]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/dc/Config.js
dc: add simple cluster panel
[pve-manager.git] / www / manager6 / dc / Config.js
1 /*
2 * Datacenter config panel, located in the center of the ViewPort after the Datacenter view is selected
3 */
4
5 Ext.define('PVE.dc.Config', {
6 extend: 'PVE.panel.Config',
7 alias: 'widget.PVE.dc.Config',
8
9 onlineHelp: 'pve_admin_guide',
10
11 initComponent: function() {
12 var me = this;
13
14 var caps = Ext.state.Manager.get('GuiCap');
15
16 me.items = [];
17
18 Ext.apply(me, {
19 title: gettext("Datacenter"),
20 hstateid: 'dctab'
21 });
22
23 if (caps.dc['Sys.Audit']) {
24 me.items.push({
25 title: gettext('Summary'),
26 xtype: 'pveDcSummary',
27 iconCls: 'fa fa-book',
28 itemId: 'summary'
29 },
30 {
31 title: gettext('Cluster'),
32 xtype: 'pveClusterAdministration',
33 iconCls: 'fa fa-server',
34 itemId: 'cluster'
35 },
36 {
37 xtype: 'pveDcOptionView',
38 title: gettext('Options'),
39 iconCls: 'fa fa-gear',
40 itemId: 'options'
41 });
42 }
43
44 if (caps.storage['Datastore.Allocate'] || caps.dc['Sys.Audit']) {
45 me.items.push({
46 xtype: 'pveStorageView',
47 title: gettext('Storage'),
48 iconCls: 'fa fa-database',
49 itemId: 'storage'
50 });
51 }
52
53 if (caps.dc['Sys.Audit']) {
54 me.items.push({
55 xtype: 'pveDcBackupView',
56 iconCls: 'fa fa-floppy-o',
57 title: gettext('Backup'),
58 itemId: 'backup'
59 },
60 {
61 xtype: 'pveReplicaView',
62 iconCls: 'fa fa-retweet',
63 title: gettext('Replication'),
64 itemId: 'replication'
65 },
66 {
67 xtype: 'pveACLView',
68 title: gettext('Permissions'),
69 iconCls: 'fa fa-unlock',
70 itemId: 'permissions',
71 expandedOnInit: true
72 });
73 }
74
75 me.items.push({
76 xtype: 'pveUserView',
77 groups: ['permissions'],
78 iconCls: 'fa fa-user',
79 title: gettext('Users'),
80 itemId: 'users'
81 });
82
83 if (caps.dc['Sys.Audit']) {
84 me.items.push({
85 xtype: 'pveGroupView',
86 title: gettext('Groups'),
87 iconCls: 'fa fa-users',
88 groups: ['permissions'],
89 itemId: 'groups'
90 },
91 {
92 xtype: 'pvePoolView',
93 title: gettext('Pools'),
94 iconCls: 'fa fa-tags',
95 groups: ['permissions'],
96 itemId: 'pools'
97 },
98 {
99 xtype: 'pveRoleView',
100 title: gettext('Roles'),
101 iconCls: 'fa fa-male',
102 groups: ['permissions'],
103 itemId: 'roles'
104 },
105 {
106 xtype: 'pveAuthView',
107 title: gettext('Authentication'),
108 groups: ['permissions'],
109 iconCls: 'fa fa-key',
110 itemId: 'domains'
111 },
112 {
113 xtype: 'pveHAStatus',
114 title: 'HA',
115 iconCls: 'fa fa-heartbeat',
116 itemId: 'ha'
117 },
118 {
119 title: gettext('Groups'),
120 groups: ['ha'],
121 xtype: 'pveHAGroupsView',
122 iconCls: 'fa fa-object-group',
123 itemId: 'ha-groups'
124 },
125 {
126 title: gettext('Fencing'),
127 groups: ['ha'],
128 iconCls: 'fa fa-bolt',
129 xtype: 'pveFencingView',
130 itemId: 'ha-fencing'
131 },
132 {
133 xtype: 'pveFirewallRules',
134 title: gettext('Firewall'),
135 allow_iface: true,
136 base_url: '/cluster/firewall/rules',
137 list_refs_url: '/cluster/firewall/refs',
138 iconCls: 'fa fa-shield',
139 itemId: 'firewall'
140 },
141 {
142 xtype: 'pveFirewallOptions',
143 title: gettext('Options'),
144 groups: ['firewall'],
145 iconCls: 'fa fa-gear',
146 base_url: '/cluster/firewall/options',
147 onlineHelp: 'pve_firewall_cluster_wide_setup',
148 fwtype: 'dc',
149 itemId: 'firewall-options'
150 },
151 {
152 xtype: 'pveSecurityGroups',
153 title: gettext('Security Group'),
154 groups: ['firewall'],
155 iconCls: 'fa fa-group',
156 itemId: 'firewall-sg'
157 },
158 {
159 xtype: 'pveFirewallAliases',
160 title: gettext('Alias'),
161 groups: ['firewall'],
162 iconCls: 'fa fa-external-link',
163 base_url: '/cluster/firewall/aliases',
164 itemId: 'firewall-aliases'
165 },
166 {
167 xtype: 'pveIPSet',
168 title: 'IPSet',
169 groups: ['firewall'],
170 iconCls: 'fa fa-list-ol',
171 base_url: '/cluster/firewall/ipset',
172 list_refs_url: '/cluster/firewall/refs',
173 itemId: 'firewall-ipset'
174 },
175 {
176 xtype: 'pveDcSupport',
177 title: gettext('Support'),
178 itemId: 'support',
179 iconCls: 'fa fa-comments-o'
180 });
181 }
182
183 me.callParent();
184 }
185 });