Skip to content

Commit ab78050

Browse files
authored
[ML] Anomaly Explorer: Fix Anomalies Table pagination (#214714)
Includes a fix for #213424 and a follow up to #203224 (comment) * Rewrites anomalies_table in typescript * Decouples anomalies table state into an individual service * Fixes an issue where anomalies table pagination wouldn't reset to 0 after changing significant properties of the view, causing the table data to refetch
1 parent 415d672 commit ab78050

File tree

17 files changed

+798
-507
lines changed

17 files changed

+798
-507
lines changed

x-pack/platform/plugins/shared/ml/common/types/results.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@
88
import type { estypes } from '@elastic/elasticsearch';
99
import type { LineAnnotationDatum, RectAnnotationDatum } from '@elastic/charts';
1010
import type { ErrorType } from '@kbn/ml-error-utils';
11-
import type { ES_AGGREGATION, ML_JOB_AGGREGATION } from '@kbn/ml-anomaly-utils';
11+
import type {
12+
ES_AGGREGATION,
13+
ML_JOB_AGGREGATION,
14+
MlAnomaliesTableRecord,
15+
} from '@kbn/ml-anomaly-utils';
1216
import { type MlEntityField, type MlRecordForInfluencer } from '@kbn/ml-anomaly-utils';
1317
import type { Datafeed, JobId, ModelSnapshot } from './anomaly_detection_jobs';
1418

19+
export interface GetAnomaliesTableDataResult {
20+
anomalies: MlAnomaliesTableRecord[];
21+
interval: string;
22+
examplesByJobId?: Record<string, Record<string, string[]>>;
23+
}
1524
export interface GetStoppedPartitionResult {
1625
jobs: string[] | Record<string, string[]>;
1726
}

x-pack/platform/plugins/shared/ml/public/application/components/anomalies_table/anomalies_table.js

Lines changed: 0 additions & 292 deletions
This file was deleted.

0 commit comments

Comments
 (0)