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