]>
Commit | Line | Data |
---|---|---|
d1a35593 DM |
1 | Ext.define('PBS.ServerAdministration', { |
2 | extend: 'Ext.tab.Panel', | |
3 | alias: 'widget.pbsServerAdministration', | |
4 | ||
5 | title: gettext('Server Administration'), | |
6 | ||
63bd6a9f | 7 | border: true, |
d1a35593 DM |
8 | defaults: { border: false }, |
9 | ||
f4f9a503 AL |
10 | tools: [PBS.Utils.get_help_tool("sysadmin-host-administration")], |
11 | ||
d1a35593 DM |
12 | controller: { |
13 | xclass: 'Ext.app.ViewController', | |
14 | ||
15 | init: function(view) { | |
16 | var upgradeBtn = view.lookupReference('upgradeBtn'); | |
17 | upgradeBtn.setDisabled(!(Proxmox.UserName && Proxmox.UserName === 'root@pam')); | |
6ab77df3 | 18 | }, |
d1a35593 DM |
19 | }, |
20 | ||
21 | items: [ | |
ecb53af6 DM |
22 | { |
23 | xtype: 'pbsServerStatus', | |
6ab77df3 | 24 | itemId: 'status', |
0656344a | 25 | iconCls: 'fa fa-area-chart', |
ecb53af6 | 26 | }, |
d1a35593 DM |
27 | { |
28 | xtype: 'proxmoxNodeServiceView', | |
29 | title: gettext('Services'), | |
30 | itemId: 'services', | |
0656344a | 31 | iconCls: 'fa fa-cogs', |
e6b599aa | 32 | restartCommand: 'reload', // avoid disruptions |
d1a35593 DM |
33 | startOnlyServices: { |
34 | syslog: true, | |
b5907d8a TL |
35 | 'proxmox-backup': true, |
36 | 'proxmox-backup-proxy': true, | |
d1a35593 | 37 | }, |
6ab77df3 | 38 | nodename: 'localhost', |
d1a35593 DM |
39 | }, |
40 | { | |
41 | xtype: 'proxmoxNodeAPT', | |
42 | title: gettext('Updates'), | |
0656344a | 43 | iconCls: 'fa fa-refresh', |
d1a35593 DM |
44 | upgradeBtn: { |
45 | xtype: 'button', | |
46 | reference: 'upgradeBtn', | |
47 | disabled: true, | |
48 | text: gettext('Upgrade'), | |
49 | handler: function() { | |
68cacc00 | 50 | Proxmox.Utils.openXtermJsViewer('upgrade', 0, 'localhost'); |
6ab77df3 | 51 | }, |
d1a35593 DM |
52 | }, |
53 | itemId: 'updates', | |
6ab77df3 | 54 | nodename: 'localhost', |
d1a35593 DM |
55 | }, |
56 | { | |
81cc71c0 | 57 | xtype: 'proxmoxJournalView', |
d1a35593 | 58 | itemId: 'logs', |
0656344a | 59 | iconCls: 'fa fa-list', |
d1a35593 | 60 | title: gettext('Syslog'), |
81cc71c0 | 61 | url: "/api2/extjs/nodes/localhost/journal", |
d1a35593 DM |
62 | }, |
63 | { | |
185dab76 | 64 | xtype: 'pbsNodeTasks', |
d1a35593 | 65 | itemId: 'tasks', |
0656344a | 66 | iconCls: 'fa fa-list-alt', |
d1a35593 DM |
67 | title: gettext('Tasks'), |
68 | height: 'auto', | |
6ab77df3 TL |
69 | nodename: 'localhost', |
70 | }, | |
71 | ], | |
d1a35593 DM |
72 | }); |
73 | ||
74 |