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>
}
}
+ // 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;
},
hidden: true,
sortable: true,
width: 110
+ },
+ hastate: {
+ header: gettext('HA State'),
+ type: 'string',
+ defaultValue: '',
+ hidden: true,
+ sortable: true
}
};
iconClsAdd = '-offline';
}
+ // overwrite any other class
+ if (info.hastate === 'error') {
+ iconClsAdd = '-offline';
+ }
+
info.iconCls = defaults.iconCls + iconClsAdd;
if (info.template) {
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;
}