]> git.proxmox.com Git - pmg-gui.git/blob - js/VersionInfo.js
b094ff08dd53e084be017ef845f338006d2e1d9c
[pmg-gui.git] / js / VersionInfo.js
1 /*global Proxmox*/
2 Ext.define('PMG.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 'Mail Gateway',
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) {
24 Proxmox.Utils.API2Request({
25 url: '/version',
26 method: 'GET',
27 success: function(response) {
28 me.update(response.result.data);
29 }
30 });
31 }
32 }
33 });