2019-01-25 12:10:55 +00:00
|
|
|
Ext.define('PBS.ServerAdministration', {
|
|
|
|
extend: 'Ext.tab.Panel',
|
|
|
|
alias: 'widget.pbsServerAdministration',
|
|
|
|
|
|
|
|
title: gettext('Server Administration'),
|
|
|
|
|
2019-04-11 10:18:04 +00:00
|
|
|
border: true,
|
2019-01-25 12:10:55 +00:00
|
|
|
defaults: { border: false },
|
|
|
|
|
|
|
|
controller: {
|
|
|
|
xclass: 'Ext.app.ViewController',
|
|
|
|
|
|
|
|
init: function(view) {
|
|
|
|
var upgradeBtn = view.lookupReference('upgradeBtn');
|
|
|
|
upgradeBtn.setDisabled(!(Proxmox.UserName && Proxmox.UserName === 'root@pam'));
|
2020-09-25 16:40:03 +00:00
|
|
|
},
|
2019-01-25 12:10:55 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
items: [
|
2020-04-30 10:11:08 +00:00
|
|
|
{
|
|
|
|
xtype: 'pbsServerStatus',
|
2020-09-25 16:40:03 +00:00
|
|
|
itemId: 'status',
|
2020-10-31 08:11:10 +00:00
|
|
|
iconCls: 'fa fa-area-chart',
|
2020-04-30 10:11:08 +00:00
|
|
|
},
|
2019-01-25 12:10:55 +00:00
|
|
|
{
|
|
|
|
xtype: 'proxmoxNodeServiceView',
|
|
|
|
title: gettext('Services'),
|
|
|
|
itemId: 'services',
|
2020-10-31 08:11:10 +00:00
|
|
|
iconCls: 'fa fa-cogs',
|
2020-07-25 18:23:12 +00:00
|
|
|
restartCommand: 'reload', // avoid disruptions
|
2019-01-25 12:10:55 +00:00
|
|
|
startOnlyServices: {
|
|
|
|
syslog: true,
|
2019-12-16 15:48:50 +00:00
|
|
|
'proxmox-backup': true,
|
|
|
|
'proxmox-backup-proxy': true,
|
2019-01-25 12:10:55 +00:00
|
|
|
},
|
2020-09-25 16:40:03 +00:00
|
|
|
nodename: 'localhost',
|
2019-01-25 12:10:55 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
xtype: 'proxmoxNodeAPT',
|
|
|
|
title: gettext('Updates'),
|
2020-10-31 08:11:10 +00:00
|
|
|
iconCls: 'fa fa-refresh',
|
2019-01-25 12:10:55 +00:00
|
|
|
upgradeBtn: {
|
|
|
|
xtype: 'button',
|
|
|
|
reference: 'upgradeBtn',
|
|
|
|
disabled: true,
|
|
|
|
text: gettext('Upgrade'),
|
|
|
|
handler: function() {
|
2019-01-25 12:14:43 +00:00
|
|
|
Proxmox.Utils.openXtermJsViewer('upgrade', 0, 'localhost');
|
2020-09-25 16:40:03 +00:00
|
|
|
},
|
2019-01-25 12:10:55 +00:00
|
|
|
},
|
|
|
|
itemId: 'updates',
|
2020-09-25 16:40:03 +00:00
|
|
|
nodename: 'localhost',
|
2019-01-25 12:10:55 +00:00
|
|
|
},
|
|
|
|
{
|
2019-12-17 13:06:48 +00:00
|
|
|
xtype: 'proxmoxJournalView',
|
2019-01-25 12:10:55 +00:00
|
|
|
itemId: 'logs',
|
2020-10-31 08:11:10 +00:00
|
|
|
iconCls: 'fa fa-list',
|
2019-01-25 12:10:55 +00:00
|
|
|
title: gettext('Syslog'),
|
2019-12-17 13:06:48 +00:00
|
|
|
url: "/api2/extjs/nodes/localhost/journal",
|
2019-01-25 12:10:55 +00:00
|
|
|
},
|
|
|
|
{
|
2020-10-30 14:02:15 +00:00
|
|
|
xtype: 'pbsNodeTasks',
|
2019-01-25 12:10:55 +00:00
|
|
|
itemId: 'tasks',
|
2020-10-31 08:11:10 +00:00
|
|
|
iconCls: 'fa fa-list-alt',
|
2019-01-25 12:10:55 +00:00
|
|
|
title: gettext('Tasks'),
|
|
|
|
height: 'auto',
|
2020-09-25 16:40:03 +00:00
|
|
|
nodename: 'localhost',
|
|
|
|
},
|
|
|
|
],
|
2019-01-25 12:10:55 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|