From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/2] ui: tape/Drive{Config, Status} move actions to status panel
Date: Mon, 8 Mar 2021 10:06:07 +0100 [thread overview]
Message-ID: <20210308090607.28658-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20210308090607.28658-1-d.csapak@proxmox.com>
so that the 'DriveConfig' panel is purely for configuration
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/tape/DriveConfig.js | 55 -----------------------------------------
www/tape/DriveStatus.js | 42 +++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 55 deletions(-)
diff --git a/www/tape/DriveConfig.js b/www/tape/DriveConfig.js
index de6a0525..763f8e55 100644
--- a/www/tape/DriveConfig.js
+++ b/www/tape/DriveConfig.js
@@ -55,34 +55,6 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
});
},
- readLabel: function(view, rI, cI, button, el, record) {
- let me = this;
- let drive = record.data.name;
-
- PBS.Utils.driveCommand(drive, 'read-label', {
- waitMsgTarget: me.getView(),
- success: PBS.Utils.showMediaLabelWindow,
- });
- },
-
- volumeStatistics: function(view, rI, cI, button, el, record) {
- let me = this;
- let drive = record.data.name;
- PBS.Utils.driveCommand(drive, 'volume-statistics', {
- waitMsgTarget: me.getView(),
- success: PBS.Utils.showVolumeStatisticsWindow,
- });
- },
-
- cartridgeMemory: function(view, rI, cI, button, el, record) {
- let me = this;
- let drive = record.data.name;
- PBS.Utils.driveCommand(drive, 'cartridge-memory', {
- waitMsgTarget: me.getView(),
- success: PBS.Utils.showCartridgeMemoryWindow,
- });
- },
-
reload: function() {
this.getView().getStore().rstore.load();
},
@@ -193,33 +165,6 @@ Ext.define('PBS.TapeManagement.DrivePanel', {
return record.data.changer ? value : '';
},
},
- {
- text: gettext('Actions'),
- width: 140,
- xtype: 'actioncolumn',
- items: [
- {
- iconCls: 'fa fa-hdd-o',
- handler: 'cartridgeMemory',
- tooltip: gettext('Cartridge Memory'),
- },
- {
- iconCls: 'fa fa-line-chart',
- handler: 'volumeStatistics',
- tooltip: gettext('Volume Statistics'),
- },
- {
- iconCls: 'fa fa-tag',
- handler: 'readLabel',
- tooltip: gettext('Read Label'),
- },
- {
- iconCls: 'fa fa-info-circle',
- handler: 'status',
- tooltip: gettext('Status'),
- },
- ],
- },
],
});
diff --git a/www/tape/DriveStatus.js b/www/tape/DriveStatus.js
index ec1b9fb9..284eb975 100644
--- a/www/tape/DriveStatus.js
+++ b/www/tape/DriveStatus.js
@@ -120,6 +120,27 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
});
},
+ readLabel: function() {
+ let me = this;
+ let view = me.getView();
+ let drive = view.drive;
+
+ PBS.Utils.driveCommand(drive, 'read-label', {
+ waitMsgTarget: view,
+ success: PBS.Utils.showMediaLabelWindow,
+ });
+ },
+
+ volumeStatistics: function() {
+ let me = this;
+ let view = me.getView();
+ let drive = view.drive;
+ PBS.Utils.driveCommand(drive, 'volume-statistics', {
+ waitMsgTarget: view,
+ success: PBS.Utils.showVolumeStatisticsWindow,
+ });
+ },
+
init: function(view) {
let me = this;
me.mon(me.lookup('statusgrid').getStore().rstore, 'load', 'onLoad');
@@ -172,6 +193,27 @@ Ext.define('PBS.TapeManagement.DriveStatus', {
disabled: '{!online}',
},
},
+ {
+ text: gettext('Read Label'),
+ xtype: 'proxmoxButton',
+ handler: 'readLabel',
+ iconCls: 'fa fa-tag',
+ disabled: true,
+ bind: {
+ disabled: '{!online}',
+ },
+ },
+ {
+ text: gettext('Show Volume Statistics'),
+ xtype: 'proxmoxButton',
+ handler: 'volumeStatistics',
+ iconCls: 'fa fa-line-chart',
+ disabled: true,
+ bind: {
+ disabled: '{!online}',
+ },
+ },
+
],
items: [
--
2.20.1
next prev parent reply other threads:[~2021-03-08 9:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-08 9:06 [pbs-devel] [PATCH proxmox-backup 1/2] ui: tape/DriveStatus: add cartridge memory grid Dominik Csapak
2021-03-08 9:06 ` Dominik Csapak [this message]
2021-03-08 10:34 ` [pbs-devel] applied: " Dietmar Maurer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210308090607.28658-2-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal