Commit f823afcc authored by Ahmed Awan's avatar Ahmed Awan
Browse files

Merge remote-tracking branch 'upstream/release_25.0' into merge_25.0_into_dev_sept

parents 66852487 89b9a50d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ jobs:
        uses: medyagh/setup-minikube@latest
        with:
          driver: none
          kubernetes-version: '1.23.0'
          kubernetes-version: '1.28.0'
      - name: Check pods
        run: kubectl get pods -A
      - uses: actions/checkout@v4
+15 −2
Original line number Diff line number Diff line
<template>
    <component :is="providerComponent" :id="itemId" v-slot="{ result: item, loading }" auto-refresh>
    <component
        :is="providerComponent"
        :id="itemId"
        :key="view"
        v-slot="{ result: item, loading }"
        :view="view"
        auto-refresh>
        <LoadingSpan v-if="loading" message="Loading dataset" />
        <div v-else>
            <ContentItem
@@ -11,7 +17,7 @@
                :expand-dataset="expandDataset"
                :is-dataset="item.history_content_type == 'dataset' || item.element_type == 'hda'"
                @update:expand-dataset="expandDataset = $event"
                @view-collection="viewCollection = !viewCollection"
                @view-collection="onViewCollection"
                @delete="onDelete"
                @toggleHighlights="onHighlight(item)"
                @undelete="onUndelete(item)"
@@ -60,6 +66,7 @@ export default {
        return {
            viewCollection: false,
            expandDataset: false,
            view: this.itemSrc === "hdca" ? "collection" : "element",
        };
    },
    computed: {
@@ -124,6 +131,12 @@ export default {
                this.onError(error, "Failed to highlight related items");
            }
        },
        onViewCollection(collection) {
            if (this.view === "collection" && collection.model_class === "HistoryDatasetCollectionAssociation") {
                this.view = "element";
            }
            this.viewCollection = !this.viewCollection;
        },
    },
};
</script>
+23 −4
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@
                    id="execute"
                    class="text-nowrap"
                    title="Run Tool"
                    :disabled="!canMutateHistory"
                    :disabled="runButtonDisabled"
                    size="small"
                    :wait="showExecuting"
                    :tooltip="tooltip"
@@ -97,7 +97,7 @@
                <ButtonSpinner
                    title="Run Tool"
                    class="mt-3 mb-3"
                    :disabled="!canMutateHistory"
                    :disabled="runButtonDisabled"
                    :wait="showExecuting"
                    :tooltip="tooltip"
                    @onClick="onExecute(config, currentHistoryId)" />
@@ -205,6 +205,7 @@ export default {
            ],
            immutableHistoryMessage:
                "This history is immutable and you cannot run tools in it. Please switch to a different history.",
            formConfigInitialized: false,
        };
    },
    computed: {
@@ -227,6 +228,12 @@ export default {
            if (!this.canMutateHistory) {
                return this.immutableHistoryMessage;
            }
            if (this.hasConfigOrValErrors) {
                return "Please resolve highlighted issues before running the tool.";
            }
            if (this.showExecuting) {
                return "Tool is being executed...";
            }
            return `Run tool: ${this.formConfig.name} (${this.formConfig.version})`;
        },
        errorContentPretty() {
@@ -252,8 +259,15 @@ export default {
        canMutateHistory() {
            return this.currentHistory && canMutateHistory(this.currentHistory);
        },
        runButtonTitle() {
            return "Run Tool";
        runButtonDisabled() {
            return this.disabled || !this.canMutateHistory || this.hasConfigOrValErrors;
        },
        /** If there are any backend returned `formConfig.errors` or internal/client checked validation errors. */
        hasConfigOrValErrors() {
            return (
                (this.formConfig.errors && Object.values(this.formConfig.errors).length > 0) ||
                this.validationInternal?.length
            );
        },
    },
    watch: {
@@ -286,7 +300,12 @@ export default {
            this.formData = newData;
            if (refreshRequest) {
                this.onUpdate();
            } else if (this.formConfigInitialized && this.hasConfigOrValErrors) {
                // After the first manual change to a form input, for every change, if there isn't a request to refresh,
                // we reset the errors since we haven't received a tool form update via the backend.
                this.formConfig.errors = null;
            }
            this.formConfigInitialized = true;
        },
        onUpdate() {
            this.disabled = true;
+7 −2
Original line number Diff line number Diff line
import { SingleQueryProvider } from "components/providers/SingleQueryProvider";

import { fetchCollectionDetails } from "@/api/datasetCollections";
import { fetchCollectionDetails, fetchCollectionSummary } from "@/api/datasetCollections";

// There isn't really a good way to know when to stop polling for HDCA updates,
// but we know the populated_state should at least be ok.
export default SingleQueryProvider(
    (params) => fetchCollectionDetails({ hdca_id: params.id }),
    (params) => {
        if (params.view && params.view === "collection") {
            return fetchCollectionSummary({ hdca_id: params.id });
        }
        return fetchCollectionDetails({ hdca_id: params.id });
    },
    (result) => result.populated_state === "ok",
);
+2 −2
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ import {
} from "@fortawesome/free-solid-svg-icons";
import { computed, type Ref, ref, set } from "vue";

import { fetchCollectionDetails } from "@/api/datasetCollections";
import { fetchCollectionSummary } from "@/api/datasetCollections";
import { fetchDatasetDetails } from "@/api/datasets";
import type { InvocationStep, StepJobSummary, WorkflowInvocationElementView } from "@/api/invocations";
import type { StoredWorkflowDetailed } from "@/api/workflows";
@@ -323,7 +323,7 @@ export function useInvocationGraph(
                set(graphStep, "state", getContentItemState(hda));
                set(graphStep, "nodeText", `${hda.hid}: <b>${hda.name}</b>`);
            } else {
                const hdca = await fetchCollectionDetails({ hdca_id: inputItem.id });
                const hdca = await fetchCollectionSummary({ hdca_id: inputItem.id });
                // TODO: Same type mismatch as above
                set(graphStep, "state", getContentItemState(hdca));
                set(graphStep, "nodeText", `${hdca.hid}: <b>${hdca.name}</b>`);
Loading