mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-17 15:51:08 +00:00
service view: avoid showing not installed services as error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
7a17156d65
commit
ae6a1cc908
@ -146,7 +146,7 @@ Ext.define('Proxmox.node.ServiceView', {
|
|||||||
if (!unitState) {
|
if (!unitState) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
if (unitState === 'masked') {
|
if (unitState === 'masked' || unitState === 'not-found') {
|
||||||
return "proxmox-disabled-row";
|
return "proxmox-disabled-row";
|
||||||
} else if (unitState === 'unknown') {
|
} else if (unitState === 'unknown') {
|
||||||
if (record.get('name') === 'syslog') {
|
if (record.get('name') === 'syslog') {
|
||||||
@ -178,9 +178,16 @@ Ext.define('Proxmox.node.ServiceView', {
|
|||||||
width: 100,
|
width: 100,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
dataIndex: 'state',
|
dataIndex: 'state',
|
||||||
renderer: (v, meta, rec) => rec.get('unit-state') === 'masked'
|
renderer: (value, meta, rec) => {
|
||||||
? gettext('disabled')
|
const unitState = rec.get('unit-state');
|
||||||
: v,
|
if (unitState === 'masked') {
|
||||||
|
return gettext('disabled');
|
||||||
|
} else if (unitState === 'not-found') {
|
||||||
|
return gettext('not installed');
|
||||||
|
} else {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: gettext('Active'),
|
header: gettext('Active'),
|
||||||
|
Loading…
Reference in New Issue
Block a user