From 1bee22491a7090824e95c8757900d44a150b7028 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 22 Apr 2024 10:22:50 -0400 Subject: [PATCH] Refine object store templates backend. --- client/src/api/schema/schema.ts | 8 +- .../ObjectStore/Instances/CreateForm.vue | 2 +- .../ObjectStore/Instances/CreateInstance.vue | 4 +- .../ObjectStore/Instances/EditInstance.vue | 4 +- .../ObjectStore/Instances/EditSecrets.vue | 2 +- .../ObjectStore/Instances/InstanceForm.vue | 2 +- .../ObjectStore/Instances/UpgradeForm.test.ts | 3 +- .../ObjectStore/Instances/UpgradeForm.vue | 2 +- .../ObjectStore/Instances/UpgradeInstance.vue | 2 +- .../components/ObjectStore/Instances/util.ts | 4 - .../Templates/CreateUserObjectStore.vue | 2 +- .../ObjectStore/Templates/SelectTemplate.vue | 8 +- .../src/components/User/UserPreferences.vue | 6 +- .../stores/objectStoreInstancesStore.test.ts | 1 + .../src/stores/objectStoreInstancesStore.ts | 6 +- lib/galaxy/app.py | 1 + lib/galaxy/config/schemas/config_schema.yml | 13 +++ lib/galaxy/managers/object_store_instances.py | 108 ++++++++++++------ lib/galaxy/model/__init__.py | 19 ++- ...3c93d66a_add_user_defined_object_stores.py | 16 ++- lib/galaxy/objectstore/__init__.py | 21 +++- lib/galaxy/webapps/galaxy/api/object_store.py | 4 +- .../test_from_configuration_object.py | 1 + 23 files changed, 153 insertions(+), 86 deletions(-) diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index 3f0443ce2bbd..d21a599263bc 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -12501,7 +12501,7 @@ export interface components { /** Device */ device?: string | null; /** Id */ - id: number; + id: number | string; /** Name */ name?: string | null; /** Object Store Id */ @@ -12520,6 +12520,8 @@ export interface components { * @enum {string} */ type: "s3" | "azure_blob" | "disk" | "generic_s3"; + /** Uuid */ + uuid: string; /** Variables */ variables: { [key: string]: (string | boolean | number) | undefined; @@ -20530,7 +20532,7 @@ export interface operations { header?: { "run-as"?: string | null; }; - /** @description The model ID for a persisted UserObjectStore object. */ + /** @description The identifier used to index a persisted UserObjectStore object. */ path: { user_object_store_id: string; }; @@ -20557,7 +20559,7 @@ export interface operations { header?: { "run-as"?: string | null; }; - /** @description The model ID for a persisted UserObjectStore object. */ + /** @description The identifier used to index a persisted UserObjectStore object. */ path: { user_object_store_id: string; }; diff --git a/client/src/components/ObjectStore/Instances/CreateForm.vue b/client/src/components/ObjectStore/Instances/CreateForm.vue index 7ff59ae6aebe..e82f0f1c484a 100644 --- a/client/src/components/ObjectStore/Instances/CreateForm.vue +++ b/client/src/components/ObjectStore/Instances/CreateForm.vue @@ -19,7 +19,7 @@ interface CreateFormProps { } const error = ref(null); const props = defineProps(); -const title = "Create a new object store for your data"; +const title = "Create a new storage location for your data"; const submitTitle = "Submit"; const inputs = computed(() => { diff --git a/client/src/components/ObjectStore/Instances/CreateInstance.vue b/client/src/components/ObjectStore/Instances/CreateInstance.vue index 91d2b996bb8e..cfd7e82dc63c 100644 --- a/client/src/components/ObjectStore/Instances/CreateInstance.vue +++ b/client/src/components/ObjectStore/Instances/CreateInstance.vue @@ -21,14 +21,14 @@ const props = defineProps(); const template = computed(() => objectStoreTemplatesStore.getLatestTemplate(props.templateId)); async function onCreated(objectStore: UserConcreteObjectStore) { - const message = `Created object store ${objectStore.name}`; + const message = `Created storage location ${objectStore.name}`; goToIndex({ message }); } diff --git a/client/src/components/ObjectStore/Instances/EditInstance.vue b/client/src/components/ObjectStore/Instances/EditInstance.vue index fc8bcbc5fecd..16e4dd9c4631 100644 --- a/client/src/components/ObjectStore/Instances/EditInstance.vue +++ b/client/src/components/ObjectStore/Instances/EditInstance.vue @@ -44,7 +44,7 @@ const inputs = computed(() => { return form; }); -const title = computed(() => `Edit Object Store ${instance.value?.name} Settings`); +const title = computed(() => `Edit Storage Location ${instance.value?.name} Settings`); const hasSecrets = computed(() => instance.value?.secrets && instance.value?.secrets.length > 0); const submitTitle = "Update Settings"; @@ -69,7 +69,7 @@ async function onSubmit(formData: any) { const { goToIndex } = useInstanceRouting(); async function onUpdate(objectStore: UserConcreteObjectStore) { - const message = `Updated object store ${objectStore.name}`; + const message = `Updated storage location ${objectStore.name}`; goToIndex({ message }); } diff --git a/client/src/components/ObjectStore/Instances/EditSecrets.vue b/client/src/components/ObjectStore/Instances/EditSecrets.vue index da3bb94cc1b6..42038241d42d 100644 --- a/client/src/components/ObjectStore/Instances/EditSecrets.vue +++ b/client/src/components/ObjectStore/Instances/EditSecrets.vue @@ -14,7 +14,7 @@ interface Props { template: ObjectStoreTemplateSummary; } const props = defineProps(); -const title = computed(() => `Update Object Store ${props.objectStore?.name} Secrets`); +const title = computed(() => `Update Storage Location ${props.objectStore?.name} Secrets`); async function onUpdate(secretName: string, secretValue: string) { const payload = { diff --git a/client/src/components/ObjectStore/Instances/InstanceForm.vue b/client/src/components/ObjectStore/Instances/InstanceForm.vue index 7c0131301671..97d4525aa4cb 100644 --- a/client/src/components/ObjectStore/Instances/InstanceForm.vue +++ b/client/src/components/ObjectStore/Instances/InstanceForm.vue @@ -26,7 +26,7 @@ async function handleSubmit() {