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