From 0dbcfb8c642d262e02fcb86befb3fd727577e458 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 23 Jul 2021 08:59:35 +0200 Subject: [PATCH] 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 --- src/node/Tasks.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/node/Tasks.js b/src/node/Tasks.js index c852615..3d7113d 100644 --- a/src/node/Tasks.js +++ b/src/node/Tasks.js @@ -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')); -- 2.39.2