]>
Commit | Line | Data |
---|---|---|
1 | Ext.define('PBS.view.main.VersionInfo', { | |
2 | extend: 'Ext.Component', | |
3 | xtype: 'versioninfo', | |
4 | ||
5 | makeApiCall: true, | |
6 | ||
7 | data: { | |
8 | version: false, | |
9 | }, | |
10 | ||
11 | tpl: [ | |
12 | 'Backup Server', | |
13 | '<tpl if="version">', | |
14 | ' {version}-{release}', | |
15 | '</tpl>', | |
16 | ], | |
17 | ||
18 | initComponent: function() { | |
19 | var me = this; | |
20 | me.callParent(); | |
21 | ||
22 | if (me.makeApiCall) { | |
23 | Proxmox.Utils.API2Request({ | |
24 | url: '/version', | |
25 | method: 'GET', | |
26 | success: function(response) { | |
27 | me.update(response.result.data); | |
28 | }, | |
29 | }); | |
30 | } | |
31 | }, | |
32 | }); |