proxmox-backup/www/ServerAdministration.js

84 lines
1.8 KiB
JavaScript
Raw Normal View History

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 },
tools: [PBS.Utils.get_help_tool("sysadmin-host-administration")],
2019-01-25 12:10:55 +00:00
controller: {
xclass: 'Ext.app.ViewController',
init: function(view) {
var upgradeBtn = view.lookupReference('upgradeBtn');
upgradeBtn.setDisabled(!(Proxmox.UserName && Proxmox.UserName === 'root@pam'));
},
2019-01-25 12:10:55 +00:00
},
items: [
{
xtype: 'pbsServerStatus',
itemId: 'status',
iconCls: 'fa fa-area-chart',
},
2019-01-25 12:10:55 +00:00
{
xtype: 'proxmoxNodeServiceView',
title: gettext('Services'),
itemId: 'services',
iconCls: 'fa fa-cogs',
restartCommand: 'reload', // avoid disruptions
2019-01-25 12:10:55 +00:00
startOnlyServices: {
syslog: true,
'proxmox-backup': true,
'proxmox-backup-proxy': true,
2019-01-25 12:10:55 +00:00
},
nodename: 'localhost',
2019-01-25 12:10:55 +00:00
},
{
xtype: 'proxmoxNodeAPT',
title: gettext('Updates'),
iconCls: 'fa fa-refresh',
2019-01-25 12:10:55 +00:00
upgradeBtn: {
xtype: 'button',
reference: 'upgradeBtn',
disabled: true,
text: gettext('Upgrade'),
handler: function() {
Proxmox.Utils.openXtermJsViewer('upgrade', 0, 'localhost');
},
2019-01-25 12:10:55 +00:00
},
itemId: 'updates',
nodename: 'localhost',
2019-01-25 12:10:55 +00:00
},
{
xtype: 'proxmoxJournalView',
2019-01-25 12:10:55 +00:00
itemId: 'logs',
iconCls: 'fa fa-list',
2019-01-25 12:10:55 +00:00
title: gettext('Syslog'),
url: "/api2/extjs/nodes/localhost/journal",
2019-01-25 12:10:55 +00:00
},
{
xtype: 'proxmoxNodeTasks',
2019-01-25 12:10:55 +00:00
itemId: 'tasks',
iconCls: 'fa fa-list-alt',
2019-01-25 12:10:55 +00:00
title: gettext('Tasks'),
height: 'auto',
nodename: 'localhost',
extraFilter: [
{
xtype: 'pbsDataStoreSelector',
fieldLabel: gettext('Datastore'),
emptyText: gettext('All'),
name: 'store',
allowBlank: true,
},
],
},
],
2019-01-25 12:10:55 +00:00
});