Skip to content

Commit

Permalink
Merge branch 'release_24.0' into test-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
martenson committed Apr 5, 2024
2 parents bab7a6a + ad6fbe5 commit a04a56d
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 45 deletions.
25 changes: 18 additions & 7 deletions client/src/components/Workflow/Editor/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@onRefactor="onRefactor"
@onShow="hideModal" />
<MessagesModal :title="messageTitle" :message="messageBody" :error="messageIsError" @onHidden="resetMessage" />
<SaveChangesModal :nav-url.sync="navUrl" :show-modal.sync="showSaveChangesModal" @on-proceed="onNavigate" />
<b-modal
v-model="showSaveAsModal"
title="Save As a New Workflow"
Expand Down Expand Up @@ -147,7 +148,7 @@
<MarkdownEditor
v-else
:markdown-text="markdownText"
:markdown-config="markdownConfig"
:markdown-config="report"
mode="report"
:title="'Workflow Report: ' + name"
:steps="steps"
Expand All @@ -169,7 +170,7 @@
<script>
import { Toast } from "composables/toast";
import { storeToRefs } from "pinia";
import Vue, { computed, onUnmounted, ref, unref } from "vue";
import Vue, { computed, nextTick, onUnmounted, ref, unref } from "vue";
import { replaceLabel } from "@/components/Markdown/parse";
import { getUntypedWorkflowParameters } from "@/components/Workflow/Editor/modules/parameters";
Expand All @@ -195,6 +196,7 @@ import WorkflowLint from "./Lint.vue";
import MessagesModal from "./MessagesModal.vue";
import WorkflowOptions from "./Options.vue";
import RefactorConfirmationModal from "./RefactorConfirmationModal.vue";
import SaveChangesModal from "./SaveChangesModal.vue";
import StateUpgradeModal from "./StateUpgradeModal.vue";
import WorkflowGraph from "./WorkflowGraph.vue";
import MarkdownEditor from "@/components/Markdown/MarkdownEditor.vue";
Expand All @@ -207,6 +209,7 @@ export default {
components: {
MarkdownEditor,
FlexPanel,
SaveChangesModal,
StateUpgradeModal,
ToolPanel,
FormDefault,
Expand Down Expand Up @@ -313,7 +316,6 @@ export default {
data() {
return {
isCanvas: true,
markdownConfig: null,
markdownText: null,
versions: [],
parameters: null,
Expand Down Expand Up @@ -341,6 +343,8 @@ export default {
transform: { x: 0, y: 0, k: 1 },
graphOffset: { left: 0, top: 0, width: 0, height: 0 },
debounceTimer: null,
showSaveChangesModal: false,
navUrl: "",
};
},
computed: {
Expand Down Expand Up @@ -702,14 +706,21 @@ export default {
const runUrl = `/workflows/run?id=${this.id}`;
this.onNavigate(runUrl);
},
async onNavigate(url) {
async onNavigate(url, forceSave = false, ignoreChanges = false) {
if (this.isNewTempWorkflow) {
await this.onCreate();
} else {
await this.onSave(true);
} else if (this.hasChanges && !forceSave && !ignoreChanges) {
// if there are changes, prompt user to save or discard or cancel
this.navUrl = url;
this.showSaveChangesModal = true;
return;
} else if (forceSave) {
// when forceSave is true, save the workflow before navigating
await this.onSave();
}
this.hasChanges = false;
await nextTick();
this.$router.push(url);
},
onSave(hideProgress = false) {
Expand Down Expand Up @@ -787,8 +798,8 @@ export default {
const report = data.report || {};
const markdown = report.markdown || reportDefault;
this.report = report;
this.markdownText = markdown;
this.markdownConfig = report;
this.hideModal();
this.stateMessages = getStateUpgradeMessages(data);
const has_changes = this.stateMessages.length > 0;
Expand Down
97 changes: 97 additions & 0 deletions client/src/components/Workflow/Editor/SaveChangesModal.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<script setup lang="ts">
import { library } from "@fortawesome/fontawesome-svg-core";
import { faSave, faTimes, faTrash } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { BButton, BModal } from "bootstrap-vue";
import { ref } from "vue";
import localize from "@/utils/localization";
library.add(faSave, faTimes, faTrash);
interface Props {
/** Show the save changes modal */
showModal: boolean;
/** The URL to navigate to before saving/ignoring changes */
navUrl: string;
}
const props = withDefaults(defineProps<Props>(), {
showModal: false,
});
const busy = ref(false);
const emit = defineEmits<{
/** Proceed with or without saving the changes */
(e: "on-proceed", url: string, forceSave: boolean, ignoreChanges: boolean): void;
/** Update the nav URL prop */
(e: "update:nav-url", url: string): void;
/** Update the show modal boolean prop */
(e: "update:show-modal", showModal: boolean): void;
}>();
const title = localize("You have unsaved changes. Do you want to save them before proceeding?");
const body = localize(
"Click 'Save' to save your changes and proceed, 'Don't Save' to discard them and proceed, or 'Cancel' to return to the editor."
);
const buttonTitles = {
cancel: localize("Do not run proceed and return to editor"),
dontSave: localize("Discard changes and proceed"),
save: localize("Save changes and proceed"),
};
function closeModal() {
emit("update:show-modal", false);
emit("update:nav-url", "");
}
function dontSave() {
busy.value = true;
emit("on-proceed", props.navUrl, false, true);
}
function saveChanges() {
busy.value = true;
closeModal();
emit("on-proceed", props.navUrl, true, false);
}
</script>

<template>
<BModal :title="title" :visible="props.showModal" @close="closeModal" @hide="closeModal">
<div>
{{ body }}
</div>
<template v-slot:modal-footer>
<BButton
v-b-tooltip.noninteractive.hover
:title="buttonTitles['cancel']"
variant="secondary"
:disabled="busy"
@click="closeModal">
<FontAwesomeIcon :icon="faTimes" />
{{ localize("Cancel") }}
</BButton>
<BButton
v-b-tooltip.noninteractive.hover
:title="buttonTitles['dontSave']"
variant="danger"
:disabled="busy"
@click="dontSave">
<FontAwesomeIcon :icon="faTrash" />
{{ localize("Don't Save") }}
</BButton>
<BButton
v-b-tooltip.noninteractive.hover
:title="buttonTitles['save']"
variant="primary"
:disabled="busy"
@click="saveChanges">
<FontAwesomeIcon :icon="faSave" />
{{ localize("Save") }}
</BButton>
</template>
</BModal>
</template>
1 change: 1 addition & 0 deletions client/src/stores/workflowStepStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ export const useWorkflowStepStore = defineScopedStore("workflowStepStore", (work

del(steps.value, stepId.toString());
del(stepExtraInputs.value, stepId);
del(stepMapOver.value, stepId.toString());
}

return {
Expand Down
41 changes: 35 additions & 6 deletions doc/source/admin/galaxy_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@
This option has no effect if the file specified by
object_store_config_file exists. Otherwise, if this option is set,
it overrides any other objectstore settings.
The syntax, available instrumenters, and documentation of their
The syntax, available storage plugins, and documentation of their
options is explained in detail in the object store sample
configuration file, `object_store_conf.sample.yml`
:Default: ``None``
Expand Down Expand Up @@ -2606,8 +2606,20 @@

:Description:
The upload store is a temporary directory in which files uploaded
by the tus middleware or server will be placed. Defaults to
new_file_path if not set.
by the tus middleware or server for user uploads will be placed.
Defaults to new_file_path if not set.
:Default: ``None``
:Type: str


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``tus_upload_store_job_files``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Description:
The upload store is a temporary directory in which files uploaded
by the tus middleware or server for remote job files (Pulsar) will
be placed. Defaults to tus_upload_store if not set.
:Default: ``None``
:Type: str

Expand Down Expand Up @@ -4030,6 +4042,23 @@
:Type: str


~~~~~~~~~~~~~~~~~~~~~
``oidc_scope_prefix``
~~~~~~~~~~~~~~~~~~~~~

:Description:
Sets the prefix for OIDC scopes specific to this Galaxy instance.
If an API call is made against this Galaxy instance using an OIDC
bearer token, any scopes must be prefixed with this value e.g.
https://galaxyproject.org/api. More concretely, to request all
permissions that the user has, the scope would have to be
specified as "<prefix>:*". e.g "https://galaxyproject.org/api:*".
Currently, only * is recognised as a valid scope, and future
iterations may provide more fine-grained scopes.
:Default: ``https://galaxyproject.org/api``
:Type: str


~~~~~~~~~~~~~~~~~~~~
``auth_config_file``
~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -5439,9 +5468,9 @@
:Type: str


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``help_forum_tool_panel_integration_enabled``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``enable_help_forum_tool_panel_integration``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Description:
Enable the integration of the Galaxy Help Forum in the tool panel.
Expand Down
Loading

0 comments on commit a04a56d

Please sign in to comment.