mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-16 20:22:27 +00: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++;
|
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 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) {
|
if (maintenance) {
|
||||||
const [type, message] = PBS.Utils.parseMaintenanceMode(maintenance);
|
const [type, message] = PBS.Utils.parseMaintenanceMode(maintenance);
|
||||||
qtip = `${type}${message ? ': ' + message : ''}`;
|
qtip = `${type}${message ? ': ' + message : ''}`;
|
||||||
let maintenanceTypeCls = type === 'delete' ? 'destroying' : 'maintenance';
|
let maintenanceTypeCls = 'maintenance';
|
||||||
iconCls = `fa fa-database pmx-tree-icon-custom ${maintenanceTypeCls}`;
|
if (type === 'delete') {
|
||||||
|
maintenanceTypeCls = 'destroying';
|
||||||
|
}
|
||||||
|
iconCls = `${mainIcon} pmx-tree-icon-custom ${maintenanceTypeCls}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getChildTextAt(j).localeCompare(name) !== 0) {
|
if (getChildTextAt(j).localeCompare(name) !== 0) {
|
||||||
|
@ -271,6 +271,10 @@ span.snapshot-comment-column {
|
|||||||
content: "\ ";
|
content: "\ ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.x-treelist-item-icon.fa-plug, .pmx-tree-icon-custom.fa-plug {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
/* datastore maintenance */
|
/* datastore maintenance */
|
||||||
.pmx-tree-icon-custom.maintenance:after {
|
.pmx-tree-icon-custom.maintenance:after {
|
||||||
content: "\f0ad";
|
content: "\f0ad";
|
||||||
@ -290,6 +294,10 @@ span.snapshot-comment-column {
|
|||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pmx-tree-icon-custom.unplugged:before {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
/*' PBS specific icons */
|
/*' PBS specific icons */
|
||||||
|
|
||||||
.pbs-icon-tape {
|
.pbs-icon-tape {
|
||||||
|
@ -22,6 +22,7 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
|
|||||||
stillbad: 0,
|
stillbad: 0,
|
||||||
deduplication: 1.0,
|
deduplication: 1.0,
|
||||||
error: "",
|
error: "",
|
||||||
|
removable: false,
|
||||||
maintenance: '',
|
maintenance: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user