Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Address Yaliang's comment, and change height of live chart to 400px i…
Browse files Browse the repository at this point in the history
…f full screen
  • Loading branch information
yizheliu-amazon committed Apr 28, 2020
1 parent ef7719d commit beab5a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
9 changes: 3 additions & 6 deletions public/pages/Dashboard/Components/AnomaliesLiveChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const AnomaliesLiveChart = (props: AnomaliesLiveChartProps) => {
continue;
}
result.push({
[AD_DOC_FIELDS.DETECTOR_NAME]: null,
[AD_DOC_FIELDS.DETECTOR_NAME]: !isEmpty(liveAnomalyData) ? '' : null,
[AD_DOC_FIELDS.PLOT_TIME]: currentTime,
[AD_DOC_FIELDS.ANOMALY_GRADE]: null,
});
Expand Down Expand Up @@ -303,7 +303,7 @@ export const AnomaliesLiveChart = (props: AnomaliesLiveChartProps) => {
) : null,
<div
style={{
height: '200px',
height: isFullScreen ? '400px' : '200px',
width: '100%',
opacity: 1,
}}
Expand Down Expand Up @@ -337,10 +337,7 @@ export const AnomaliesLiveChart = (props: AnomaliesLiveChartProps) => {
domain={{ min: 0, max: 1 }}
/>
<BarSeries
// `id` for placeholder data point introduced by `prepareVisualizedAnomalies` shows as legend,
// When there exists anomalies with anomaly grade > 0
// we make `id` to blank string to hide the legend of placeholder data point
id={!isEmpty(liveAnomalyData) ? '' : ' '}
id={'Detector Anomaly grade'}
xScaleType={ScaleType.Time}
timeZone="local"
yScaleType="linear"
Expand Down
7 changes: 1 addition & 6 deletions public/pages/Dashboard/Container/DashboardOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { DetectorListItem } from '../../../models/interfaces';
import { getIndices, getAliases } from '../../../redux/reducers/elasticsearch';
import { getDetectorList } from '../../../redux/reducers/ad';
import {
EuiButton,
EuiFlexGroup,
EuiFlexItem,
EuiComboBox,
Expand All @@ -40,11 +39,7 @@ import {
import { AppState } from '../../../redux/reducers';
import { CatIndex, IndexAlias } from '../../../../server/models/types';
import { getVisibleOptions } from '../../utils/helpers';
import {
DETECTOR_STATE,
PLUGIN_NAME,
APP_PATH,
} from '../../../utils/constants';
import { DETECTOR_STATE } from '../../../utils/constants';
import { getDetectorStateOptions } from '../../DetectorsList/utils/helpers';

export function DashboardOverview() {
Expand Down

0 comments on commit beab5a4

Please sign in to comment.