]> git.proxmox.com Git - pmg-gui.git/blob - js/NavigationTree.js
NavigationTree.js - include new statistic pages
[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('License'),
85 iconCls: 'fa fa-ticket',
86 path: 'pmgLicense',
87 leaf: true,
88 }
89 ]
90 },
91 {
92 text: gettext('Administration'),
93 iconCls: 'fa fa-wrench',
94 path: 'pmgServerAdministration',
95 expanded: true,
96 children: [
97 {
98 text: gettext('Statistics'),
99 iconCls: 'fa fa-bar-chart',
100 border: false,
101 path: 'pmgGeneralMailStatistics',
102 expanded: true,
103 children: [
104 {
105 text: gettext('Spam Scores'),
106 path: 'pmgSpamScoreDistribution',
107 border: false,
108 leaf: true
109 },
110 {
111 text: gettext('Virus Charts'),
112 path: 'pmgVirusCharts',
113 border: false,
114 leaf: true
115 }
116 ]
117 },
118 {
119 text: gettext('Quarantine'),
120 iconCls: 'fa fa-cubes',
121 path: 'pmgSpamQuarantine',
122 leaf: true,
123 },
124 {
125 text: gettext('Tracking Center'),
126 iconCls: 'fa fa-map-o',
127 path: 'pmgTrackingCenter',
128 leaf: true,
129 },
130 {
131 text: gettext('Queues'),
132 iconCls: 'fa fa-bars',
133 path: 'pmgQueueAdministration',
134 leaf: true,
135 }
136 ]
137 }
138 ]
139 }
140 });
141
142 Ext.define('PMG.view.main.NavigationTree', {
143 extend: 'Ext.list.Tree',
144 xtype: 'navigationtree',
145
146 select: function(path) {
147 var me = this;
148 var item = me.getStore().findRecord('path', path, 0, false, true, true);
149 me.setSelection(item);
150 },
151
152 animation: false,
153 expanderOnly: true,
154 expanderFirst: false,
155 store: 'NavigationStore',
156 ui: 'nav'
157 });