]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/Utils.js
ui: dc/options: fix renderer
[pve-manager.git] / www / manager6 / Utils.js
index 8631a67c878390b532cb3ad1f20d796947cbe3dd..dbd0cef86577195726f53678d910340bccd96e67 100644 (file)
@@ -13,7 +13,7 @@ Ext.define('PVE.Utils', {
 
     toolkit: undefined, // (extjs|touch), set inside Toolkit.js
 
-    bus_match: /^(ide|sata|virtio|scsi)\d+$/,
+    bus_match: /^(ide|sata|virtio|scsi)(\d+)$/,
 
     log_severity_hash: {
        0: "panic",
@@ -43,6 +43,7 @@ Ext.define('PVE.Utils', {
            { desc: '2.4 Kernel', val: 'l24' },
        ],
        'Microsoft Windows': [
+           { desc: '11/2022', val: 'win11' },
            { desc: '10/2016/2019', val: 'win10' },
            { desc: '8.x/2012/2012r2', val: 'win8' },
            { desc: '7/2008r2', val: 'win7' },
@@ -504,10 +505,7 @@ Ext.define('PVE.Utils', {
            return PVE.Parser.printPropertyString(value);
        }
     },
-    render_as_property_string: function(value) {
-       return !value ? Proxmox.Utils.defaultText
-           : PVE.Parser.printPropertyString(value);
-    },
+    render_as_property_string: v => !v ? Proxmox.Utils.defaultText : PVE.Parser.printPropertyString(v),
 
     render_scsihw: function(value) {
        if (!value) {
@@ -793,7 +791,7 @@ Ext.define('PVE.Utils', {
            backups: true,
        },
        cifs: {
-           name: 'CIFS',
+           name: 'SMB/CIFS',
            ipanel: 'CIFSInputPanel',
            faIcon: 'building',
            backups: true,
@@ -1301,17 +1299,6 @@ Ext.define('PVE.Utils', {
        return Ext.htmlEncode(first + " " + last);
     },
 
-    render_u2f_error: function(error) {
-       var ErrorNames = {
-           '1': gettext('Other Error'),
-           '2': gettext('Bad Request'),
-           '3': gettext('Configuration Unsupported'),
-           '4': gettext('Device Ineligible'),
-           '5': gettext('Timeout'),
-       };
-       return "U2F Error: " + ErrorNames[error] || Proxmox.Utils.unknownText;
-    },
-
     windowHostname: function() {
        return window.location.hostname.replace(Proxmox.Utils.IP6_bracket_match,
             function(m, addr, offset, original) { return addr; });
@@ -1602,7 +1589,7 @@ Ext.define('PVE.Utils', {
        }
     },
 
-    hardware_counts: { net: 32, usb: 5, hostpci: 16, audio: 1, efidisk: 1, serial: 4, rng: 1 },
+    hardware_counts: { net: 32, usb: 5, hostpci: 16, audio: 1, efidisk: 1, serial: 4, rng: 1, tpmstate: 1 },
 
     cleanEmptyObjectKeys: function(obj) {
        for (const propName of Object.keys(obj)) {
@@ -1830,6 +1817,7 @@ Ext.define('PVE.Utils', {
            cephdestroymon: ['Ceph Monitor', gettext('Destroy')],
            cephdestroyosd: ['Ceph OSD', gettext('Destroy')],
            cephdestroypool: ['Ceph Pool', gettext('Destroy')],
+           cephdestroyfs: ['CephFS', gettext('Destroy')],
            cephfscreate: ['CephFS', gettext('Create')],
            cephsetpool: ['Ceph Pool', gettext('Edit')],
            cephsetflags: ['', gettext('Change global Ceph flags')],
@@ -1845,7 +1833,9 @@ Ext.define('PVE.Utils', {
            imgcopy: ['', gettext('Copy data')],
            imgdel: ['', gettext('Erase data')],
            lvmcreate: [gettext('LVM Storage'), gettext('Create')],
+           lvmremove: ['Volume Group', gettext('Remove')],
            lvmthincreate: [gettext('LVM-Thin Storage'), gettext('Create')],
+           lvmthinremove: ['Thinpool', gettext('Remove')],
            migrateall: ['', gettext('Migrate all VMs and Containers')],
            'move_volume': ['CT', gettext('Move Volume')],
            'pbs-download': ['VM/CT', gettext('File Restore Download')],
@@ -1897,6 +1887,7 @@ Ext.define('PVE.Utils', {
            vztemplate: ['CT', gettext('Convert to template')],
            vzumount: ['CT', gettext('Unmount')],
            zfscreate: [gettext('ZFS Storage'), gettext('Create')],
+           zfsremove: ['ZFS Pool', gettext('Remove')],
        });
     },