From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 9B288716FC for ; Thu, 8 Apr 2021 13:39:53 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8DCD21A99E for ; Thu, 8 Apr 2021 13:39:23 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id EDE411A97C for ; Thu, 8 Apr 2021 13:39:21 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id B690142E06 for ; Thu, 8 Apr 2021 13:39:21 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Thu, 8 Apr 2021 13:39:20 +0200 Message-Id: <20210408113920.24416-7-d.csapak@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210408113920.24416-1-d.csapak@proxmox.com> References: <20210408113920.24416-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.167 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup 7/7] ui: tape/DriveStatus: improve status grid a bit X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 11:39:53 -0000 by using format_boolean for compression/write protect, combining file/block posiition into one (saves a line) and adding the missing alert-flags Signed-off-by: Dominik Csapak --- www/tape/DriveStatus.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/www/tape/DriveStatus.js b/www/tape/DriveStatus.js index e965bac1..cd001bff 100644 --- a/www/tape/DriveStatus.js +++ b/www/tape/DriveStatus.js @@ -317,6 +317,7 @@ Ext.define('PBS.TapeManagement.DriveStatusGrid', { required: true, header: gettext('Write Protect'), defaultValue: false, + renderer: Proxmox.Utils.format_boolean, }, 'buffer-mode': { required: true, @@ -325,12 +326,23 @@ Ext.define('PBS.TapeManagement.DriveStatusGrid', { 'compression': { required: true, header: gettext('Compression'), + renderer: Proxmox.Utils.format_boolean, }, 'file-number': { - header: gettext('File Number'), + header: gettext('Tape Position'), + renderer: function(value, mD, r, rI, cI, store) { + let me = this; + let filenr = value; + let rec = store.getById('block-number'); + if (rec) { + let blocknr = rec.data.value; + return `File ${filenr}, Block ${blocknr}`; + } + return `File ${filenr}`; + }, }, 'block-number': { - header: gettext('Block Number'), + visible: false, }, 'manufactured': { header: gettext('Tape Manufacture Date'), @@ -361,6 +373,9 @@ Ext.define('PBS.TapeManagement.DriveStatusGrid', { return value; }, }, + 'alert-flags': { + header: gettext('Alert Flags'), + }, }, }); -- 2.20.1