proxmox-backup/www/ServerAdministration.js
Thomas Lamprecht 0656344ae4 ui: administration: set icons for tabs
orient on PVE, the ones for Updates, ServerStatus, should by
self-explanatory.

Services is in PVE named "System", but reusing that cogs icon makes
similar sense here too, and seems in line with search result of a
"service icons" query.

Syslog is the same as our general log icon, but as we also use this
normally for worker task logs and that is present here too, I
changed the worker task log icon to the alternative list, which
resembles a task view window - so IMO even better than before.

Sync that change also into the always present tasks button at the top
right.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-31 09:11:11 +01:00

73 lines
1.6 KiB
JavaScript

Ext.define('PBS.ServerAdministration', {
extend: 'Ext.tab.Panel',
alias: 'widget.pbsServerAdministration',
title: gettext('Server Administration'),
border: true,
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',
iconCls: 'fa fa-area-chart',
},
{
xtype: 'proxmoxNodeServiceView',
title: gettext('Services'),
itemId: 'services',
iconCls: 'fa fa-cogs',
restartCommand: 'reload', // avoid disruptions
startOnlyServices: {
syslog: true,
'proxmox-backup': true,
'proxmox-backup-proxy': true,
},
nodename: 'localhost',
},
{
xtype: 'proxmoxNodeAPT',
title: gettext('Updates'),
iconCls: 'fa fa-refresh',
upgradeBtn: {
xtype: 'button',
reference: 'upgradeBtn',
disabled: true,
text: gettext('Upgrade'),
handler: function() {
Proxmox.Utils.openXtermJsViewer('upgrade', 0, 'localhost');
},
},
itemId: 'updates',
nodename: 'localhost',
},
{
xtype: 'proxmoxJournalView',
itemId: 'logs',
iconCls: 'fa fa-list',
title: gettext('Syslog'),
url: "/api2/extjs/nodes/localhost/journal",
},
{
xtype: 'proxmoxNodeTasks',
itemId: 'tasks',
iconCls: 'fa fa-list-alt',
title: gettext('Tasks'),
height: 'auto',
nodename: 'localhost',
},
],
});