]> git.proxmox.com Git - pve-manager.git/blob - www/manager/dc/Config.js
6c198055df895a12bee215f12f982f924b7ba3bf
[pve-manager.git] / www / manager / dc / Config.js
1 Ext.define('PVE.dc.Config', {
2 extend: 'PVE.panel.Config',
3 alias: 'widget.PVE.dc.Config',
4
5 initComponent: function() {
6 var me = this;
7
8 var caps = Ext.state.Manager.get('GuiCap');
9
10 me.items = [];
11
12 Ext.apply(me, {
13 title: gettext("Datacenter"),
14 hstateid: 'dctab'
15 });
16
17 if (caps.dc['Sys.Audit']) {
18 me.items.push([
19 {
20 title: gettext('Summary'),
21 xtype: 'pveDcSummary',
22 itemId: 'summary'
23 },
24 {
25 xtype: 'pveDcOptionView',
26 title: gettext('Options'),
27 itemId: 'options'
28 }
29 ]);
30 }
31
32 if (caps.storage['Datastore.Allocate'] || caps.dc['Sys.Audit']) {
33 me.items.push({
34 xtype: 'pveStorageView',
35 title: gettext('Storage'),
36 itemId: 'storage'
37 });
38 }
39
40 if (caps.dc['Sys.Audit']) {
41 me.items.push({
42 xtype: 'pveDcBackupView',
43 title: gettext('Backup'),
44 itemId: 'backup'
45 });
46 }
47
48 me.items.push({
49 xtype: 'pveUserView',
50 title: gettext('Users'),
51 itemId: 'users'
52 });
53
54 if (caps.dc['Sys.Audit']) {
55 me.items.push([
56 {
57 xtype: 'pveGroupView',
58 title: gettext('Groups'),
59 itemId: 'groups'
60 },
61 {
62 xtype: 'pvePoolView',
63 title: gettext('Pools'),
64 itemId: 'pools'
65 },
66 {
67 xtype: 'pveACLView',
68 title: gettext('Permissions'),
69 itemId: 'permissions'
70 },
71 {
72 xtype: 'pveRoleView',
73 title: gettext('Roles'),
74 itemId: 'roles'
75 },
76 {
77 xtype: 'pveAuthView',
78 title: gettext('Authentication'),
79 itemId: 'domains'
80 },
81 {
82 xtype: 'pveHAPanel',
83 title: 'HA',
84 phstateid: me.hstateid,
85 itemId: 'ha'
86 },
87 {
88 xtype: 'pveFirewallPanel',
89 title: gettext('Firewall'),
90 base_url: '/cluster/firewall',
91 fwtype: 'dc',
92 phstateid: me.hstateid,
93 itemId: 'firewall'
94 }
95 ]);
96
97 me.items.push({
98 xtype: 'pveDcSupport',
99 title: gettext('Support'),
100 itemId: 'support'
101 });
102 }
103
104 me.callParent();
105 }
106 });