* [pve-devel] [PATCH widget-toolkit] node/Tasks: show correct node-specific task log
@ 2021-07-23 6:59 Dominik Csapak
2021-07-23 7:01 ` Dominik Csapak
2021-07-27 14:35 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2021-07-23 6:59 UTC (permalink / raw)
To: pve-devel
while refactoring, we forgot to replace the 'localhost' url
(which is valid for pmg/pbs) with the actual nodename we have in pve
do this by setting the correct url in the viewModel right at the start
of the initComponent
we now also have the possiblitiy to overwrite the url if we want
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
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.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-27 14:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 6:59 [pve-devel] [PATCH widget-toolkit] node/Tasks: show correct node-specific task log Dominik Csapak
2021-07-23 7:01 ` Dominik Csapak
2021-07-27 14:35 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox