]> git.proxmox.com Git - pmg-gui.git/blob - js/NavigationTree.js
quarantine: refactor spamquarantine controller
[pmg-gui.git] / js / NavigationTree.js
1 Ext.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',
13 leaf: true,
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',
25 leaf: true,
26 },
27 {
28 text: gettext('Who Objects'),
29 iconCls: 'fa fa-user-circle',
30 path: 'pmgWhoConfiguration',
31 leaf: true,
32 },
33 {
34 text: gettext('What Objects'),
35 iconCls: 'fa fa-cube',
36 path: 'pmgWhatConfiguration',
37 leaf: true,
38 },
39 {
40 text: gettext('When Objects'),
41 iconCls: 'fa fa-clock-o',
42 path: 'pmgWhenConfiguration',
43 leaf: true,
44 },
45 ],
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',
57 leaf: true,
58 },
59 {
60 text: gettext('Spam Detector'),
61 iconCls: 'fa fa-bullhorn',
62 path: 'pmgSpamDetectorConfiguration',
63 leaf: true,
64 },
65 {
66 text: gettext('Virus Detector'),
67 iconCls: 'fa fa-bug',
68 path: 'pmgVirusDetectorConfiguration',
69 leaf: true,
70 },
71 {
72 text: gettext('User Management'),
73 iconCls: 'fa fa-users',
74 path: 'pmgUserManagement',
75 leaf: true,
76 },
77 {
78 text: gettext('Cluster'),
79 iconCls: 'fa fa-server',
80 path: 'pmgClusterAdministration',
81 leaf: true,
82 },
83 {
84 text: gettext('Subscription'),
85 iconCls: 'fa fa-support',
86 path: 'pmgSubscription',
87 leaf: true,
88 },
89 {
90 text: gettext('Backup/Restore'),
91 iconCls: 'fa fa-floppy-o',
92 path: 'pmgBackupConfiguration',
93 leaf: true,
94 },
95 {
96 text: gettext('Certificates'),
97 iconCls: 'fa fa-certificate',
98 path: 'pmgCertificateConfiguration',
99 leaf: true,
100 },
101 ],
102 },
103 {
104 text: gettext('Administration'),
105 iconCls: 'fa fa-wrench',
106 path: 'pmgServerAdministration',
107 expanded: true,
108 children: [
109 {
110 text: gettext('Spam Quarantine'),
111 iconCls: 'fa fa-bullhorn',
112 path: 'pmgSpamQuarantine',
113 leaf: true,
114 },
115 {
116 text: gettext('Virus Quarantine'),
117 iconCls: 'fa fa-bug',
118 path: 'pmgVirusQuarantine',
119 leaf: true,
120 },
121 {
122 text: gettext('Attachment Quarantine'),
123 iconCls: 'fa fa-paperclip',
124 path: 'pmgAttachmentQuarantine',
125 leaf: true,
126 },
127 {
128 text: gettext('User Whitelist'),
129 iconCls: 'fa fa-file-o',
130 path: 'pmgUserWhitelist',
131 leaf: true,
132 },
133 {
134 text: gettext('User Blacklist'),
135 iconCls: 'fa fa-file',
136 path: 'pmgUserBlacklist',
137 leaf: true,
138 },
139 {
140 text: gettext('Tracking Center'),
141 iconCls: 'fa fa-map-o',
142 path: 'pmgMailTracker',
143 leaf: true,
144 },
145 {
146 text: gettext('Queues'),
147 iconCls: 'fa fa-bars',
148 path: 'pmgQueueAdministration',
149 leaf: true,
150 },
151 ],
152 },
153 {
154 text: gettext('Statistics'),
155 iconCls: 'fa fa-bar-chart',
156 path: 'pmgGeneralMailStatistics',
157 expanded: true,
158 children: [
159 {
160 text: gettext('Spam Scores'),
161 iconCls: 'fa fa-table',
162 path: 'pmgSpamScoreDistribution',
163 leaf: true,
164 },
165 {
166 text: gettext('Virus Charts'),
167 iconCls: 'fa fa-bug',
168 path: 'pmgVirusCharts',
169 leaf: true,
170 },
171 {
172 text: gettext('Hourly Distribution'),
173 iconCls: 'fa fa-area-chart',
174 path: 'pmgHourlyMailDistribution',
175 leaf: true,
176 },
177 {
178 text: gettext('Postscreen'),
179 iconCls: 'fa fa-line-chart',
180 path: 'pmgRBLStatistics',
181 leaf: true,
182 },
183 {
184 text: gettext('Domain'),
185 iconCls: 'fa fa-table',
186 path: 'pmgDomainStatistics',
187 leaf: true,
188 },
189 {
190 text: gettext('Sender'),
191 iconCls: 'fa fa-table',
192 path: 'pmgSenderStatistics',
193 leaf: true,
194 },
195 {
196 text: gettext('Receiver'),
197 iconCls: 'fa fa-table',
198 path: 'pmgReceiverStatistics',
199 leaf: true,
200 },
201 {
202 text: gettext('Contact'),
203 iconCls: 'fa fa-table',
204 path: 'pmgContactStatistics',
205 leaf: true,
206 },
207 ],
208 },
209 ],
210 },
211 });
212
213 Ext.define('PMG.view.main.NavigationTree', {
214 extend: 'Ext.list.Tree',
215 xtype: 'navigationtree',
216
217 select: function(path) {
218 var me = this;
219 var item = me.getStore().findRecord('path', path, 0, false, true, true);
220 me.setSelection(item);
221 },
222
223 animation: false,
224 expanderOnly: true,
225 expanderFirst: false,
226 store: 'NavigationStore',
227 ui: 'pve-nav',
228 });