[pbs-devel] [PATCH proxmox-backup] ui: tape/ChangerStatus: hide drive-slots without assigned drives

Dominik Csapak d.csapak at proxmox.com
Wed Apr 14 14:11:22 CEST 2021


if a user has not configured a drive for a specified driveslot of the
changer, simply hide that slot

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/tape/ChangerStatus.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/www/tape/ChangerStatus.js b/www/tape/ChangerStatus.js
index e5d143fe..ff8a436c 100644
--- a/www/tape/ChangerStatus.js
+++ b/www/tape/ChangerStatus.js
@@ -519,7 +519,11 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 		    let type = entry['entry-kind'];
 		    let id = entry['entry-id'];
 
-		    if (type === 'drive' && drive_entries[id] !== undefined) {
+		    if (type === 'drive') {
+			if (drive_entries[id] === undefined) {
+			    continue;
+			}
+
 			entry = Ext.applyIf(entry, drive_entries[id]);
 			valid_drives.push(drive_entries[id].name);
 		    }
-- 
2.20.1






More information about the pbs-devel mailing list