]>
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 TL |
29 | }, |
30 | { | |
31 | title: gettext('Cluster'), | |
32 | xtype: 'pveClusterAdministration', | |
33 | iconCls: 'fa fa-server', | |
f6710aac | 34 | itemId: 'cluster', |
2f13e1d2 | 35 | }, |
f3a46983 DC |
36 | { |
37 | title: 'Ceph', | |
38 | itemId: 'ceph', | |
39 | iconCls: 'fa fa-ceph', | |
f6710aac | 40 | xtype: 'pveNodeCephStatus', |
f3a46983 | 41 | }, |
2f13e1d2 | 42 | { |
ba93a9c6 | 43 | xtype: 'pveDcOptionView', |
6d55c93e | 44 | title: gettext('Options'), |
2af89b7b | 45 | iconCls: 'fa fa-gear', |
f6710aac | 46 | itemId: 'options', |
2af89b7b | 47 | }); |
acf7653a DM |
48 | } |
49 | ||
50 | if (caps.storage['Datastore.Allocate'] || caps.dc['Sys.Audit']) { | |
51 | me.items.push({ | |
52 | xtype: 'pveStorageView', | |
53 | title: gettext('Storage'), | |
2af89b7b | 54 | iconCls: 'fa fa-database', |
f6710aac | 55 | itemId: 'storage', |
acf7653a DM |
56 | }); |
57 | } | |
58 | ||
9233148b | 59 | |
acf7653a | 60 | if (caps.dc['Sys.Audit']) { |
2af89b7b | 61 | me.items.push({ |
acf7653a | 62 | xtype: 'pveDcBackupView', |
2af89b7b | 63 | iconCls: 'fa fa-floppy-o', |
acf7653a | 64 | title: gettext('Backup'), |
f6710aac | 65 | itemId: 'backup', |
2af89b7b | 66 | }, |
56297d42 DC |
67 | { |
68 | xtype: 'pveReplicaView', | |
69 | iconCls: 'fa fa-retweet', | |
70 | title: gettext('Replication'), | |
f6710aac | 71 | itemId: 'replication', |
56297d42 | 72 | }, |
2af89b7b DC |
73 | { |
74 | xtype: 'pveACLView', | |
75 | title: gettext('Permissions'), | |
76 | iconCls: 'fa fa-unlock', | |
77 | itemId: 'permissions', | |
f6710aac | 78 | expandedOnInit: true, |
acf7653a DM |
79 | }); |
80 | } | |
81 | ||
82 | me.items.push({ | |
83 | xtype: 'pveUserView', | |
2af89b7b DC |
84 | groups: ['permissions'], |
85 | iconCls: 'fa fa-user', | |
acf7653a | 86 | title: gettext('Users'), |
f6710aac | 87 | itemId: 'users', |
acf7653a DM |
88 | }); |
89 | ||
c831fbde FG |
90 | me.items.push({ |
91 | xtype: 'pveTokenView', | |
92 | groups: ['permissions'], | |
93 | iconCls: 'fa fa-user-o', | |
94 | title: gettext('API Tokens'), | |
f6710aac | 95 | itemId: 'apitokens', |
c831fbde FG |
96 | }); |
97 | ||
acf7653a | 98 | if (caps.dc['Sys.Audit']) { |
6d55c93e | 99 | me.items.push({ |
2af89b7b DC |
100 | xtype: 'pveGroupView', |
101 | title: gettext('Groups'), | |
102 | iconCls: 'fa fa-users', | |
103 | groups: ['permissions'], | |
f6710aac | 104 | itemId: 'groups', |
2af89b7b DC |
105 | }, |
106 | { | |
107 | xtype: 'pvePoolView', | |
108 | title: gettext('Pools'), | |
109 | iconCls: 'fa fa-tags', | |
110 | groups: ['permissions'], | |
f6710aac | 111 | itemId: 'pools', |
2af89b7b DC |
112 | }, |
113 | { | |
114 | xtype: 'pveRoleView', | |
115 | title: gettext('Roles'), | |
116 | iconCls: 'fa fa-male', | |
117 | groups: ['permissions'], | |
f6710aac | 118 | itemId: 'roles', |
2af89b7b DC |
119 | }, |
120 | { | |
121 | xtype: 'pveAuthView', | |
122 | title: gettext('Authentication'), | |
123 | groups: ['permissions'], | |
124 | iconCls: 'fa fa-key', | |
f6710aac | 125 | itemId: 'domains', |
2af89b7b DC |
126 | }, |
127 | { | |
8a58f554 | 128 | xtype: 'pveHAStatus', |
2af89b7b DC |
129 | title: 'HA', |
130 | iconCls: 'fa fa-heartbeat', | |
f6710aac | 131 | itemId: 'ha', |
2af89b7b | 132 | }, |
2af89b7b DC |
133 | { |
134 | title: gettext('Groups'), | |
135 | groups: ['ha'], | |
136 | xtype: 'pveHAGroupsView', | |
137 | iconCls: 'fa fa-object-group', | |
f6710aac | 138 | itemId: 'ha-groups', |
2af89b7b DC |
139 | }, |
140 | { | |
141 | title: gettext('Fencing'), | |
142 | groups: ['ha'], | |
143 | iconCls: 'fa fa-bolt', | |
144 | xtype: 'pveFencingView', | |
f6710aac | 145 | itemId: 'ha-fencing', |
35ffde01 TL |
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', | |
f6710aac | 154 | expandedOnInit: true, |
35ffde01 | 155 | }, |
35ffde01 TL |
156 | { |
157 | xtype: 'pveSDNZoneView', | |
158 | groups: ['sdn'], | |
159 | title: gettext('Zones'), | |
160 | hidden: true, | |
161 | iconCls: 'fa fa-th', | |
f6710aac | 162 | itemId: 'sdnzone', |
35ffde01 TL |
163 | }, |
164 | { | |
1d9643f6 | 165 | xtype: 'pveSDNVnet', |
35ffde01 TL |
166 | groups: ['sdn'], |
167 | title: gettext('Vnets'), | |
168 | hidden: true, | |
169 | iconCls: 'fa fa-network-wired', | |
f6710aac | 170 | itemId: 'sdnvnet', |
1d9643f6 AD |
171 | }, |
172 | { | |
173 | xtype: 'pveSDNOptions', | |
174 | groups: ['sdn'], | |
175 | title: gettext('Options'), | |
176 | hidden: true, | |
177 | iconCls: 'fa fa-gear', | |
8295f55e | 178 | itemId: 'sdnoptions', |
35ffde01 TL |
179 | }); |
180 | } | |
f9c0feeb DC |
181 | |
182 | if (Proxmox.UserName === 'root@pam') { | |
183 | me.items.push({ | |
184 | xtype: 'pveACMEClusterView', | |
b37ea2a1 | 185 | title: 'ACME', |
f9c0feeb | 186 | iconCls: 'fa fa-certificate', |
f6710aac | 187 | itemId: 'acme', |
f9c0feeb DC |
188 | }); |
189 | } | |
190 | ||
35ffde01 | 191 | me.items.push({ |
2af89b7b DC |
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', | |
f6710aac | 198 | itemId: 'firewall', |
2af89b7b DC |
199 | }, |
200 | { | |
201 | xtype: 'pveFirewallOptions', | |
202 | title: gettext('Options'), | |
203 | groups: ['firewall'], | |
204 | iconCls: 'fa fa-gear', | |
205 | base_url: '/cluster/firewall/options', | |
c8802a60 | 206 | onlineHelp: 'pve_firewall_cluster_wide_setup', |
2af89b7b | 207 | fwtype: 'dc', |
f6710aac | 208 | itemId: 'firewall-options', |
2af89b7b DC |
209 | }, |
210 | { | |
211 | xtype: 'pveSecurityGroups', | |
212 | title: gettext('Security Group'), | |
213 | groups: ['firewall'], | |
214 | iconCls: 'fa fa-group', | |
f6710aac | 215 | itemId: 'firewall-sg', |
2af89b7b DC |
216 | }, |
217 | { | |
218 | xtype: 'pveFirewallAliases', | |
219 | title: gettext('Alias'), | |
220 | groups: ['firewall'], | |
221 | iconCls: 'fa fa-external-link', | |
222 | base_url: '/cluster/firewall/aliases', | |
f6710aac | 223 | itemId: 'firewall-aliases', |
2af89b7b DC |
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', | |
f6710aac | 232 | itemId: 'firewall-ipset', |
2af89b7b | 233 | }, |
f257dcec DC |
234 | { |
235 | xtype: 'pveMetricServerView', | |
236 | title: gettext('Metric Server'), | |
237 | iconCls: 'fa fa-bar-chart', | |
238 | itemId: 'metricservers', | |
c63115da | 239 | onlineHelp: 'external_metric_server', |
f257dcec | 240 | }, |
2af89b7b | 241 | { |
acf7653a DM |
242 | xtype: 'pveDcSupport', |
243 | title: gettext('Support'), | |
2af89b7b | 244 | itemId: 'support', |
f6710aac | 245 | iconCls: 'fa fa-comments-o', |
acf7653a DM |
246 | }); |
247 | } | |
248 | ||
249 | me.callParent(); | |
f6710aac | 250 | }, |
acf7653a | 251 | }); |