]>
Commit | Line | Data |
---|---|---|
2c1d504e | 1 | /*global Proxmox*/ |
252645ce DM |
2 | Ext.define('PMG.ServerAdministration', { |
3 | extend: 'Ext.tab.Panel', | |
4 | alias: 'widget.pmgServerAdministration', | |
5 | ||
6 | title: gettext('Server Administration'), | |
7 | ||
830e5827 DM |
8 | border: false, |
9 | defaults: { border: false }, | |
10 | ||
cea4e924 DM |
11 | controller: { |
12 | xclass: 'Ext.app.ViewController', | |
13 | ||
14 | init: function(view) { | |
15 | var upgradeBtn = view.lookupReference('upgradeBtn'); | |
16 | upgradeBtn.setDisabled(!(Proxmox.UserName && Proxmox.UserName === 'root@pam')); | |
17 | } | |
18 | }, | |
19 | ||
252645ce | 20 | items: [ |
e653eb82 | 21 | { |
61415efa DC |
22 | xtype: 'pmgServerStatus', |
23 | itemId: 'status' | |
e653eb82 | 24 | }, |
252645ce | 25 | { |
0f3d85d5 | 26 | xtype: 'proxmoxNodeServiceView', |
252645ce | 27 | title: gettext('Services'), |
61415efa | 28 | itemId: 'services', |
0f3d85d5 DM |
29 | startOnlyServices: { |
30 | syslog: true, | |
31 | pmgproxy: true, | |
32 | pmgdaemon: true | |
33 | }, | |
34 | nodename: Proxmox.NodeName | |
252645ce DM |
35 | }, |
36 | { | |
81c250bd | 37 | xtype: 'proxmoxNodeAPT', |
252645ce | 38 | title: gettext('Updates'), |
81c250bd DM |
39 | upgradeBtn: { |
40 | xtype: 'button', | |
cea4e924 DM |
41 | reference: 'upgradeBtn', |
42 | disabled: true, | |
81c250bd DM |
43 | text: gettext('Upgrade'), |
44 | handler: function() { | |
6ad5f9f2 | 45 | Proxmox.Utils.openXtermJsViewer('upgrade', 0, Proxmox.NodeName); |
81c250bd DM |
46 | } |
47 | }, | |
61415efa | 48 | itemId: 'updates', |
81c250bd | 49 | nodename: Proxmox.NodeName |
03912e15 | 50 | }, |
ac6617da DM |
51 | { |
52 | xtype: 'proxmoxLogView', | |
61415efa | 53 | itemId: 'logs', |
ac6617da DM |
54 | title: gettext('Syslog'), |
55 | url: "/api2/extjs/nodes/" + Proxmox.NodeName + "/syslog", | |
56 | log_select_timespan: 1 | |
57 | }, | |
03912e15 DM |
58 | { |
59 | xtype: 'proxmoxNodeTasks', | |
61415efa | 60 | itemId: 'tasks', |
03912e15 DM |
61 | title: gettext('Tasks'), |
62 | height: 'auto', | |
63 | nodename: Proxmox.NodeName | |
252645ce DM |
64 | } |
65 | ] | |
66 | }); | |
67 | ||
68 |