]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/dc/Config.js
ui: dc/UserView: disable TFA button based on realm type
[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 title: gettext('Cluster'),
32 xtype: 'pveClusterAdministration',
33 iconCls: 'fa fa-server',
34 itemId: 'cluster',
35 },
36 {
37 title: 'Ceph',
38 itemId: 'ceph',
39 iconCls: 'fa fa-ceph',
40 xtype: 'pveNodeCephStatus',
41 },
42 {
43 xtype: 'pveDcOptionView',
44 title: gettext('Options'),
45 iconCls: 'fa fa-gear',
46 itemId: 'options',
47 });
48 }
49
50 if (caps.storage['Datastore.Allocate'] || caps.dc['Sys.Audit']) {
51 me.items.push({
52 xtype: 'pveStorageView',
53 title: gettext('Storage'),
54 iconCls: 'fa fa-database',
55 itemId: 'storage',
56 });
57 }
58
59
60 if (caps.dc['Sys.Audit']) {
61 me.items.push({
62 xtype: 'pveDcBackupView',
63 iconCls: 'fa fa-floppy-o',
64 title: gettext('Backup'),
65 itemId: 'backup',
66 },
67 {
68 xtype: 'pveReplicaView',
69 iconCls: 'fa fa-retweet',
70 title: gettext('Replication'),
71 itemId: 'replication',
72 },
73 {
74 xtype: 'pveACLView',
75 title: gettext('Permissions'),
76 iconCls: 'fa fa-unlock',
77 itemId: 'permissions',
78 expandedOnInit: true,
79 });
80 }
81
82 me.items.push({
83 xtype: 'pveUserView',
84 groups: ['permissions'],
85 iconCls: 'fa fa-user',
86 title: gettext('Users'),
87 itemId: 'users',
88 });
89
90 me.items.push({
91 xtype: 'pveTokenView',
92 groups: ['permissions'],
93 iconCls: 'fa fa-user-o',
94 title: gettext('API Tokens'),
95 itemId: 'apitokens',
96 });
97
98 if (caps.dc['Sys.Audit']) {
99 me.items.push({
100 xtype: 'pveGroupView',
101 title: gettext('Groups'),
102 iconCls: 'fa fa-users',
103 groups: ['permissions'],
104 itemId: 'groups',
105 },
106 {
107 xtype: 'pvePoolView',
108 title: gettext('Pools'),
109 iconCls: 'fa fa-tags',
110 groups: ['permissions'],
111 itemId: 'pools',
112 },
113 {
114 xtype: 'pveRoleView',
115 title: gettext('Roles'),
116 iconCls: 'fa fa-male',
117 groups: ['permissions'],
118 itemId: 'roles',
119 },
120 {
121 xtype: 'pveAuthView',
122 title: gettext('Authentication'),
123 groups: ['permissions'],
124 iconCls: 'fa fa-key',
125 itemId: 'domains',
126 },
127 {
128 xtype: 'pveHAStatus',
129 title: 'HA',
130 iconCls: 'fa fa-heartbeat',
131 itemId: 'ha',
132 },
133 {
134 title: gettext('Groups'),
135 groups: ['ha'],
136 xtype: 'pveHAGroupsView',
137 iconCls: 'fa fa-object-group',
138 itemId: 'ha-groups',
139 },
140 {
141 title: gettext('Fencing'),
142 groups: ['ha'],
143 iconCls: 'fa fa-bolt',
144 xtype: 'pveFencingView',
145 itemId: 'ha-fencing',
146 });
147 if (PVE.SDNInfo || PVE.SDNInfo === undefined) {
148 me.items.push({
149 xtype: 'pveSDNStatus',
150 title: gettext('SDN'),
151 iconCls: 'fa fa-sdn',
152 hidden: true,
153 itemId: 'sdn',
154 expandedOnInit: true,
155 },
156 {
157 xtype: 'pveSDNZoneView',
158 groups: ['sdn'],
159 title: gettext('Zones'),
160 hidden: true,
161 iconCls: 'fa fa-th',
162 itemId: 'sdnzone',
163 },
164 {
165 xtype: 'pveSDNVnet',
166 groups: ['sdn'],
167 title: gettext('Vnets'),
168 hidden: true,
169 iconCls: 'fa fa-network-wired',
170 itemId: 'sdnvnet',
171 },
172 {
173 xtype: 'pveSDNOptions',
174 groups: ['sdn'],
175 title: gettext('Options'),
176 hidden: true,
177 iconCls: 'fa fa-gear',
178 itemId: 'sdnoptions',
179 });
180 }
181
182 if (Proxmox.UserName === 'root@pam') {
183 me.items.push({
184 xtype: 'pveACMEClusterView',
185 title: 'ACME',
186 iconCls: 'fa fa-certificate',
187 itemId: 'acme',
188 });
189 }
190
191 me.items.push({
192 xtype: 'pveFirewallRules',
193 title: gettext('Firewall'),
194 allow_iface: true,
195 base_url: '/cluster/firewall/rules',
196 list_refs_url: '/cluster/firewall/refs',
197 iconCls: 'fa fa-shield',
198 itemId: 'firewall',
199 },
200 {
201 xtype: 'pveFirewallOptions',
202 title: gettext('Options'),
203 groups: ['firewall'],
204 iconCls: 'fa fa-gear',
205 base_url: '/cluster/firewall/options',
206 onlineHelp: 'pve_firewall_cluster_wide_setup',
207 fwtype: 'dc',
208 itemId: 'firewall-options',
209 },
210 {
211 xtype: 'pveSecurityGroups',
212 title: gettext('Security Group'),
213 groups: ['firewall'],
214 iconCls: 'fa fa-group',
215 itemId: 'firewall-sg',
216 },
217 {
218 xtype: 'pveFirewallAliases',
219 title: gettext('Alias'),
220 groups: ['firewall'],
221 iconCls: 'fa fa-external-link',
222 base_url: '/cluster/firewall/aliases',
223 itemId: 'firewall-aliases',
224 },
225 {
226 xtype: 'pveIPSet',
227 title: 'IPSet',
228 groups: ['firewall'],
229 iconCls: 'fa fa-list-ol',
230 base_url: '/cluster/firewall/ipset',
231 list_refs_url: '/cluster/firewall/refs',
232 itemId: 'firewall-ipset',
233 },
234 {
235 xtype: 'pveMetricServerView',
236 title: gettext('Metric Server'),
237 iconCls: 'fa fa-bar-chart',
238 itemId: 'metricservers',
239 onlineHelp: 'external_metric_server',
240 },
241 {
242 xtype: 'pveDcSupport',
243 title: gettext('Support'),
244 itemId: 'support',
245 iconCls: 'fa fa-comments-o',
246 });
247 }
248
249 me.callParent();
250 },
251 });