]> git.proxmox.com Git - proxmox-widget-toolkit.git/blobdiff - Utils.js
MacPrefix: prevent multicast MacPrefixes
[proxmox-widget-toolkit.git] / Utils.js
index 7a4c1d63b81fea10313a903400774575d90b6e30..ef4aa5ece3474cf9da699d9c9bd5aa5b1feba828 100644 (file)
--- a/Utils.js
+++ b/Utils.js
@@ -405,6 +405,7 @@ Ext.define('Proxmox.Utils', { utilities: {
        eth: gettext("Network Device"),
        bridge: 'Linux Bridge',
        bond: 'Linux Bond',
+       vlan: 'Linux VLAN',
        OVSBridge: 'OVS Bridge',
        OVSBond: 'OVS Bond',
        OVSPort: 'OVS Port',
@@ -480,27 +481,36 @@ Ext.define('Proxmox.Utils', { utilities: {
        cephdestroyosd: ['Ceph OSD', gettext('Destroy') ],
        cephcreatepool: ['Ceph Pool', gettext('Create') ],
        cephdestroypool: ['Ceph Pool', gettext('Destroy') ],
+       cephfscreate: ['CephFS', gettext('Create') ],
+       cephcreatemds: ['Ceph Metadata Server', gettext('Create') ],
+       cephdestroymds: ['Ceph Metadata Server', gettext('Destroy') ],
        imgcopy: ['', gettext('Copy data') ],
        imgdel: ['', gettext('Erase data') ],
+       unknownimgdel: ['', gettext('Destroy image from unknown guest') ],
        download: ['', gettext('Download') ],
-       vzdump: ['', gettext('Backup') ],
+       vzdump: ['VM/CT', gettext('Backup') ],
        aptupdate: ['', gettext('Update package database') ],
        startall: [ '', gettext('Start all VMs and Containers') ],
        stopall: [ '', gettext('Stop all VMs and Containers') ],
-       migrateall: [ '', gettext('Migrate all VMs and Containers') ]
+       migrateall: [ '', gettext('Migrate all VMs and Containers') ],
+       dircreate: [ gettext('Directory Storage'), gettext('Create') ],
+       lvmcreate: [ gettext('LVM Storage'), gettext('Create') ],
+       lvmthincreate: [ gettext('LVM-Thin Storage'), gettext('Create') ],
+       zfscreate: [ gettext('ZFS Storage'), gettext('Create') ]
     },
 
     format_task_description: function(type, id) {
        var farray = Proxmox.Utils.task_desc_table[type];
+       var text;
        if (!farray) {
-           var text = type;
+           text = type;
            if (id) {
                type += ' ' + id;
            }
            return text;
        }
        var prefix = farray[0];
-       var text = farray[1];
+       text = farray[1];
        if (prefix) {
            return prefix + ' ' + id + ' - ' + text;
        }
@@ -567,16 +577,20 @@ Ext.define('Proxmox.Utils', { utilities: {
        return Ext.Date.format(servertime, 'Y-m-d H:i:s');
     },
 
-    openXtermJsViewer: function(vmtype, vmid, nodename, vmname) {
-       var url = Ext.urlEncode({
+    openXtermJsViewer: function(vmtype, vmid, nodename, vmname, cmd) {
+       var url = Ext.Object.toQueryString({
            console: vmtype, // kvm, lxc, upgrade or shell
            xtermjs: 1,
            vmid: vmid,
            vmname: vmname,
-           node: nodename
+           node: nodename,
+           cmd: cmd,
+
        });
        var nw = window.open("?" + url, '_blank', 'toolbar=no,location=no,status=no,menubar=no,resizable=yes,width=800,height=420');
-       nw.focus();
+       if (nw) {
+           nw.focus();
+       }
     }
 
 },