]> git.proxmox.com Git - proxmox-backup.git/blob - www/NavigationTree.js
ui: add simple dashboard
[proxmox-backup.git] / www / NavigationTree.js
1 Ext.define('PBS.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: 'pbsDashboard',
13 leaf: true
14 },
15 {
16 text: gettext('Configuration'),
17 iconCls: 'fa fa-gears',
18 path: 'pbsSystemConfiguration',
19 expanded: true,
20 children: [
21 {
22 text: gettext('Data Store'),
23 iconCls: 'fa fa-envelope-o',
24 path: 'pbsDataStoreConfig',
25 leaf: true
26 },
27 {
28 text: gettext('Subscription'),
29 iconCls: 'fa fa-support',
30 path: 'pbsSubscription',
31 leaf: true
32 }
33 ]
34 },
35 {
36 text: gettext('Administration'),
37 iconCls: 'fa fa-wrench',
38 path: 'pbsServerAdministration',
39 leaf: true
40 }
41 ]
42 }
43 });
44
45 Ext.define('PBS.view.main.NavigationTree', {
46 extend: 'Ext.list.Tree',
47 xtype: 'navigationtree',
48
49 select: function(path) {
50 var me = this;
51 var item = me.getStore().findRecord('path', path, 0, false, true, true);
52 me.setSelection(item);
53 },
54
55 animation: false,
56 expanderOnly: true,
57 expanderFirst: false,
58 store: 'NavigationStore',
59 ui: 'nav'
60 });