]> git.proxmox.com Git - proxmox-backup.git/commitdiff
ui: remove cartridge memory panel (show window after butten press instead)
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 8 Mar 2021 11:52:06 +0000 (12:52 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 8 Mar 2021 11:52:06 +0000 (12:52 +0100)
www/Utils.js
www/tape/DriveStatus.js

index 4667efb2d0274c654e4182cfaf167e05f5c0dea0..6c8ca5cbfb47c8e089aef24bf21026aed9c45ce8 100644 (file)
@@ -499,6 +499,7 @@ Ext.define('PBS.Utils', {
                    columns: [
                        {
                            text: gettext('ID'),
+                           hidden: true,
                            dataIndex: 'id',
                            width: 60,
                        },
index 0aec50313347fac6cfa5ac75227a31fb9f88d045..3b67ce6f6be62d01dde8ccaff763d81fd1d5edcd 100644 (file)
@@ -141,6 +141,16 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
            });
        },
 
+       cartridgeMemory: function() {
+           let me = this;
+           let view = me.getView();
+           let drive = view.drive;
+           PBS.Utils.driveCommand(drive, 'cartridge-memory', {
+               waitMsgTarget: me.getView(),
+               success: PBS.Utils.showCartridgeMemoryWindow,
+           });
+       },
+
        init: function(view) {
            let me = this;
            me.mon(me.lookup('statusgrid').getStore().rstore, 'load', 'onLoad');
@@ -204,7 +214,7 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
            },
        },
        {
-           text: gettext('Show Volume Statistics'),
+           text: gettext('Volume Statistics'),
            xtype: 'proxmoxButton',
            handler: 'volumeStatistics',
            iconCls: 'fa fa-line-chart',
@@ -213,6 +223,16 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
                disabled: '{!online}',
            },
        },
+       {
+           text: gettext('Cartridge Memory'),
+           xtype: 'proxmoxButton',
+           iconCls: 'fa fa-hdd-o',
+           handler: 'cartridgeMemory',
+           disabled: true,
+           bind: {
+               disabled: '{!online}',
+           },
+       },
 
     ],
 
@@ -243,18 +263,6 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
                },
            ],
        },
-       {
-           xtype: 'pbsDriveCartridgeMemoryGrid',
-           flex: 1,
-           padding: 5,
-           reference: 'cartridgegrid',
-           bind: {
-               disabled: '{!online}',
-           },
-           cbind: {
-               url: '{cartridgeMemoryUrl}',
-           },
-       },
     ],
 });
 
@@ -319,66 +327,6 @@ Ext.define('PBS.TapeManagement.DriveStatusGrid', {
     },
 });
 
-Ext.define('PBS.TapeManagement.CartridgeMemoryGrid', {
-    extend: 'Ext.grid.Panel',
-    alias: 'widget.pbsDriveCartridgeMemoryGrid',
-
-    title: gettext('Cartridge Memory'),
-
-    emptyText: gettext('Not Loaded yet'),
-    viewConfig: {
-       deferEmptyText: false,
-    },
-
-    controller: {
-       xclass: 'Ext.app.ViewController',
-
-       loadCartridgeMemory: function() {
-           console.log(this);
-           this.getView().getStore().load();
-       },
-
-       init: function(view) {
-           if (!view.url) {
-               throw "no url given";
-           }
-
-           view.getStore().getProxy().setUrl(view.url);
-       },
-    },
-
-    store: {
-       proxy: {
-           type: 'proxmox',
-       },
-    },
-
-    tbar: [
-       {
-           text: gettext('Reload'),
-           handler: 'loadCartridgeMemory',
-       },
-    ],
-
-    columns: [
-       {
-           text: gettext('ID'),
-           dataIndex: 'id',
-           width: 60,
-       },
-       {
-           text: gettext('Name'),
-           dataIndex: 'name',
-           flex: 2,
-       },
-       {
-           text: gettext('Value'),
-           dataIndex: 'value',
-           flex: 1,
-       },
-    ],
-});
-
 Ext.define('PBS.TapeManagement.DriveInfoPanel', {
     extend: 'Ext.panel.Panel',
     alias: 'widget.pbsDriveInfoPanel',