]>
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 | ||
8 | border: false, | |
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: [ | |
21 | // { | |
22 | // xtype: 'pbsServerStatus', | |
23 | // itemId: 'status' | |
24 | // }, | |
25 | { | |
26 | xtype: 'proxmoxNodeServiceView', | |
27 | title: gettext('Services'), | |
28 | itemId: 'services', | |
29 | startOnlyServices: { | |
30 | syslog: true, | |
31 | pmgproxy: true, | |
32 | pmgdaemon: true | |
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 | { | |
52 | xtype: 'proxmoxLogView', | |
53 | itemId: 'logs', | |
54 | title: gettext('Syslog'), | |
68cacc00 | 55 | url: "/api2/extjs/nodes/localhost/syslog", |
d1a35593 DM |
56 | log_select_timespan: 1 |
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 |