]> git.proxmox.com Git - pmg-gui.git/blame - js/NavigationTree.js
tree wide: eslint --fix
[pmg-gui.git] / js / NavigationTree.js
CommitLineData
ed2e43ff
DC
1Ext.define('PMG.store.NavigationStore', {
2 extend: 'Ext.data.TreeStore',
3
4 storeId: 'NavigationStore',
5
6 root: {
7 expanded: true,
8 children: [
9 {
10 text: gettext('Dashboard'),
11 iconCls: 'fa fa-tachometer',
12 path: 'pmgDashboard',
c87d46fb 13 leaf: true,
ed2e43ff
DC
14 },
15 {
16 text: gettext('Mail Filter'),
17 iconCls: 'fa fa-envelope',
18 path: 'pmgRuleConfiguration',
19 expanded: true,
20 children: [
21 {
22 text: gettext('Action Objects'),
23 iconCls: 'fa fa-flag',
24 path: 'pmgActionList',
c87d46fb 25 leaf: true,
ed2e43ff
DC
26 },
27 {
28 text: gettext('Who Objects'),
29 iconCls: 'fa fa-user-circle',
30 path: 'pmgWhoConfiguration',
c87d46fb 31 leaf: true,
ed2e43ff
DC
32 },
33 {
34 text: gettext('What Objects'),
35 iconCls: 'fa fa-cube',
36 path: 'pmgWhatConfiguration',
c87d46fb 37 leaf: true,
ed2e43ff
DC
38 },
39 {
40 text: gettext('When Objects'),
41 iconCls: 'fa fa-clock-o',
42 path: 'pmgWhenConfiguration',
c87d46fb
TL
43 leaf: true,
44 },
45 ],
ed2e43ff
DC
46 },
47 {
48 text: gettext('Configuration'),
49 iconCls: 'fa fa-gears',
50 path: 'pmgSystemConfiguration',
51 expanded: true,
52 children: [
53 {
54 text: gettext('Mail Proxy'),
55 iconCls: 'fa fa-envelope-o',
56 path: 'pmgMailProxyConfiguration',
c87d46fb 57 leaf: true,
ed2e43ff
DC
58 },
59 {
60 text: gettext('Spam Detector'),
61 iconCls: 'fa fa-bullhorn',
62 path: 'pmgSpamDetectorConfiguration',
c87d46fb 63 leaf: true,
ed2e43ff
DC
64 },
65 {
66 text: gettext('Virus Detector'),
67 iconCls: 'fa fa-bug',
68 path: 'pmgVirusDetectorConfiguration',
c87d46fb 69 leaf: true,
ed2e43ff
DC
70 },
71 {
72 text: gettext('User Management'),
73 iconCls: 'fa fa-users',
74 path: 'pmgUserManagement',
c87d46fb 75 leaf: true,
ed2e43ff
DC
76 },
77 {
78 text: gettext('Cluster'),
79 iconCls: 'fa fa-server',
c77675e9 80 path: 'pmgClusterAdministration',
c87d46fb 81 leaf: true,
ed2e43ff
DC
82 },
83 {
a10c81d9
DM
84 text: gettext('Subscription'),
85 iconCls: 'fa fa-support',
86 path: 'pmgSubscription',
c87d46fb
TL
87 leaf: true,
88 },
89 ],
ed2e43ff
DC
90 },
91 {
92 text: gettext('Administration'),
93 iconCls: 'fa fa-wrench',
94 path: 'pmgServerAdministration',
95 expanded: true,
96 children: [
ed2e43ff 97 {
387aeedf
DC
98 text: gettext('Spam Quarantine'),
99 iconCls: 'fa fa-bullhorn',
1279636f 100 path: 'pmgSpamQuarantine',
c87d46fb 101 leaf: true,
387aeedf
DC
102 },
103 {
104 text: gettext('Virus Quarantine'),
105 iconCls: 'fa fa-bug',
106 path: 'pmgVirusQuarantine',
c87d46fb 107 leaf: true,
0023ef6a
DC
108 },
109 {
110 text: gettext('Attachment Quarantine'),
111 iconCls: 'fa fa-paperclip',
112 path: 'pmgAttachmentQuarantine',
c87d46fb 113 leaf: true,
ed2e43ff 114 },
f2a235e3
DC
115 {
116 text: gettext('User Whitelist'),
117 iconCls: 'fa fa-file-o',
118 path: 'pmgUserWhitelist',
c87d46fb 119 leaf: true,
f2a235e3
DC
120 },
121 {
122 text: gettext('User Blacklist'),
123 iconCls: 'fa fa-file',
124 path: 'pmgUserBlacklist',
c87d46fb 125 leaf: true,
f2a235e3 126 },
ed2e43ff
DC
127 {
128 text: gettext('Tracking Center'),
129 iconCls: 'fa fa-map-o',
cf248533 130 path: 'pmgMailTracker',
c87d46fb 131 leaf: true,
ed2e43ff
DC
132 },
133 {
134 text: gettext('Queues'),
135 iconCls: 'fa fa-bars',
136 path: 'pmgQueueAdministration',
c87d46fb
TL
137 leaf: true,
138 },
139 ],
4183c555
DM
140 },
141 {
142 text: gettext('Statistics'),
143 iconCls: 'fa fa-bar-chart',
4183c555
DM
144 path: 'pmgGeneralMailStatistics',
145 expanded: true,
146 children: [
147 {
148 text: gettext('Spam Scores'),
149 iconCls: 'fa fa-table',
150 path: 'pmgSpamScoreDistribution',
c87d46fb 151 leaf: true,
4183c555
DM
152 },
153 {
154 text: gettext('Virus Charts'),
155 iconCls: 'fa fa-bug',
156 path: 'pmgVirusCharts',
c87d46fb 157 leaf: true,
4183c555
DM
158 },
159 {
160 text: gettext('Hourly Distribution'),
161 iconCls: 'fa fa-area-chart',
162 path: 'pmgHourlyMailDistribution',
c87d46fb 163 leaf: true,
4183c555 164 },
a32c09e6 165 {
d6a00b29 166 text: gettext('Postscreen'),
a32c09e6
DM
167 iconCls: 'fa fa-line-chart',
168 path: 'pmgRBLStatistics',
c87d46fb 169 leaf: true,
a32c09e6 170 },
4183c555
DM
171 {
172 text: gettext('Domain'),
173 iconCls: 'fa fa-table',
174 path: 'pmgDomainStatistics',
c87d46fb 175 leaf: true,
4183c555
DM
176 },
177 {
178 text: gettext('Sender'),
179 iconCls: 'fa fa-table',
180 path: 'pmgSenderStatistics',
c87d46fb 181 leaf: true,
4183c555
DM
182 },
183 {
184 text: gettext('Receiver'),
185 iconCls: 'fa fa-table',
186 path: 'pmgReceiverStatistics',
c87d46fb 187 leaf: true,
4183c555
DM
188 },
189 {
190 text: gettext('Contact'),
191 iconCls: 'fa fa-table',
192 path: 'pmgContactStatistics',
c87d46fb
TL
193 leaf: true,
194 },
195 ],
196 },
197 ],
198 },
ed2e43ff
DC
199});
200
201Ext.define('PMG.view.main.NavigationTree', {
202 extend: 'Ext.list.Tree',
203 xtype: 'navigationtree',
204
205 select: function(path) {
206 var me = this;
207 var item = me.getStore().findRecord('path', path, 0, false, true, true);
208 me.setSelection(item);
209 },
210
211 animation: false,
212 expanderOnly: true,
213 expanderFirst: false,
214 store: 'NavigationStore',
c87d46fb 215 ui: 'nav',
ed2e43ff 216});