]> git.proxmox.com Git - proxmox-backup.git/blob - www/ServerAdministration.js
ui: add panel/Tasks and use it for the node tasks
[proxmox-backup.git] / www / ServerAdministration.js
1 Ext.define('PBS.ServerAdministration', {
2 extend: 'Ext.tab.Panel',
3 alias: 'widget.pbsServerAdministration',
4
5 title: gettext('Server Administration'),
6
7 border: true,
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'));
16 },
17 },
18
19 items: [
20 {
21 xtype: 'pbsServerStatus',
22 itemId: 'status',
23 iconCls: 'fa fa-area-chart',
24 },
25 {
26 xtype: 'proxmoxNodeServiceView',
27 title: gettext('Services'),
28 itemId: 'services',
29 iconCls: 'fa fa-cogs',
30 restartCommand: 'reload', // avoid disruptions
31 startOnlyServices: {
32 syslog: true,
33 'proxmox-backup': true,
34 'proxmox-backup-proxy': true,
35 },
36 nodename: 'localhost',
37 },
38 {
39 xtype: 'proxmoxNodeAPT',
40 title: gettext('Updates'),
41 iconCls: 'fa fa-refresh',
42 upgradeBtn: {
43 xtype: 'button',
44 reference: 'upgradeBtn',
45 disabled: true,
46 text: gettext('Upgrade'),
47 handler: function() {
48 Proxmox.Utils.openXtermJsViewer('upgrade', 0, 'localhost');
49 },
50 },
51 itemId: 'updates',
52 nodename: 'localhost',
53 },
54 {
55 xtype: 'proxmoxJournalView',
56 itemId: 'logs',
57 iconCls: 'fa fa-list',
58 title: gettext('Syslog'),
59 url: "/api2/extjs/nodes/localhost/journal",
60 },
61 {
62 xtype: 'pbsNodeTasks',
63 itemId: 'tasks',
64 iconCls: 'fa fa-list-alt',
65 title: gettext('Tasks'),
66 height: 'auto',
67 nodename: 'localhost',
68 },
69 ],
70 });
71
72