configure refreh done
authorOliver Maurhart <oliver.maurhart@ait.ac.at>
Wed, 02 Apr 2014 09:47:38 +0200
changeset 1129cd4654c040b
parent 108 dec3f05b57c5
child 113 67158aad9e06
configure refreh done
OpenSecurity/bin/download_initial_image.sh
OpenSecurity/bin/initial_vm.sh
OpenSecurity/bin/opensecurity_client_restful_server.py
OpenSecurity/bin/opensecurityd.pyw
OpenSecurity/bin/ui/about_dialog.py
OpenSecurity/bin/ui/configure_dialog.py
     1.1 --- a/OpenSecurity/bin/download_initial_image.sh	Tue Apr 01 16:16:54 2014 +0200
     1.2 +++ b/OpenSecurity/bin/download_initial_image.sh	Wed Apr 02 09:47:38 2014 +0200
     1.3 @@ -3,7 +3,7 @@
     1.4  # ------------------------------------------------------------
     1.5  # download initial VM for
     1.6  #
     1.7 -#       OpenSecurity V0.2
     1.8 +#       OpenSecurity V0.2.4
     1.9  #
    1.10  # (C)opyright 2014, AIT Austrian Instiitute of Technology
    1.11  # ------------------------------------------------------------
     2.1 --- a/OpenSecurity/bin/initial_vm.sh	Tue Apr 01 16:16:54 2014 +0200
     2.2 +++ b/OpenSecurity/bin/initial_vm.sh	Wed Apr 02 09:47:38 2014 +0200
     2.3 @@ -3,7 +3,7 @@
     2.4  # ------------------------------------------------------------
     2.5  # install the initial VM for 
     2.6  #
     2.7 -#       OpenSecurity V0.2
     2.8 +#       OpenSecurity V0.2.4
     2.9  #
    2.10  # This has been originally a Windows only BAT file.
    2.11  #
     3.1 --- a/OpenSecurity/bin/opensecurity_client_restful_server.py	Tue Apr 01 16:16:54 2014 +0200
     3.2 +++ b/OpenSecurity/bin/opensecurity_client_restful_server.py	Wed Apr 02 09:47:38 2014 +0200
     3.3 @@ -51,7 +51,7 @@
     3.4  # const
     3.5  
     3.6  
     3.7 -__version__ = "0.2"
     3.8 +__version__ = "0.2.4"
     3.9  
    3.10  
    3.11  """All the URLs we know mapping to class handler"""
     4.1 --- a/OpenSecurity/bin/opensecurityd.pyw	Tue Apr 01 16:16:54 2014 +0200
     4.2 +++ b/OpenSecurity/bin/opensecurityd.pyw	Wed Apr 02 09:47:38 2014 +0200
     4.3 @@ -50,7 +50,7 @@
     4.4  # ------------------------------------------------------------
     4.5  # const
     4.6  
     4.7 -__version__ = "0.2.3"
     4.8 +__version__ = "0.2.4"
     4.9  
    4.10  
    4.11  """All the URLs we know mapping to class handler"""
    4.12 @@ -182,7 +182,7 @@
    4.13              res += '"path": "' + t.replace('\\', '\\\\') + '", '
    4.14              res += '"size": ' + str(os.path.getsize(t)) + ', ' 
    4.15              res += '"date": ' + str(os.path.getmtime(t)) + ''
    4.16 -            res += '}'
    4.17 +            res += '}}'
    4.18          return res
    4.19  
    4.20  
    4.21 @@ -386,7 +386,7 @@
    4.22      def GET(self):
    4.23          log_call(web.ctx.environ)
    4.24          global gvm_mgr
    4.25 -        return gvm_mgr.listVM() 
    4.26 +        return str(gvm_mgr.listVM()).replace("'",'"')
    4.27              
    4.28  
    4.29  def log_call(web_environ):
     5.1 --- a/OpenSecurity/bin/ui/about_dialog.py	Tue Apr 01 16:16:54 2014 +0200
     5.2 +++ b/OpenSecurity/bin/ui/about_dialog.py	Wed Apr 02 09:47:38 2014 +0200
     5.3 @@ -63,7 +63,7 @@
     5.4  
     5.5  <h1 class="header">
     5.6      <a href="http://www.opensecurity.at"><img src=":/opensecurity/gfx/opensecurity_logo.jpg"/></a><br/><br/>
     5.7 -    OpenSecurity V0.2.3
     5.8 +    OpenSecurity V0.2.4
     5.9  </h1>
    5.10  
    5.11  <div class="about_text" align="justify">
     6.1 --- a/OpenSecurity/bin/ui/configure_dialog.py	Tue Apr 01 16:16:54 2014 +0200
     6.2 +++ b/OpenSecurity/bin/ui/configure_dialog.py	Wed Apr 02 09:47:38 2014 +0200
     6.3 @@ -34,6 +34,7 @@
     6.4  
     6.5  import json
     6.6  import sys
     6.7 +import time
     6.8  import urllib2
     6.9  
    6.10  from PyQt4 import QtCore
    6.11 @@ -103,18 +104,36 @@
    6.12          self.ui.edtVersion.setText('<not evaluated yet>')
    6.13          self.ui.edtStatus.setEnabled(False);
    6.14          self.ui.edtVersion.setEnabled(False);
    6.15 +        self.ui.tvTemplate.clear()
    6.16 +        self.ui.tvMachines.clear()
    6.17  
    6.18          try:
    6.19 +
    6.20 +            # get general server info
    6.21              j = json.load(urllib2.urlopen('http://127.0.0.1:8080'))
    6.22              self.ui.edtStatus.setText('running')
    6.23              self.ui.edtStatus.setEnabled(True)
    6.24              self.ui.edtVersion.setText(j['os_server']['version'])
    6.25              self.ui.edtVersion.setEnabled(True)
    6.26 +
    6.27 +            # get initial template info
    6.28 +            j = json.load(urllib2.urlopen('http://127.0.0.1:8080/initial_image'))
    6.29 +            i = QtGui.QTreeWidgetItem(self.ui.tvTemplate)
    6.30 +            i.setText(0, j['initial_template']['name'])
    6.31 +            i.setText(1, QtCore.QDateTime.fromTime_t(int(j['initial_template']['date'])).toString(QtCore.Qt.SystemLocaleShortDate))
    6.32 +            i.setText(2, str(j['initial_template']['size']))
    6.33 +            i.setText(3, j['initial_template']['path'])
    6.34              
    6.35 +            # get machines
    6.36 +            j = json.load(urllib2.urlopen('http://127.0.0.1:8080/vms'))
    6.37 +            for m in j:
    6.38 +                i = QtGui.QTreeWidgetItem(self.ui.tvMachines)
    6.39 +                i.setText(0, m)
    6.40 +
    6.41          except:
    6.42              pass
    6.43  
    6.44 -
    6.45 + 
    6.46  if __name__ == "__main__":
    6.47          a = QtGui.QApplication(sys.argv)
    6.48          d = ConfigureDialog()