fix #3542: node task logs: query correct node for tasks in clusters
While refactoring, we forgot to replace the 'localhost' URL (which is valid for PMG/PBS) with the actual nodename we have in Proxmox VE. Do this by setting the correct URL in the viewModel right at the start of the initComponent We now also have the possibility to overwrite the url if we want Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
dacb645550
commit
0dbcfb8c64
@ -199,7 +199,7 @@ Ext.define('Proxmox.node.Tasks', {
|
||||
startParam: 'start',
|
||||
limitParam: 'limit',
|
||||
extraParams: '{extraParams}',
|
||||
url: "/api2/json/nodes/localhost/tasks",
|
||||
url: '{url}',
|
||||
},
|
||||
listeners: {
|
||||
prefetch: 'updateLayout',
|
||||
@ -443,6 +443,10 @@ Ext.define('Proxmox.node.Tasks', {
|
||||
initComponent: function() {
|
||||
const me = this;
|
||||
|
||||
let nodename = me.nodename || 'localhost';
|
||||
let url = me.url || `/api2/json/nodes/${nodename}/tasks`;
|
||||
me.getViewModel().set('url', url);
|
||||
|
||||
let updateExtraFilters = function(name, value) {
|
||||
let vm = me.getViewModel();
|
||||
let extraFilter = Ext.clone(vm.get('extraFilter'));
|
||||
|
Loading…
Reference in New Issue
Block a user