]>
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', | |
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', | |
771bd0b9 | 25 | leaf: true |
ed2e43ff DC |
26 | }, |
27 | { | |
28 | text: gettext('Who Objects'), | |
29 | iconCls: 'fa fa-user-circle', | |
30 | path: 'pmgWhoConfiguration', | |
771bd0b9 | 31 | leaf: true |
ed2e43ff DC |
32 | }, |
33 | { | |
34 | text: gettext('What Objects'), | |
35 | iconCls: 'fa fa-cube', | |
36 | path: 'pmgWhatConfiguration', | |
771bd0b9 | 37 | leaf: true |
ed2e43ff DC |
38 | }, |
39 | { | |
40 | text: gettext('When Objects'), | |
41 | iconCls: 'fa fa-clock-o', | |
42 | path: 'pmgWhenConfiguration', | |
771bd0b9 | 43 | leaf: true |
ed2e43ff DC |
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', | |
771bd0b9 | 57 | leaf: true |
ed2e43ff DC |
58 | }, |
59 | { | |
60 | text: gettext('Spam Detector'), | |
61 | iconCls: 'fa fa-bullhorn', | |
62 | path: 'pmgSpamDetectorConfiguration', | |
771bd0b9 | 63 | leaf: true |
ed2e43ff DC |
64 | }, |
65 | { | |
66 | text: gettext('Virus Detector'), | |
67 | iconCls: 'fa fa-bug', | |
68 | path: 'pmgVirusDetectorConfiguration', | |
771bd0b9 | 69 | leaf: true |
ed2e43ff DC |
70 | }, |
71 | { | |
72 | text: gettext('User Management'), | |
73 | iconCls: 'fa fa-users', | |
74 | path: 'pmgUserManagement', | |
771bd0b9 | 75 | leaf: true |
ed2e43ff DC |
76 | }, |
77 | { | |
78 | text: gettext('Cluster'), | |
79 | iconCls: 'fa fa-server', | |
c77675e9 | 80 | path: 'pmgClusterAdministration', |
771bd0b9 | 81 | leaf: true |
ed2e43ff DC |
82 | }, |
83 | { | |
a10c81d9 DM |
84 | text: gettext('Subscription'), |
85 | iconCls: 'fa fa-support', | |
86 | path: 'pmgSubscription', | |
87 | leaf: true | |
ed2e43ff DC |
88 | } |
89 | ] | |
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', |
771bd0b9 | 101 | leaf: true |
387aeedf DC |
102 | }, |
103 | { | |
104 | text: gettext('Virus Quarantine'), | |
105 | iconCls: 'fa fa-bug', | |
106 | path: 'pmgVirusQuarantine', | |
771bd0b9 | 107 | leaf: true |
ed2e43ff | 108 | }, |
f2a235e3 DC |
109 | { |
110 | text: gettext('User Whitelist'), | |
111 | iconCls: 'fa fa-file-o', | |
112 | path: 'pmgUserWhitelist', | |
771bd0b9 | 113 | leaf: true |
f2a235e3 DC |
114 | }, |
115 | { | |
116 | text: gettext('User Blacklist'), | |
117 | iconCls: 'fa fa-file', | |
118 | path: 'pmgUserBlacklist', | |
771bd0b9 | 119 | leaf: true |
f2a235e3 | 120 | }, |
ed2e43ff DC |
121 | { |
122 | text: gettext('Tracking Center'), | |
123 | iconCls: 'fa fa-map-o', | |
cf248533 | 124 | path: 'pmgMailTracker', |
771bd0b9 | 125 | leaf: true |
ed2e43ff DC |
126 | }, |
127 | { | |
128 | text: gettext('Queues'), | |
129 | iconCls: 'fa fa-bars', | |
130 | path: 'pmgQueueAdministration', | |
771bd0b9 | 131 | leaf: true |
ed2e43ff DC |
132 | } |
133 | ] | |
4183c555 DM |
134 | }, |
135 | { | |
136 | text: gettext('Statistics'), | |
137 | iconCls: 'fa fa-bar-chart', | |
4183c555 DM |
138 | path: 'pmgGeneralMailStatistics', |
139 | expanded: true, | |
140 | children: [ | |
141 | { | |
142 | text: gettext('Spam Scores'), | |
143 | iconCls: 'fa fa-table', | |
144 | path: 'pmgSpamScoreDistribution', | |
4183c555 DM |
145 | leaf: true |
146 | }, | |
147 | { | |
148 | text: gettext('Virus Charts'), | |
149 | iconCls: 'fa fa-bug', | |
150 | path: 'pmgVirusCharts', | |
4183c555 DM |
151 | leaf: true |
152 | }, | |
153 | { | |
154 | text: gettext('Hourly Distribution'), | |
155 | iconCls: 'fa fa-area-chart', | |
156 | path: 'pmgHourlyMailDistribution', | |
4183c555 DM |
157 | leaf: true |
158 | }, | |
a32c09e6 DM |
159 | { |
160 | text: gettext('RBL'), | |
161 | iconCls: 'fa fa-line-chart', | |
162 | path: 'pmgRBLStatistics', | |
a32c09e6 DM |
163 | leaf: true |
164 | }, | |
4183c555 DM |
165 | { |
166 | text: gettext('Domain'), | |
167 | iconCls: 'fa fa-table', | |
168 | path: 'pmgDomainStatistics', | |
4183c555 DM |
169 | leaf: true |
170 | }, | |
171 | { | |
172 | text: gettext('Sender'), | |
173 | iconCls: 'fa fa-table', | |
174 | path: 'pmgSenderStatistics', | |
4183c555 DM |
175 | leaf: true |
176 | }, | |
177 | { | |
178 | text: gettext('Receiver'), | |
179 | iconCls: 'fa fa-table', | |
180 | path: 'pmgReceiverStatistics', | |
4183c555 DM |
181 | leaf: true |
182 | }, | |
183 | { | |
184 | text: gettext('Contact'), | |
185 | iconCls: 'fa fa-table', | |
186 | path: 'pmgContactStatistics', | |
4183c555 DM |
187 | leaf: true |
188 | } | |
189 | ] | |
ed2e43ff DC |
190 | } |
191 | ] | |
192 | } | |
193 | }); | |
194 | ||
195 | Ext.define('PMG.view.main.NavigationTree', { | |
196 | extend: 'Ext.list.Tree', | |
197 | xtype: 'navigationtree', | |
198 | ||
199 | select: function(path) { | |
200 | var me = this; | |
201 | var item = me.getStore().findRecord('path', path, 0, false, true, true); | |
202 | me.setSelection(item); | |
203 | }, | |
204 | ||
205 | animation: false, | |
206 | expanderOnly: true, | |
207 | expanderFirst: false, | |
208 | store: 'NavigationStore', | |
209 | ui: 'nav' | |
210 | }); |