proxmox-widget-toolkit/node/DNSEdit.js
Thomas Lamprecht 01031528ad eslint fixes all over the place
all autofixed by eslint with a slightly reduced base config rule set
to avoid rules which may give some undesired results in our code
base.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 15:02:29 +02:00

55 lines
1.1 KiB
JavaScript

Ext.define('Proxmox.node.DNSEdit', {
extend: 'Proxmox.window.Edit',
alias: ['widget.proxmoxNodeDNSEdit'],
initComponent: function() {
var me = this;
if (!me.nodename) {
throw "no node name specified";
}
me.items = [
{
xtype: 'textfield',
fieldLabel: gettext('Search domain'),
name: 'search',
allowBlank: false,
},
{
xtype: 'proxmoxtextfield',
fieldLabel: gettext('DNS server') + " 1",
vtype: 'IP64Address',
skipEmptyText: true,
name: 'dns1',
},
{
xtype: 'proxmoxtextfield',
fieldLabel: gettext('DNS server') + " 2",
vtype: 'IP64Address',
skipEmptyText: true,
name: 'dns2',
},
{
xtype: 'proxmoxtextfield',
fieldLabel: gettext('DNS server') + " 3",
vtype: 'IP64Address',
skipEmptyText: true,
name: 'dns3',
},
];
Ext.applyIf(me, {
subject: gettext('DNS'),
url: "/api2/extjs/nodes/" + me.nodename + "/dns",
fieldDefaults: {
labelWidth: 120,
},
});
me.callParent();
me.load();
},
});