proxmox-backup/www/VersionInfo.js

38 lines
580 B
JavaScript
Raw Normal View History

Ext.define('PBS.view.main.VersionInfo', {
2018-12-04 16:58:40 +00:00
extend: 'Ext.Component',
xtype: 'versioninfo',
makeApiCall: true,
data: {
version: false,
2018-12-04 16:58:40 +00:00
},
style: {
'font-size': '14px',
'line-height': '18px',
},
2018-12-04 16:58:40 +00:00
tpl: [
'Backup Server',
'<tpl if="version">',
' {version}-{release}',
'</tpl>',
2018-12-04 16:58:40 +00:00
],
initComponent: function() {
var me = this;
me.callParent();
if (me.makeApiCall) {
Proxmox.Utils.API2Request({
2018-12-04 16:58:40 +00:00
url: '/version',
method: 'GET',
success: function(response) {
me.update(response.result.data);
},
2018-12-04 16:58:40 +00:00
});
}
},
2018-12-04 16:58:40 +00:00
});