Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update for VirtualBox 3.1.

git-svn-id: http://vboxweb.googlecode.com/svn/trunk@90 729376a8-6c6b-11de-afdd-bb9f892af8c1
  • Loading branch information...
commit d49bf4a8841bc662184bfd21d53c993efa1dd256 1 parent e678762
vboxweb authored
Showing with 2,755 additions and 2,418 deletions.
  1. +47 −42 VBoxWebSrv.py
  2. +2,538 −2,110 www/jswrapper/VirtualBox.xidl
  3. BIN  www/static/images/vbox/attachment_16px.png
  4. BIN  www/static/images/vbox/attachment_add_16px.png
  5. BIN  www/static/images/vbox/attachment_add_disabled_16px.png
  6. BIN  www/static/images/vbox/attachment_disabled_16px.png
  7. BIN  www/static/images/vbox/attachment_remove_16px.png
  8. BIN  www/static/images/vbox/attachment_remove_disabled_16px.png
  9. BIN  www/static/images/vbox/cd_16px.png
  10. BIN  www/static/images/vbox/cd_add_16px.png
  11. BIN  www/static/images/vbox/cd_add_disabled_16px.png
  12. BIN  www/static/images/vbox/cd_disabled_16px.png
  13. BIN  www/static/images/vbox/cd_read_16px.png
  14. BIN  www/static/images/vbox/cd_unmount_16px.png
  15. BIN  www/static/images/vbox/cd_unmount_dis_16px.png
  16. BIN  www/static/images/vbox/cd_write_16px.png
  17. BIN  www/static/images/vbox/controller_add_16px.png
  18. BIN  www/static/images/vbox/controller_add_disabled_16px.png
  19. BIN  www/static/images/vbox/controller_remove_16px.png
  20. BIN  www/static/images/vbox/controller_remove_disabled_16px.png
  21. BIN  www/static/images/vbox/delete_snapshot_16px.png
  22. BIN  www/static/images/vbox/delete_snapshot_22px.png
  23. BIN  www/static/images/vbox/delete_snapshot_dis_16px.png
  24. BIN  www/static/images/vbox/delete_snapshot_dis_22px.png
  25. BIN  www/static/images/vbox/fd_16px.png
  26. BIN  www/static/images/vbox/fd_add_16px.png
  27. BIN  www/static/images/vbox/fd_add_disabled_16px.png
  28. BIN  www/static/images/vbox/fd_disabled_16px.png
  29. BIN  www/static/images/vbox/fd_read_16px.png
  30. BIN  www/static/images/vbox/fd_unmount_16px.png
  31. BIN  www/static/images/vbox/fd_unmount_dis_16px.png
  32. BIN  www/static/images/vbox/fd_write_16px.png
  33. BIN  www/static/images/vbox/floppy_16px.png
  34. BIN  www/static/images/vbox/floppy_add_16px.png
  35. BIN  www/static/images/vbox/floppy_add_disabled_16px.png
  36. BIN  www/static/images/vbox/floppy_collapse_16px.png
  37. BIN  www/static/images/vbox/floppy_expand_16px.png
  38. BIN  www/static/images/vbox/hd_16px.png
  39. BIN  www/static/images/vbox/hd_add_16px.png
  40. BIN  www/static/images/vbox/hd_add_22px.png
  41. BIN  www/static/images/vbox/hd_add_disabled_16px.png
  42. BIN  www/static/images/vbox/hd_add_disabled_22px.png
  43. BIN  www/static/images/vbox/hd_disabled_16px.png
  44. BIN  www/static/images/vbox/hd_new_16px.png
  45. BIN  www/static/images/vbox/hd_new_22px.png
  46. BIN  www/static/images/vbox/hd_new_disabled_16px.png
  47. BIN  www/static/images/vbox/hd_new_disabled_22px.png
  48. BIN  www/static/images/vbox/hd_read_16px.png
  49. BIN  www/static/images/vbox/hd_release_16px.png
  50. BIN  www/static/images/vbox/hd_release_22px.png
  51. BIN  www/static/images/vbox/hd_release_disabled_16px.png
  52. BIN  www/static/images/vbox/hd_release_disabled_22px.png
  53. BIN  www/static/images/vbox/hd_remove_16px.png
  54. BIN  www/static/images/vbox/hd_remove_22px.png
  55. BIN  www/static/images/vbox/hd_remove_disabled_16px.png
  56. BIN  www/static/images/vbox/hd_remove_disabled_22px.png
  57. BIN  www/static/images/vbox/hd_write_16px.png
  58. BIN  www/static/images/vbox/ide_16px.png
  59. BIN  www/static/images/vbox/ide_add_16px.png
  60. BIN  www/static/images/vbox/ide_add_disabled_16px.png
  61. BIN  www/static/images/vbox/ide_collapse_16px.png
  62. BIN  www/static/images/vbox/ide_expand_16px.png
  63. BIN  www/static/images/vbox/monitor.png
  64. BIN  www/static/images/vbox/sata_16px.png
  65. BIN  www/static/images/vbox/sata_add_16px.png
  66. BIN  www/static/images/vbox/sata_add_disabled_16px.png
  67. BIN  www/static/images/vbox/sata_collapse_16px.png
  68. BIN  www/static/images/vbox/sata_expand_16px.png
  69. BIN  www/static/images/vbox/scsi_16px.png
  70. BIN  www/static/images/vbox/scsi_add_16px.png
  71. BIN  www/static/images/vbox/scsi_add_disabled_16px.png
  72. BIN  www/static/images/vbox/scsi_collapse_16px.png
  73. BIN  www/static/images/vbox/scsi_expand_16px.png
  74. BIN  www/static/images/vbox/state_restoring_16px.png
  75. BIN  www/static/images/vbox/state_saved_16px.png
  76. BIN  www/static/images/vbox/state_saving_16px.png
  77. +148 −218 www/static/js/VirtualBox_Main.js
  78. +17 −43 www/static/js/vboxTabWidget.js
  79. +5 −5 www/templates/index.html
