]>
Commit | Line | Data |
---|---|---|
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 |
5 | Ext.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'), | |
188 | iconCls: 'fa fa-sdn', | |
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 TL |
205 | hidden: true, |
206 | iconCls: 'fa fa-network-wired', | |
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', |
35ffde01 TL |
216 | }); |
217 | } | |
f9c0feeb DC |
218 | |
219 | if (Proxmox.UserName === 'root@pam') { | |
220 | me.items.push({ | |
221 | xtype: 'pveACMEClusterView', | |
b37ea2a1 | 222 | title: 'ACME', |
f9c0feeb | 223 | iconCls: 'fa fa-certificate', |
f6710aac | 224 | itemId: 'acme', |
f9c0feeb DC |
225 | }); |
226 | } | |
227 | ||
35ffde01 | 228 | me.items.push({ |
2af89b7b DC |
229 | xtype: 'pveFirewallRules', |
230 | title: gettext('Firewall'), | |
231 | allow_iface: true, | |
232 | base_url: '/cluster/firewall/rules', | |
233 | list_refs_url: '/cluster/firewall/refs', | |
234 | iconCls: 'fa fa-shield', | |
f6710aac | 235 | itemId: 'firewall', |
2af89b7b DC |
236 | }, |
237 | { | |
238 | xtype: 'pveFirewallOptions', | |
239 | title: gettext('Options'), | |
240 | groups: ['firewall'], | |
241 | iconCls: 'fa fa-gear', | |
242 | base_url: '/cluster/firewall/options', | |
c8802a60 | 243 | onlineHelp: 'pve_firewall_cluster_wide_setup', |
2af89b7b | 244 | fwtype: 'dc', |
f6710aac | 245 | itemId: 'firewall-options', |
2af89b7b DC |
246 | }, |
247 | { | |
248 | xtype: 'pveSecurityGroups', | |
249 | title: gettext('Security Group'), | |
250 | groups: ['firewall'], | |
251 | iconCls: 'fa fa-group', | |
f6710aac | 252 | itemId: 'firewall-sg', |
2af89b7b DC |
253 | }, |
254 | { | |
255 | xtype: 'pveFirewallAliases', | |
256 | title: gettext('Alias'), | |
257 | groups: ['firewall'], | |
258 | iconCls: 'fa fa-external-link', | |
259 | base_url: '/cluster/firewall/aliases', | |
f6710aac | 260 | itemId: 'firewall-aliases', |
2af89b7b DC |
261 | }, |
262 | { | |
263 | xtype: 'pveIPSet', | |
264 | title: 'IPSet', | |
265 | groups: ['firewall'], | |
266 | iconCls: 'fa fa-list-ol', | |
267 | base_url: '/cluster/firewall/ipset', | |
268 | list_refs_url: '/cluster/firewall/refs', | |
f6710aac | 269 | itemId: 'firewall-ipset', |
2af89b7b | 270 | }, |
f257dcec DC |
271 | { |
272 | xtype: 'pveMetricServerView', | |
273 | title: gettext('Metric Server'), | |
274 | iconCls: 'fa fa-bar-chart', | |
275 | itemId: 'metricservers', | |
c63115da | 276 | onlineHelp: 'external_metric_server', |
f257dcec | 277 | }, |
2af89b7b | 278 | { |
acf7653a DM |
279 | xtype: 'pveDcSupport', |
280 | title: gettext('Support'), | |
2af89b7b | 281 | itemId: 'support', |
f6710aac | 282 | iconCls: 'fa fa-comments-o', |
acf7653a DM |
283 | }); |
284 | } | |
285 | ||
286 | me.callParent(); | |
f6710aac | 287 | }, |
acf7653a | 288 | }); |