Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => {
];

const isConnectorsFeatureEnabled = await isFeatureEnabled(
FeatureFlag.CONNECTORS
FeatureFlag.CONNECTORS_INTEGRATION_FEEDS
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import { useTranslations } from 'next-intl';

import { ShareableResourceConnectorDetails } from '@/components/service/document/connector/shareable-resource-connector-details';
import OneClickDeploy from '@/components/service/document/one-click-deploy/one-click-deploy';
import ShareableResourceDescription from '@/components/service/document/shareable-resource-description';
import { ShareableResourceBasicInformation } from '@/components/service/document/ui/shareable-resource-basic-information';
import BadgeOverflowCounter, {
Expand All @@ -32,6 +33,9 @@ const ShareableResourceConnectorSlug: React.FunctionComponent<
> = ({ documentData, breadcrumbValue, shareUrl, logo }) => {
const t = useTranslations();

const shouldDisplayOneClickDeployButton =
documentData.manager_supported === 'true';

return (
<>
<BreadcrumbNav value={breadcrumbValue} />
Expand Down Expand Up @@ -62,6 +66,10 @@ const ShareableResourceConnectorSlug: React.FunctionComponent<
documentId={documentData.slug}
url={shareUrl}
/>

{shouldDisplayOneClickDeployButton && (
<OneClickDeploy documentData={documentData} />
)}
</div>
</div>
<div className="w-full mt-s mb-xs">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { RefreshUserPlatformTokenMutation } from '@/components/registration/register/register.graphql';
import useExternalTab from '@/hooks/useExternalTab';
import {
isConnectorResource,
ShareableResource,
ShareableResourceType,
} from '@/utils/shareable-resources/shareable-resources.types';
Expand Down Expand Up @@ -36,6 +37,10 @@ function computeDeployUrl(
return `${platformBasePath}/admin/deploy-scenario/${service_instance?.id}/${id}`;
}

if (isConnectorResource(documentData)) {
return `${platformBasePath}/dashboard/xtm-hub/deploy-connector/${documentData.slug}?openConfig=true`;
}

const urlKey = OPENCTI_URL_CONFIGS[type as keyof typeof OPENCTI_URL_CONFIGS];
return `${platformBasePath}/dashboard/xtm-hub/${urlKey}/${service_instance?.id}/${id}`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const IntegrationFeedsList = ({
} = useServiceListLocalStorage(localStorageKey);

const isConnectorsFeatureFlagEnabled = useIsFeatureEnabled(
FeatureFlag.CONNECTORS
FeatureFlag.CONNECTORS_INTEGRATION_FEEDS
);

const filters: ServiceListFilterMap = isConnectorsFeatureFlagEnabled
Expand Down
2 changes: 1 addition & 1 deletion apps/portal-front/src/utils/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export enum FeatureFlag {
// dummy feature flag used for testing purposes
DUMMY = 'DUMMY',
OPEN_CTI_FREE_TRIAL = 'OPEN_CTI_FREE_TRIAL',
CONNECTORS = 'CONNECTORS',
CONNECTORS_INTEGRATION_FEEDS = 'CONNECTORS_INTEGRATION_FEEDS',
}