]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: storage/browser: pass storage plugin type to content panels
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 24 Nov 2020 22:33:53 +0000 (23:33 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 24 Nov 2020 22:33:57 +0000 (23:33 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/storage/Browser.js

index 6efa0e655b519dabe769f64659a2ea4526818a25..c0036d6a8b147d01f49b4cd95e0802e64df47d12 100644 (file)
@@ -45,7 +45,9 @@ Ext.define('PVE.storage.Browser', {
                'id',
                `storage/${nodename}/${storeid}`,
            );
-           let contents = storageInfo.data.content.split(',');
+           let res = storageInfo.data;
+           let plugin = res.plugintype;
+           let contents = res.content.split(',');
 
            if (contents.includes('backup')) {
                me.items.push({
@@ -53,6 +55,7 @@ Ext.define('PVE.storage.Browser', {
                    title: gettext('Backups'),
                    iconCls: 'fa fa-floppy-o',
                    itemId: 'contentBackup',
+                   pluginType: plugin,
                    hasNotesColumn: true,
                });
            }
@@ -63,6 +66,7 @@ Ext.define('PVE.storage.Browser', {
                    iconCls: 'fa fa-hdd-o',
                    itemId: 'contentImages',
                    content: 'images',
+                   pluginType: plugin,
                });
            }
            if (contents.includes('rootdir')) {
@@ -72,6 +76,7 @@ Ext.define('PVE.storage.Browser', {
                    iconCls: 'fa fa-hdd-o lxc',
                    itemId: 'contentRootdir',
                    content: 'rootdir',
+                   pluginType: plugin,
                });
            }
            if (contents.includes('iso')) {
@@ -81,6 +86,7 @@ Ext.define('PVE.storage.Browser', {
                    iconCls: 'pve-itype-treelist-item-icon-cdrom',
                    itemId: 'contentIso',
                    content: 'iso',
+                   pluginType: plugin,
                    useUploadButton: true,
                });
            }
@@ -90,6 +96,7 @@ Ext.define('PVE.storage.Browser', {
                    title: gettext('CT Templates'),
                    iconCls: 'fa fa-file-o lxc',
                    itemId: 'contentVztmpl',
+                   pluginType: plugin,
                });
            }
            if (contents.includes('snippets')) {
@@ -99,6 +106,7 @@ Ext.define('PVE.storage.Browser', {
                    iconCls: 'fa fa-file-code-o',
                    itemId: 'contentSnippets',
                    content: 'snippets',
+                   pluginType: plugin,
                });
            }
        }