Skip to content

Commit

Permalink
Merge pull request galaxyproject#18405 from ahmedhamidawan/fix_input_…
Browse files Browse the repository at this point in the history
…step_parameters_label_bug

[24.1] Fix `input_step_parameters` missing values that don't have a label
  • Loading branch information
mvdbeek authored Jun 19, 2024
2 parents 2b3a825 + b5cabbf commit 98bffa1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
10 changes: 5 additions & 5 deletions client/src/components/Workflow/Editor/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -801,12 +801,9 @@ export default {
this.report.markdown = markdown;
},
onRun() {
const runUrl = `/workflows/run?id=${this.id}${
this.version !== undefined ? `&version=${this.version}` : ""
}`;
this.onNavigate(runUrl);
this.onNavigate(`/workflows/run?id=${this.id}`, false, false, true);
},
async onNavigate(url, forceSave = false, ignoreChanges = false) {
async onNavigate(url, forceSave = false, ignoreChanges = false, appendVersion = false) {
if (this.isNewTempWorkflow) {
await this.onCreate();
} else if (this.hasChanges && !forceSave && !ignoreChanges) {
Expand All @@ -819,6 +816,9 @@ export default {
await this.onSave();
}
if (appendVersion && this.version !== undefined) {
url += `&version=${this.version}`;
}
this.hasChanges = false;
await nextTick();
this.$router.push(url);
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/Workflow/Editor/SaveChangesModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const busy = ref(false);
const emit = defineEmits<{
/** Proceed with or without saving the changes */
(e: "on-proceed", url: string, forceSave: boolean, ignoreChanges: boolean): void;
(e: "on-proceed", url: string, forceSave: boolean, ignoreChanges: boolean, appendVersion: boolean): void;
/** Update the nav URL prop */
(e: "update:nav-url", url: string): void;
/** Update the show modal boolean prop */
Expand All @@ -49,13 +49,13 @@ function closeModal() {
function dontSave() {
busy.value = true;
emit("on-proceed", props.navUrl, false, true);
emit("on-proceed", props.navUrl, false, true, true);
}
function saveChanges() {
busy.value = true;
closeModal();
emit("on-proceed", props.navUrl, true, false);
emit("on-proceed", props.navUrl, true, false, true);
}
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</details>
<ParameterStep
v-else-if="workflowStepType == 'parameter_input'"
:parameters="[invocation.input_step_parameters[stepDetails.workflow_step_label]]" />
:parameters="[getParamInput(stepDetails)]" />
<GenericHistoryItem
v-else-if="
isDataStep &&
Expand Down Expand Up @@ -209,6 +209,11 @@ export default {
this.fetchWorkflowForInstanceId(this.workflowStep.workflow_id);
}
},
getParamInput(stepDetails) {
return Object.values(this.invocation.input_step_parameters).find(
(param) => param.workflow_step_id === stepDetails.workflow_step_id
);
},
showJob(id) {
this.$emit("show-job", id);
},
Expand Down
2 changes: 1 addition & 1 deletion client/src/entry/analysis/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ export function getRouter(Galaxy) {
props: (route) => ({
invocationId: route.params.invocationId,
isFullPage: true,
fromPanel: route.query.from_panel,
fromPanel: Boolean(route.query.from_panel),
}),
},
{
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8923,7 +8923,7 @@ def to_dict(self, view="collection", value_mapper=None, step_details=False, lega
for input_step_parameter in self.input_step_parameters:
label = input_step_parameter.workflow_step.label
if not label:
continue
label = f"{input_step_parameter.workflow_step.order_index + 1}: Unnamed parameter"
input_parameters[label] = {
"parameter_value": input_step_parameter.parameter_value,
"label": label,
Expand Down

0 comments on commit 98bffa1

Please sign in to comment.