proxmox-backup/www/VersionInfo.js
Dietmar Maurer 576e3bf252 rename api3 back to api2
There is no real need to change the path, so using api2 we can reuse
all helpers (like tools from proxmox widget toolkit).
2019-01-22 12:10:38 +01:00

34 lines
527 B
JavaScript

/*global Proxmox*/
Ext.define('PBS.view.main.VersionInfo',{
extend: 'Ext.Component',
xtype: 'versioninfo',
makeApiCall: true,
data: {
version: false
},
tpl: [
'Backup Server',
'<tpl if="version">',
' {version}-{release}',
'</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);
}
});
}
}
});