+
{' '}
{credential.provider?.name}{' '}
Credentials
- {activeUserIsAdmin && (
-
- {allowEdit ? (
-
- {' '}
-
-
- ) : (
-
- )}
-
- )}
setName(value)}
+ setValue={(value) => handleNameChange(value)}
label="Name"
readOnly={!allowEdit}
disabled={!allowEdit}
@@ -109,15 +102,37 @@ export const UpdateProviderCredentials = (props: { credential: ProviderCredentia
setValue={(value) => handleCredentialChange(credential, value)}
label={credential.replace(/_/g, ' ').toUpperCase()}
required
- secret={true}
+ secret={isCredentialSecret(credential)}
readOnly={!allowEdit}
disabled={!allowEdit}
/>
))}
+ {credential.provider?.optionalCredentials.map((credential: string) => (
+
handleCredentialChange(credential, value)}
+ label={credential.replace(/_/g, ' ').toUpperCase()}
+ secret={true}
+ readOnly={!allowEdit}
+ disabled={!allowEdit}
+ />
+ ))}
+
{credential.provider?.id === 'aws' && (
handleCredentialChange('region', region)} />
)}
+
+
+
+
)
}
diff --git a/frontend/package.json b/frontend/package.json
index 64a155da..ba4e84bf 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -32,6 +32,7 @@
"jsonwebtoken": "^9.0.2",
"jspdf": "^2.5.1",
"libsodium-wrappers-sumo": "^0.7.13",
+ "lodash": "^4.17.21",
"next": "^14.2.3",
"next-auth": "^4.24.5",
"nextjs-toploader": "^1.6.4",
@@ -54,6 +55,7 @@
"@types/jest": "^29.5.11",
"@types/jsonwebtoken": "^9.0.5",
"@types/libsodium-wrappers-sumo": "^0.7.8",
+ "@types/lodash": "^4.17.1",
"@types/react-icons": "^3.0.0",
"@types/zxcvbn": "^4.4.4",
"@typescript-eslint/eslint-plugin": "^6.19.1",
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index 89bf9847..86068571 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -2318,6 +2318,11 @@
version "0.7.10"
resolved "https://registry.npmjs.org/@types/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz"
+"@types/lodash@^4.17.1":
+ version "4.17.1"
+ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.1.tgz#0fabfcf2f2127ef73b119d98452bd317c4a17eb8"
+ integrity sha512-X+2qazGS3jxLAIz5JDXDzglAF3KpijdhFxlf/V1+hEsOUc+HnWi81L/uv/EvGuV90WY+7mPGFCUDGfQC3Gj95Q==
+
"@types/node@*":
version "20.5.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.1.tgz#178d58ee7e4834152b0e8b4d30cbfab578b9bb30"