]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/dc/Config.js
www: use af-address-book-o for realms
[pve-manager.git] / www / manager6 / dc / Config.js
CommitLineData
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
5Ext.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
DJ
30 {
31 xtype: 'pveNotesView',
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
acf7653a 104 if (caps.dc['Sys.Audit']) {
6d55c93e 105 me.items.push({
2af89b7b
DC
106 xtype: 'pveGroupView',
107 title: gettext('Groups'),
108 iconCls: 'fa fa-users',
109 groups: ['permissions'],
f6710aac 110 itemId: 'groups',
2af89b7b
DC
111 },
112 {
113 xtype: 'pvePoolView',
114 title: gettext('Pools'),
115 iconCls: 'fa fa-tags',
116 groups: ['permissions'],
f6710aac 117 itemId: 'pools',
2af89b7b
DC
118 },
119 {
120 xtype: 'pveRoleView',
121 title: gettext('Roles'),
122 iconCls: 'fa fa-male',
123 groups: ['permissions'],
f6710aac 124 itemId: 'roles',
2af89b7b
DC
125 },
126 {
127 xtype: 'pveAuthView',
128 title: gettext('Authentication'),
129 groups: ['permissions'],
3c025656 130 iconCls: 'fa fa-address-book-o',
f6710aac 131 itemId: 'domains',
2af89b7b
DC
132 },
133 {
8a58f554 134 xtype: 'pveHAStatus',
2af89b7b
DC
135 title: 'HA',
136 iconCls: 'fa fa-heartbeat',
f6710aac 137 itemId: 'ha',
2af89b7b 138 },
2af89b7b
DC
139 {
140 title: gettext('Groups'),
141 groups: ['ha'],
142 xtype: 'pveHAGroupsView',
143 iconCls: 'fa fa-object-group',
f6710aac 144 itemId: 'ha-groups',
2af89b7b
DC
145 },
146 {
147 title: gettext('Fencing'),
148 groups: ['ha'],
149 iconCls: 'fa fa-bolt',
150 xtype: 'pveFencingView',
f6710aac 151 itemId: 'ha-fencing',
35ffde01 152 });
013cd17b
TL
153 // always show on initial load, will be hiddea later if the SDN API calls don't exist,
154 // else it won't be shown at first if the user initially loads with DC selected
35ffde01
TL
155 if (PVE.SDNInfo || PVE.SDNInfo === undefined) {
156 me.items.push({
157 xtype: 'pveSDNStatus',
158 title: gettext('SDN'),
159 iconCls: 'fa fa-sdn',
160 hidden: true,
161 itemId: 'sdn',
f6710aac 162 expandedOnInit: true,
35ffde01 163 },
35ffde01
TL
164 {
165 xtype: 'pveSDNZoneView',
166 groups: ['sdn'],
167 title: gettext('Zones'),
168 hidden: true,
169 iconCls: 'fa fa-th',
f6710aac 170 itemId: 'sdnzone',
35ffde01
TL
171 },
172 {
1d9643f6 173 xtype: 'pveSDNVnet',
35ffde01
TL
174 groups: ['sdn'],
175 title: gettext('Vnets'),
176 hidden: true,
177 iconCls: 'fa fa-network-wired',
f6710aac 178 itemId: 'sdnvnet',
1d9643f6
AD
179 },
180 {
181 xtype: 'pveSDNOptions',
182 groups: ['sdn'],
183 title: gettext('Options'),
184 hidden: true,
185 iconCls: 'fa fa-gear',
8295f55e 186 itemId: 'sdnoptions',
35ffde01
TL
187 });
188 }
f9c0feeb
DC
189
190 if (Proxmox.UserName === 'root@pam') {
191 me.items.push({
192 xtype: 'pveACMEClusterView',
b37ea2a1 193 title: 'ACME',
f9c0feeb 194 iconCls: 'fa fa-certificate',
f6710aac 195 itemId: 'acme',
f9c0feeb
DC
196 });
197 }
198
35ffde01 199 me.items.push({
2af89b7b
DC
200 xtype: 'pveFirewallRules',
201 title: gettext('Firewall'),
202 allow_iface: true,
203 base_url: '/cluster/firewall/rules',
204 list_refs_url: '/cluster/firewall/refs',
205 iconCls: 'fa fa-shield',
f6710aac 206 itemId: 'firewall',
2af89b7b
DC
207 },
208 {
209 xtype: 'pveFirewallOptions',
210 title: gettext('Options'),
211 groups: ['firewall'],
212 iconCls: 'fa fa-gear',
213 base_url: '/cluster/firewall/options',
c8802a60 214 onlineHelp: 'pve_firewall_cluster_wide_setup',
2af89b7b 215 fwtype: 'dc',
f6710aac 216 itemId: 'firewall-options',
2af89b7b
DC
217 },
218 {
219 xtype: 'pveSecurityGroups',
220 title: gettext('Security Group'),
221 groups: ['firewall'],
222 iconCls: 'fa fa-group',
f6710aac 223 itemId: 'firewall-sg',
2af89b7b
DC
224 },
225 {
226 xtype: 'pveFirewallAliases',
227 title: gettext('Alias'),
228 groups: ['firewall'],
229 iconCls: 'fa fa-external-link',
230 base_url: '/cluster/firewall/aliases',
f6710aac 231 itemId: 'firewall-aliases',
2af89b7b
DC
232 },
233 {
234 xtype: 'pveIPSet',
235 title: 'IPSet',
236 groups: ['firewall'],
237 iconCls: 'fa fa-list-ol',
238 base_url: '/cluster/firewall/ipset',
239 list_refs_url: '/cluster/firewall/refs',
f6710aac 240 itemId: 'firewall-ipset',
2af89b7b 241 },
f257dcec
DC
242 {
243 xtype: 'pveMetricServerView',
244 title: gettext('Metric Server'),
245 iconCls: 'fa fa-bar-chart',
246 itemId: 'metricservers',
c63115da 247 onlineHelp: 'external_metric_server',
f257dcec 248 },
2af89b7b 249 {
acf7653a
DM
250 xtype: 'pveDcSupport',
251 title: gettext('Support'),
2af89b7b 252 itemId: 'support',
f6710aac 253 iconCls: 'fa fa-comments-o',
acf7653a
DM
254 });
255 }
256
257 me.callParent();
f6710aac 258 },
acf7653a 259});