]>
Commit | Line | Data |
---|---|---|
eb874be7 DM |
1 | Ext.define('Proxmox.node.DNSView', { |
2 | extend: 'Proxmox.grid.ObjectGrid', | |
3 | alias: ['widget.proxmoxNodeDNSView'], | |
4 | ||
5 | initComponent : function() { | |
6 | var me = this; | |
7 | ||
8 | if (!me.nodename) { | |
9 | throw "no node name specified"; | |
10 | } | |
11 | ||
12 | var run_editor = function() { | |
13 | var win = Ext.create('Proxmox.node.DNSEdit', { | |
14 | nodename: me.nodename | |
15 | }); | |
16 | win.show(); | |
17 | }; | |
18 | ||
19 | Ext.apply(me, { | |
20 | url: "/api2/json/nodes/" + me.nodename + "/dns", | |
21 | cwidth1: 130, | |
22 | interval: 1000, | |
9307eda4 | 23 | run_editor: run_editor, |
eb874be7 DM |
24 | rows: { |
25 | search: { header: 'Search domain', required: true }, | |
26 | dns1: { header: gettext('DNS server') + " 1", required: true }, | |
27 | dns2: { header: gettext('DNS server') + " 2" }, | |
28 | dns3: { header: gettext('DNS server') + " 3" } | |
29 | }, | |
30 | tbar: [ | |
31 | { | |
32 | text: gettext("Edit"), | |
33 | handler: run_editor | |
34 | } | |
35 | ], | |
36 | listeners: { | |
37 | itemdblclick: run_editor | |
38 | } | |
39 | }); | |
40 | ||
41 | me.callParent(); | |
42 | ||
84af78a1 DC |
43 | me.on('activate', me.rstore.startUpdate); |
44 | me.on('deactivate', me.rstore.stopUpdate); | |
eb874be7 DM |
45 | me.on('destroy', me.rstore.stopUpdate); |
46 | } | |
47 | }); |