Skip to content

Commit a426e41

Browse files
authored
Fix description on overview page (opensearch-project#850)
Signed-off-by: Miki <miki@amazon.com>
1 parent 07908a0 commit a426e41

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

public/pages/Overview/containers/AnomalyDetectionOverview.tsx

+14-15
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import { RouteComponentProps } from 'react-router-dom';
7070
import queryString from 'querystring';
7171
import { getDataSourceFromURL, getSampleDetectorsQueryParamsWithDataSouceId, isDataSourceCompatible } from '../../../../public/pages/utils/helpers';
7272
import { MDSStates } from '../../../models/interfaces';
73-
import { TopNavControlButtonData } from '../../../../../../src/plugins/navigation/public';
73+
import { TopNavControlButtonData, TopNavControlLinkData } from '../../../../../../src/plugins/navigation/public';
7474

7575
interface AnomalyDetectionOverviewProps extends RouteComponentProps {
7676
setActionMenu: (menuMount: MountPoint | undefined) => void;
@@ -108,8 +108,8 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {
108108
const queryParams = getDataSourceFromURL(props.location);
109109
const [MDSOverviewState, setMDSOverviewState] = useState<MDSStates>({
110110
queryParams,
111-
selectedDataSourceId: queryParams.dataSourceId === undefined
112-
? undefined
111+
selectedDataSourceId: queryParams.dataSourceId === undefined
112+
? undefined
113113
: queryParams.dataSourceId,
114114
});
115115

@@ -149,7 +149,7 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {
149149
...location,
150150
search: queryString.stringify(updatedParams),
151151
});
152-
}
152+
}
153153
fetchData();
154154
}, [MDSOverviewState]);
155155

@@ -275,7 +275,7 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {
275275
componentType={'DataSourceSelectable'}
276276
componentConfig={{
277277
fullWidth: false,
278-
activeOption: props.landingDataSourceId === undefined
278+
activeOption: props.landingDataSourceId === undefined
279279
|| MDSOverviewState.selectedDataSourceId === undefined
280280
? undefined
281281
: [{ id: MDSOverviewState.selectedDataSourceId }],
@@ -292,15 +292,14 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {
292292

293293
const descriptionData = [
294294
{
295-
renderComponent: (
296-
<EuiText>
297-
The anomaly detection plugin automatically detects anomalies in your
298-
data in near real-time using the Random Cut Forest (RCF) algorithm.{' '}
299-
<EuiLink href={`${BASE_DOCS_LINK}/ad`} target="_blank">
300-
Learn more
301-
</EuiLink>
302-
</EuiText>
303-
),
295+
description: 'The anomaly detection plugin automatically detects anomalies in your data in near real-time using the Random Cut Forest (RCF) algorithm.',
296+
links: {
297+
label: 'Learn more',
298+
target: '_blank',
299+
flush: 'both',
300+
href: `${BASE_DOCS_LINK}/ad`,
301+
controlType: 'link',
302+
} as TopNavControlLinkData,
304303
},
305304
];
306305
let renderPageHeader = () => {
@@ -364,7 +363,7 @@ export function AnomalyDetectionOverview(props: AnomalyDetectionOverviewProps) {
364363
<Fragment>
365364
{dataSourceEnabled && renderDataSourceComponent}
366365
{renderPageHeader()}
367-
366+
368367
<EuiSpacer size="xl" />
369368
<ContentPanel title="How it works">
370369
<EuiFlexGroup>

0 commit comments

Comments
 (0)