[pve-devel] [PATCH manager 1/1] gui: show lock in status bar of vms/cts

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Mar 20 12:20:05 CET 2019


On 3/20/19 11:29 AM, Dominik Csapak wrote:
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---

missing a "(partially) fixes #1506", also I do not really like the colon and the right-alignment,
it's just does not fits to the (action) button, as of now we have info left and buttons to the
right in the guests tbars, now it's mixed... how about something like the following on top of
yours? (The change is just POC, look at the ui result):

----8<----
diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js
index de125404..bcffbf0c 100644
--- a/www/manager6/lxc/Config.js
+++ b/www/manager6/lxc/Config.js
@@ -166,7 +166,7 @@ Ext.define('PVE.lxc.Config', {
            },
            tpl: [
                '<tpl if="lock">',
-               '<i class="fa fa-lg fa-lock"></i>: ' + '{lock}',
+               '<i class="fa fa-lg fa-lock"></i> ({lock})',
                '</tpl>'
            ]
        });
@@ -174,8 +174,9 @@ Ext.define('PVE.lxc.Config', {

        Ext.apply(me, {
            title: Ext.String.format(gettext("Container {0} on node '{1}'"), vm.text, nodename),
+           noTitleAlign: true,
            hstateid: 'lxctab',
-           tbar: [ statusTxt, startBtn, shutdownBtn, migrateBtn, consoleBtn, moreBtn ],
+           tbar: [ statusTxt, '->', startBtn, shutdownBtn, migrateBtn, consoleBtn, moreBtn ],
            defaults: { statusStore: me.statusStore },
            items: [
                {
diff --git a/www/manager6/panel/ConfigPanel.js b/www/manager6/panel/ConfigPanel.js
index e3c71eef..86ce6ec5 100644
--- a/www/manager6/panel/ConfigPanel.js
+++ b/www/manager6/panel/ConfigPanel.js
@@ -183,7 +183,9 @@ Ext.define('PVE.panel.Config', {
            }
        }

-       tbar.unshift('->');
+       if (!me.noTitleAlign) {
+           tbar.unshift('->');
+       }
        tbar.unshift({
            xtype: 'tbtext',
            text: title,
diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js
index a61e58c4..953ef072 100644
--- a/www/manager6/qemu/Config.js
+++ b/www/manager6/qemu/Config.js
@@ -179,17 +179,19 @@ Ext.define('PVE.qemu.Config', {
            data: {
                lock: undefined
            },
+           dock: 'left',
            tpl: [
                '<tpl if="lock">',
-               '<i class="fa fa-lg fa-lock"></i>: ' + '{lock}',
+               '<i class="fa fa-lg fa-lock"></i> ({lock})',
                '</tpl>'
            ]
        });

        Ext.apply(me, {
+           noTitleAlign: true,
            title: Ext.String.format(gettext("Virtual Machine {0} on node '{1}'"), vm.text, nodename),
            hstateid: 'kvmtab',
-           tbar: [ statusTxt, resumeBtn, startBtn, shutdownBtn, migrateBtn, consoleBtn, moreBtn ],
+           tbar: [ statusTxt, '->', resumeBtn, startBtn, shutdownBtn, migrateBtn, consoleBtn, moreBtn ],
            defaults: { statusStore: me.statusStore },
            items: [
                {
--



More information about the pve-devel mailing list