]>
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')); | |
c87d46fb | 17 | }, |
cea4e924 DM |
18 | }, |
19 | ||
252645ce | 20 | items: [ |
e653eb82 | 21 | { |
61415efa | 22 | xtype: 'pmgServerStatus', |
c87d46fb | 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, | |
c87d46fb | 32 | pmgdaemon: true, |
0f3d85d5 | 33 | }, |
c87d46fb | 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); |
c87d46fb | 46 | }, |
81c250bd | 47 | }, |
61415efa | 48 | itemId: 'updates', |
c87d46fb | 49 | nodename: Proxmox.NodeName, |
03912e15 | 50 | }, |
ac6617da | 51 | { |
1b146c10 | 52 | xtype: 'proxmoxJournalView', |
61415efa | 53 | itemId: 'logs', |
ac6617da | 54 | title: gettext('Syslog'), |
c87d46fb | 55 | url: "/api2/extjs/nodes/" + Proxmox.NodeName + "/journal", |
ac6617da | 56 | }, |
03912e15 DM |
57 | { |
58 | xtype: 'proxmoxNodeTasks', | |
61415efa | 59 | itemId: 'tasks', |
03912e15 DM |
60 | title: gettext('Tasks'), |
61 | height: 'auto', | |
c87d46fb TL |
62 | nodename: Proxmox.NodeName, |
63 | }, | |
64 | ], | |
252645ce DM |
65 | }); |
66 | ||
67 |