diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsx
index 211146121c..f422fc6829 100644
--- a/frontend/src/AppRoutes/index.tsx
+++ b/frontend/src/AppRoutes/index.tsx
@@ -44,7 +44,6 @@ function App(): JSX.Element {
trialInfo,
activeLicenseV3,
isFetchingActiveLicenseV3,
- activeLicenseV3FetchError,
userFetchError,
licensesFetchError,
featureFlagsFetchError,
@@ -264,12 +263,7 @@ function App(): JSX.Element {
// if the user is in logged in state
if (isLoggedInState) {
// if the setup calls are loading then return a spinner
- if (
- isFetchingLicenses ||
- isFetchingUser ||
- isFetchingFeatureFlags ||
- isFetchingActiveLicenseV3
- ) {
+ if (isFetchingLicenses || isFetchingUser || isFetchingFeatureFlags) {
return ;
}
@@ -277,7 +271,7 @@ function App(): JSX.Element {
// this needs to be on top of data missing error because if there is an error, data will never be loaded and it will
// move to indefinitive loading
if (
- (userFetchError || licensesFetchError || activeLicenseV3FetchError) &&
+ (userFetchError || licensesFetchError) &&
pathname !== ROUTES.SOMETHING_WENT_WRONG
) {
history.replace(ROUTES.SOMETHING_WENT_WRONG);
@@ -287,8 +281,7 @@ function App(): JSX.Element {
if (
(!licenses || !user.email || !featureFlags) &&
!userFetchError &&
- !licensesFetchError &&
- !activeLicenseV3FetchError
+ !licensesFetchError
) {
return ;
}
diff --git a/frontend/src/container/Home/DataSourceInfo/DataSourceInfo.tsx b/frontend/src/container/Home/DataSourceInfo/DataSourceInfo.tsx
index f368a858cc..115bc85946 100644
--- a/frontend/src/container/Home/DataSourceInfo/DataSourceInfo.tsx
+++ b/frontend/src/container/Home/DataSourceInfo/DataSourceInfo.tsx
@@ -6,7 +6,11 @@ import { useGetDeploymentsData } from 'hooks/CustomDomain/useGetDeploymentsData'
import history from 'lib/history';
import { Globe, Link2 } from 'lucide-react';
import Card from 'periscope/components/Card/Card';
+import { useAppContext } from 'providers/App/App';
import { useEffect, useState } from 'react';
+import { LicensePlatform } from 'types/api/licensesV3/getActive';
+
+import { DOCS_LINKS } from '../constants';
function DataSourceInfo({
dataSentToSigNoz,
@@ -15,6 +19,8 @@ function DataSourceInfo({
dataSentToSigNoz: boolean;
isLoading: boolean;
}): JSX.Element {
+ const { activeLicenseV3 } = useAppContext();
+
const notSendingData = !dataSentToSigNoz;
const {
@@ -77,12 +83,36 @@ function DataSourceInfo({
tabIndex={0}
onClick={(): void => {
logEvent('Homepage: Connect dataSource clicked', {});
- history.push(ROUTES.GET_STARTED);
+
+ if (
+ activeLicenseV3 &&
+ activeLicenseV3.platform === LicensePlatform.CLOUD
+ ) {
+ history.push(ROUTES.GET_STARTED_WITH_CLOUD);
+ } else {
+ window?.open(
+ DOCS_LINKS.ADD_DATA_SOURCE,
+ '_blank',
+ 'noopener noreferrer',
+ );
+ }
}}
onKeyDown={(e): void => {
if (e.key === 'Enter') {
logEvent('Homepage: Connect dataSource clicked', {});
- history.push(ROUTES.GET_STARTED);
+
+ if (
+ activeLicenseV3 &&
+ activeLicenseV3.platform === LicensePlatform.CLOUD
+ ) {
+ history.push(ROUTES.GET_STARTED_WITH_CLOUD);
+ } else {
+ window?.open(
+ DOCS_LINKS.ADD_DATA_SOURCE,
+ '_blank',
+ 'noopener noreferrer',
+ );
+ }
}
}}
>
diff --git a/frontend/src/container/Home/HomeChecklist/HomeChecklist.tsx b/frontend/src/container/Home/HomeChecklist/HomeChecklist.tsx
index 84148b0d0f..3bf52945d0 100644
--- a/frontend/src/container/Home/HomeChecklist/HomeChecklist.tsx
+++ b/frontend/src/container/Home/HomeChecklist/HomeChecklist.tsx
@@ -1,11 +1,14 @@
+/* eslint-disable sonarjs/cognitive-complexity */
import './HomeChecklist.styles.scss';
import { Button } from 'antd';
import logEvent from 'api/common/logEvent';
+import ROUTES from 'constants/routes';
+import history from 'lib/history';
import { ArrowRight, ArrowRightToLine, BookOpenText } from 'lucide-react';
import { useAppContext } from 'providers/App/App';
import { useEffect, useState } from 'react';
-import { Link } from 'react-router-dom';
+import { LicensePlatform } from 'types/api/licensesV3/getActive';
import { USER_ROLES } from 'types/roles';
export type ChecklistItem = {
@@ -14,6 +17,7 @@ export type ChecklistItem = {
description: string;
completed: boolean;
isSkipped: boolean;
+ isSkippable?: boolean;
skippedPreferenceKey?: string;
toRoute?: string;
docsLink?: string;
@@ -28,7 +32,7 @@ function HomeChecklist({
onSkip: (item: ChecklistItem) => void;
isLoading: boolean;
}): JSX.Element {
- const { user } = useAppContext();
+ const { user, activeLicenseV3 } = useAppContext();
const [completedChecklistItems, setCompletedChecklistItems] = useState<
ChecklistItem[]
@@ -79,19 +83,32 @@ function HomeChecklist({
{user?.role !== USER_ROLES.VIEWER && (
-
-
-
+
{item.docsLink && (
- {!item.isSkipped && (
+ {!item.isSkipped && item.isSkippable && (