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