pmg-gui/js/VersionInfo.js
Dominik Csapak ca6f3037f6 add versioninfo component
this gets the current version from the api and displays it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-04-05 06:38:50 +02:00

33 lines
516 B
JavaScript

Ext.define('PMG.view.main.VersionInfo',{
extend: 'Ext.Component',
xtype: 'versioninfo',
makeApiCall: true,
data: {
version: false
},
tpl: [
'Mail Gateway',
'<tpl if="version">',
' {version}-{release}/{repoid}',
'</tpl>'
],
initComponent: function() {
var me = this;
me.callParent();
if (me.makeApiCall) {
Proxmox.Utils.API2Request({
url: '/version',
method: 'GET',
success: function(response) {
me.update(response.result.data);
}
});
}
}
});