]>
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"), | |
20 | hstateid: 'dctab' | |
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', |
6d55c93e | 28 | itemId: 'summary' |
2f13e1d2 TL |
29 | }, |
30 | { | |
31 | title: gettext('Cluster'), | |
32 | xtype: 'pveClusterAdministration', | |
33 | iconCls: 'fa fa-server', | |
34 | itemId: 'cluster' | |
35 | }, | |
f3a46983 DC |
36 | { |
37 | title: 'Ceph', | |
38 | itemId: 'ceph', | |
39 | iconCls: 'fa fa-ceph', | |
40 | xtype: 'pveNodeCephStatus' | |
41 | }, | |
2f13e1d2 | 42 | { |
ba93a9c6 | 43 | xtype: 'pveDcOptionView', |
6d55c93e | 44 | title: gettext('Options'), |
2af89b7b | 45 | iconCls: 'fa fa-gear', |
6d55c93e | 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', |
acf7653a DM |
55 | itemId: 'storage' |
56 | }); | |
57 | } | |
58 | ||
9233148b AD |
59 | if (caps.dc['Sys.Audit']) { |
60 | ||
61 | me.items.push({ | |
62 | xtype: 'pveSDNStatus', | |
63 | title: gettext('SDN'), | |
64 | iconCls: 'fa fa-unlock', | |
65 | itemId: 'sdn', | |
66 | expandedOnInit: true | |
67 | }); | |
68 | ||
69 | me.items.push({ | |
70 | xtype: 'pveSDNControllerView', | |
71 | groups: ['sdn'], | |
72 | title: gettext('Controllers'), | |
73 | iconCls: 'fa fa-database', | |
74 | itemId: 'sdncontroller' | |
75 | }); | |
76 | me.items.push({ | |
77 | xtype: 'pveSDNZoneView', | |
78 | groups: ['sdn'], | |
79 | title: gettext('Zones'), | |
80 | iconCls: 'fa fa-database', | |
81 | itemId: 'sdnzone' | |
82 | }); | |
83 | me.items.push({ | |
84 | xtype: 'pveSDNVnetView', | |
85 | groups: ['sdn'], | |
86 | title: gettext('Vnets'), | |
87 | iconCls: 'fa fa-database', | |
88 | itemId: 'sdnvnet' | |
89 | }); | |
90 | } | |
91 | ||
acf7653a | 92 | if (caps.dc['Sys.Audit']) { |
2af89b7b | 93 | me.items.push({ |
acf7653a | 94 | xtype: 'pveDcBackupView', |
2af89b7b | 95 | iconCls: 'fa fa-floppy-o', |
acf7653a DM |
96 | title: gettext('Backup'), |
97 | itemId: 'backup' | |
2af89b7b | 98 | }, |
56297d42 DC |
99 | { |
100 | xtype: 'pveReplicaView', | |
101 | iconCls: 'fa fa-retweet', | |
102 | title: gettext('Replication'), | |
a0f3e8e3 | 103 | itemId: 'replication' |
56297d42 | 104 | }, |
2af89b7b DC |
105 | { |
106 | xtype: 'pveACLView', | |
107 | title: gettext('Permissions'), | |
108 | iconCls: 'fa fa-unlock', | |
109 | itemId: 'permissions', | |
110 | expandedOnInit: true | |
acf7653a DM |
111 | }); |
112 | } | |
113 | ||
114 | me.items.push({ | |
115 | xtype: 'pveUserView', | |
2af89b7b DC |
116 | groups: ['permissions'], |
117 | iconCls: 'fa fa-user', | |
acf7653a DM |
118 | title: gettext('Users'), |
119 | itemId: 'users' | |
120 | }); | |
121 | ||
122 | if (caps.dc['Sys.Audit']) { | |
6d55c93e | 123 | me.items.push({ |
2af89b7b DC |
124 | xtype: 'pveGroupView', |
125 | title: gettext('Groups'), | |
126 | iconCls: 'fa fa-users', | |
127 | groups: ['permissions'], | |
128 | itemId: 'groups' | |
129 | }, | |
130 | { | |
131 | xtype: 'pvePoolView', | |
132 | title: gettext('Pools'), | |
133 | iconCls: 'fa fa-tags', | |
134 | groups: ['permissions'], | |
135 | itemId: 'pools' | |
136 | }, | |
137 | { | |
138 | xtype: 'pveRoleView', | |
139 | title: gettext('Roles'), | |
140 | iconCls: 'fa fa-male', | |
141 | groups: ['permissions'], | |
142 | itemId: 'roles' | |
143 | }, | |
144 | { | |
145 | xtype: 'pveAuthView', | |
146 | title: gettext('Authentication'), | |
147 | groups: ['permissions'], | |
148 | iconCls: 'fa fa-key', | |
149 | itemId: 'domains' | |
150 | }, | |
151 | { | |
8a58f554 | 152 | xtype: 'pveHAStatus', |
2af89b7b DC |
153 | title: 'HA', |
154 | iconCls: 'fa fa-heartbeat', | |
155 | itemId: 'ha' | |
156 | }, | |
2af89b7b DC |
157 | { |
158 | title: gettext('Groups'), | |
159 | groups: ['ha'], | |
160 | xtype: 'pveHAGroupsView', | |
161 | iconCls: 'fa fa-object-group', | |
162 | itemId: 'ha-groups' | |
163 | }, | |
164 | { | |
165 | title: gettext('Fencing'), | |
166 | groups: ['ha'], | |
167 | iconCls: 'fa fa-bolt', | |
168 | xtype: 'pveFencingView', | |
169 | itemId: 'ha-fencing' | |
170 | }, | |
171 | { | |
172 | xtype: 'pveFirewallRules', | |
173 | title: gettext('Firewall'), | |
174 | allow_iface: true, | |
175 | base_url: '/cluster/firewall/rules', | |
176 | list_refs_url: '/cluster/firewall/refs', | |
177 | iconCls: 'fa fa-shield', | |
178 | itemId: 'firewall' | |
179 | }, | |
180 | { | |
181 | xtype: 'pveFirewallOptions', | |
182 | title: gettext('Options'), | |
183 | groups: ['firewall'], | |
184 | iconCls: 'fa fa-gear', | |
185 | base_url: '/cluster/firewall/options', | |
c8802a60 | 186 | onlineHelp: 'pve_firewall_cluster_wide_setup', |
2af89b7b DC |
187 | fwtype: 'dc', |
188 | itemId: 'firewall-options' | |
189 | }, | |
190 | { | |
191 | xtype: 'pveSecurityGroups', | |
192 | title: gettext('Security Group'), | |
193 | groups: ['firewall'], | |
194 | iconCls: 'fa fa-group', | |
195 | itemId: 'firewall-sg' | |
196 | }, | |
197 | { | |
198 | xtype: 'pveFirewallAliases', | |
199 | title: gettext('Alias'), | |
200 | groups: ['firewall'], | |
201 | iconCls: 'fa fa-external-link', | |
202 | base_url: '/cluster/firewall/aliases', | |
203 | itemId: 'firewall-aliases' | |
204 | }, | |
205 | { | |
206 | xtype: 'pveIPSet', | |
207 | title: 'IPSet', | |
208 | groups: ['firewall'], | |
209 | iconCls: 'fa fa-list-ol', | |
210 | base_url: '/cluster/firewall/ipset', | |
211 | list_refs_url: '/cluster/firewall/refs', | |
212 | itemId: 'firewall-ipset' | |
213 | }, | |
214 | { | |
acf7653a DM |
215 | xtype: 'pveDcSupport', |
216 | title: gettext('Support'), | |
2af89b7b DC |
217 | itemId: 'support', |
218 | iconCls: 'fa fa-comments-o' | |
acf7653a DM |
219 | }); |
220 | } | |
221 | ||
222 | me.callParent(); | |
223 | } | |
224 | }); |