mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 09:01:32 +00:00
show ha error state in tree and resource grid
with this patch, vms in an ha error state get an icon (reusing the node offline icon) to indicate the error in the resource grid, we also add the icon, and have an additional column where we can display the ha state Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
b67dc872ac
commit
2b2fe160f5
@ -961,6 +961,11 @@ Ext.define('PVE.Utils', { utilities: {
|
||||
}
|
||||
}
|
||||
|
||||
// overwrite anything else
|
||||
if (record.data.hastate === 'error') {
|
||||
gridcls = '-offline';
|
||||
}
|
||||
|
||||
var fa = '<i class="fa fa-fw x-fa-grid' + gridcls + ' fa-' + icon + '"></i> ';
|
||||
return fa + value;
|
||||
},
|
||||
|
@ -233,6 +233,13 @@ Ext.define('PVE.data.ResourceStore', {
|
||||
hidden: true,
|
||||
sortable: true,
|
||||
width: 110
|
||||
},
|
||||
hastate: {
|
||||
header: gettext('HA State'),
|
||||
type: 'string',
|
||||
defaultValue: '',
|
||||
hidden: true,
|
||||
sortable: true
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -124,6 +124,11 @@ Ext.define('PVE.tree.ResourceTree', {
|
||||
iconClsAdd = '-offline';
|
||||
}
|
||||
|
||||
// overwrite any other class
|
||||
if (info.hastate === 'error') {
|
||||
iconClsAdd = '-offline';
|
||||
}
|
||||
|
||||
info.iconCls = defaults.iconCls + iconClsAdd;
|
||||
|
||||
if (info.template) {
|
||||
@ -288,7 +293,8 @@ Ext.define('PVE.tree.ResourceTree', {
|
||||
if ((item.data.text !== olditem.data.text) ||
|
||||
(item.data.running !== olditem.data.running) ||
|
||||
(item.data.template !== olditem.data.template) ||
|
||||
(item.data.status !== olditem.data.status)) {
|
||||
(item.data.status !== olditem.data.status) ||
|
||||
(item.data.hastate!== olditem.data.hastate)) {
|
||||
//console.log("changed node/text/running " + olditem.data.id);
|
||||
changed = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user