]>
Commit | Line | Data |
---|---|---|
ff735274 | 1 | /*global Proxmox*/ |
ec922854 DM |
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) { | |
c17f9fe4 DC |
18 | if (button !== 'yes') { |
19 | return; | |
20 | } | |
ec922854 DM |
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 | ||
e119071c DM |
43 | Ext.define('PMG.SystemConfiguration', { |
44 | extend: 'Ext.tab.Panel', | |
bca16cae | 45 | xtype: 'pmgSystemConfiguration', |
e119071c | 46 | |
d9e1af94 | 47 | title: gettext('Configuration') + ': ' + gettext('System'), |
830e5827 | 48 | border: false, |
1a51a8dc | 49 | scrollable: true, |
830e5827 | 50 | defaults: { border: false }, |
e119071c DM |
51 | items: [ |
52 | { | |
1a51a8dc DC |
53 | title: gettext('Network/Time'), |
54 | itemId: 'network', | |
55 | xtype: 'panel', | |
56 | layout: { | |
57 | type: 'vbox', | |
58 | align: 'stretch', | |
771bd0b9 | 59 | multi: true |
1a51a8dc DC |
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, | |
3960dd97 | 70 | minHeight: 200, |
1a51a8dc DC |
71 | title: gettext('Interfaces'), |
72 | xtype: 'proxmoxNodeNetworkView', | |
771bd0b9 | 73 | nodename: Proxmox.NodeName |
1a51a8dc DC |
74 | }, |
75 | { | |
1a51a8dc DC |
76 | title: gettext('DNS'), |
77 | xtype: 'proxmoxNodeDNSView', | |
78 | nodename: Proxmox.NodeName | |
79 | }, | |
80 | { | |
1a51a8dc DC |
81 | title: gettext('Time'), |
82 | xtype: 'proxmoxNodeTimeView', | |
83 | nodename: Proxmox.NodeName | |
771bd0b9 | 84 | } |
1a51a8dc | 85 | ] |
e119071c DM |
86 | }, |
87 | { | |
a4504500 | 88 | itemId: 'backup', |
e119071c | 89 | title: gettext('Backup'), |
1a51a8dc | 90 | html: "Backup" |
e119071c DM |
91 | }, |
92 | { | |
a4504500 | 93 | itemId: 'restore', |
ec922854 | 94 | xtype: 'pmgRestoreSystemConfiguration' |
e119071c DM |
95 | }, |
96 | { | |
fc7de588 DM |
97 | itemId: 'options', |
98 | title: gettext('Options'), | |
771bd0b9 | 99 | xtype: 'pmgSystemOptions' |
e119071c DM |
100 | } |
101 | ] | |
102 | }); | |
103 | ||
104 |