diff options
author | chotaire <chotaire@chotaire.net> | 2020-01-29 12:41:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-29 12:41:02 +0100 |
commit | bc88fca2a5cfddd0f16a383a674a2ab2d41bff94 (patch) | |
tree | 52d1da7f72eff49c352967eab99c89faa8c7836e /js | |
parent | 870373b8419c4de6f99c1bc6d87ab52bd99bc89a (diff) | |
parent | b19edfc483dff008c3dcdd9a1c69c8691ffddd2c (diff) | |
download | phpvirtualbox-bc88fca2a5cfddd0f16a383a674a2ab2d41bff94.zip phpvirtualbox-bc88fca2a5cfddd0f16a383a674a2ab2d41bff94.tar.gz phpvirtualbox-bc88fca2a5cfddd0f16a383a674a2ab2d41bff94.tar.bz2 |
Merge branch 'develop' into chot-nested-virtualization
Diffstat (limited to 'js')
-rw-r--r-- | js/phpvirtualbox.js | 74 |
1 files changed, 59 insertions, 15 deletions
diff --git a/js/phpvirtualbox.js b/js/phpvirtualbox.js index 3889f53..6e9f90a 100644 --- a/js/phpvirtualbox.js +++ b/js/phpvirtualbox.js @@ -958,6 +958,11 @@ var vboxVMDetailsSections = { condition: function(d) { return !(vboxVMDetailsSections.display.rows[1].condition(d)); } + },{ + title: "Graphics Controller", + callback: function(d) { + return d['graphicsControllerType']; + } } ] }, @@ -2431,7 +2436,7 @@ var vboxMedia = { }, /** - * Return true if a medium format supports + * Return true if a medium format supports Split2G */ formatSupportsSplit: function(format) { @@ -2446,6 +2451,23 @@ var vboxMedia = { } return false; }, + + /** + * Return true if a medium format supports Discard + */ + formatSupportsDiscard: function(format) { + + var format = format.toLowerCase(); + + var mfs = $('#vboxPane').data('vboxSystemProperties').mediumFormats; + + for(var i = 0; i < mfs.length; i++) { + if(mfs[i].id.toLowerCase() == format) { + return (jQuery.inArray('Discard',mfs[i].capabilities) > -1); + } + } + return false; + }, /** * Return printable virtual hard disk variant @@ -4748,7 +4770,13 @@ var vboxStorage = { attrib: 'ignoreFlush', runningEnabled: true, }); - } + }; + if($('#vboxPane').data('vboxConfig').enableAdvancedConfig&&vboxMedia.formatSupportsDiscard(ma.medium.format)) { + opts[opts.length]={ + label: 'Support Discard (TRIM)', + attrib: 'discard', + }; + }; return opts; case 'DVD': // Host drive @@ -4839,7 +4867,7 @@ var vboxStorage = { }, SCSI: { - maxPortCount: 16, + maxPortCount: 15, maxDevicesPerPortCount: 1, driveTypes: ['dvd','disk'], types: ['LsiLogic','BusLogic'], @@ -4882,18 +4910,34 @@ var vboxStorage = { }, USB: { - maxPortCount: 8, - maxDevicesPerPortCount: 1, - types: ['USB'], - driveTypes: ['dvd','disk'], - slotName: function(p,d) { return trans('USB Port %1','VBoxGlobal', null, 'StorageSlot').replace('%1',p); }, - slots: function() { - var s = {}; - for(var i = 0; i < 8; i++) { - s[i+'-0'] = trans('USB Port %1','VBoxGlobal', null, 'StorageSlot').replace('%1',i); - } - return s; - } + maxPortCount: 8, + maxDevicesPerPortCount: 1, + types: ['USB'], + driveTypes: ['dvd','disk'], + slotName: function(p,d) { return trans('USB Port %1','VBoxGlobal', null, 'StorageSlot').replace('%1',p); }, + slots: function() { + var s = {}; + for(var i = 0; i < 8; i++) { + s[i+'-0'] = trans('USB Port %1','VBoxGlobal', null, 'StorageSlot').replace('%1',i); + } + return s; + } + }, + + PCIe: { + maxPortCount: 255, + maxDevicesPerPortCount: 1, + types: ['NVMe'], + driveTypes: ['disk'], + slotName: function(p,d) { return trans('NVMe Port %1','VBoxGlobal', null, 'StorageSlot').replace('%1',p); }, + slots: function() { + var s = {}; + for(var i = 0; i < 8; i++) { + s[i+'-0'] = trans('NVMe Port %1','VBoxGlobal', null, 'StorageSlot').replace('%1',i); + } + return s; + }, + displayInherit: 'IDE' } }; |