diff --git a/ui/src/data-services/models/storage.ts b/ui/src/data-services/models/storage.ts index 2a99f4c5a..fc236d303 100644 --- a/ui/src/data-services/models/storage.ts +++ b/ui/src/data-services/models/storage.ts @@ -7,6 +7,10 @@ export class StorageSource extends Entity { super(entity) } + get accessKey(): string { + return this._data.access_key + } + get bucket(): string { return this._data.bucket } diff --git a/ui/src/pages/overview/entities/details-form/storage-details-form.tsx b/ui/src/pages/overview/entities/details-form/storage-details-form.tsx index 30643ce9c..5875dfa0e 100644 --- a/ui/src/pages/overview/entities/details-form/storage-details-form.tsx +++ b/ui/src/pages/overview/entities/details-form/storage-details-form.tsx @@ -82,11 +82,12 @@ export const StorageDetailsForm = ({ setFocus, } = useForm({ defaultValues: { - name: entity?.name, + access_key: storage?.accessKey, + name: storage?.name, bucket: storage?.bucket, public_base_url: storage?.publicBaseUrl, endpoint_url: storage?.endpointUrl, - // Access key and secret key are not returned by the API + // Secret access key is not returned by the API }, mode: 'onChange', }) @@ -145,18 +146,11 @@ export const StorageDetailsForm = ({ /> - ( - setTimeout(() => setFocus(field.name))} - /> - )} />