5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-03 01:18:02 +03:00
proxmox-backup/www/VersionInfo.js
Thomas Lamprecht c7cf3b424a ui: version info: replace hyphen separator with dot
Our package uses <x>.<y>.<z>-<rev> as version format, here we get
version=<x>.<y> and release=<z>, so we rendered the version like
<x>.<y>-<z>, which is rather wrong.

And while the return value of the API call might be a bit odd and
should probably change (or at least add a full version property), but
for now it's what it is, so at least render it correctly.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-27 20:31:53 +01:00

38 lines
580 B
JavaScript

Ext.define('PBS.view.main.VersionInfo', {
extend: 'Ext.Component',
xtype: 'versioninfo',
makeApiCall: true,
data: {
version: false,
},
style: {
'font-size': '14px',
'line-height': '18px',
},
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);
},
});
}
},
});