]>
Commit | Line | Data |
---|---|---|
5c7a1b15 DM |
1 | Ext.define('PBS.MainView', { |
2 | extend: 'Ext.container.Container', | |
3 | xtype: 'mainview', | |
4 | ||
5 | title: 'Proxmox Backup Server', | |
6 | ||
7 | controller: { | |
8 | xclass: 'Ext.app.ViewController', | |
9 | routes: { | |
10 | ':path:subpath': { | |
11 | action: 'changePath', | |
12 | before: 'beforeChangePath', | |
13 | conditions : { | |
14 | ':path' : '(?:([%a-zA-Z0-9\\-\\_\\s,]+))', | |
15 | ':subpath' : '(?:(?::)([%a-zA-Z0-9\\-\\_\\s,]+))?' | |
16 | } | |
17 | } | |
18 | }, | |
19 | ||
20 | beforeChangePath: function(path, subpath, action) { | |
21 | var me = this; | |
22 | ||
23 | action.resume(); | |
24 | }, | |
25 | ||
26 | changePath: function(path,subpath) { | |
27 | var me = this; | |
28 | var contentpanel = me.lookupReference('contentpanel'); | |
29 | var lastpanel = contentpanel.getLayout().getActiveItem(); | |
30 | ||
31 | }, | |
32 | ||
33 | init: function(view) { | |
34 | var me = this; | |
35 | console.log("init"); | |
36 | ||
37 | } | |
38 | }, | |
39 | ||
40 | plugins: 'viewport', | |
41 | ||
42 | layout: { type: 'border' }, | |
43 | ||
44 | items: [ | |
45 | { | |
46 | region: 'north', | |
47 | xtype: 'container', | |
48 | layout: { | |
49 | type: 'hbox', | |
50 | align: 'middle' | |
51 | }, | |
52 | margin: '2 5 2 5', | |
53 | height: 38, | |
54 | items: [ | |
55 | { | |
56 | xtype: 'proxmoxlogo' | |
57 | }, | |
58 | { | |
e4dc0a14 | 59 | xtype: 'versioninfo' |
5c7a1b15 DM |
60 | }, |
61 | { | |
62 | flex: 1 | |
63 | }, | |
64 | { | |
65 | baseCls: 'x-plain', | |
66 | reference: 'usernameinfo', | |
67 | padding: '0 5', | |
68 | tpl: Ext.String.format(gettext("You are logged in as {0}"), "'{username}'") | |
69 | }, | |
70 | { | |
71 | reference: 'logoutButton', | |
72 | xtype: 'button', | |
73 | iconCls: 'fa fa-sign-out', | |
74 | text: gettext('Logout') | |
75 | } | |
76 | ] | |
77 | }, | |
78 | { | |
79 | xtype: 'panel', | |
80 | scrollable: 'y', | |
81 | border: false, | |
82 | region: 'west', | |
83 | layout: { | |
84 | type: 'vbox', | |
85 | align: 'stretch' | |
86 | }, | |
87 | items: [{ html: "test" }] | |
88 | }, | |
89 | { | |
90 | xtype: 'panel', | |
91 | layout: { type: 'card' }, | |
92 | region: 'center', | |
93 | border: false, | |
94 | reference: 'contentpanel' | |
95 | } | |
96 | ] | |
97 | }); | |
98 | ||
99 |