]> git.proxmox.com Git - pmg-gui.git/blame - js/SystemConfiguration.js
jslint: add Proxmox global to files
[pmg-gui.git] / js / SystemConfiguration.js
CommitLineData
ff735274 1/*global Proxmox*/
ec922854
DM
2Ext.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
e119071c
DM
41Ext.define('PMG.SystemConfiguration', {
42 extend: 'Ext.tab.Panel',
bca16cae 43 xtype: 'pmgSystemConfiguration',
e119071c 44
d9e1af94 45 title: gettext('Configuration') + ': ' + gettext('System'),
830e5827 46 border: false,
1a51a8dc 47 scrollable: true,
830e5827 48 defaults: { border: false },
e119071c
DM
49 items: [
50 {
1a51a8dc
DC
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,
3960dd97 68 minHeight: 200,
1a51a8dc
DC
69 title: gettext('Interfaces'),
70 xtype: 'proxmoxNodeNetworkView',
71 nodename: Proxmox.NodeName,
72 },
73 {
1a51a8dc
DC
74 title: gettext('DNS'),
75 xtype: 'proxmoxNodeDNSView',
76 nodename: Proxmox.NodeName
77 },
78 {
1a51a8dc
DC
79 title: gettext('Time'),
80 xtype: 'proxmoxNodeTimeView',
81 nodename: Proxmox.NodeName
82 },
83 ]
e119071c
DM
84 },
85 {
a4504500 86 itemId: 'backup',
e119071c 87 title: gettext('Backup'),
1a51a8dc 88 html: "Backup"
e119071c
DM
89 },
90 {
a4504500 91 itemId: 'restore',
ec922854 92 xtype: 'pmgRestoreSystemConfiguration'
e119071c
DM
93 },
94 {
fc7de588
DM
95 itemId: 'options',
96 title: gettext('Options'),
97 xtype: 'pmgSystemOptions',
e119071c
DM
98 }
99 ]
100});
101
102