null}
- role="button"
- tabIndex={0}
- onClick={async (event) => {
- event.stopPropagation();
- handlePopUpOpen("deleteConfirmation", {
- provider: cloudIntegration.slug
- });
- }}
- className="absolute right-0 top-0 flex h-0 w-12 cursor-pointer items-center justify-center overflow-hidden rounded-r-md bg-red text-xs opacity-50 transition-all duration-300 hover:opacity-100 group-hover:h-full"
- >
-
+ filteredIntegrations.map((cloudIntegration) => {
+ const syncSlug = cloudIntegration.syncSlug ?? cloudIntegration.slug;
+ const isSyncAvailable = isSecretSyncAvailable(syncSlug);
+
+ return (
+
null}
+ role="button"
+ tabIndex={0}
+ className={`group relative ${
+ cloudIntegration.isAvailable
+ ? "cursor-pointer duration-200 hover:bg-mineshaft-700"
+ : "opacity-50"
+ } flex h-36 flex-col items-center justify-center rounded-md border border-mineshaft-600 bg-mineshaft-800 p-3`}
+ onClick={() => {
+ if (isSyncAvailable) {
+ navigate({
+ to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
+ params: {
+ projectId: currentWorkspace.id
+ },
+ search: {
+ selectedTab: IntegrationsListPageTabs.SecretSyncs,
+ addSync: syncSlug as SecretSync
+ }
+ });
+ return;
+ }
+ if (!cloudIntegration.isAvailable) return;
+ if (
+ permission.cannot(
+ ProjectPermissionActions.Create,
+ ProjectPermissionSub.Integrations
+ )
+ ) {
+ createNotification({
+ type: "error",
+ text: "You do not have permission to create an integration"
+ });
+ return;
+ }
+ onIntegrationStart(cloudIntegration.slug);
+ }}
+ key={cloudIntegration.slug}
+ >
+
+

+
+ {cloudIntegration.name}
+
+
+ {cloudIntegration.isAvailable &&
+ Boolean(integrationAuths?.[cloudIntegration.slug]) && (
+
+
+
+
+ Authorized
-
+
+ null}
+ role="button"
+ tabIndex={0}
+ onClick={async (event) => {
+ event.stopPropagation();
+ handlePopUpOpen("deleteConfirmation", {
+ provider: cloudIntegration.slug
+ });
+ }}
+ className="absolute right-0 top-0 flex h-0 w-12 cursor-pointer items-center justify-center overflow-hidden rounded-r-md bg-red text-xs opacity-50 transition-all duration-300 hover:opacity-100 group-hover:h-full"
+ >
+
+
+
+
+
+ )}
+ {isSyncAvailable && (
+
+
+
+ Secret Sync Available
+
)}
-
- ))
+
+ );
+ })
) : (