we showed 'CT<CTID>' (for example CT100) as hostname when
we did not have one, but we set it to 'localhost' on starting
the container

also instead of simply setting the emptyText to the name on
tab creation, we load the window, which then gets the actual value

Signed-off-by: Dominik Csapak <[email protected]>
---
 www/manager6/lxc/DNS.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/www/manager6/lxc/DNS.js b/www/manager6/lxc/DNS.js
index eaf1719..6fa8ef2 100644
--- a/www/manager6/lxc/DNS.js
+++ b/www/manager6/lxc/DNS.js
@@ -156,7 +156,7 @@ Ext.define('PVE.lxc.DNS', {
        var rows = {
            hostname: {
                required: true,
-               defaultValue: me.pveSelNode.data.name,
+               defaultValue: 'localhost',
                header: gettext('Hostname'),
                editor: caps.vms['VM.Config.Network'] ? {
                    xtype: 'pveWindowEdit',
@@ -167,8 +167,8 @@ Ext.define('PVE.lxc.DNS', {
                        vtype: 'DnsName',
                        value: '',
                        fieldLabel: gettext('Hostname'),
-                       allowBlank: true,
-                       emptyText: me.pveSelNode.data.name
+                       allowBlank: false,
+                       emptyText: 'localhost'
                    }
                } : undefined
            },
@@ -229,8 +229,9 @@ Ext.define('PVE.lxc.DNS', {
                    url: '/api2/extjs/' + baseurl
                }, rowdef.editor);
                win = Ext.createWidget(rowdef.editor.xtype, config);
+               win.load();
            }
-           //win.load();
+
            win.show();
            win.on('destroy', reload);
        };
-- 
2.1.4


_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to