Commit 2809914f authored by Cage, Gregory's avatar Cage, Gregory
Browse files

Add option to disable batch mode for all tools

parent d0927034
Loading
Loading
Loading
Loading
Loading
+8 −14
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ const props = withDefaults(
        collectionTypes?: Array<string>;
        flavor?: string;
        tag?: string;
        singleDatasetInput?: boolean;
    }>(),
    {
        loading: false,
@@ -51,13 +50,14 @@ const props = withDefaults(
        collectionTypes: undefined,
        flavor: undefined,
        tag: undefined,
        singleDatasetInput: false,
    }
);

const eventStore = useEventStore();
const { datatypesMapper } = useDatatypesMapper();

const disableBatchInput = getGalaxyInstance().config.disable_batch_input;

const $emit = defineEmits(["input", "alert"]);

// Determines wether values should be processed as linked or unlinked
@@ -224,6 +224,11 @@ const variant = computed(() => {
    const flavorKey = props.flavor ? `${props.flavor}_` : "";
    const multipleKey = props.multiple ? `_multiple` : "";
    const variantKey = `${flavorKey}${props.type}${multipleKey}`;
    if (disableBatchInput && VARIANTS[variantKey]) {
        return VARIANTS[variantKey]!.filter((v) => {
            return v.batch === BATCH.DISABLED;
        });
    }
    return VARIANTS[variantKey];
});

@@ -523,19 +528,8 @@ const noOptionsWarningMessage = computed(() => {
        @dragover.prevent
        @drop.prevent="onDrop">
        <div class="d-flex flex-column">
            <BButtonGroup v-if="variant && variant.length > 1" buttons class="align-self-start">
                <BButton
                    v-if="props.singleDatasetInput"
                    v-for="(v, index) in variant.slice(0,1)"
                    :key="index"
                    v-b-tooltip.hover.bottom
                    :pressed="currentField === index"
                    :title="v.tooltip"
                    @click="currentField = index">
                    <FontAwesomeIcon :icon="['far', v.icon]" />
                </BButton>
            <BButtonGroup v-if="variant && variant.length > 0" buttons class="align-self-start">
                <BButton
                    v-else
                    v-for="(v, index) in variant"
                    :key="index"
                    v-b-tooltip.hover.bottom
+0 −3
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ interface FormElementProps {
    connectedEnableIcon?: string;
    connectedDisableIcon?: string;
    workflowBuildingMode?: boolean;
    singleDatasetInput?: boolean;
}

const props = withDefaults(defineProps<FormElementProps>(), {
@@ -64,7 +63,6 @@ const props = withDefaults(defineProps<FormElementProps>(), {
    connectedEnableIcon: "fa fa-times",
    connectedDisableIcon: "fa fa-arrows-alt-h",
    workflowBuildingMode: false,
    singleDatasetInput: false,
});

const emit = defineEmits<{
@@ -300,7 +298,6 @@ function onAlert(value: string | undefined) {
                :tag="attrs.tag"
                :type="props.type"
                :collection-types="attrs.collection_types"
                :single-dataset-input="props.singleDatasetInput"
                @alert="onAlert" />
            <FormDrilldown
                v-else-if="props.type === 'drill_down'"
+0 −6
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
                        :refresh-on-change="false"
                        :disabled="sustainConditionals"
                        :attributes="input.test_param"
                        :single-dataset-input="singleDatasetInput"
                        @change="onChange" />
                    <div v-for="(caseDetails, caseId) in input.cases" :key="caseId">
                        <FormNode
@@ -60,7 +59,6 @@
                :collapsed-disable-icon="collapsedDisableIcon"
                :loading="loading"
                :workflow-building-mode="workflowBuildingMode"
                :single-dataset-input="singleDatasetInput"
                @change="onChange" />
        </div>
    </div>
@@ -131,10 +129,6 @@ export default {
            type: Boolean,
            default: false,
        },
        singleDatasetInput: {
            type: Boolean,
            default: false,
        },
    },
    methods: {
        getPrefix(name, index) {
+1 −5
Original line number Diff line number Diff line
@@ -59,10 +59,6 @@ const props = defineProps({
        type: String,
        default: null,
    },
    singleDatasetInput: {
        type: Boolean,
        default: true,
    },
});

const emit = defineEmits<{
@@ -173,7 +169,7 @@ const { keyObject } = useKeyedObjects();
            </template>

            <template v-slot:body>
                <FormNode v-bind="props.passthroughProps" :inputs="cache" :prefix="getPrefix(cacheId)" :single-dataset-input="props.singleDatasetInput" />
                <FormNode v-bind="props.passthroughProps" :inputs="cache" :prefix="getPrefix(cacheId)" />
            </template>
        </FormCard>

+12 −0
Original line number Diff line number Diff line
@@ -5615,4 +5615,16 @@
:Type: bool


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``disable_batch_input``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Description:
    Disable the batch input mode for all tools. This will remove the "Multiple Datasets" and
    "Dataset Collection" input types from single dataset inputs in all tools.

:Default: ``false``
:Type: bool


Loading