576e3bf252
There is no real need to change the path, so using api2 we can reuse all helpers (like tools from proxmox widget toolkit).
34 lines
527 B
JavaScript
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);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|