diff --git a/src/components/parameter-schema/description-mode/ParameterDescription.vue b/src/components/parameter-schema/description-mode/ParameterDescription.vue index 016f8ec15f8e2a0a7ed9fca78f85ff9713263c3d..0a3cfbd6698378f24ef1180036682afc62f437f3 100644 --- a/src/components/parameter-schema/description-mode/ParameterDescription.vue +++ b/src/components/parameter-schema/description-mode/ParameterDescription.vue @@ -67,7 +67,7 @@ const anyOfTooltip = computed<string | undefined>(() => { labelText = "<ul class='ps-3 ms-0 mb-0 text-start'>"; if (props.anyOfDependencies.group.length > 0) { labelText += - "<li>When this is set, these are also required:<ul >" + + "<li>When this is set, these parameters are also required:<ul >" + props.anyOfDependencies.group .map((a) => "<li>--" + a + "</li>") .join("") + @@ -76,7 +76,7 @@ const anyOfTooltip = computed<string | undefined>(() => { labelText += "<li>Set this or any of these parameters:<ul>" + props.anyOfDependencies.dependencies - .map((a) => "<li>--" + a + "</li>") + .map((a) => "<li>" + a.map((b) => "--" + b).join(",") + "</li>") .join("") + "</ul></li></ul>"; } @@ -87,7 +87,7 @@ const anyOfTooltip = computed<string | undefined>(() => { const dependentTooltip = computed<string | undefined>(() => { if (props.dependencies != undefined) { return ( - "Required when these are set: <ul class='ps-4 mb-0 text-start'>" + + "Required when these parameters are set: <ul class='ps-4 mb-0 text-start'>" + props.dependencies.map((a) => "<li>--" + a + "</li>").join("") + "</ul></li>" ); @@ -113,15 +113,15 @@ onMounted(() => { <div class="d-flex pt-2 justify-content-between"> <div class="flex-fill ps-2"> <div class="row"> - <div class="fs-6"> + <span class="fs-6 w-fit"> <font-awesome-icon v-if="icon" :icon="icon" class="me-2" /> <code :id="props.parameterName" class="border rounded p-1" >--{{ props.parameterName }}</code > - </div> + </span> <span v-if="anyOfTooltip != undefined" - class="rounded p-1 bg-secondary ms-2 label w-fit" + class="rounded py-0 px-1 bg-secondary ms-2 label w-fit fs-6" data-bs-toggle="tooltip" data-bs-placement="bottom" :data-bs-title="anyOfTooltip" @@ -131,13 +131,13 @@ onMounted(() => { > <span v-if="dependentTooltip != undefined" - class="rounded p-1 bg-secondary ms-2 label w-fit" + class="rounded py-0 px-1 bg-secondary ms-2 label w-fit fs-6" data-bs-toggle="tooltip" data-bs-placement="bottom" :data-bs-title="dependentTooltip" data-bs-custom-class="parameter-form-tooltip" data-bs-html="true" - >dependent</span + >dependency</span > </div> <div class="row align-items-start mt-2"> diff --git a/src/components/parameter-schema/description-mode/ParameterGroupDescription.vue b/src/components/parameter-schema/description-mode/ParameterGroupDescription.vue index dd00f5b2cb6f3c4159033ef24baebad3e96c58c3..d74b54577016444ff55f790e21e5d086f7edc5b2 100644 --- a/src/components/parameter-schema/description-mode/ParameterGroupDescription.vue +++ b/src/components/parameter-schema/description-mode/ParameterGroupDescription.vue @@ -83,7 +83,7 @@ const parameterAnyOfDependenciesPerParameter = computed< group: b.find((a) => a.includes(paramName))?.filter((a) => a != paramName) ?? [], - dependencies: b.filter((a) => !a.includes(paramName)).flat(), + dependencies: b.filter((a) => !a.includes(paramName)), }; } return r; diff --git a/src/components/parameter-schema/form-mode/ParameterGroupForm.vue b/src/components/parameter-schema/form-mode/ParameterGroupForm.vue index ba8b1b583ecab4353fb2b53de8d819c678a0157d..2553b343e90f00cc7de2d51d7ed4f35b2d6de738 100644 --- a/src/components/parameter-schema/form-mode/ParameterGroupForm.vue +++ b/src/components/parameter-schema/form-mode/ParameterGroupForm.vue @@ -117,12 +117,12 @@ function parameterDependentRequired(parameterName: string): boolean { function parameterAnyOfRequired(parameterName: string): boolean { return ( parameterAnyOfDependenciesPerParameter.value[parameterName] != undefined && - parameterAnyOfDependenciesPerParameter.value[ - parameterName - ].dependencies.reduce( - (acc, groupParam) => acc && model.value[groupParam] == undefined, - true, - ) && + parameterAnyOfDependenciesPerParameter.value[parameterName].dependencies + .flat() + .reduce( + (acc, groupParam) => acc && model.value[groupParam] == undefined, + true, + ) && (model.value[parameterName] == undefined || parameterAnyOfDependenciesPerParameter.value[parameterName].group.reduce( (acc, groupParam) => acc && model.value[groupParam] == undefined, @@ -145,7 +145,7 @@ const parameterAnyOfDependenciesPerParameter = computed< group: b.find((a) => a.includes(paramName))?.filter((a) => a != paramName) ?? [], - dependencies: b.filter((a) => !a.includes(paramName)).flat(), + dependencies: b.filter((a) => !a.includes(paramName)), }; } return r; @@ -158,7 +158,7 @@ const dependentTooltip = computed<Record<string, string>>(() => { let labelText = ""; if (parameterDependenciesPerParameter.value[paramName] != undefined) { labelText += - "Required when these are set: <ul class='ps-4 mb-0 text-start'>" + + "Required when these parameters are set: <ul class='ps-4 mb-0 text-start'>" + parameterDependenciesPerParameter.value[paramName] .map((a) => "<li>--" + a + "</li>") .join("") + @@ -191,7 +191,7 @@ const anyOfTooltip = computed<Record<string, string>>(() => { labelText += "<li>Set this or any of these parameters:<ul>" + parameterAnyOfDependenciesPerParameter.value[paramName].dependencies - .map((a) => "<li>--" + a + "</li>") + .map((a) => "<li>" + a.map((b) => "--" + b).join(",") + "</li>") .join("") + "</ul></li></ul>"; } @@ -282,7 +282,7 @@ onMounted(() => { data-bs-custom-class="parameter-form-tooltip" data-bs-html="true" > - Dependent + dependency </span> <div class="input-group" diff --git a/src/types/WorkflowParameters.ts b/src/types/WorkflowParameters.ts index b13fbe918c3571684dd38a3c81841ed94fdb6f85..eec9f79e5a89c92bc24e51dc0ddbc39d0d77efcd 100644 --- a/src/types/WorkflowParameters.ts +++ b/src/types/WorkflowParameters.ts @@ -20,5 +20,5 @@ export type TemporaryParams = { export interface ParameterAnyOfDependencies { group: string[]; // AND group in OR combination - dependencies: string[]; // OR combination to fulfill + dependencies: string[][]; // OR combination to fulfill } diff --git a/src/views/DashboardView.vue b/src/views/DashboardView.vue index 685cb7c0ecf4bb9c6441765f617219df1a98e012..5d79dfe4f6231337f35ea91ae9c277ac4bfdfa16 100644 --- a/src/views/DashboardView.vue +++ b/src/views/DashboardView.vue @@ -21,6 +21,7 @@ import type { import dayjs from "dayjs"; import { useWorkflowExecutionStore } from "@/stores/workflowExecutions"; import { useResourceStore } from "@/stores/resources"; +import { latestVersion } from "@/utils/Workflow.ts"; const authStore = useUserStore(); const bucketStore = useBucketStore(); @@ -259,7 +260,18 @@ function accumulateWorkflowStatus( v-for="workflow in processedWorkflows.slice(0, 3)" :key="workflow.workflow_id" > - {{ workflow.name }} <br /> + <router-link + :to="{ + name: 'workflow-version', + params: { + workflowId: workflow.workflow_id, + versionId: latestVersion(workflow.versions) + ?.workflow_version_id, + }, + }" + >{{ workflow.name }} + </router-link> + <br /> <span class="text-secondary" style="font-size: 0.8rem"> Last update {{