2018-12-04 16:58:40 +00:00
|
|
|
/*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) {
|
2019-01-22 11:10:38 +00:00
|
|
|
Proxmox.Utils.API2Request({
|
2018-12-04 16:58:40 +00:00
|
|
|
url: '/version',
|
|
|
|
method: 'GET',
|
|
|
|
success: function(response) {
|
|
|
|
me.update(response.result.data);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|