mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-05 05:08:00 +00:00
ui: ha: add name of service to resource grid
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
7bc5e7978d
commit
2ae20617aa
@ -38,6 +38,19 @@ Ext.define('PVE.data.ResourceStore', {
|
||||
return me.getAt(index).data.node;
|
||||
},
|
||||
|
||||
guestName: function(vmid) {
|
||||
let me = this;
|
||||
let index = me.findExact('vmid', parseInt(vmid, 10));
|
||||
if (index < 0) {
|
||||
return '-';
|
||||
}
|
||||
let rec = me.getAt(index).data;
|
||||
if ('name' in rec) {
|
||||
return rec.name;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
|
||||
constructor: function(config) {
|
||||
// fixme: how to avoid those warnings
|
||||
/*jslint confusion: true */
|
||||
|
@ -141,6 +141,21 @@ Ext.define('PVE.ha.ResourcesView', {
|
||||
sortable: true,
|
||||
dataIndex: 'crm_state'
|
||||
},
|
||||
{
|
||||
header: gettext('Name'),
|
||||
width: 100,
|
||||
sortable: true,
|
||||
dataIndex: 'sid',
|
||||
renderer: function(value, metaData, record) {
|
||||
let res = value.match(/^(\S+):(\S+)$/);
|
||||
if (res[1] !== 'vm' && res[1] !== 'ct') {
|
||||
return '-';
|
||||
}
|
||||
//var guestType = res[1];
|
||||
let vmid = res[2];
|
||||
return PVE.data.ResourceStore.guestName(vmid);
|
||||
}
|
||||
},
|
||||
{
|
||||
header: gettext('Max. Restart'),
|
||||
width: 100,
|
||||
|
Loading…
Reference in New Issue
Block a user