]> git.proxmox.com Git - proxmox-backup.git/blame - www/ServerAdministration.js
ui: add panel/Tasks and use it for the node tasks
[proxmox-backup.git] / www / ServerAdministration.js
CommitLineData
d1a35593
DM
1Ext.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
10 controller: {
11 xclass: 'Ext.app.ViewController',
12
13 init: function(view) {
14 var upgradeBtn = view.lookupReference('upgradeBtn');
15 upgradeBtn.setDisabled(!(Proxmox.UserName && Proxmox.UserName === 'root@pam'));
6ab77df3 16 },
d1a35593
DM
17 },
18
19 items: [
ecb53af6
DM
20 {
21 xtype: 'pbsServerStatus',
6ab77df3 22 itemId: 'status',
0656344a 23 iconCls: 'fa fa-area-chart',
ecb53af6 24 },
d1a35593
DM
25 {
26 xtype: 'proxmoxNodeServiceView',
27 title: gettext('Services'),
28 itemId: 'services',
0656344a 29 iconCls: 'fa fa-cogs',
e6b599aa 30 restartCommand: 'reload', // avoid disruptions
d1a35593
DM
31 startOnlyServices: {
32 syslog: true,
b5907d8a
TL
33 'proxmox-backup': true,
34 'proxmox-backup-proxy': true,
d1a35593 35 },
6ab77df3 36 nodename: 'localhost',
d1a35593
DM
37 },
38 {
39 xtype: 'proxmoxNodeAPT',
40 title: gettext('Updates'),
0656344a 41 iconCls: 'fa fa-refresh',
d1a35593
DM
42 upgradeBtn: {
43 xtype: 'button',
44 reference: 'upgradeBtn',
45 disabled: true,
46 text: gettext('Upgrade'),
47 handler: function() {
68cacc00 48 Proxmox.Utils.openXtermJsViewer('upgrade', 0, 'localhost');
6ab77df3 49 },
d1a35593
DM
50 },
51 itemId: 'updates',
6ab77df3 52 nodename: 'localhost',
d1a35593
DM
53 },
54 {
81cc71c0 55 xtype: 'proxmoxJournalView',
d1a35593 56 itemId: 'logs',
0656344a 57 iconCls: 'fa fa-list',
d1a35593 58 title: gettext('Syslog'),
81cc71c0 59 url: "/api2/extjs/nodes/localhost/journal",
d1a35593
DM
60 },
61 {
185dab76 62 xtype: 'pbsNodeTasks',
d1a35593 63 itemId: 'tasks',
0656344a 64 iconCls: 'fa fa-list-alt',
d1a35593
DM
65 title: gettext('Tasks'),
66 height: 'auto',
6ab77df3
TL
67 nodename: 'localhost',
68 },
69 ],
d1a35593
DM
70});
71
72