]>
Commit | Line | Data |
---|---|---|
d1a35593 DM |
1 | /*global Proxmox*/ |
2 | Ext.define('PBS.ServerAdministration', { | |
3 | extend: 'Ext.tab.Panel', | |
4 | alias: 'widget.pbsServerAdministration', | |
5 | ||
6 | title: gettext('Server Administration'), | |
7 | ||
63bd6a9f | 8 | border: true, |
d1a35593 DM |
9 | defaults: { border: false }, |
10 | ||
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 | ||
20 | items: [ | |
ecb53af6 DM |
21 | { |
22 | xtype: 'pbsServerStatus', | |
23 | itemId: 'status' | |
24 | }, | |
d1a35593 DM |
25 | { |
26 | xtype: 'proxmoxNodeServiceView', | |
27 | title: gettext('Services'), | |
28 | itemId: 'services', | |
29 | startOnlyServices: { | |
30 | syslog: true, | |
b5907d8a TL |
31 | 'proxmox-backup': true, |
32 | 'proxmox-backup-proxy': true, | |
d1a35593 | 33 | }, |
68cacc00 | 34 | nodename: 'localhost' |
d1a35593 DM |
35 | }, |
36 | { | |
37 | xtype: 'proxmoxNodeAPT', | |
38 | title: gettext('Updates'), | |
39 | upgradeBtn: { | |
40 | xtype: 'button', | |
41 | reference: 'upgradeBtn', | |
42 | disabled: true, | |
43 | text: gettext('Upgrade'), | |
44 | handler: function() { | |
68cacc00 | 45 | Proxmox.Utils.openXtermJsViewer('upgrade', 0, 'localhost'); |
d1a35593 DM |
46 | } |
47 | }, | |
48 | itemId: 'updates', | |
68cacc00 | 49 | nodename: 'localhost' |
d1a35593 DM |
50 | }, |
51 | { | |
81cc71c0 | 52 | xtype: 'proxmoxJournalView', |
d1a35593 DM |
53 | itemId: 'logs', |
54 | title: gettext('Syslog'), | |
81cc71c0 | 55 | url: "/api2/extjs/nodes/localhost/journal", |
d1a35593 DM |
56 | }, |
57 | { | |
58 | xtype: 'proxmoxNodeTasks', | |
59 | itemId: 'tasks', | |
60 | title: gettext('Tasks'), | |
61 | height: 'auto', | |
68cacc00 | 62 | nodename: 'localhost' |
d1a35593 DM |
63 | } |
64 | ] | |
65 | }); | |
66 | ||
67 |