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