diff --git a/src/Settings.tsx b/src/Settings.tsx
index e63f55e..589fd8a 100644
--- a/src/Settings.tsx
+++ b/src/Settings.tsx
@@ -36,7 +36,7 @@ export default function Settings() {
account: values['docker-account'],
password: values['docker-password'],
});
- notification.info({
+ notification.success({
message: 'DockerHub setup saved.',
});
};
@@ -46,7 +46,7 @@ export default function Settings() {
secretKey: values['aws-key'],
region: values['aws-region'],
});
- notification.info({
+ notification.success({
message: 'AWS setup saved.',
});
};
@@ -55,7 +55,7 @@ export default function Settings() {
endpoint: values['primehub-api-endpoint'],
token: values['primehub-api-token'],
});
- notification.info({
+ notification.success({
message: 'PrimeHub setup saved.',
});
};
@@ -100,6 +100,48 @@ export default function Settings() {
});
}
};
+ const onAWSTest = async () => {
+ const accessKeyId = awsForm.getFieldValue('aws-id');
+ const secretAccessKey = awsForm.getFieldValue('aws-key');
+ const region = awsForm.getFieldValue('aws-region');
+ const result = await send('test-aws-credentials', {
+ accessKeyId,
+ secretAccessKey,
+ region,
+ });
+ if (result.error) {
+ console.log(result.error);
+ notification.error({
+ message: 'AWS Credential Check Failed',
+ description: ``,
+ });
+ } else {
+ notification.success({
+ message: 'AWS Connected',
+ description: ``,
+ });
+ }
+ };
+ const onDockerHubTest = async () => {
+ const username = dockerHubForm.getFieldValue('docker-account');
+ const password = dockerHubForm.getFieldValue('docker-password');
+ const result = await send('test-dockerhub-credentials', {
+ username,
+ password,
+ });
+ if (!result) {
+ console.log(result.error);
+ notification.error({
+ message: 'DockerHub Credential Check Failed',
+ description: ``,
+ });
+ } else {
+ notification.success({
+ message: 'DockerHub Connected',
+ description: ``,
+ });
+ }
+ };
const onDockerHubReset = async () => {
await send('delete-dockerhub-credential');
notification.info({
@@ -207,7 +249,13 @@ export default function Settings() {
-
+
+ Test
+
+ }
+ />
-
+
+ Test
+
+ }
+ />