Skip to content

Commit

Permalink
Fix include_nested_invocations passing, drop unused provder method
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Mar 18, 2024
1 parent 3ebf8eb commit f776c3a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
23 changes: 19 additions & 4 deletions client/src/components/Workflow/InvocationsList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
21 changes: 2 additions & 19 deletions client/src/components/Workflow/InvocationsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
},
Expand Down

0 comments on commit f776c3a

Please sign in to comment.