]>
Commit | Line | Data |
---|---|---|
1 | Ext.define('PMG.ServerAdministration', { | |
2 | extend: 'Ext.tab.Panel', | |
3 | alias: 'widget.pmgServerAdministration', | |
4 | ||
5 | title: gettext('Server Administration'), | |
6 | ||
7 | border: false, | |
8 | defaults: { border: false }, | |
9 | ||
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')); | |
16 | }, | |
17 | }, | |
18 | ||
19 | items: [ | |
20 | { | |
21 | xtype: 'pmgServerStatus', | |
22 | itemId: 'status', | |
23 | iconCls: 'fa fa-area-chart', | |
24 | }, | |
25 | { | |
26 | xtype: 'proxmoxNodeServiceView', | |
27 | title: gettext('Services'), | |
28 | itemId: 'services', | |
29 | iconCls: 'fa fa-cogs', | |
30 | startOnlyServices: { | |
31 | syslog: true, | |
32 | pmgproxy: true, | |
33 | pmgdaemon: true, | |
34 | }, | |
35 | nodename: Proxmox.NodeName, | |
36 | }, | |
37 | { | |
38 | xtype: 'proxmoxNodeAPT', | |
39 | title: gettext('Updates'), | |
40 | iconCls: 'fa fa-refresh', | |
41 | upgradeBtn: { | |
42 | xtype: 'button', | |
43 | reference: 'upgradeBtn', | |
44 | disabled: true, | |
45 | text: gettext('Upgrade'), | |
46 | handler: function() { | |
47 | Proxmox.Utils.openXtermJsViewer('upgrade', 0, Proxmox.NodeName); | |
48 | }, | |
49 | }, | |
50 | itemId: 'updates', | |
51 | nodename: Proxmox.NodeName, | |
52 | }, | |
53 | { | |
54 | xtype: 'proxmoxNodeAPTRepositories', | |
55 | title: gettext('Repositories'), | |
56 | iconCls: 'fa fa-files-o', | |
57 | itemId: 'aptrepositories', | |
58 | nodename: 'localhost', | |
59 | product: 'Proxmox Mail Gateway', | |
60 | onlineHelp: 'pmg_package_repositories', | |
61 | }, | |
62 | { | |
63 | xtype: 'proxmoxJournalView', | |
64 | itemId: 'logs', | |
65 | iconCls: 'fa fa-list', | |
66 | title: gettext('Syslog'), | |
67 | url: "/api2/extjs/nodes/" + Proxmox.NodeName + "/journal", | |
68 | }, | |
69 | { | |
70 | xtype: 'proxmoxNodeTasks', | |
71 | itemId: 'tasks', | |
72 | iconCls: 'fa fa-list-alt', | |
73 | title: gettext('Tasks'), | |
74 | height: 'auto', | |
75 | nodename: Proxmox.NodeName, | |
76 | }, | |
77 | ], | |
78 | }); | |
79 | ||
80 |