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