ServerAdministration.js: new widget

This commit is contained in:
Dietmar Maurer 2019-01-25 13:10:55 +01:00
parent d85facd1d2
commit d1a35593cb
2 changed files with 69 additions and 0 deletions

View File

@ -5,6 +5,7 @@ JSSRC= \
SystemConfiguration.js \ SystemConfiguration.js \
Subscription.js \ Subscription.js \
DataStoreConfig.js \ DataStoreConfig.js \
ServerAdministration.js \
NavigationTree.js \ NavigationTree.js \
Application.js \ Application.js \
MainView.js MainView.js

View File

@ -0,0 +1,68 @@
/*global Proxmox*/
Ext.define('PBS.ServerAdministration', {
extend: 'Ext.tab.Panel',
alias: 'widget.pbsServerAdministration',
title: gettext('Server Administration'),
border: false,
defaults: { border: false },
controller: {
xclass: 'Ext.app.ViewController',
init: function(view) {
var upgradeBtn = view.lookupReference('upgradeBtn');
upgradeBtn.setDisabled(!(Proxmox.UserName && Proxmox.UserName === 'root@pam'));
}
},
items: [
// {
// xtype: 'pbsServerStatus',
// itemId: 'status'
// },
{
xtype: 'proxmoxNodeServiceView',
title: gettext('Services'),
itemId: 'services',
startOnlyServices: {
syslog: true,
pmgproxy: true,
pmgdaemon: true
},
nodename: Proxmox.NodeName
},
{
xtype: 'proxmoxNodeAPT',
title: gettext('Updates'),
upgradeBtn: {
xtype: 'button',
reference: 'upgradeBtn',
disabled: true,
text: gettext('Upgrade'),
handler: function() {
Proxmox.Utils.openXtermJsViewer('upgrade', 0, Proxmox.NodeName);
}
},
itemId: 'updates',
nodename: Proxmox.NodeName
},
{
xtype: 'proxmoxLogView',
itemId: 'logs',
title: gettext('Syslog'),
url: "/api2/extjs/nodes/" + Proxmox.NodeName + "/syslog",
log_select_timespan: 1
},
{
xtype: 'proxmoxNodeTasks',
itemId: 'tasks',
title: gettext('Tasks'),
height: 'auto',
nodename: Proxmox.NodeName
}
]
});