]> git.proxmox.com Git - pmg-gui.git/blob - js/SystemConfiguration.js
jslint: declare variables correctly
[pmg-gui.git] / js / SystemConfiguration.js
1 /*global Proxmox*/
2 Ext.define('PMG.RestoreSystemConfiguration', {
3 extend: 'Ext.Panel',
4 xtype: 'pmgRestoreSystemConfiguration',
5
6 title: gettext('Restore'),
7
8 controller: {
9 xclass: 'Ext.app.ViewController',
10
11 onFactoryDefaults: function() {
12 var me = this.getView();
13
14 Ext.Msg.confirm(
15 gettext('Confirm'),
16 gettext('Reset rule database to factory defaults?'),
17 function(button) {
18 if (button !== 'yes') {
19 return;
20 }
21 var url = '/config/ruledb';
22 Proxmox.Utils.API2Request({
23 url: '/config/ruledb',
24 method: 'POST',
25 waitMsgTarget: me,
26 failure: function (response, opts) {
27 Ext.Msg.alert(gettext('Error'), response.htmlStatus);
28 }
29 });
30 }
31 );
32 }
33 },
34
35 tbar: [
36 {
37 text: gettext('Factory Defaults'),
38 handler: 'onFactoryDefaults'
39 }
40 ]
41 });
42
43 Ext.define('PMG.SystemConfiguration', {
44 extend: 'Ext.tab.Panel',
45 xtype: 'pmgSystemConfiguration',
46
47 title: gettext('Configuration') + ': ' + gettext('System'),
48 border: false,
49 scrollable: true,
50 defaults: { border: false },
51 items: [
52 {
53 title: gettext('Network/Time'),
54 itemId: 'network',
55 xtype: 'panel',
56 layout: {
57 type: 'vbox',
58 align: 'stretch',
59 multi: true
60 },
61 bodyPadding: '0 0 10 0',
62 defaults: {
63 collapsible: true,
64 animCollapse: false,
65 margin: '10 10 0 10'
66 },
67 items: [
68 {
69 flex: 1,
70 minHeight: 200,
71 title: gettext('Interfaces'),
72 xtype: 'proxmoxNodeNetworkView',
73 nodename: Proxmox.NodeName
74 },
75 {
76 title: gettext('DNS'),
77 xtype: 'proxmoxNodeDNSView',
78 nodename: Proxmox.NodeName
79 },
80 {
81 title: gettext('Time'),
82 xtype: 'proxmoxNodeTimeView',
83 nodename: Proxmox.NodeName
84 }
85 ]
86 },
87 {
88 itemId: 'backup',
89 title: gettext('Backup'),
90 html: "Backup"
91 },
92 {
93 itemId: 'restore',
94 xtype: 'pmgRestoreSystemConfiguration'
95 },
96 {
97 itemId: 'options',
98 title: gettext('Options'),
99 xtype: 'pmgSystemOptions'
100 }
101 ]
102 });
103
104