]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/sdn/Browser.js
bb30cbe0f6af8fa2ee69b8e25acc00d7356d771b
[pve-manager.git] / www / manager6 / sdn / Browser.js
1 Ext.define('PVE.sdn.Browser', {
2 extend: 'PVE.panel.Config',
3 alias: 'widget.PVE.sdn.Browser',
4
5 onlineHelp: 'chapter_pvesdn',
6
7 initComponent: function() {
8 var me = this;
9
10 var nodename = me.pveSelNode.data.node;
11 if (!nodename) {
12 throw "no node name specified";
13 }
14
15 var sdnid = me.pveSelNode.data.sdn;
16 if (!sdnid) {
17 throw "no sdn ID specified";
18 }
19
20 me.items = [];
21
22 var caps = Ext.state.Manager.get('GuiCap');
23
24 Ext.apply(me, {
25 title: Ext.String.format(gettext("Zone {0} on node {1}"),
26 "'" + sdnid + "'", "'" + nodename + "'"),
27 hstateid: 'sdntab',
28 });
29
30 if (caps.sdn['SDN.Audit']) {
31 me.items.push({
32 xtype: 'pveSDNZoneContentView',
33 title: gettext('Content'),
34 iconCls: 'fa fa-th',
35 itemId: 'content',
36 });
37 }
38
39 if (caps.sdn['Permissions.Modify']) {
40 me.items.push({
41 xtype: 'pveACLView',
42 title: gettext('Permissions'),
43 iconCls: 'fa fa-unlock',
44 itemId: 'permissions',
45 path: '/sdn/zones/' + sdnid,
46 });
47 }
48
49 me.callParent();
50 },
51 });