From d1a35593cbec87ebc2167ae494d427b1729c7a40 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 25 Jan 2019 13:10:55 +0100 Subject: [PATCH] ServerAdministration.js: new widget --- www/Makefile | 1 + www/ServerAdministration.js | 68 +++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 www/ServerAdministration.js diff --git a/www/Makefile b/www/Makefile index fdd93c26..1821dbf0 100644 --- a/www/Makefile +++ b/www/Makefile @@ -5,6 +5,7 @@ JSSRC= \ SystemConfiguration.js \ Subscription.js \ DataStoreConfig.js \ + ServerAdministration.js \ NavigationTree.js \ Application.js \ MainView.js diff --git a/www/ServerAdministration.js b/www/ServerAdministration.js new file mode 100644 index 00000000..4001402c --- /dev/null +++ b/www/ServerAdministration.js @@ -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 + } + ] +}); + +