Skip to content

Commit

Permalink
no jobs selected callout in smv
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Jan 28, 2022
1 parent 0500236 commit eea4506
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ import { aggregationTypeTransform } from '../../../common/util/anomaly_utils';
import { isMetricDetector } from './get_function_description';
import { getViewableDetectors } from './timeseriesexplorer_utils/get_viewable_detectors';
import { TimeseriesexplorerChartDataError } from './components/timeseriesexplorer_chart_data_error';
import { ExplorerNoJobsSelected } from '../explorer/components';

// Used to indicate the chart is being plotted across
// all partition field values, where the cardinality of the field cannot be
Expand Down Expand Up @@ -974,7 +975,11 @@ export class TimeSeriesExplorer extends React.Component {
const jobs = createTimeSeriesJobData(mlJobService.jobs);

if (selectedDetectorIndex === undefined || mlJobService.getJob(selectedJobId) === undefined) {
return <TimeSeriesExplorerPage dateFormatTz={dateFormatTz} resizeRef={this.resizeRef} />;
return (
<TimeSeriesExplorerPage dateFormatTz={dateFormatTz} resizeRef={this.resizeRef}>
<ExplorerNoJobsSelected />
</TimeSeriesExplorerPage>
);
}

const selectedJob = mlJobService.getJob(selectedJobId);
Expand Down

0 comments on commit eea4506

Please sign in to comment.