diff --git a/backend/src/services/app-connection/aws/aws-connection-fns.ts b/backend/src/services/app-connection/aws/aws-connection-fns.ts index d81421529..887729502 100644 --- a/backend/src/services/app-connection/aws/aws-connection-fns.ts +++ b/backend/src/services/app-connection/aws/aws-connection-fns.ts @@ -81,11 +81,14 @@ export const getAwsConnectionConfig = async (appConnection: TAwsConnectionConfig }; export const validateAwsConnectionCredentials = async (appConnection: TAwsConnectionConfig) => { - const awsConfig = await getAwsConnectionConfig(appConnection); - const sts = new AWS.STS(awsConfig); - let resp: Awaited["promise"]>>; + let resp: AWS.STS.GetCallerIdentityResponse & { + $response: AWS.Response; + }; try { + const awsConfig = await getAwsConnectionConfig(appConnection); + const sts = new AWS.STS(awsConfig); + resp = await sts.getCallerIdentity().promise(); } catch (e: unknown) { throw new BadRequestError({ @@ -93,7 +96,7 @@ export const validateAwsConnectionCredentials = async (appConnection: TAwsConnec }); } - if (resp.$response.httpResponse.statusCode !== 200) + if (resp?.$response.httpResponse.statusCode !== 200) throw new InternalServerError({ message: `Unable to validate credentials: ${ resp.$response.error?.message ?? diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx index a5e7d270d..fefb1ad41 100644 --- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx +++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx @@ -289,34 +289,36 @@ export const SecretSyncsTable = ({ secretSyncs }: Props) => { Status - {Object.values(SecretSyncStatus).map((status) => ( - { - e.preventDefault(); - setFilters((prev) => ({ - ...prev, - status: prev.status.includes(status) - ? prev.status.filter((s) => s !== status) - : [...prev.status, status] - })); - }} - key={status} - icon={ - filters.status.includes(status) && ( - - ) - } - iconPos="right" - > -
- - {STATUS_ICON_MAP[status].name} -
-
- ))} + {[SecretSyncStatus.Running, SecretSyncStatus.Succeeded, SecretSyncStatus.Failed].map( + (status) => ( + { + e.preventDefault(); + setFilters((prev) => ({ + ...prev, + status: prev.status.includes(status) + ? prev.status.filter((s) => s !== status) + : [...prev.status, status] + })); + }} + key={status} + icon={ + filters.status.includes(status) && ( + + ) + } + iconPos="right" + > +
+ + {STATUS_ICON_MAP[status].name} +
+
+ ) + )} Service {secretSyncs.length ? ( [...new Set(secretSyncs.map(({ destination }) => destination))].map((destination) => { diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx index 5491d53ab..609780362 100644 --- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx +++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx @@ -4,7 +4,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { format } from "date-fns"; import { ProjectPermissionCan } from "@app/components/permissions"; -import { SecretSyncLabel } from "@app/components/secret-syncs"; +import { SecretSyncLabel, SecretSyncStatusBadge } from "@app/components/secret-syncs"; import { IconButton } from "@app/components/v2"; import { ProjectPermissionSub } from "@app/context"; import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types"; @@ -57,6 +57,11 @@ export const SecretSyncDetailsSection = ({ secretSync, onEditDetails }: Props) =
{name} {description} + {syncStatus && ( + + + + )} {lastSyncedAt && ( {format(new Date(lastSyncedAt), "yyyy-MM-dd, hh:mm aaa")}