]> git.proxmox.com Git - pmg-gui.git/blame - js/ServerAdministration.js
quarantine: refactor spamquarantine controller
[pmg-gui.git] / js / ServerAdministration.js
CommitLineData
252645ce
DM
1Ext.define('PMG.ServerAdministration', {
2 extend: 'Ext.tab.Panel',
3 alias: 'widget.pmgServerAdministration',
4
5 title: gettext('Server Administration'),
6
830e5827
DM
7 border: false,
8 defaults: { border: false },
9
cea4e924
DM
10 controller: {
11 xclass: 'Ext.app.ViewController',
12
13 init: function(view) {
14 var upgradeBtn = view.lookupReference('upgradeBtn');
15 upgradeBtn.setDisabled(!(Proxmox.UserName && Proxmox.UserName === 'root@pam'));
c87d46fb 16 },
cea4e924
DM
17 },
18
252645ce 19 items: [
e653eb82 20 {
61415efa 21 xtype: 'pmgServerStatus',
c87d46fb 22 itemId: 'status',
e245faa5 23 iconCls: 'fa fa-area-chart',
e653eb82 24 },
252645ce 25 {
0f3d85d5 26 xtype: 'proxmoxNodeServiceView',
e245faa5 27 title: gettext('Services'),
61415efa 28 itemId: 'services',
e245faa5 29 iconCls: 'fa fa-cogs',
0f3d85d5
DM
30 startOnlyServices: {
31 syslog: true,
32 pmgproxy: true,
c87d46fb 33 pmgdaemon: true,
0f3d85d5 34 },
c87d46fb 35 nodename: Proxmox.NodeName,
252645ce
DM
36 },
37 {
81c250bd 38 xtype: 'proxmoxNodeAPT',
e245faa5
TL
39 title: gettext('Updates'),
40 iconCls: 'fa fa-refresh',
81c250bd
DM
41 upgradeBtn: {
42 xtype: 'button',
cea4e924
DM
43 reference: 'upgradeBtn',
44 disabled: true,
81c250bd
DM
45 text: gettext('Upgrade'),
46 handler: function() {
6ad5f9f2 47 Proxmox.Utils.openXtermJsViewer('upgrade', 0, Proxmox.NodeName);
c87d46fb 48 },
81c250bd 49 },
61415efa 50 itemId: 'updates',
c87d46fb 51 nodename: Proxmox.NodeName,
03912e15 52 },
8431ab89
FE
53 {
54 xtype: 'proxmoxNodeAPTRepositories',
55 title: gettext('Repositories'),
e245faa5 56 iconCls: 'fa fa-files-o',
8431ab89
FE
57 itemId: 'aptrepositories',
58 nodename: 'localhost',
59 product: 'Proxmox Mail Gateway',
3cc0ec1b 60 onlineHelp: 'pmg_package_repositories',
8431ab89 61 },
ac6617da 62 {
1b146c10 63 xtype: 'proxmoxJournalView',
61415efa 64 itemId: 'logs',
e245faa5 65 iconCls: 'fa fa-list',
ac6617da 66 title: gettext('Syslog'),
c87d46fb 67 url: "/api2/extjs/nodes/" + Proxmox.NodeName + "/journal",
ac6617da 68 },
03912e15
DM
69 {
70 xtype: 'proxmoxNodeTasks',
61415efa 71 itemId: 'tasks',
e245faa5 72 iconCls: 'fa fa-list-alt',
03912e15
DM
73 title: gettext('Tasks'),
74 height: 'auto',
c87d46fb
TL
75 nodename: Proxmox.NodeName,
76 },
77 ],
252645ce
DM
78});
79
80