]>
git.proxmox.com Git - proxmox-backup.git/blob - www/ServerStatus.js
1 Ext
.define('PBS.ServerStatus', {
2 extend
: 'Ext.panel.Panel',
3 alias
: 'widget.pbsServerStatus',
5 title
: gettext('ServerStatus'),
7 html
: "Add Something usefule here ?",
9 initComponent: function() {
12 var node_command = function(cmd
) {
13 Proxmox
.Utils
.API2Request({
14 params
: { command
: cmd
},
15 url
: '/nodes/localhost/status',
18 failure: function(response
, opts
) {
19 Ext
.Msg
.alert(gettext('Error'), response
.htmlStatus
);
24 var restartBtn
= Ext
.create('Proxmox.button.Button', {
25 text
: gettext('Reboot'),
27 confirmMsg
: gettext("Reboot backup server?"),
29 node_command('reboot');
34 var shutdownBtn
= Ext
.create('Proxmox.button.Button', {
35 text
: gettext('Shutdown'),
37 confirmMsg
: gettext("Shutdown backup server?"),
39 node_command('shutdown');
41 iconCls
: 'fa fa-power-off'
44 me
.tbar
= [ restartBtn
, shutdownBtn
];