View
89 VBoxWebSrv.py
@@ -113,10 +113,9 @@ def __init__(self, ctx, machine):
# the actual VRDP port has to be read from the extra data
port = machine.getExtraData("VBoxInternal2/VRDPBindPort")
if port and port != "invalid":
- self.port = port
+ self.ports = port
else:
- self.port = vrdp.port
-
+ self.ports = vrdp.ports
self.netAddress = vrdp.netAddress
if not self.netAddress:
self.netAddress = ctx['serverAdr']
@@ -138,19 +137,20 @@ def __init__(self, guestOSType):
self.recommendedVRAM = guestOSType.recommendedVRAM
self.recommendedHDD = guestOSType.recommendedHDD
-class jsHardDiskAttachment:
+class jsStorageController:
+ def __init__(self, controller):
+ self.name = controller.name
+
+class jsMedium:
+ def __init__(self, medium):
+ self.description = medium.description
+
+class jsMediumAttachment:
def __init__(self, attachment):
- self.hardDisk = jsHardDisk(attachment.hardDisk)
self.controller = attachment.controller
- self.port = attachment.port
self.device = attachment.device
-
-class jsHardDisk:
- def __init__(self, hardDisk):
- self.id = hardDisk.id
- self.name = hardDisk.name
- self.type = hardDisk.type
- self.logicalSize = hardDisk.logicalSize
+ self.type = 0
+ self.port = attachment.port
class jsMachine:
def __init__(self, ctx, machine):
@@ -164,16 +164,21 @@ def __init__(self, ctx, machine):
self.memorySize = machine.memorySize
self.VRAMSize = machine.VRAMSize
self.accelerate3DEnabled = machine.accelerate3DEnabled
- self.HWVirtExEnabled = machine.HWVirtExEnabled
- self.HWVirtExNestedPagingEnabled = machine.HWVirtExNestedPagingEnabled
+ self.HWVirtExEnabled = machine.getHWVirtExProperty(ctx['global'].constants.HWVirtExPropertyType_Enabled)
+ self.HWVirtExNestedPagingEnabled = machine.getHWVirtExProperty(ctx['global'].constants.HWVirtExPropertyType_NestedPaging)
self.VRDPServer = jsVRDPServer(ctx, machine)
self.state = machine.state
self.sessState = machine.sessionState
- self.hardDiskAttachments = []
- arrAtt = ctx['global'].getArray(machine, 'hardDiskAttachments')
+ self.storageControllers = []
+ arrStorageControllers = ctx['global'].getArray(machine, 'storageControllers')
+ for i in arrStorageControllers:
+ self.storageControllers.append(jsStorageController(i))
+
+ self.mediumAttachments = []
+ arrAtt = ctx['global'].getArray(machine, 'mediumAttachments')
for i in arrAtt:
- self.hardDiskAttachments.append(jsHardDiskAttachment(i))
+ self.mediumAttachments.append(jsMediumAttachment(i))
maxBootPosition = ctx['vb'].systemProperties.maxBootPosition
for i in range(1, maxBootPosition + 1):
@@ -513,7 +518,7 @@ def index(self):
file = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'www/templates/index.html')
return serve_file(file, content_type='text/html')
-g_virtualBoxManager = vboxapi.VirtualBoxManager(None, None)
+g_vboxManager = vboxapi.VirtualBoxManager(None, None)
g_threadPool = {}
g_logLevel = 99
g_sessionNum = 0
@@ -527,27 +532,27 @@ def log(level, str):
print str
def perThreadInit(threadIndex):
- g_virtualBoxManager.initPerThread()
+ g_vboxManager.initPerThread()
def perThreadDeinit(threadIndex):
- g_virtualBoxManager.deinitPerThread()
+ g_vboxManager.deinitPerThread()
def onShutdown():
global g_serverTerminated
g_serverTerminated = True
- if hasattr(g_virtualBoxManager, 'interruptWaitEvents'):
- g_virtualBoxManager.interruptWaitEvents()
+ if hasattr(g_vboxManager, 'interruptWaitEvents'):
+ g_vboxManager.interruptWaitEvents()
return
- # For Win32, we can do that w/o g_virtualBoxManager support easily
+ # For Win32, we can do that w/o g_vboxManager support easily
if sys.platform == 'win32':
from win32api import PostThreadMessage
from win32con import WM_USER
- PostThreadMessage(g_virtualBoxManager.platform.tid, WM_USER, None, None)
+ PostThreadMessage(g_vboxManager.platform.tid, WM_USER, None, None)
def main(argv = sys.argv):
- print "VirtualBox Version: %s, Platform: %s" %(g_virtualBoxManager.vbox.version, sys.platform)
+ print "VirtualBox Version: %s, Platform: %s" %(g_vboxManager.vbox.version, sys.platform)
bRDPWebForceUpdate = False
@@ -559,14 +564,14 @@ def main(argv = sys.argv):
return
h = hashlib.new('sha1')
h.update(argv[3])
- g_virtualBoxManager.vbox.setExtraData(
+ g_vboxManager.vbox.setExtraData(
"vboxweb/users/" + argv[2], h.hexdigest())
return
elif argv[1] == "deluser":
if len(argv) <> 3:
print "Syntax: " + argv[0] + " deluser <username>"
return
- g_virtualBoxManager.vbox.setExtraData("vboxweb/users/" + argv[2], "")
+ g_vboxManager.vbox.setExtraData("vboxweb/users/" + argv[2], "")
return
elif argv[1] == "rdpweb":
if len(argv) <> 3:
@@ -579,13 +584,13 @@ def main(argv = sys.argv):
adduser <username> <password>
-Add a new user to VBoxWeb
-
+
deluser <username>
-Delete an existing user
-
+
rdpweb update
-Update the embeddded flash RDP viewer
-
+
help
-Display this message
"""
@@ -614,12 +619,12 @@ def main(argv = sys.argv):
s.close
# Init config
- ctx = {'global':g_virtualBoxManager,
- 'mgr':g_virtualBoxManager.mgr,
- 'vb':g_virtualBoxManager.vbox,
- 'ifaces':g_virtualBoxManager.constants,
- 'remote':g_virtualBoxManager.remote,
- 'type':g_virtualBoxManager.type,
+ ctx = {'global':g_vboxManager,
+ 'mgr':g_vboxManager.mgr,
+ 'vb':g_vboxManager.vbox,
+ 'ifaces':g_vboxManager.constants,
+ 'remote':g_vboxManager.remote,
+ 'type':g_vboxManager.type,
'serverAdr':serverAdr,
'serverPort':serverPort
}
@@ -644,14 +649,14 @@ def main(argv = sys.argv):
if sys.platform == 'darwin':
while not g_serverTerminated:
# We have no timed waits on Darwin, and waitForEvents(-1)
- # blocks signal delivery for some reasons, thus we cannot send
- # wait interrupt notifcation.
+ # blocks signal delivery for some reasons, thus we cannot send
+ # wait interrupt notifcation.
# Instead we cheat a bit and just sleep() between events
- g_virtualBoxManager.waitForEvents(0)
- time.sleep(0.3)
+ g_vboxManager.waitForEvents(0)
+ time.sleep(0.3)
else:
while not g_serverTerminated:
- g_virtualBoxManager.waitForEvents(-1)
+ g_vboxManager.waitForEvents(-1)
except KeyboardInterrupt:
pass
View
4,648 www/jswrapper/VirtualBox.xidl
2,538 additions, 2,110 deletions not shown
View
BIN  www/static/images/vbox/attachment_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/attachment_add_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/attachment_add_disabled_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/attachment_disabled_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/attachment_remove_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/attachment_remove_disabled_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/cd_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/cd_add_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/cd_add_disabled_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/cd_disabled_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/cd_read_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/cd_unmount_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/cd_unmount_dis_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/cd_write_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/controller_add_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/controller_add_disabled_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/controller_remove_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/controller_remove_disabled_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/delete_snapshot_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/delete_snapshot_22px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/delete_snapshot_dis_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/delete_snapshot_dis_22px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/fd_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/fd_add_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/fd_add_disabled_16px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/static/images/vbox/fd_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/fd_read_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/fd_unmount_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/fd_unmount_dis_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/fd_write_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/floppy_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/floppy_add_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/floppy_add_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/floppy_collapse_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/floppy_expand_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_add_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_add_22px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_add_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_add_disabled_22px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_new_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_new_22px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_new_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_new_disabled_22px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_read_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_release_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_release_22px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_release_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_release_disabled_22px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_remove_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_remove_22px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_remove_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_remove_disabled_22px.png
Diff not rendered
View
BIN  www/static/images/vbox/hd_write_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/ide_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/ide_add_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/ide_add_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/ide_collapse_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/ide_expand_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/monitor.png
Diff not rendered
View
BIN  www/static/images/vbox/sata_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/sata_add_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/sata_add_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/sata_collapse_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/sata_expand_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/scsi_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/scsi_add_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/scsi_add_disabled_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/scsi_collapse_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/scsi_expand_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/state_restoring_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/state_saved_16px.png
Diff not rendered
View
BIN  www/static/images/vbox/state_saving_16px.png
Diff not rendered
View
366 www/static/js/VirtualBox_Main.js
@@ -59,6 +59,21 @@ var vboxIVirtualBoxErrorInfoImpl = Class.create(
});
+var vboxILocalOwnerImpl = Class.create(
+{
+ initialize: function(jsonObject)
+ {
+ this.jsonObject = jsonObject;
+ },
+
+
+ loadSettingsJSON: function(jsonObject)
+ {
+ this.jsonObject = jsonObject;
+ }
+
+});
+
var vboxIVirtualBoxCallbackImpl = Class.create(
{
initialize: function(jsonObject)
@@ -139,14 +154,6 @@ var vboxIVirtualBoxImpl = Class.create(
{
return this.jsonObject.settingsFilePath;
},
- getSettingsFileVersion: function()
- {
- return this.jsonObject.settingsFileVersion;
- },
- getSettingsFormatVersion: function()
- {
- return this.jsonObject.settingsFormatVersion;
- },
getHost: function()
{
return this.jsonObject.host;
@@ -373,6 +380,10 @@ var vboxIMachineImpl = Class.create(
{
return this.jsonObject.HardwareVersion;
},
+ getHardwareUUID: function()
+ {
+ return this.jsonObject.hardwareUUID;
+ },
getCPUCount: function()
{
return this.jsonObject.CPUCount;
@@ -397,6 +408,10 @@ var vboxIMachineImpl = Class.create(
{
return this.jsonObject.accelerate3DEnabled;
},
+ getAccelerate2DVideoEnabled: function()
+ {
+ return this.jsonObject.accelerate2DVideoEnabled;
+ },
getMonitorCount: function()
{
return this.jsonObject.monitorCount;
@@ -405,21 +420,9 @@ var vboxIMachineImpl = Class.create(
{
return this.jsonObject.BIOSSettings;
},
- getHWVirtExEnabled: function()
- {
- return this.jsonObject.HWVirtExEnabled;
- },
- getHWVirtExNestedPagingEnabled: function()
- {
- return this.jsonObject.HWVirtExNestedPagingEnabled;
- },
- getHWVirtExVPIDEnabled: function()
+ getFirmwareType: function()
{
- return this.jsonObject.HWVirtExVPIDEnabled;
- },
- getPAEEnabled: function()
- {
- return this.jsonObject.PAEEnabled;
+ return this.jsonObject.firmwareType;
},
getSnapshotFolder: function()
{
@@ -429,17 +432,9 @@ var vboxIMachineImpl = Class.create(
{
return this.jsonObject.VRDPServer;
},
- getHardDiskAttachments: function()
- {
- return this.jsonObject.hardDiskAttachments;
- },
- getDVDDrive: function()
- {
- return this.jsonObject.DVDDrive;
- },
- getFloppyDrive: function()
+ getMediumAttachments: function()
{
- return this.jsonObject.floppyDrive;
+ return this.jsonObject.mediumAttachments;
},
getUSBController: function()
{
@@ -457,10 +452,6 @@ var vboxIMachineImpl = Class.create(
{
return this.jsonObject.settingsFilePath;
},
- getSettingsFileVersion: function()
- {
- return this.jsonObject.settingsFileVersion;
- },
getSettingsModified: function()
{
return this.jsonObject.settingsModified;
@@ -517,6 +508,22 @@ var vboxIMachineImpl = Class.create(
{
return this.jsonObject.guestPropertyNotificationPatterns;
},
+ getTeleporterEnabled: function()
+ {
+ return this.jsonObject.teleporterEnabled;
+ },
+ getTeleporterPort: function()
+ {
+ return this.jsonObject.teleporterPort;
+ },
+ getTeleporterAddress: function()
+ {
+ return this.jsonObject.teleporterAddress;
+ },
+ getTeleporterPassword: function()
+ {
+ return this.jsonObject.teleporterPassword;
+ },
loadSettingsJSON: function(jsonObject)
@@ -551,6 +558,10 @@ var vboxIRemoteDisplayInfoImpl = Class.create(
{
return this.jsonObject.active;
},
+ getPort: function()
+ {
+ return this.jsonObject.port;
+ },
getNumberOfClients: function()
{
return this.jsonObject.numberOfClients;
@@ -644,8 +655,7 @@ var vboxIConsoleImpl = Class.create(
},
getDebugger: function()
{
-// debugger is a reserved keyword, Safari chokes on it, have to fix the generator
-// return this.jsonObject.debugger;
+ return this.jsonObject.debugger;
},
getUSBDevices: function()
{
@@ -672,60 +682,6 @@ var vboxIConsoleImpl = Class.create(
});
-var vboxIHostDVDDriveImpl = Class.create(
-{
- initialize: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- },
- getName: function()
- {
- return this.jsonObject.name;
- },
- getDescription: function()
- {
- return this.jsonObject.description;
- },
- getUdi: function()
- {
- return this.jsonObject.udi;
- },
-
-
- loadSettingsJSON: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- }
-
-});
-
-var vboxIHostFloppyDriveImpl = Class.create(
-{
- initialize: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- },
- getName: function()
- {
- return this.jsonObject.name;
- },
- getDescription: function()
- {
- return this.jsonObject.description;
- },
- getUdi: function()
- {
- return this.jsonObject.udi;
- },
-
-
- loadSettingsJSON: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- }
-
-});
-
var vboxIHostNetworkInterfaceImpl = Class.create(
{
initialize: function(jsonObject)
@@ -918,9 +874,9 @@ var vboxISystemPropertiesImpl = Class.create(
{
return this.jsonObject.defaultHardDiskFolder;
},
- getHardDiskFormats: function()
+ getMediumFormats: function()
{
- return this.jsonObject.hardDiskFormats;
+ return this.jsonObject.mediumFormats;
},
getDefaultHardDiskFormat: function()
{
@@ -1115,6 +1071,10 @@ var vboxIProgressImpl = Class.create(
{
return this.jsonObject.operationPercent;
},
+ getTimeout: function()
+ {
+ return this.jsonObject.timeout;
+ },
loadSettingsJSON: function(jsonObject)
@@ -1171,43 +1131,35 @@ var vboxISnapshotImpl = Class.create(
});
-var vboxIMediumImpl = Class.create(
+var vboxIMediumAttachmentImpl = Class.create(
{
initialize: function(jsonObject)
{
this.jsonObject = jsonObject;
},
- getId: function()
- {
- return this.jsonObject.id;
- },
- getDescription: function()
- {
- return this.jsonObject.description;
- },
- getState: function()
+ getMedium: function()
{
- return this.jsonObject.state;
+ return this.jsonObject.medium;
},
- getLocation: function()
+ getController: function()
{
- return this.jsonObject.location;
+ return this.jsonObject.controller;
},
- getName: function()
+ getPort: function()
{
- return this.jsonObject.name;
+ return this.jsonObject.port;
},
- getSize: function()
+ getDevice: function()
{
- return this.jsonObject.size;
+ return this.jsonObject.device;
},
- getLastAccessError: function()
+ getType: function()
{
- return this.jsonObject.lastAccessError;
+ return this.jsonObject.type;
},
- getMachineIds: function()
+ getPassthrough: function()
{
- return this.jsonObject.machineIds;
+ return this.jsonObject.passthrough;
},
@@ -1218,44 +1170,45 @@ var vboxIMediumImpl = Class.create(
});
-var vboxIHardDiskAttachmentImpl = Class.create(
+var vboxIMediumImpl = Class.create(
{
initialize: function(jsonObject)
{
this.jsonObject = jsonObject;
},
- getHardDisk: function()
+ getId: function()
{
- return this.jsonObject.hardDisk;
+ return this.jsonObject.id;
},
- getController: function()
+ getDescription: function()
{
- return this.jsonObject.controller;
+ return this.jsonObject.description;
},
- getPort: function()
+ getState: function()
{
- return this.jsonObject.port;
+ return this.jsonObject.state;
},
- getDevice: function()
+ getLocation: function()
{
- return this.jsonObject.device;
+ return this.jsonObject.location;
},
-
-
- loadSettingsJSON: function(jsonObject)
+ getName: function()
{
- this.jsonObject = jsonObject;
- }
-
-});
-
-var vboxIHardDiskImpl = Class.create(vboxIMediumImpl,
-{
- initialize: function(jsonObject)
+ return this.jsonObject.name;
+ },
+ getDeviceType: function()
{
- this.jsonObject = jsonObject;
+ return this.jsonObject.deviceType;
+ },
+ getHostDrive: function()
+ {
+ return this.jsonObject.hostDrive;
},
- getFormat: function()
+ getSize: function()
+ {
+ return this.jsonObject.size;
+ },
+ getFormat: function()
{
return this.jsonObject.format;
},
@@ -1271,9 +1224,9 @@ var vboxIHardDiskImpl = Class.create(vboxIMediumImpl,
{
return this.jsonObject.children;
},
- getRoot: function()
+ getBase: function()
{
- return this.jsonObject.root;
+ return this.jsonObject.base;
},
getReadOnly: function()
{
@@ -1287,6 +1240,14 @@ var vboxIHardDiskImpl = Class.create(vboxIMediumImpl,
{
return this.jsonObject.autoReset;
},
+ getLastAccessError: function()
+ {
+ return this.jsonObject.lastAccessError;
+ },
+ getMachineIds: function()
+ {
+ return this.jsonObject.machineIds;
+ },
loadSettingsJSON: function(jsonObject)
@@ -1296,7 +1257,7 @@ var vboxIHardDiskImpl = Class.create(vboxIMediumImpl,
});
-var vboxIHardDiskFormatImpl = Class.create(
+var vboxIMediumFormatImpl = Class.create(
{
initialize: function(jsonObject)
{
@@ -1327,82 +1288,6 @@ var vboxIHardDiskFormatImpl = Class.create(
});
-var vboxIFloppyImageImpl = Class.create(vboxIMediumImpl,
-{
- initialize: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- },
-
-
- loadSettingsJSON: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- }
-
-});
-
-var vboxIDVDImageImpl = Class.create(vboxIMediumImpl,
-{
- initialize: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- },
-
-
- loadSettingsJSON: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- }
-
-});
-
-var vboxIDVDDriveImpl = Class.create(
-{
- initialize: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- },
- getState: function()
- {
- return this.jsonObject.state;
- },
- getPassthrough: function()
- {
- return this.jsonObject.passthrough;
- },
-
-
- loadSettingsJSON: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- }
-
-});
-
-var vboxIFloppyDriveImpl = Class.create(
-{
- initialize: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- },
- getEnabled: function()
- {
- return this.jsonObject.enabled;
- },
- getState: function()
- {
- return this.jsonObject.state;
- },
-
-
- loadSettingsJSON: function(jsonObject)
- {
- this.jsonObject = jsonObject;
- }
-
-});
-
var vboxIKeyboardImpl = Class.create(
{
initialize: function(jsonObject)
@@ -1982,9 +1867,9 @@ var vboxIVRDPServerImpl = Class.create(
{
return this.jsonObject.enabled;
},
- getPort: function()
+ getPorts: function()
{
- return this.jsonObject.port;
+ return this.jsonObject.ports;
},
getNetAddress: function()
{
@@ -2269,3 +2154,48 @@ var vboxISessionImpl = Class.create(
});
+var vboxILocalOwnerImpl = Class.create(
+{
+ initialize: function(jsonObject)
+ {
+ this.jsonObject = jsonObject;
+ },
+
+
+ loadSettingsJSON: function(jsonObject)
+ {
+ this.jsonObject = jsonObject;
+ }
+
+});
+
+var vboxIVirtualBoxCallbackImpl = Class.create(
+{
+ initialize: function(jsonObject)
+ {
+ this.jsonObject = jsonObject;
+ },
+
+
+ loadSettingsJSON: function(jsonObject)
+ {
+ this.jsonObject = jsonObject;
+ }
+
+});
+
+var vboxIConsoleCallbackImpl = Class.create(
+{
+ initialize: function(jsonObject)
+ {
+ this.jsonObject = jsonObject;
+ },
+
+
+ loadSettingsJSON: function(jsonObject)
+ {
+ this.jsonObject = jsonObject;
+ }
+
+});
+
View
60 www/static/js/vboxTabWidget.js
@@ -135,9 +135,7 @@ var vboxTabWidget = Class.create(
strBootOrder = strBootOrder + ", " + vbGlobal.deviceType(bootOrder[i]);
}
- var vrdpServer = new vboxIVRDPServerImpl(mach.getVRDPServer());
var guestOSType = vbGlobal.virtualBox().getGuestOSTypeById(mach.getOSTypeId());
- var hardDiskAttachments = mach.getHardDiskAttachments();
jQuery("#tab-details-vm-general-name-val").text(curItem.name());
jQuery("#tab-details-vm-general-osname-val").text(guestOSType.getDescription());
@@ -145,57 +143,33 @@ var vboxTabWidget = Class.create(
jQuery("#tab-details-vm-system-ram-val").text(mach.getMemorySize() + tr(" MB"));
jQuery("#tab-details-vm-system-cpu-val").text(mach.getCPUCount());
jQuery("#tab-details-vm-system-bootorder-val").text(strBootOrder);
- jQuery("#tab-details-vm-system-hwvirt-val").text(mach.getHWVirtExEnabled() ? tr("Enabled") : tr("Disabled"));
- jQuery("#tab-details-vm-system-nestedp-val").text(mach.getHWVirtExNestedPagingEnabled() ? tr("Enabled") : tr("Disabled"));
+ jQuery("#tab-details-vm-system-hwvirt-val").text(mach.jsonObject.HWVirtExEnabled ? tr("Enabled") : tr("Disabled")); /* Hack alert! */
+ jQuery("#tab-details-vm-system-nestedp-val").text(mach.jsonObject.HWVirtExNestedPagingEnabled ? tr("Enabled") : tr("Disabled")); /* Hack alert! */
+ /* Display */
jQuery("#tab-details-vm-display-videomem-val").text(mach.getVRAMSize() + tr(" MB"));
jQuery("#tab-details-vm-display-3daccel-val").text(mach.getAccelerate3DEnabled() ? tr("Enabled") : tr("Disabled"));
+
+ var vrdpServer = new vboxIVRDPServerImpl(mach.getVRDPServer());
if (vrdpServer.getEnabled())
- jQuery("#tab-details-vm-display-rdpport-val").text(tr("Enabled") + ", " + tr("Port ") + vrdpServer.getPort());
+ jQuery("#tab-details-vm-display-rdpport-val").text(tr("Enabled") + ", " + tr("Port(s) ") + vrdpServer.getPorts());
else
- jQuery("#tab-details-vm-display-rdpport-val").text(tr("Disabled") + " (" + tr("Port ") + vrdpServer.getPort() + ")");
+ jQuery("#tab-details-vm-display-rdpport-val").text(tr("Disabled") + " (" + tr("Port(s) ") + vrdpServer.getPorts() + ")");
- jQuery("li.harddisks-list-item").remove();
- for (i = 0; i < hardDiskAttachments.length; i++)
+ /* Storage */
+ jQuery("li.storage-list-item").remove();
+ var storageControllers = mach.getStorageControllers();
+ for (i = 0; i < storageControllers.length; i++)
{
- attachment = new vboxIHardDiskAttachmentImpl(hardDiskAttachments[i]);
- hardDisk = new vboxIHardDiskImpl(attachment.getHardDisk());
- if (attachment.getController() === "IDE")
- {
- port = (attachment.getPort() === 0) ? tr("Primary") : tr("Secondary");
- device = (attachment.getDevice() === 0) ? tr("Master") : tr("Slave");
- }
- else if (attachment.getController() === "SATA")
- {
- port = tr("Port ") + attachment.getPort();
- device = "";
- }
- else if (attachment.getController() === "SCSI")
- {
- port = tr("Port ") + attachment.getPort();
- device = "";
- }
- else
- {
- port = attachment.getPort();
- device = attachment.getDevice();
- }
-
- if (device != "")
- device = ' ' + device;
- strHardDisk = hardDisk.getName() + " (" + vbGlobal.hardDiskType(hardDisk.getType()) +
- ", " + (hardDisk.getLogicalSize() / 1024) + " GB)";
- strListItem = '<div class="tab-details-vm-attribute">' +
- attachment.getController() + " " + port + device + ":" +
- '</div><div class="tab-details-vm-value">' + strHardDisk +
- '</div><div style="clear: both"></div>';
- jQuery("#tab-details-vm-harddisks-list").append('<li class="harddisks-list-item">' + strListItem + "</li>");
+ var controller = storageControllers[i];
+ /** @todo implement medium <-> storage controller enumeration here */
+ jQuery("#tab-details-vm-storage-list").append('<li class="storage-list-item">' + controller.name + "</li>");
}
- if (hardDiskAttachments.length <= 0)
+ if (storageControllers.length <= 0)
{
- jQuery("#tab-details-vm-harddisks-list").
- append('<li class="harddisks-list-item">' + tr("No hard disks attached") + "</li>");
+ jQuery("#tab-details-vm-storage-list").
+ append('<li class="storage-list-item">' + tr("No storage attached") + "</li>");
}
},
View
10 www/templates/index.html
@@ -386,12 +386,12 @@
</div>
</div>
- <div class="tab-section" id="tab-details-sec-vm-harddisks">
- <div id="tab-details-hdr-harddisks" class="tab-section-header">
- <img class="tab-section-hdr-icon" alt="" src="/images/vbox/hd_16px.png"/>
- <span class="tab-section-hdr-text">Hard Disks</span>
+ <div class="tab-section" id="tab-details-sec-vm-storage">
+ <div id="tab-details-hdr-storage" class="tab-section-header">
+ <img class="tab-section-hdr-icon" alt="" src="/images/vbox/attachment_16px.png"/>
+ <span class="tab-section-hdr-text">Storage</span>
</div>
- <ul id="tab-details-vm-harddisks-list" class="harddisks-list"><li/></ul>
+ <ul id="tab-details-vm-storage-list" class="storage-list"></ul>
</div>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.