mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-09 17:55:09 +00:00
add versioninfo component
this gets the current version from the api and displays it Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
9e3180e7c7
commit
ca6f3037f6
32
js/VersionInfo.js
Normal file
32
js/VersionInfo.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Ext.define('PMG.view.main.VersionInfo',{
|
||||||
|
extend: 'Ext.Component',
|
||||||
|
xtype: 'versioninfo',
|
||||||
|
|
||||||
|
makeApiCall: true,
|
||||||
|
|
||||||
|
data: {
|
||||||
|
version: false
|
||||||
|
},
|
||||||
|
|
||||||
|
tpl: [
|
||||||
|
'Mail Gateway',
|
||||||
|
'<tpl if="version">',
|
||||||
|
' {version}-{release}/{repoid}',
|
||||||
|
'</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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user