From f776c3ad891b55fa69f73a4342ffb44e34fe26cf Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 18 Mar 2024 10:15:00 +0100 Subject: [PATCH] Fix ``include_nested_invocations`` passing, drop unused provder method Fixes https://github.com/galaxyproject/galaxy/issues/17760 --- .../Workflow/InvocationsList.test.js | 23 +++++++++++++++---- .../components/Workflow/InvocationsList.vue | 21 ++--------------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/client/src/components/Workflow/InvocationsList.test.js b/client/src/components/Workflow/InvocationsList.test.js index 0d394ac0bc23..6321039a1c55 100644 --- a/client/src/components/Workflow/InvocationsList.test.js +++ b/client/src/components/Workflow/InvocationsList.test.js @@ -70,7 +70,12 @@ describe("InvocationsList.vue", () => { beforeEach(async () => { axiosMock .onGet("/api/invocations", { - params: { limit: 50, offset: 0, include_terminal: false, workflow_id: "abcde145678" }, + params: { + limit: 50, + offset: 0, + include_terminal: false, + workflow_id: "abcde145678", + }, }) .reply(200, [], { total_matches: "0" }); const propsData = { @@ -102,7 +107,13 @@ describe("InvocationsList.vue", () => { beforeEach(async () => { axiosMock .onGet("/api/invocations", { - params: { limit: 50, offset: 0, include_terminal: false, history_id: "abcde145678" }, + params: { + limit: 50, + offset: 0, + include_terminal: false, + history_id: "abcde145678", + include_nested_invocations: false, + }, }) .reply(200, [], { total_matches: "0" }); const propsData = { @@ -132,7 +143,9 @@ describe("InvocationsList.vue", () => { describe("with invocation", () => { beforeEach(async () => { axiosMock - .onGet("/api/invocations", { params: { limit: 50, offset: 0, include_terminal: false } }) + .onGet("/api/invocations", { + params: { limit: 50, offset: 0, include_terminal: false, include_nested_invocations: false }, + }) .reply(200, [mockInvocationData], { total_matches: "1" }); const propsData = { ownerGrid: false, @@ -202,7 +215,9 @@ describe("InvocationsList.vue", () => { describe("paginations", () => { beforeEach(async () => { axiosMock - .onGet("/api/invocations", { params: { limit: 1, offset: 0, include_terminal: false } }) + .onGet("/api/invocations", { + params: { limit: 1, offset: 0, include_terminal: false, include_nested_invocations: false }, + }) .reply(200, [mockInvocationData], { total_matches: "3" }); const propsData = { ownerGrid: false, diff --git a/client/src/components/Workflow/InvocationsList.vue b/client/src/components/Workflow/InvocationsList.vue index d2350bf49d6f..ce962d036388 100644 --- a/client/src/components/Workflow/InvocationsList.vue +++ b/client/src/components/Workflow/InvocationsList.vue @@ -168,6 +168,8 @@ export default { const extraParams = this.ownerGrid ? {} : { include_terminal: false }; if (this.storedWorkflowId) { extraParams["workflow_id"] = this.storedWorkflowId; + } else { + extraParams["include_nested_invocations"] = false; } if (this.historyId) { extraParams["history_id"] = this.historyId; @@ -195,25 +197,6 @@ export default { methods: { ...mapActions(useHistoryStore, ["loadHistoryById"]), ...mapActions(useWorkflowStore, ["fetchWorkflowForInstanceIdCached"]), - async provider(ctx) { - ctx.root = this.root; - const extraParams = this.ownerGrid ? {} : { include_terminal: false }; - if (this.storedWorkflowId) { - extraParams["workflow_id"] = this.storedWorkflowId; - } else { - extraParams["include_nested_invocations"] = false; - } - if (this.historyId) { - extraParams["history_id"] = this.historyId; - } - if (this.userId) { - extraParams["user_id"] = this.userId; - } - const promise = invocationsProvider(ctx, this.setRows, extraParams).catch(this.onError); - const invocationItems = await promise; - this.invocationItems = invocationItems; - return invocationItems; - }, swapRowDetails(row) { row.toggleDetails(); },