2019-01-25 12:10:55 +00:00
|
|
|
/*global Proxmox*/
|
|
|
|
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'));
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
items: [
|
|
|
|
// {
|
|
|
|
// xtype: 'pbsServerStatus',
|
|
|
|
// itemId: 'status'
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
xtype: 'proxmoxNodeServiceView',
|
|
|
|
title: gettext('Services'),
|
|
|
|
itemId: 'services',
|
|
|
|
startOnlyServices: {
|
|
|
|
syslog: true,
|
|
|
|
pmgproxy: true,
|
|
|
|
pmgdaemon: true
|
|
|
|
},
|
2019-01-25 12:14:43 +00:00
|
|
|
nodename: 'localhost'
|
2019-01-25 12:10:55 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
xtype: 'proxmoxNodeAPT',
|
|
|
|
title: gettext('Updates'),
|
|
|
|
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');
|
2019-01-25 12:10:55 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
itemId: 'updates',
|
2019-01-25 12:14:43 +00:00
|
|
|
nodename: 'localhost'
|
2019-01-25 12:10:55 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
xtype: 'proxmoxLogView',
|
|
|
|
itemId: 'logs',
|
|
|
|
title: gettext('Syslog'),
|
2019-01-25 12:14:43 +00:00
|
|
|
url: "/api2/extjs/nodes/localhost/syslog",
|
2019-01-25 12:10:55 +00:00
|
|
|
log_select_timespan: 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
xtype: 'proxmoxNodeTasks',
|
|
|
|
itemId: 'tasks',
|
|
|
|
title: gettext('Tasks'),
|
|
|
|
height: 'auto',
|
2019-01-25 12:14:43 +00:00
|
|
|
nodename: 'localhost'
|
2019-01-25 12:10:55 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
|