]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/dc/Config.js
ui: guest import: add warning for losing efi state
[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 xtype: 'pmxNotesView',
32 title: gettext('Notes'),
33 iconCls: 'fa fa-sticky-note-o',
34 itemId: 'notes',
35 },
36 {
37 title: gettext('Cluster'),
38 xtype: 'pveClusterAdministration',
39 iconCls: 'fa fa-server',
40 itemId: 'cluster',
41 },
42 {
43 title: 'Ceph',
44 itemId: 'ceph',
45 iconCls: 'fa fa-ceph',
46 xtype: 'pveNodeCephStatus',
47 },
48 {
49 xtype: 'pveDcOptionView',
50 title: gettext('Options'),
51 iconCls: 'fa fa-gear',
52 itemId: 'options',
53 });
54 }
55
56 if (caps.storage['Datastore.Allocate'] || caps.dc['Sys.Audit']) {
57 me.items.push({
58 xtype: 'pveStorageView',
59 title: gettext('Storage'),
60 iconCls: 'fa fa-database',
61 itemId: 'storage',
62 });
63 }
64
65
66 if (caps.dc['Sys.Audit']) {
67 me.items.push({
68 xtype: 'pveDcBackupView',
69 iconCls: 'fa fa-floppy-o',
70 title: gettext('Backup'),
71 itemId: 'backup',
72 },
73 {
74 xtype: 'pveReplicaView',
75 iconCls: 'fa fa-retweet',
76 title: gettext('Replication'),
77 itemId: 'replication',
78 },
79 {
80 xtype: 'pveACLView',
81 title: gettext('Permissions'),
82 iconCls: 'fa fa-unlock',
83 itemId: 'permissions',
84 expandedOnInit: true,
85 });
86 }
87
88 me.items.push({
89 xtype: 'pveUserView',
90 groups: ['permissions'],
91 iconCls: 'fa fa-user',
92 title: gettext('Users'),
93 itemId: 'users',
94 });
95
96 me.items.push({
97 xtype: 'pveTokenView',
98 groups: ['permissions'],
99 iconCls: 'fa fa-user-o',
100 title: gettext('API Tokens'),
101 itemId: 'apitokens',
102 });
103
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,
111 issuerName: `Proxmox VE - ${PVE.ClusterName || Proxmox.NodeName}`,
112 });
113
114 if (caps.dc['Sys.Audit']) {
115 me.items.push({
116 xtype: 'pveGroupView',
117 title: gettext('Groups'),
118 iconCls: 'fa fa-users',
119 groups: ['permissions'],
120 itemId: 'groups',
121 },
122 {
123 xtype: 'pvePoolView',
124 title: gettext('Pools'),
125 iconCls: 'fa fa-tags',
126 groups: ['permissions'],
127 itemId: 'pools',
128 },
129 {
130 xtype: 'pveRoleView',
131 title: gettext('Roles'),
132 iconCls: 'fa fa-male',
133 groups: ['permissions'],
134 itemId: 'roles',
135 },
136 {
137 title: gettext('Realms'),
138 xtype: 'panel',
139 layout: {
140 type: 'border',
141 },
142 groups: ['permissions'],
143 iconCls: 'fa fa-address-book-o',
144 itemId: 'domains',
145 items: [
146 {
147 xtype: 'pveAuthView',
148 region: 'center',
149 border: false,
150 },
151 {
152 xtype: 'pveRealmSyncJobView',
153 title: gettext('Realm Sync Jobs'),
154 region: 'south',
155 collapsible: true,
156 animCollapse: false,
157 border: false,
158 height: '50%',
159 },
160 ],
161 },
162 {
163 xtype: 'pveHAStatus',
164 title: 'HA',
165 iconCls: 'fa fa-heartbeat',
166 itemId: 'ha',
167 },
168 {
169 title: gettext('Groups'),
170 groups: ['ha'],
171 xtype: 'pveHAGroupsView',
172 iconCls: 'fa fa-object-group',
173 itemId: 'ha-groups',
174 },
175 {
176 title: gettext('Fencing'),
177 groups: ['ha'],
178 iconCls: 'fa fa-bolt',
179 xtype: 'pveFencingView',
180 itemId: 'ha-fencing',
181 });
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
184 if (PVE.SDNInfo || PVE.SDNInfo === undefined) {
185 me.items.push({
186 xtype: 'pveSDNStatus',
187 title: gettext('SDN'),
188 iconCls: 'fa fa-sdn x-fa-sdn-treelist',
189 hidden: true,
190 itemId: 'sdn',
191 expandedOnInit: true,
192 },
193 {
194 xtype: 'pveSDNZoneView',
195 groups: ['sdn'],
196 title: gettext('Zones'),
197 hidden: true,
198 iconCls: 'fa fa-th',
199 itemId: 'sdnzone',
200 },
201 {
202 xtype: 'pveSDNVnet',
203 groups: ['sdn'],
204 title: 'VNets',
205 hidden: true,
206 iconCls: 'fa fa-network-wired x-fa-sdn-treelist',
207 itemId: 'sdnvnet',
208 },
209 {
210 xtype: 'pveSDNOptions',
211 groups: ['sdn'],
212 title: gettext('Options'),
213 hidden: true,
214 iconCls: 'fa fa-gear',
215 itemId: 'sdnoptions',
216 },
217 {
218 xtype: 'pveDhcpTree',
219 groups: ['sdn'],
220 title: gettext('IPAM'),
221 hidden: true,
222 iconCls: 'fa fa-map-signs',
223 itemId: 'sdnmappings',
224 });
225 }
226
227 if (Proxmox.UserName === 'root@pam') {
228 me.items.push({
229 xtype: 'pveACMEClusterView',
230 title: 'ACME',
231 iconCls: 'fa fa-certificate',
232 itemId: 'acme',
233 });
234 }
235
236 me.items.push({
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',
243 itemId: 'firewall',
244 },
245 {
246 xtype: 'pveFirewallOptions',
247 title: gettext('Options'),
248 groups: ['firewall'],
249 iconCls: 'fa fa-gear',
250 base_url: '/cluster/firewall/options',
251 onlineHelp: 'pve_firewall_cluster_wide_setup',
252 fwtype: 'dc',
253 itemId: 'firewall-options',
254 },
255 {
256 xtype: 'pveSecurityGroups',
257 title: gettext('Security Group'),
258 groups: ['firewall'],
259 iconCls: 'fa fa-group',
260 itemId: 'firewall-sg',
261 },
262 {
263 xtype: 'pveFirewallAliases',
264 title: gettext('Alias'),
265 groups: ['firewall'],
266 iconCls: 'fa fa-external-link',
267 base_url: '/cluster/firewall/aliases',
268 itemId: 'firewall-aliases',
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',
277 itemId: 'firewall-ipset',
278 },
279 {
280 xtype: 'pveMetricServerView',
281 title: gettext('Metric Server'),
282 iconCls: 'fa fa-bar-chart',
283 itemId: 'metricservers',
284 onlineHelp: 'external_metric_server',
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: {
305 border: false,
306 },
307 items: [
308 {
309 xtype: 'pveDcPCIMapView',
310 title: gettext('PCI Devices'),
311 flex: 1,
312 },
313 {
314 xtype: 'splitter',
315 collapsible: false,
316 performCollapse: false,
317 },
318 {
319 xtype: 'pveDcUSBMapView',
320 title: gettext('USB Devices'),
321 flex: 1,
322 },
323 ],
324 },
325 );
326 }
327
328 if (caps.mapping['Mapping.Audit'] ||
329 caps.mapping['Mapping.Use'] ||
330 caps.mapping['Mapping.Modify']) {
331 me.items.push(
332 {
333 xtype: 'pmxNotificationConfigView',
334 title: gettext('Notifications'),
335 itemId: 'notification-targets',
336 iconCls: 'fa fa-bell-o',
337 baseUrl: '/cluster/notifications',
338 },
339 );
340 }
341
342 if (caps.dc['Sys.Audit']) {
343 me.items.push({
344 xtype: 'pveDcSupport',
345 title: gettext('Support'),
346 itemId: 'support',
347 iconCls: 'fa fa-comments-o',
348 });
349 }
350
351 me.callParent();
352 },
353 });