2020-09-25 16:34:54 +00:00
|
|
|
Ext.define('PBS.view.main.VersionInfo', {
|
2018-12-04 16:58:40 +00:00
|
|
|
extend: 'Ext.Component',
|
|
|
|
xtype: 'versioninfo',
|
|
|
|
|
|
|
|
makeApiCall: true,
|
|
|
|
|
|
|
|
data: {
|
2020-09-25 16:34:54 +00:00
|
|
|
version: false,
|
2018-12-04 16:58:40 +00:00
|
|
|
},
|
|
|
|
|
2021-07-03 21:13:29 +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}',
|
2020-09-25 16:34:54 +00:00
|
|
|
'</tpl>',
|
2018-12-04 16:58:40 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
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);
|
2020-09-25 16:34:54 +00:00
|
|
|
},
|
2018-12-04 16:58:40 +00:00
|
|
|
});
|
|
|
|
}
|
2020-09-25 16:34:54 +00:00
|
|
|
},
|
2018-12-04 16:58:40 +00:00
|
|
|
});
|