From 009a17f0fcb1d0d643d12a60caebee5138ff9e53 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 30 Jan 2024 22:53:49 -0500 Subject: [PATCH 1/3] Refactor MarkdownDialog.vue to ts+composition. --- .../components/Markdown/MarkdownDialog.vue | 436 +++++++++--------- 1 file changed, 220 insertions(+), 216 deletions(-) diff --git a/client/src/components/Markdown/MarkdownDialog.vue b/client/src/components/Markdown/MarkdownDialog.vue index 648c9696c4f7..9473fdc41634 100644 --- a/client/src/components/Markdown/MarkdownDialog.vue +++ b/client/src/components/Markdown/MarkdownDialog.vue @@ -1,3 +1,223 @@ + + - - From 8761a3c8a8174e37bdceeabc27ebedb616c0fa41 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 2 Feb 2024 10:48:22 -0500 Subject: [PATCH 2/3] Reactive history id in MarkdownDialog.vue. --- .../components/Markdown/MarkdownDialog.vue | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/client/src/components/Markdown/MarkdownDialog.vue b/client/src/components/Markdown/MarkdownDialog.vue index 9473fdc41634..cbb4344bd03f 100644 --- a/client/src/components/Markdown/MarkdownDialog.vue +++ b/client/src/components/Markdown/MarkdownDialog.vue @@ -1,10 +1,11 @@ @@ -234,13 +220,13 @@ if (props.argumentType == "workflow_id") { :argument-payload="argumentPayload" :labels="labels" :use-labels="useLabels" - :history="dataHistoryId" + :history="currentHistoryId" @onOk="onVisualization" @onCancel="onCancel" /> - + From 741650dd3e52f3d60e9a3b30c1d3088ff9384cc6 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 3 Feb 2024 11:26:17 -0500 Subject: [PATCH 3/3] Migrate MarkdownDialog API interactions to fetchers. --- client/src/api/histories.ts | 1 + client/src/api/invocations.ts | 4 +++- client/src/api/jobs.ts | 2 ++ client/src/api/workflows.ts | 3 +++ .../components/Markdown/MarkdownDialog.vue | 21 ++++++++----------- .../components/Markdown/MarkdownToolBox.vue | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 client/src/api/workflows.ts diff --git a/client/src/api/histories.ts b/client/src/api/histories.ts index a4da4bb0627f..da0564f0ab43 100644 --- a/client/src/api/histories.ts +++ b/client/src/api/histories.ts @@ -7,3 +7,4 @@ export const deleteHistories = fetcher.path("/api/histories/batch/delete").metho export const undeleteHistory = fetcher.path("/api/histories/deleted/{history_id}/undelete").method("post").create(); export const undeleteHistories = fetcher.path("/api/histories/batch/undelete").method("put").create(); export const historiesQuery = fetcher.path("/api/histories/query").method("get").create(); +export const publishedHistoriesFetcher = fetcher.path("/api/histories/published").method("get").create(); diff --git a/client/src/api/invocations.ts b/client/src/api/invocations.ts index fe8b8d5da4c7..c604a40998b3 100644 --- a/client/src/api/invocations.ts +++ b/client/src/api/invocations.ts @@ -2,7 +2,9 @@ import axios from "axios"; import { getAppRoot } from "@/onload"; -import { ApiResponse } from "./schema"; +import { ApiResponse, fetcher } from "./schema"; + +export const invocationsFetcher = fetcher.path("/api/invocations").method("get").create(); // TODO: Replace these interfaces with real schema models after https://github.com/galaxyproject/galaxy/pull/16707 is merged export interface WorkflowInvocation { diff --git a/client/src/api/jobs.ts b/client/src/api/jobs.ts index e915a9179098..65399c0beb96 100644 --- a/client/src/api/jobs.ts +++ b/client/src/api/jobs.ts @@ -6,3 +6,5 @@ export const jobLockStatus = fetcher.path("/api/job_lock").method("get").create( export const jobLockUpdate = fetcher.path("/api/job_lock").method("put").create(); export const fetchJobDestinationParams = fetcher.path("/api/jobs/{job_id}/destination_params").method("get").create(); + +export const jobsFetcher = fetcher.path("/api/jobs").method("get").create(); diff --git a/client/src/api/workflows.ts b/client/src/api/workflows.ts new file mode 100644 index 000000000000..168e85ed00c4 --- /dev/null +++ b/client/src/api/workflows.ts @@ -0,0 +1,3 @@ +import { fetcher } from "@/api/schema"; + +export const workflowsFetcher = fetcher.path("/api/workflows").method("get").create(); diff --git a/client/src/components/Markdown/MarkdownDialog.vue b/client/src/components/Markdown/MarkdownDialog.vue index cbb4344bd03f..4076696f47ee 100644 --- a/client/src/components/Markdown/MarkdownDialog.vue +++ b/client/src/components/Markdown/MarkdownDialog.vue @@ -1,10 +1,12 @@