From ab671cffa466a69c51368245f47215671b7e26b5 Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau Date: Fri, 1 Apr 2022 21:44:30 -0400 Subject: [PATCH] review III --- .../alerting/server/lib/get_execution_log_aggregation.test.ts | 4 ---- .../alerting/server/lib/get_execution_log_aggregation.ts | 4 +--- .../application/sections/rule_details/components/rule.tsx | 1 - .../sections/rule_details/components/rule_error_log.tsx | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts index 365b759ed658c..80090effca9d1 100644 --- a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts +++ b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.test.ts @@ -248,8 +248,6 @@ describe('formatExecutionLogResult', () => { expect(formatExecutionLogResult({ aggregations: undefined })).toEqual({ total: 0, data: [], - errors: [], - totalErrors: 0, }); }); test('should return empty results if aggregations.excludeExecuteStart are undefined', () => { @@ -260,8 +258,6 @@ describe('formatExecutionLogResult', () => { ).toEqual({ total: 0, data: [], - errors: [], - totalErrors: 0, }); }); test('should format results correctly', () => { diff --git a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts index 991905aa0cbc7..fbe72508dab2b 100644 --- a/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts +++ b/x-pack/plugins/alerting/server/lib/get_execution_log_aggregation.ts @@ -34,9 +34,7 @@ const Millis2Nanos = 1000 * 1000; export const EMPTY_EXECUTION_LOG_RESULT = { total: 0, - totalErrors: 0, data: [], - errors: [], }; interface IAlertCounts extends estypes.AggregationsMultiBucketAggregateBase { @@ -299,7 +297,7 @@ function formatExecutionLogAggBucket(bucket: IExecutionUuidAggBucket): IExecutio export function formatExecutionLogResult( results: AggregateEventsBySavedObjectResult -): Pick { +): IExecutionLogResult { const { aggregations } = results; if (!aggregations || !aggregations.excludeExecuteStart) { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx index 64c6eeea67ef3..dca16e5acbf1b 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx @@ -12,7 +12,6 @@ import { EuiSpacer, EuiFlexGroup, EuiFlexItem, - EuiHorizontalRule, EuiPanel, EuiStat, EuiIconTip, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_error_log.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_error_log.tsx index ce22e31d9ec6b..e47c65ff4e3e9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_error_log.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_error_log.tsx @@ -227,7 +227,6 @@ export const RuleErrorLog = (props: RuleErrorLogProps) => { data-test-subj="RuleErrorLog" loading={isLoading} items={logList ?? []} - itemId="id" columns={columns} sorting={{ sort }} pagination={pagination}