]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/dc/Config.js
api: add proxmox-firewall to versions pkg list
[pve-manager.git] / www / manager6 / dc / Config.js
CommitLineData
5289a1b8 1/*
6d55c93e 2 * Datacenter config panel, located in the center of the ViewPort after the Datacenter view is selected
5289a1b8
EK
3 */
4
acf7653a
DM
5Ext.define('PVE.dc.Config', {
6 extend: 'PVE.panel.Config',
7 alias: 'widget.PVE.dc.Config',
8
c8802a60 9 onlineHelp: 'pve_admin_guide',
983277c9 10
acf7653a
DM
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"),
f6710aac 20 hstateid: 'dctab',
acf7653a
DM
21 });
22
23 if (caps.dc['Sys.Audit']) {
6d55c93e 24 me.items.push({
2f13e1d2 25 title: gettext('Summary'),
6d55c93e 26 xtype: 'pveDcSummary',
2af89b7b 27 iconCls: 'fa fa-book',
f6710aac 28 itemId: 'summary',
2f13e1d2 29 },
bd800443 30 {
742de03d 31 xtype: 'pmxNotesView',
bd800443
DJ
32 title: gettext('Notes'),
33 iconCls: 'fa fa-sticky-note-o',
34 itemId: 'notes',
35 },
2f13e1d2
TL
36 {
37 title: gettext('Cluster'),
38 xtype: 'pveClusterAdministration',
39 iconCls: 'fa fa-server',
f6710aac 40 itemId: 'cluster',
2f13e1d2 41 },
f3a46983
DC
42 {
43 title: 'Ceph',
44 itemId: 'ceph',
45 iconCls: 'fa fa-ceph',
f6710aac 46 xtype: 'pveNodeCephStatus',
f3a46983 47 },
2f13e1d2 48 {
ba93a9c6 49 xtype: 'pveDcOptionView',
6d55c93e 50 title: gettext('Options'),
2af89b7b 51 iconCls: 'fa fa-gear',
f6710aac 52 itemId: 'options',
2af89b7b 53 });
acf7653a
DM
54 }
55
56 if (caps.storage['Datastore.Allocate'] || caps.dc['Sys.Audit']) {
57 me.items.push({
58 xtype: 'pveStorageView',
59 title: gettext('Storage'),
2af89b7b 60 iconCls: 'fa fa-database',
f6710aac 61 itemId: 'storage',
acf7653a
DM
62 });
63 }
64
9233148b 65
acf7653a 66 if (caps.dc['Sys.Audit']) {
2af89b7b 67 me.items.push({
acf7653a 68 xtype: 'pveDcBackupView',
2af89b7b 69 iconCls: 'fa fa-floppy-o',
acf7653a 70 title: gettext('Backup'),
f6710aac 71 itemId: 'backup',
2af89b7b 72 },
56297d42
DC
73 {
74 xtype: 'pveReplicaView',
75 iconCls: 'fa fa-retweet',
76 title: gettext('Replication'),
f6710aac 77 itemId: 'replication',
56297d42 78 },
2af89b7b
DC
79 {
80 xtype: 'pveACLView',
81 title: gettext('Permissions'),
82 iconCls: 'fa fa-unlock',
83 itemId: 'permissions',
f6710aac 84 expandedOnInit: true,
acf7653a
DM
85 });
86 }
87
88 me.items.push({
89 xtype: 'pveUserView',
2af89b7b
DC
90 groups: ['permissions'],
91 iconCls: 'fa fa-user',
acf7653a 92 title: gettext('Users'),
f6710aac 93 itemId: 'users',
acf7653a
DM
94 });
95
c831fbde
FG
96 me.items.push({
97 xtype: 'pveTokenView',
98 groups: ['permissions'],
99 iconCls: 'fa fa-user-o',
100 title: gettext('API Tokens'),
f6710aac 101 itemId: 'apitokens',
c831fbde
FG
102 });
103
8ff8f435
WB
104 me.items.push({
105 xtype: 'pmxTfaView',
106 title: gettext('Two Factor'),
107 groups: ['permissions'],
108 iconCls: 'fa fa-key',
109 itemId: 'tfa',
110 yubicoEnabled: true,
411a4577 111 issuerName: `Proxmox VE - ${PVE.ClusterName || Proxmox.NodeName}`,
8ff8f435
WB
112 });
113
acf7653a 114 if (caps.dc['Sys.Audit']) {
6d55c93e 115 me.items.push({
2af89b7b
DC
116 xtype: 'pveGroupView',
117 title: gettext('Groups'),
118 iconCls: 'fa fa-users',
119 groups: ['permissions'],
f6710aac 120 itemId: 'groups',
2af89b7b
DC
121 },
122 {
123 xtype: 'pvePoolView',
124 title: gettext('Pools'),
125 iconCls: 'fa fa-tags',
126 groups: ['permissions'],
f6710aac 127 itemId: 'pools',
2af89b7b
DC
128 },
129 {
130 xtype: 'pveRoleView',
131 title: gettext('Roles'),
132 iconCls: 'fa fa-male',
133 groups: ['permissions'],
f6710aac 134 itemId: 'roles',
2af89b7b
DC
135 },
136 {
8ff8f435 137 title: gettext('Realms'),
4c8fcdd7
DC
138 xtype: 'panel',
139 layout: {
140 type: 'border',
141 },
2af89b7b 142 groups: ['permissions'],
3c025656 143 iconCls: 'fa fa-address-book-o',
f6710aac 144 itemId: 'domains',
4c8fcdd7
DC
145 items: [
146 {
147 xtype: 'pveAuthView',
148 region: 'center',
149 border: false,
150 },
151 {
152 xtype: 'pveRealmSyncJobView',
fc8f37ee 153 title: gettext('Realm Sync Jobs'),
4c8fcdd7
DC
154 region: 'south',
155 collapsible: true,
156 animCollapse: false,
157 border: false,
158 height: '50%',
159 },
160 ],
f44ce595 161 },
2af89b7b 162 {
8a58f554 163 xtype: 'pveHAStatus',
2af89b7b
DC
164 title: 'HA',
165 iconCls: 'fa fa-heartbeat',
f6710aac 166 itemId: 'ha',
2af89b7b 167 },
2af89b7b
DC
168 {
169 title: gettext('Groups'),
170 groups: ['ha'],
171 xtype: 'pveHAGroupsView',
172 iconCls: 'fa fa-object-group',
f6710aac 173 itemId: 'ha-groups',
2af89b7b
DC
174 },
175 {
176 title: gettext('Fencing'),
177 groups: ['ha'],
178 iconCls: 'fa fa-bolt',
179 xtype: 'pveFencingView',
f6710aac 180 itemId: 'ha-fencing',
35ffde01 181 });
013cd17b
TL
182 // always show on initial load, will be hiddea later if the SDN API calls don't exist,
183 // else it won't be shown at first if the user initially loads with DC selected
35ffde01
TL
184 if (PVE.SDNInfo || PVE.SDNInfo === undefined) {
185 me.items.push({
186 xtype: 'pveSDNStatus',
187 title: gettext('SDN'),
a3c059c5 188 iconCls: 'fa fa-sdn x-fa-sdn-treelist',
35ffde01
TL
189 hidden: true,
190 itemId: 'sdn',
f6710aac 191 expandedOnInit: true,
35ffde01 192 },
35ffde01
TL
193 {
194 xtype: 'pveSDNZoneView',
195 groups: ['sdn'],
196 title: gettext('Zones'),
197 hidden: true,
198 iconCls: 'fa fa-th',
f6710aac 199 itemId: 'sdnzone',
35ffde01
TL
200 },
201 {
1d9643f6 202 xtype: 'pveSDNVnet',
35ffde01 203 groups: ['sdn'],
5f936d95 204 title: 'VNets',
35ffde01 205 hidden: true,
a3c059c5 206 iconCls: 'fa fa-network-wired x-fa-sdn-treelist',
f6710aac 207 itemId: 'sdnvnet',
1d9643f6
AD
208 },
209 {
210 xtype: 'pveSDNOptions',
211 groups: ['sdn'],
212 title: gettext('Options'),
213 hidden: true,
214 iconCls: 'fa fa-gear',
8295f55e 215 itemId: 'sdnoptions',
a3c059c5
SH
216 },
217 {
218 xtype: 'pveDhcpTree',
219 groups: ['sdn'],
220 title: gettext('IPAM'),
221 hidden: true,
222 iconCls: 'fa fa-map-signs',
223 itemId: 'sdnmappings',
35ffde01
TL
224 });
225 }
f9c0feeb
DC
226
227 if (Proxmox.UserName === 'root@pam') {
228 me.items.push({
229 xtype: 'pveACMEClusterView',
b37ea2a1 230 title: 'ACME',
f9c0feeb 231 iconCls: 'fa fa-certificate',
f6710aac 232 itemId: 'acme',
f9c0feeb
DC
233 });
234 }
235
35ffde01 236 me.items.push({
2af89b7b
DC
237 xtype: 'pveFirewallRules',
238 title: gettext('Firewall'),
239 allow_iface: true,
240 base_url: '/cluster/firewall/rules',
241 list_refs_url: '/cluster/firewall/refs',
242 iconCls: 'fa fa-shield',
f6710aac 243 itemId: 'firewall',
2af89b7b
DC
244 },
245 {
246 xtype: 'pveFirewallOptions',
247 title: gettext('Options'),
248 groups: ['firewall'],
249 iconCls: 'fa fa-gear',
250 base_url: '/cluster/firewall/options',
c8802a60 251 onlineHelp: 'pve_firewall_cluster_wide_setup',
2af89b7b 252 fwtype: 'dc',
f6710aac 253 itemId: 'firewall-options',
2af89b7b
DC
254 },
255 {
256 xtype: 'pveSecurityGroups',
257 title: gettext('Security Group'),
258 groups: ['firewall'],
259 iconCls: 'fa fa-group',
f6710aac 260 itemId: 'firewall-sg',
2af89b7b
DC
261 },
262 {
263 xtype: 'pveFirewallAliases',
264 title: gettext('Alias'),
265 groups: ['firewall'],
266 iconCls: 'fa fa-external-link',
267 base_url: '/cluster/firewall/aliases',
f6710aac 268 itemId: 'firewall-aliases',
2af89b7b
DC
269 },
270 {
271 xtype: 'pveIPSet',
272 title: 'IPSet',
273 groups: ['firewall'],
274 iconCls: 'fa fa-list-ol',
275 base_url: '/cluster/firewall/ipset',
276 list_refs_url: '/cluster/firewall/refs',
f6710aac 277 itemId: 'firewall-ipset',
2af89b7b 278 },
f257dcec
DC
279 {
280 xtype: 'pveMetricServerView',
281 title: gettext('Metric Server'),
282 iconCls: 'fa fa-bar-chart',
283 itemId: 'metricservers',
c63115da 284 onlineHelp: 'external_metric_server',
70eb18e8
DC
285 });
286 }
287
288 if (caps.mapping['Mapping.Audit'] ||
289 caps.mapping['Mapping.Use'] ||
290 caps.mapping['Mapping.Modify']) {
291 me.items.push(
292 {
293 xtype: 'container',
294 onlineHelp: 'resource_mapping',
295 title: gettext('Resource Mappings'),
296 itemId: 'resources',
297 iconCls: 'fa fa-folder-o',
298 layout: {
299 type: 'vbox',
300 align: 'stretch',
301 multi: true,
302 },
303 scrollable: true,
304 defaults: {
0eb03eaa 305 border: false,
70eb18e8
DC
306 },
307 items: [
308 {
70eb18e8
DC
309 xtype: 'pveDcPCIMapView',
310 title: gettext('PCI Devices'),
311 flex: 1,
312 },
313 {
0eb03eaa
DC
314 xtype: 'splitter',
315 collapsible: false,
316 performCollapse: false,
317 },
318 {
70eb18e8
DC
319 xtype: 'pveDcUSBMapView',
320 title: gettext('USB Devices'),
321 flex: 1,
322 },
323 ],
324 },
325 );
326 }
327
8fc1f4a9
LW
328 if (caps.mapping['Mapping.Audit'] ||
329 caps.mapping['Mapping.Use'] ||
330 caps.mapping['Mapping.Modify']) {
e4eb04d6
LW
331 me.items.push(
332 {
333 xtype: 'pmxNotificationConfigView',
2cb6c8df 334 title: gettext('Notifications'),
e4eb04d6 335 itemId: 'notification-targets',
2cb6c8df 336 iconCls: 'fa fa-bell-o',
e4eb04d6 337 baseUrl: '/cluster/notifications',
e4eb04d6
LW
338 },
339 );
340 }
341
70eb18e8
DC
342 if (caps.dc['Sys.Audit']) {
343 me.items.push({
acf7653a
DM
344 xtype: 'pveDcSupport',
345 title: gettext('Support'),
2af89b7b 346 itemId: 'support',
f6710aac 347 iconCls: 'fa fa-comments-o',
acf7653a
DM
348 });
349 }
350
351 me.callParent();
f6710aac 352 },
acf7653a 353});