Unverified Commit 46057b2d authored by Marius van den Beek's avatar Marius van den Beek Committed by GitHub
Browse files

Merge pull request #18525 from davelopez/24.1_fix_use_label_for_object_stores_usage_display

[24.1] Use name instead of ID for displaying object stores + revise user-facing language in UI
parents b4af9b39 0404a176
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { computed, ref } from "vue";

import { ConcreteObjectStoreModel } from "@/api";
import { useObjectStoreStore } from "@/stores/objectStoreStore";

import ObjectStoreSelect from "./ObjectStoreSelect.vue";
import SelectModal from "@/components/Dataset/DatasetStorage/SelectModal.vue";
@@ -12,26 +13,28 @@ import SelectModal from "@/components/Dataset/DatasetStorage/SelectModal.vue";
library.add(faTimes);

interface FilterObjectStoreLinkProps {
    value: String | null;
    value?: string;
    objectStores: ConcreteObjectStoreModel[];
}

const props = defineProps<FilterObjectStoreLinkProps>();

const { getObjectStoreNameById } = useObjectStoreStore();

const showModal = ref(false);

const emit = defineEmits<{
    (e: "change", objectStoreId: string | null): void;
    (e: "change", objectStoreId?: string): void;
}>();

function onSelect(objectStoreId: string | null) {
function onSelect(objectStoreId?: string) {
    emit("change", objectStoreId);
    showModal.value = false;
}

const selectionText = computed(() => {
    if (props.value) {
        return props.value;
        return getObjectStoreNameById(props.value);
    } else {
        return "(any)";
    }
@@ -45,7 +48,7 @@ const selectionText = computed(() => {
        </SelectModal>
        <b-link href="#" @click="showModal = true">{{ selectionText }}</b-link>
        <span v-if="value" v-b-tooltip.hover title="Remove Filter">
            <FontAwesomeIcon icon="times" @click="onSelect(null)" />
            <FontAwesomeIcon icon="times" @click="onSelect(undefined)" />
        </span>
    </span>
</template>
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
import { computed } from "vue";

const MESSAGES = {
    posix: "This is a simple path based object store that assumes the all the relevant paths are already mounted on the Galaxy server and target worker nodes.",
    posix: "This is a simple path based storage location that assumes the all the relevant paths are already mounted on the Galaxy server and target worker nodes.",
    s3fs: "This is an remote file source plugin based on the Amazon Simple Storage Service (S3) interface. The AWS interface has become an industry standard and many storage vendors support it and use it to expose 'object' based storage.",
};

+2 −2
Original line number Diff line number Diff line
@@ -59,9 +59,9 @@ function reload() {
            :fixed="true"
            :show-empty="true">
            <template v-slot:empty>
                <LoadingSpan v-if="loading" message="Loading object store instances" />
                <LoadingSpan v-if="loading" message="Loading storage location instances" />
                <b-alert v-else id="no-object-store-instances" variant="info" show>
                    <div>No object store instances found, click the create button to configure a new one.</div>
                    <div>No storage location instances found, click the create button to configure a new one.</div>
                </b-alert>
            </template>
            <template v-slot:cell(badges)="row">
+5 −5
Original line number Diff line number Diff line
@@ -4,13 +4,13 @@ import { computed } from "vue";
import { ObjectStoreTemplateType } from "@/api/objectStores";

const MESSAGES = {
    aws_s3: "This is an object store based on the Amazon Simple Storage Service (S3). Data here is hosted by Amazon.",
    aws_s3: "This is a storage location based on the Amazon Simple Storage Service (S3). Data here is hosted by Amazon.",
    azure_blob:
        "This is a Microsoft Azure Blob based object store. More information on Microsoft's Azure Blob Storage can be found at https://azure.microsoft.com/en-us/products/storage/blobs/.",
    disk: "This is a simple path based object store that assumes the all the relevant paths are already mounted on the Galaxy server and target worker nodes.",
    boto3: "This is an object store based on the Amazon Simple Storage Service (S3) interface, but likely not stored by Amazon. The AWS interface has become an industry standard and many storage vendors support it and use it to expose object based storage.",
        "This is a Microsoft Azure Blob based storage location. More information on Microsoft's Azure Blob Storage can be found at https://azure.microsoft.com/en-us/products/storage/blobs/.",
    disk: "This is a simple path based storage location that assumes the all the relevant paths are already mounted on the Galaxy server and target worker nodes.",
    boto3: "This is a storage location based on the Amazon Simple Storage Service (S3) interface, but likely not stored by Amazon. The AWS interface has become an industry standard and many storage vendors support it and use it to expose object based storage.",
    generic_s3:
        "This is an object store based on the Amazon Simple Storage Service (S3) interface, but likely not stored by Amazon. The AWS interface has become an industry standard and many storage vendors support it and use it to expose object based storage.",
        "This is a storage location based on the Amazon Simple Storage Service (S3) interface, but likely not stored by Amazon. The AWS interface has become an industry standard and many storage vendors support it and use it to expose object based storage.",
};

interface Props {
+2 −2
Original line number Diff line number Diff line
@@ -29,9 +29,9 @@ const texts = reactive({
        buttonText: localize("Explore now"),
    },
    explore_by_objectstore: {
        title: localize("Visually explore your disk usage by object store"),
        title: localize("Visually explore your disk usage by storage location"),
        description: localize(
            "Want to know how the space in your account is being distributed by object store? Here you can explore your disk usage in a visual way by object store."
            "Want to know how the space in your account is being distributed across storage locations? Here you can explore your disk usage in a visual way by where it is physically stored."
        ),
        icon: "fas fa-hdd fa-6x",
        buttonText: localize("Explore now"),
Loading