]>
Commit | Line | Data |
---|---|---|
ed2e43ff DC |
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', | |
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 | }, | |
d3ad46ba SI |
89 | { |
90 | text: gettext('Backup/Restore'), | |
91 | iconCls: 'fa fa-floppy-o', | |
92 | path: 'pmgBackupConfiguration', | |
93 | leaf: true, | |
94 | }, | |
c87d46fb | 95 | ], |
ed2e43ff DC |
96 | }, |
97 | { | |
98 | text: gettext('Administration'), | |
99 | iconCls: 'fa fa-wrench', | |
100 | path: 'pmgServerAdministration', | |
101 | expanded: true, | |
102 | children: [ | |
ed2e43ff | 103 | { |
387aeedf DC |
104 | text: gettext('Spam Quarantine'), |
105 | iconCls: 'fa fa-bullhorn', | |
1279636f | 106 | path: 'pmgSpamQuarantine', |
c87d46fb | 107 | leaf: true, |
387aeedf DC |
108 | }, |
109 | { | |
110 | text: gettext('Virus Quarantine'), | |
111 | iconCls: 'fa fa-bug', | |
112 | path: 'pmgVirusQuarantine', | |
c87d46fb | 113 | leaf: true, |
0023ef6a DC |
114 | }, |
115 | { | |
116 | text: gettext('Attachment Quarantine'), | |
117 | iconCls: 'fa fa-paperclip', | |
118 | path: 'pmgAttachmentQuarantine', | |
c87d46fb | 119 | leaf: true, |
ed2e43ff | 120 | }, |
f2a235e3 DC |
121 | { |
122 | text: gettext('User Whitelist'), | |
123 | iconCls: 'fa fa-file-o', | |
124 | path: 'pmgUserWhitelist', | |
c87d46fb | 125 | leaf: true, |
f2a235e3 DC |
126 | }, |
127 | { | |
128 | text: gettext('User Blacklist'), | |
129 | iconCls: 'fa fa-file', | |
130 | path: 'pmgUserBlacklist', | |
c87d46fb | 131 | leaf: true, |
f2a235e3 | 132 | }, |
ed2e43ff DC |
133 | { |
134 | text: gettext('Tracking Center'), | |
135 | iconCls: 'fa fa-map-o', | |
cf248533 | 136 | path: 'pmgMailTracker', |
c87d46fb | 137 | leaf: true, |
ed2e43ff DC |
138 | }, |
139 | { | |
140 | text: gettext('Queues'), | |
141 | iconCls: 'fa fa-bars', | |
142 | path: 'pmgQueueAdministration', | |
c87d46fb TL |
143 | leaf: true, |
144 | }, | |
145 | ], | |
4183c555 DM |
146 | }, |
147 | { | |
148 | text: gettext('Statistics'), | |
149 | iconCls: 'fa fa-bar-chart', | |
4183c555 DM |
150 | path: 'pmgGeneralMailStatistics', |
151 | expanded: true, | |
152 | children: [ | |
153 | { | |
154 | text: gettext('Spam Scores'), | |
155 | iconCls: 'fa fa-table', | |
156 | path: 'pmgSpamScoreDistribution', | |
c87d46fb | 157 | leaf: true, |
4183c555 DM |
158 | }, |
159 | { | |
160 | text: gettext('Virus Charts'), | |
161 | iconCls: 'fa fa-bug', | |
162 | path: 'pmgVirusCharts', | |
c87d46fb | 163 | leaf: true, |
4183c555 DM |
164 | }, |
165 | { | |
166 | text: gettext('Hourly Distribution'), | |
167 | iconCls: 'fa fa-area-chart', | |
168 | path: 'pmgHourlyMailDistribution', | |
c87d46fb | 169 | leaf: true, |
4183c555 | 170 | }, |
a32c09e6 | 171 | { |
d6a00b29 | 172 | text: gettext('Postscreen'), |
a32c09e6 DM |
173 | iconCls: 'fa fa-line-chart', |
174 | path: 'pmgRBLStatistics', | |
c87d46fb | 175 | leaf: true, |
a32c09e6 | 176 | }, |
4183c555 DM |
177 | { |
178 | text: gettext('Domain'), | |
179 | iconCls: 'fa fa-table', | |
180 | path: 'pmgDomainStatistics', | |
c87d46fb | 181 | leaf: true, |
4183c555 DM |
182 | }, |
183 | { | |
184 | text: gettext('Sender'), | |
185 | iconCls: 'fa fa-table', | |
186 | path: 'pmgSenderStatistics', | |
c87d46fb | 187 | leaf: true, |
4183c555 DM |
188 | }, |
189 | { | |
190 | text: gettext('Receiver'), | |
191 | iconCls: 'fa fa-table', | |
192 | path: 'pmgReceiverStatistics', | |
c87d46fb | 193 | leaf: true, |
4183c555 DM |
194 | }, |
195 | { | |
196 | text: gettext('Contact'), | |
197 | iconCls: 'fa fa-table', | |
198 | path: 'pmgContactStatistics', | |
c87d46fb TL |
199 | leaf: true, |
200 | }, | |
201 | ], | |
202 | }, | |
203 | ], | |
204 | }, | |
ed2e43ff DC |
205 | }); |
206 | ||
207 | Ext.define('PMG.view.main.NavigationTree', { | |
208 | extend: 'Ext.list.Tree', | |
209 | xtype: 'navigationtree', | |
210 | ||
211 | select: function(path) { | |
212 | var me = this; | |
213 | var item = me.getStore().findRecord('path', path, 0, false, true, true); | |
214 | me.setSelection(item); | |
215 | }, | |
216 | ||
217 | animation: false, | |
218 | expanderOnly: true, | |
219 | expanderFirst: false, | |
220 | store: 'NavigationStore', | |
c87d46fb | 221 | ui: 'nav', |
ed2e43ff | 222 | }); |