Skip to content

Commit

Permalink
Fix description on overview page (#850)
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
(cherry picked from commit a426e41)
  • Loading branch information
AMoo-Miki authored and github-actions[bot] committed Aug 26, 2024
1 parent 310e60c commit 8b829b3
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions public/pages/Overview/containers/AnomalyDetectionOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import { RouteComponentProps } from 'react-router-dom';
import queryString from 'querystring';
import { getDataSourceFromURL, getSampleDetectorsQueryParamsWithDataSouceId, isDataSourceCompatible } from '../../../../public/pages/utils/helpers';
import { MDSStates } from '../../../models/interfaces';
import { TopNavControlButtonData } from '../../../../../../src/plugins/navigation/public';
import { TopNavControlButtonData, TopNavControlLinkData } from '../../../../../../src/plugins/navigation/public';

interface AnomalyDetectionOverviewProps extends RouteComponentProps {
setActionMenu: (menuMount: MountPoint | undefined) => void;
Expand Down Expand Up @@ -108,8 +108,8 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {
const queryParams = getDataSourceFromURL(props.location);
const [MDSOverviewState, setMDSOverviewState] = useState<MDSStates>({
queryParams,
selectedDataSourceId: queryParams.dataSourceId === undefined
? undefined
selectedDataSourceId: queryParams.dataSourceId === undefined
? undefined
: queryParams.dataSourceId,
});

Expand Down Expand Up @@ -149,7 +149,7 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {
...location,
search: queryString.stringify(updatedParams),
});
}
}
fetchData();
}, [MDSOverviewState]);

Expand Down Expand Up @@ -275,7 +275,7 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {
componentType={'DataSourceSelectable'}
componentConfig={{
fullWidth: false,
activeOption: props.landingDataSourceId === undefined
activeOption: props.landingDataSourceId === undefined
|| MDSOverviewState.selectedDataSourceId === undefined
? undefined
: [{ id: MDSOverviewState.selectedDataSourceId }],
Expand All @@ -292,15 +292,14 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {

const descriptionData = [
{
renderComponent: (
<EuiText>
The anomaly detection plugin automatically detects anomalies in your
data in near real-time using the Random Cut Forest (RCF) algorithm.{' '}
<EuiLink href={`${BASE_DOCS_LINK}/ad`} target="_blank">
Learn more
</EuiLink>
</EuiText>
),
description: 'The anomaly detection plugin automatically detects anomalies in your data in near real-time using the Random Cut Forest (RCF) algorithm.',
links: {
label: 'Learn more',
target: '_blank',
flush: 'both',
href: `${BASE_DOCS_LINK}/ad`,
controlType: 'link',
} as TopNavControlLinkData,
},
];
let renderPageHeader = () => {
Expand Down Expand Up @@ -364,7 +363,7 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {
<Fragment>
{dataSourceEnabled && renderDataSourceComponent}
{renderPageHeader()}

<EuiSpacer size="xl" />
<ContentPanel title="How it works">
<EuiFlexGroup>
Expand Down

0 comments on commit 8b829b3

Please sign in to comment.