mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-01-05 09:17:59 +03:00
ui: tree: render unmounted datastores correctly
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
parent
9cafa1775b
commit
c74b289174
@ -267,13 +267,25 @@ Ext.define('PBS.view.main.NavigationTree', {
|
||||
j++;
|
||||
}
|
||||
|
||||
let [qtip, iconCls] = ['', 'fa fa-database'];
|
||||
let mountStatus = records[i].data['mount-status'] ?? 'nonremovable';
|
||||
let isRemovable = mountStatus !== 'nonremovable';
|
||||
let mainIcon = `fa fa-${isRemovable ? 'plug' : 'database'}`;
|
||||
let [qtip, iconCls] = ['', mainIcon];
|
||||
const maintenance = records[i].data.maintenance;
|
||||
|
||||
const removable_not_mounted = records[i].data['mount-status'] === 'notmounted';
|
||||
if (removable_not_mounted) {
|
||||
iconCls = `${mainIcon} pmx-tree-icon-custom unplugged`;
|
||||
qtip = gettext('Removable datastore not mounted');
|
||||
}
|
||||
if (maintenance) {
|
||||
const [type, message] = PBS.Utils.parseMaintenanceMode(maintenance);
|
||||
qtip = `${type}${message ? ': ' + message : ''}`;
|
||||
let maintenanceTypeCls = type === 'delete' ? 'destroying' : 'maintenance';
|
||||
iconCls = `fa fa-database pmx-tree-icon-custom ${maintenanceTypeCls}`;
|
||||
let maintenanceTypeCls = 'maintenance';
|
||||
if (type === 'delete') {
|
||||
maintenanceTypeCls = 'destroying';
|
||||
}
|
||||
iconCls = `${mainIcon} pmx-tree-icon-custom ${maintenanceTypeCls}`;
|
||||
}
|
||||
|
||||
if (getChildTextAt(j).localeCompare(name) !== 0) {
|
||||
|
@ -271,6 +271,10 @@ span.snapshot-comment-column {
|
||||
content: "\ ";
|
||||
}
|
||||
|
||||
.x-treelist-item-icon.fa-plug, .pmx-tree-icon-custom.fa-plug {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* datastore maintenance */
|
||||
.pmx-tree-icon-custom.maintenance:after {
|
||||
content: "\f0ad";
|
||||
@ -290,6 +294,10 @@ span.snapshot-comment-column {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.pmx-tree-icon-custom.unplugged:before {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
/*' PBS specific icons */
|
||||
|
||||
.pbs-icon-tape {
|
||||
|
@ -22,6 +22,7 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
|
||||
stillbad: 0,
|
||||
deduplication: 1.0,
|
||||
error: "",
|
||||
removable: false,
|
||||
maintenance: '',
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user