diff --git a/client/src/components/History/CurrentHistory/HistoryCounter.vue b/client/src/components/History/CurrentHistory/HistoryCounter.vue index df3f0a1d0e0f..98efa0bf11b8 100644 --- a/client/src/components/History/CurrentHistory/HistoryCounter.vue +++ b/client/src/components/History/CurrentHistory/HistoryCounter.vue @@ -12,6 +12,7 @@ import { useRouter } from "vue-router/composables"; import type { HistorySummary } from "@/api"; import { HistoryFilters } from "@/components/History/HistoryFilters.js"; import { useConfig } from "@/composables/config"; +import { useStorageLocationConfiguration } from "@/composables/storageLocation"; import { useUserStore } from "@/stores/userStore"; import { useDetailedHistory } from "./usesDetailedHistory"; @@ -19,6 +20,8 @@ import { useDetailedHistory } from "./usesDetailedHistory"; import PreferredStorePopover from "./PreferredStorePopover.vue"; import SelectPreferredStore from "./SelectPreferredStore.vue"; +const { isOnlyPreference } = useStorageLocationConfiguration(); + library.add(faDatabase, faEyeSlash, faHdd, faMapMarker, faSync, faTrash); const props = withDefaults( @@ -54,6 +57,14 @@ const historyPreferredObjectStoreId = ref(props.history.preferred_object_store_i const niceHistorySize = computed(() => prettyBytes(historySize.value)); +const storageLocationTitle = computed(() => { + if (isOnlyPreference.value) { + return "History Preferred Storage Location"; + } else { + return "History Storage Location"; + } +}); + function onDashboard() { router.push({ name: "HistoryOverviewInAnalysis", params: { historyId: props.history.id } }); } @@ -206,7 +217,7 @@ onMounted(() => { { } return id; }); + +const title = computed(() => { + if (isOnlyPreference.value) { + return "Preferred Storage Location"; + } else { + return "Storage Location"; + } +}); diff --git a/client/src/components/ObjectStore/SelectObjectStore.vue b/client/src/components/ObjectStore/SelectObjectStore.vue index def41a60ff4d..1aa6287a6a07 100644 --- a/client/src/components/ObjectStore/SelectObjectStore.vue +++ b/client/src/components/ObjectStore/SelectObjectStore.vue @@ -3,6 +3,7 @@ import { storeToRefs } from "pinia"; import { computed, ref } from "vue"; import { ConcreteObjectStoreModel } from "@/api"; +import { useStorageLocationConfiguration } from "@/composables/storageLocation"; import { useObjectStoreStore } from "@/stores/objectStoreStore"; import ObjectStoreSelectButton from "./ObjectStoreSelectButton.vue"; @@ -25,6 +26,7 @@ const props = withDefaults(defineProps(), { const store = useObjectStoreStore(); const { isLoading, loadErrorMessage, selectableObjectStores } = storeToRefs(store); +const { isOnlyPreference } = useStorageLocationConfiguration(); const loadingObjectStoreInfoMessage = ref("Loading storage location information"); const whyIsSelectionPreferredText = ref(` @@ -64,7 +66,7 @@ async function handleSubmit(preferredObjectStore: ConcreteObjectStoreModel | nul {{ error }} - + - +

{{ whyIsSelectionPreferredText }}

diff --git a/client/src/components/ObjectStore/showTargetPopoverMixin.js b/client/src/components/ObjectStore/showTargetPopoverMixin.js index 66c68f4bfd5e..61f19c279871 100644 --- a/client/src/components/ObjectStore/showTargetPopoverMixin.js +++ b/client/src/components/ObjectStore/showTargetPopoverMixin.js @@ -1,3 +1,7 @@ +import { mapState } from "pinia"; + +import { useConfigStore } from "@/stores/configurationStore"; + import ShowSelectedObjectStore from "./ShowSelectedObjectStore"; export default { @@ -11,8 +15,16 @@ export default { }, }, computed: { + ...mapState(useConfigStore, ["config"]), + preferredOrEmptyString() { + if (this.config?.object_store_always_respect_user_selection) { + return ""; + } else { + return "Preferred"; + } + }, title() { - return this.l(`Preferred Target Storage Location ${this.titleSuffix || ""}`); + return this.l(`${this.preferredOrEmptyString} Target Storage Location ${this.titleSuffix || ""}`); }, }, }; diff --git a/client/src/components/Tool/ToolCard.vue b/client/src/components/Tool/ToolCard.vue index f1df26492a1a..d28e4d46ad96 100644 --- a/client/src/components/Tool/ToolCard.vue +++ b/client/src/components/Tool/ToolCard.vue @@ -7,6 +7,7 @@ import { getAppRoot } from "onload/loadConfig"; import { storeToRefs } from "pinia"; import { computed, ref, watch } from "vue"; +import { useStorageLocationConfiguration } from "@/composables/storageLocation"; import { useConfigStore } from "@/stores/configurationStore"; import { useUserStore } from "@/stores/userStore"; @@ -83,12 +84,21 @@ function onSetError(e) { errorText.value = e; } +const { isOnlyPreference } = useStorageLocationConfiguration(); const { currentUser, isAnonymous } = storeToRefs(useUserStore()); const { isLoaded: isConfigLoaded, config } = storeToRefs(useConfigStore()); const hasUser = computed(() => !isAnonymous.value); const versions = computed(() => props.options.versions); const showVersions = computed(() => props.options.versions?.length > 1); +const storageLocationModalTitle = computed(() => { + if (isOnlyPreference.value) { + return "Tool Execution Preferred Storage Location"; + } else { + return "Tool Execution Storage Location"; + } +}); + const root = computed(() => getAppRoot()); const showPreferredObjectStoreModal = ref(false); const toolPreferredObjectStoreId = ref(props.preferredObjectStoreId); @@ -148,7 +158,7 @@ const showHelpForum = computed(() => isConfigLoaded.value && config.value.enable {{ title }}

- Preferred storage location has been set at the tool level, by default history or user preferences will - be used and if those are not set Galaxy will pick an administrator-configured default. + The {{ preferredOrEmptyString }} storage location has been set at the tool level, by default history or + user preferences will be used and if those are not set Galaxy will pick an administrator-configured + default.

- Change preferred storage location by clicking on the storage button in the tool header. + Change {{ preferredOrEmptyString }} storage location by clicking on the storage button in the tool + header.
diff --git a/client/src/components/User/UserPreferredObjectStore.vue b/client/src/components/User/UserPreferredObjectStore.vue index e2c056ddae66..c51ab8b8b60f 100644 --- a/client/src/components/User/UserPreferredObjectStore.vue +++ b/client/src/components/User/UserPreferredObjectStore.vue @@ -7,17 +7,17 @@ v-b-modal.modal-select-preferred-object-store class="preferred-storage" href="javascript:void(0)" - >Preferred Storage Location{{ title }}
- Select a preferred storage location for the outputs of new jobs. + Select a {{ preferredOrEmptyString }} storage location for the outputs of new jobs.
{ wrapper = mount(WorkflowStorageConfiguration, { propsData, localVue, + pinia: createTestingPinia(), }); } diff --git a/client/src/components/Workflow/Run/WorkflowStorageConfiguration.vue b/client/src/components/Workflow/Run/WorkflowStorageConfiguration.vue index d6d9b03ea557..d67dc2b5a191 100644 --- a/client/src/components/Workflow/Run/WorkflowStorageConfiguration.vue +++ b/client/src/components/Workflow/Run/WorkflowStorageConfiguration.vue @@ -12,11 +12,7 @@ :title-suffix="suffixPrimary" :invocation-preferred-object-store-id="selectedObjectStoreId"> - + @@ -37,7 +33,7 @@