]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/dc/Config.js
13ded12e88ab5c13745186e7e544dd7c8b473fb2
[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 xtype: 'pveAuthView',
138 title: gettext('Realms'),
139 groups: ['permissions'],
140 iconCls: 'fa fa-address-book-o',
141 itemId: 'domains',
142 },
143 {
144 xtype: 'pveHAStatus',
145 title: 'HA',
146 iconCls: 'fa fa-heartbeat',
147 itemId: 'ha',
148 },
149 {
150 title: gettext('Groups'),
151 groups: ['ha'],
152 xtype: 'pveHAGroupsView',
153 iconCls: 'fa fa-object-group',
154 itemId: 'ha-groups',
155 },
156 {
157 title: gettext('Fencing'),
158 groups: ['ha'],
159 iconCls: 'fa fa-bolt',
160 xtype: 'pveFencingView',
161 itemId: 'ha-fencing',
162 });
163 // always show on initial load, will be hiddea later if the SDN API calls don't exist,
164 // else it won't be shown at first if the user initially loads with DC selected
165 if (PVE.SDNInfo || PVE.SDNInfo === undefined) {
166 me.items.push({
167 xtype: 'pveSDNStatus',
168 title: gettext('SDN'),
169 iconCls: 'fa fa-sdn',
170 hidden: true,
171 itemId: 'sdn',
172 expandedOnInit: true,
173 },
174 {
175 xtype: 'pveSDNZoneView',
176 groups: ['sdn'],
177 title: gettext('Zones'),
178 hidden: true,
179 iconCls: 'fa fa-th',
180 itemId: 'sdnzone',
181 },
182 {
183 xtype: 'pveSDNVnet',
184 groups: ['sdn'],
185 title: gettext('Vnets'),
186 hidden: true,
187 iconCls: 'fa fa-network-wired',
188 itemId: 'sdnvnet',
189 },
190 {
191 xtype: 'pveSDNOptions',
192 groups: ['sdn'],
193 title: gettext('Options'),
194 hidden: true,
195 iconCls: 'fa fa-gear',
196 itemId: 'sdnoptions',
197 });
198 }
199
200 if (Proxmox.UserName === 'root@pam') {
201 me.items.push({
202 xtype: 'pveACMEClusterView',
203 title: 'ACME',
204 iconCls: 'fa fa-certificate',
205 itemId: 'acme',
206 });
207 }
208
209 me.items.push({
210 xtype: 'pveFirewallRules',
211 title: gettext('Firewall'),
212 allow_iface: true,
213 base_url: '/cluster/firewall/rules',
214 list_refs_url: '/cluster/firewall/refs',
215 iconCls: 'fa fa-shield',
216 itemId: 'firewall',
217 },
218 {
219 xtype: 'pveFirewallOptions',
220 title: gettext('Options'),
221 groups: ['firewall'],
222 iconCls: 'fa fa-gear',
223 base_url: '/cluster/firewall/options',
224 onlineHelp: 'pve_firewall_cluster_wide_setup',
225 fwtype: 'dc',
226 itemId: 'firewall-options',
227 },
228 {
229 xtype: 'pveSecurityGroups',
230 title: gettext('Security Group'),
231 groups: ['firewall'],
232 iconCls: 'fa fa-group',
233 itemId: 'firewall-sg',
234 },
235 {
236 xtype: 'pveFirewallAliases',
237 title: gettext('Alias'),
238 groups: ['firewall'],
239 iconCls: 'fa fa-external-link',
240 base_url: '/cluster/firewall/aliases',
241 itemId: 'firewall-aliases',
242 },
243 {
244 xtype: 'pveIPSet',
245 title: 'IPSet',
246 groups: ['firewall'],
247 iconCls: 'fa fa-list-ol',
248 base_url: '/cluster/firewall/ipset',
249 list_refs_url: '/cluster/firewall/refs',
250 itemId: 'firewall-ipset',
251 },
252 {
253 xtype: 'pveMetricServerView',
254 title: gettext('Metric Server'),
255 iconCls: 'fa fa-bar-chart',
256 itemId: 'metricservers',
257 onlineHelp: 'external_metric_server',
258 },
259 {
260 xtype: 'pveDcSupport',
261 title: gettext('Support'),
262 itemId: 'support',
263 iconCls: 'fa fa-comments-o',
264 });
265 }
266
267 me.callParent();
268 },
269 });