[pbs-devel] [PATCH v2 proxmox-backup 11/15] ui: show usb icon for removable datastore in list

Hannes Laimer h.laimer at proxmox.com
Mon Aug 30 13:15:01 CEST 2021


---
 www/NavigationTree.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/NavigationTree.js b/www/NavigationTree.js
index 6035526c..dc07e3bb 100644
--- a/www/NavigationTree.js
+++ b/www/NavigationTree.js
@@ -218,6 +218,7 @@ Ext.define('PBS.view.main.NavigationTree', {
 	    let existingChildren = {};
 	    for (let i = 0, j = 0, length = records.length; i < length; i++) {
 		let name = records[i].id;
+		let removable = records[i].data.removable;
 		existingChildren[name] = true;
 
 		while (name.localeCompare(getChildTextAt(j)) > 0 && (j+1) < list.childNodes.length) {
@@ -228,7 +229,7 @@ Ext.define('PBS.view.main.NavigationTree', {
 		    list.insertChild(j, {
 			text: name,
 			path: `DataStore-${name}`,
-			iconCls: 'fa fa-database',
+			iconCls: `fa fa-${removable ? 'usb' : 'database'}`,
 			leaf: true,
 		    });
 		}
-- 
2.30.2






More information about the pbs-devel mailing list