ui: dc/Guests: fix indentation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-07-05 12:18:28 +02:00
parent d4c6f35c38
commit 3e32628c22

View File

@ -23,94 +23,98 @@ Ext.define('PVE.dc.Guests', {
'text-align': 'center', 'text-align': 'center',
}, },
}, },
items: [{ items: [
itemId: 'qemu', {
data: { itemId: 'qemu',
running: 0, data: {
paused: 0, running: 0,
stopped: 0, paused: 0,
template: 0, stopped: 0,
template: 0,
},
tpl: [
'<h3>' + gettext("Virtual Machines") + '</h3>',
'<div class="left-aligned">',
'<i class="good fa fa-fw fa-play-circle">&nbsp;</i>',
gettext('Running'),
'</div>',
'<div class="right-aligned">{running}</div><br />',
'<tpl if="paused &gt; 0">',
'<div class="left-aligned">',
'<i class="warning fa fa-fw fa-pause-circle">&nbsp;</i>',
gettext('Paused'),
'</div>',
'<div class="right-aligned">{paused}</div><br />',
'</tpl>',
'<div class="left-aligned">',
'<i class="faded fa fa-fw fa-stop-circle">&nbsp;</i>',
gettext('Stopped'),
'</div>',
'<div class="right-aligned">{stopped}</div><br />',
'<tpl if="template &gt; 0">',
'<div class="left-aligned">',
'<i class="fa fa-fw fa-circle-o">&nbsp;</i>',
gettext('Templates'),
'</div>',
'<div class="right-aligned">{template}</div>',
'</tpl>',
],
}, },
tpl: [ {
'<h3>' + gettext("Virtual Machines") + '</h3>', itemId: 'lxc',
'<div class="left-aligned">', data: {
'<i class="good fa fa-fw fa-play-circle">&nbsp;</i>', running: 0,
gettext('Running'), paused: 0,
'</div>', stopped: 0,
'<div class="right-aligned">{running}</div><br />', template: 0,
'<tpl if="paused &gt; 0">', },
tpl: [
'<h3>' + gettext("LXC Container") + '</h3>',
'<div class="left-aligned">', '<div class="left-aligned">',
'<i class="warning fa fa-fw fa-pause-circle">&nbsp;</i>', '<i class="good fa fa-fw fa-play-circle">&nbsp;</i>',
gettext('Paused'), gettext('Running'),
'</div>', '</div>',
'<div class="right-aligned">{paused}</div><br />', '<div class="right-aligned">{running}</div><br />',
'</tpl>', '<tpl if="paused &gt; 0">',
'<div class="left-aligned">', '<div class="left-aligned">',
'<i class="faded fa fa-fw fa-stop-circle">&nbsp;</i>', '<i class="warning fa fa-fw fa-pause-circle">&nbsp;</i>',
gettext('Stopped'), gettext('Paused'),
'</div>', '</div>',
'<div class="right-aligned">{stopped}</div><br />', '<div class="right-aligned">{paused}</div><br />',
'<tpl if="template &gt; 0">', '</tpl>',
'<div class="left-aligned">', '<div class="left-aligned">',
'<i class="fa fa-fw fa-circle-o">&nbsp;</i>', '<i class="faded fa fa-fw fa-stop-circle">&nbsp;</i>',
gettext('Templates'), gettext('Stopped'),
'</div>', '</div>',
'<div class="right-aligned">{template}</div>', '<div class="right-aligned">{stopped}</div><br />',
'</tpl>', '<tpl if="template &gt; 0">',
], '<div class="left-aligned">',
}, { '<i class="fa fa-fw fa-circle-o">&nbsp;</i>',
itemId: 'lxc', gettext('Templates'),
data: { '</div>',
running: 0, '<div class="right-aligned">{template}</div>',
paused: 0, '</tpl>',
stopped: 0, ],
template: 0,
}, },
tpl: [ {
'<h3>' + gettext("LXC Container") + '</h3>', itemId: 'error',
'<div class="left-aligned">', colspan: 2,
'<i class="good fa fa-fw fa-play-circle">&nbsp;</i>', data: {
gettext('Running'), num: 0,
'</div>', },
'<div class="right-aligned">{running}</div><br />', columnWidth: 1,
'<tpl if="paused &gt; 0">', padding: '10 250 0 250',
'<div class="left-aligned">', tpl: [
'<i class="warning fa fa-fw fa-pause-circle">&nbsp;</i>', '<tpl if="num &gt; 0">',
gettext('Paused'), '<div class="left-aligned">',
'</div>', '<i class="critical fa fa-fw fa-times-circle">&nbsp;</i>',
'<div class="right-aligned">{paused}</div><br />', gettext('Error'),
'</tpl>', '</div>',
'<div class="left-aligned">', '<div class="right-aligned">{num}</div>',
'<i class="faded fa fa-fw fa-stop-circle">&nbsp;</i>', '</tpl>',
gettext('Stopped'), ],
'</div>',
'<div class="right-aligned">{stopped}</div><br />',
'<tpl if="template &gt; 0">',
'<div class="left-aligned">',
'<i class="fa fa-fw fa-circle-o">&nbsp;</i>',
gettext('Templates'),
'</div>',
'<div class="right-aligned">{template}</div>',
'</tpl>',
],
}, {
itemId: 'error',
colspan: 2,
data: {
num: 0,
}, },
columnWidth: 1, ],
padding: '10 250 0 250',
tpl: [
'<tpl if="num &gt; 0">',
'<div class="left-aligned">',
'<i class="critical fa fa-fw fa-times-circle">&nbsp;</i>',
gettext('Error'),
'</div>',
'<div class="right-aligned">{num}</div>',
'</tpl>',
],
}],
updateValues: function(qemu, lxc, error) { updateValues: function(qemu, lxc, error) {
let me = this; let me = this;