Loading client/src/components/Form/Elements/FormData/FormData.vue +17 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ const props = withDefaults( }; extensions?: Array<string>; type?: string; collectionTypes?: Array<string>; flavor?: string; tag?: string; }>(), Loading @@ -45,6 +46,7 @@ const props = withDefaults( value: undefined, extensions: () => [], type: "data", collectionTypes: undefined, flavor: undefined, tag: undefined, } Loading Loading @@ -311,14 +313,28 @@ function handleIncoming(incoming: Record<string, unknown>, partial = true) { const newName = v.name ? v.name : newId; const newSrc = v.src || (v.history_content_type === "dataset_collection" ? SOURCE.COLLECTION : SOURCE.DATASET); const newValue = { const newValue: DataOption = { id: newId, src: newSrc, batch: false, map_over_type: undefined, hid: newHid, name: newName, keep: true, tags: [], }; if (v.collection_type && props.collectionTypes?.length > 0) { if (!props.collectionTypes.includes(v.collection_type)) { const mapOverType = props.collectionTypes.find((collectionType) => v.collection_type.endsWith(collectionType) ); if (!mapOverType) { return false; } newValue["batch"] = true; newValue["map_over_type"] = mapOverType; } } // Verify that new value has corresponding option const keepKey = `${newId}_${newSrc}`; const existingOptions = props.options && props.options[newSrc]; Loading client/src/components/Form/Elements/FormData/types.ts +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ export type DataOption = { hid: number; is_dataset?: boolean; keep: boolean; batch: boolean; map_over_type?: string; name: string; src: string; Loading client/src/components/Form/FormElement.vue +2 −1 Original line number Diff line number Diff line Loading @@ -288,7 +288,8 @@ const isOptional = computed(() => !isRequired.value && attrs.value["optional"] ! :optional="attrs.optional" :options="attrs.options" :tag="attrs.tag" :type="props.type" /> :type="props.type" :collection-types="attrs.collection_types" /> <FormDrilldown v-else-if="props.type === 'drill_down'" :id="id" Loading lib/galaxy/tools/parameters/basic.py +1 −0 Original line number Diff line number Diff line Loading @@ -2511,6 +2511,7 @@ class DataCollectionToolParameter(BaseDataToolParameter): # create dictionary and fill default parameters other_values = other_values or {} d = super().to_dict(trans) d["collection_types"] = self.collection_types d["extensions"] = self.extensions d["multiple"] = self.multiple d["options"] = {"hda": [], "hdca": [], "dce": []} Loading Loading
client/src/components/Form/Elements/FormData/FormData.vue +17 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ const props = withDefaults( }; extensions?: Array<string>; type?: string; collectionTypes?: Array<string>; flavor?: string; tag?: string; }>(), Loading @@ -45,6 +46,7 @@ const props = withDefaults( value: undefined, extensions: () => [], type: "data", collectionTypes: undefined, flavor: undefined, tag: undefined, } Loading Loading @@ -311,14 +313,28 @@ function handleIncoming(incoming: Record<string, unknown>, partial = true) { const newName = v.name ? v.name : newId; const newSrc = v.src || (v.history_content_type === "dataset_collection" ? SOURCE.COLLECTION : SOURCE.DATASET); const newValue = { const newValue: DataOption = { id: newId, src: newSrc, batch: false, map_over_type: undefined, hid: newHid, name: newName, keep: true, tags: [], }; if (v.collection_type && props.collectionTypes?.length > 0) { if (!props.collectionTypes.includes(v.collection_type)) { const mapOverType = props.collectionTypes.find((collectionType) => v.collection_type.endsWith(collectionType) ); if (!mapOverType) { return false; } newValue["batch"] = true; newValue["map_over_type"] = mapOverType; } } // Verify that new value has corresponding option const keepKey = `${newId}_${newSrc}`; const existingOptions = props.options && props.options[newSrc]; Loading
client/src/components/Form/Elements/FormData/types.ts +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ export type DataOption = { hid: number; is_dataset?: boolean; keep: boolean; batch: boolean; map_over_type?: string; name: string; src: string; Loading
client/src/components/Form/FormElement.vue +2 −1 Original line number Diff line number Diff line Loading @@ -288,7 +288,8 @@ const isOptional = computed(() => !isRequired.value && attrs.value["optional"] ! :optional="attrs.optional" :options="attrs.options" :tag="attrs.tag" :type="props.type" /> :type="props.type" :collection-types="attrs.collection_types" /> <FormDrilldown v-else-if="props.type === 'drill_down'" :id="id" Loading
lib/galaxy/tools/parameters/basic.py +1 −0 Original line number Diff line number Diff line Loading @@ -2511,6 +2511,7 @@ class DataCollectionToolParameter(BaseDataToolParameter): # create dictionary and fill default parameters other_values = other_values or {} d = super().to_dict(trans) d["collection_types"] = self.collection_types d["extensions"] = self.extensions d["multiple"] = self.multiple d["options"] = {"hda": [], "hdca": [], "dce": []} Loading