From 176c2df5616010e6195d283b0f33b75129f2377f Mon Sep 17 00:00:00 2001 From: Patrick O'Sullivan Date: Fri, 4 Nov 2022 15:56:11 -0500 Subject: [PATCH] Add region to s3 settings --- ui/src/preferences/StoragePrefs.tsx | 20 ++++++++++++++++++++ ui/src/state/storage-reducer.ts | 14 ++++++++++++-- ui/src/state/storage.ts | 6 ++++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/ui/src/preferences/StoragePrefs.tsx b/ui/src/preferences/StoragePrefs.tsx index 15ab7c8..b7d540e 100644 --- a/ui/src/preferences/StoragePrefs.tsx +++ b/ui/src/preferences/StoragePrefs.tsx @@ -17,6 +17,7 @@ interface CredentialsSubmit { endpoint: string; accessId: string; accessSecret: string; + region: string; bucket: string; } @@ -38,6 +39,11 @@ export const StoragePrefs = () => { api.poke(setAccessKeyId(data.accessId)); api.poke(setSecretAccessKey(data.accessSecret)); api.poke(setCurrentBucket(data.bucket)); + api.poke({ + app: 's3-store', + mark: 's3-action', + json: { 'set-region': data.region }, + }); }, []) ); @@ -113,6 +119,20 @@ export const StoragePrefs = () => { className="input default-ring bg-gray-50" /> +
+ + +