mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 16:29:01 +08:00
fix: update logic to handle step paths in Kubernetes APM flow (#4297)
* fix: update logic to handle step paths in kubernetes APM flow * fix: don't reset service name on data source component mount
This commit is contained in:
parent
fbbe0bef86
commit
a268bb910c
@ -35,9 +35,7 @@ export default function DataSource(): JSX.Element {
|
||||
selectedFramework,
|
||||
updateSelectedDataSource,
|
||||
updateServiceName,
|
||||
updateSelectedEnvironment,
|
||||
updateSelectedFramework,
|
||||
updateErrorDetails,
|
||||
} = useOnboardingContext();
|
||||
|
||||
const [supportedDataSources, setSupportedDataSources] = useState<
|
||||
@ -55,11 +53,6 @@ export default function DataSource(): JSX.Element {
|
||||
|
||||
setSupportedDataSources(dataSource);
|
||||
}
|
||||
|
||||
updateSelectedEnvironment('');
|
||||
updateErrorDetails('');
|
||||
updateServiceName('');
|
||||
updateSelectedFramework('');
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
|
@ -3,7 +3,10 @@ import { MarkdownRenderer } from 'components/MarkdownRenderer/MarkdownRenderer';
|
||||
import { ApmDocFilePaths } from 'container/OnboardingContainer/constants/apmDocFilePaths';
|
||||
import { InfraMonitoringDocFilePaths } from 'container/OnboardingContainer/constants/infraMonitoringDocFilePaths';
|
||||
import { LogsManagementDocFilePaths } from 'container/OnboardingContainer/constants/logsManagementDocFilePaths';
|
||||
import { useOnboardingContext } from 'container/OnboardingContainer/context/OnboardingContext';
|
||||
import {
|
||||
OnboardingMethods,
|
||||
useOnboardingContext,
|
||||
} from 'container/OnboardingContainer/context/OnboardingContext';
|
||||
import { ModulesMap } from 'container/OnboardingContainer/OnboardingContainer';
|
||||
import useAnalytics from 'hooks/analytics/useAnalytics';
|
||||
import { useEffect, useState } from 'react';
|
||||
@ -42,13 +45,13 @@ export default function MarkdownStep(): JSX.Element {
|
||||
path += `_${selectedEnvironment}`;
|
||||
}
|
||||
|
||||
if (
|
||||
selectedModule?.id === ModulesMap.APM &&
|
||||
selectedDataSource?.id !== 'kubernetes' &&
|
||||
selectedMethod
|
||||
) {
|
||||
if (selectedModule?.id === ModulesMap.APM) {
|
||||
if (selectedEnvironment === 'kubernetes') {
|
||||
path += `_${OnboardingMethods.RECOMMENDED_STEPS}`;
|
||||
} else if (selectedEnvironment !== 'kubernetes' && selectedMethod) {
|
||||
path += `_${selectedMethod}`;
|
||||
}
|
||||
}
|
||||
|
||||
path += `_${step?.id}`;
|
||||
|
||||
|
@ -104,7 +104,7 @@ function OnboardingContextProvider({
|
||||
setSelectedDataSource(defaultApplicationDataSource);
|
||||
setSelectedEnvironment('');
|
||||
setSelectedFramework('');
|
||||
setSelectedMethod(OnboardingMethods.RECOMMENDED_STEPS);
|
||||
setSelectedMethod(OnboardingMethods.QUICK_START);
|
||||
updateActiveStep(null);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user