2019-01-25 13:10:55 +01:00
/*global Proxmox*/
Ext . define ( 'PBS.ServerAdministration' , {
extend : 'Ext.tab.Panel' ,
alias : 'widget.pbsServerAdministration' ,
title : gettext ( 'Server Administration' ) ,
2019-04-11 12:18:04 +02:00
border : true ,
2019-01-25 13:10:55 +01: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 : [
2020-04-30 12:11:08 +02:00
{
xtype : 'pbsServerStatus' ,
itemId : 'status'
} ,
2019-01-25 13:10:55 +01:00
{
xtype : 'proxmoxNodeServiceView' ,
title : gettext ( 'Services' ) ,
itemId : 'services' ,
2020-07-25 20:23:12 +02:00
restartCommand : 'reload' , // avoid disruptions
2019-01-25 13:10:55 +01:00
startOnlyServices : {
syslog : true ,
2019-12-16 16:48:50 +01:00
'proxmox-backup' : true ,
'proxmox-backup-proxy' : true ,
2019-01-25 13:10:55 +01:00
} ,
2019-01-25 13:14:43 +01:00
nodename : 'localhost'
2019-01-25 13:10:55 +01:00
} ,
{
xtype : 'proxmoxNodeAPT' ,
title : gettext ( 'Updates' ) ,
upgradeBtn : {
xtype : 'button' ,
reference : 'upgradeBtn' ,
disabled : true ,
text : gettext ( 'Upgrade' ) ,
handler : function ( ) {
2019-01-25 13:14:43 +01:00
Proxmox . Utils . openXtermJsViewer ( 'upgrade' , 0 , 'localhost' ) ;
2019-01-25 13:10:55 +01:00
}
} ,
itemId : 'updates' ,
2019-01-25 13:14:43 +01:00
nodename : 'localhost'
2019-01-25 13:10:55 +01:00
} ,
{
2019-12-17 14:06:48 +01:00
xtype : 'proxmoxJournalView' ,
2019-01-25 13:10:55 +01:00
itemId : 'logs' ,
title : gettext ( 'Syslog' ) ,
2019-12-17 14:06:48 +01:00
url : "/api2/extjs/nodes/localhost/journal" ,
2019-01-25 13:10:55 +01:00
} ,
{
xtype : 'proxmoxNodeTasks' ,
itemId : 'tasks' ,
title : gettext ( 'Tasks' ) ,
height : 'auto' ,
2019-01-25 13:14:43 +01:00
nodename : 'localhost'
2019-01-25 13:10:55 +01:00
}
]
} ) ;