]>
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', | |
e6b599aa | 29 | restartCommand: 'reload', // avoid disruptions |
d1a35593 DM |
30 | startOnlyServices: { |
31 | syslog: true, | |
b5907d8a TL |
32 | 'proxmox-backup': true, |
33 | 'proxmox-backup-proxy': true, | |
d1a35593 | 34 | }, |
68cacc00 | 35 | nodename: 'localhost' |
d1a35593 DM |
36 | }, |
37 | { | |
38 | xtype: 'proxmoxNodeAPT', | |
39 | title: gettext('Updates'), | |
40 | upgradeBtn: { | |
41 | xtype: 'button', | |
42 | reference: 'upgradeBtn', | |
43 | disabled: true, | |
44 | text: gettext('Upgrade'), | |
45 | handler: function() { | |
68cacc00 | 46 | Proxmox.Utils.openXtermJsViewer('upgrade', 0, 'localhost'); |
d1a35593 DM |
47 | } |
48 | }, | |
49 | itemId: 'updates', | |
68cacc00 | 50 | nodename: 'localhost' |
d1a35593 DM |
51 | }, |
52 | { | |
81cc71c0 | 53 | xtype: 'proxmoxJournalView', |
d1a35593 DM |
54 | itemId: 'logs', |
55 | title: gettext('Syslog'), | |
81cc71c0 | 56 | url: "/api2/extjs/nodes/localhost/journal", |
d1a35593 DM |
57 | }, |
58 | { | |
59 | xtype: 'proxmoxNodeTasks', | |
60 | itemId: 'tasks', | |
61 | title: gettext('Tasks'), | |
62 | height: 'auto', | |
68cacc00 | 63 | nodename: 'localhost' |
d1a35593 DM |
64 | } |
65 | ] | |
66 | }); | |
67 | ||
68 |