Skip to content

Commit

Permalink
Fix typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacqary committed Jun 30, 2020
1 parent bb53cf3 commit 18f7d2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions x-pack/plugins/infra/common/snapshot_metric_i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { i18n } from '@kbn/i18n';
import { SnapshotMetricType } from './inventory_models/types';

const Translations = {
CPUUsage: i18n.translate('xpack.infra.waffle.metricOptions.cpuUsageText', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ export const createInventoryMetricThresholdExecutor = (
if (nextState === AlertStates.ALERT) {
reason = results
.map((result) => {
if (!result[item]) return '';
const resultWithVerboseMetricName = {
...result[item],
metric: toMetricOpt(result[item].metric).text,
metric: toMetricOpt(result[item].metric)?.text as string,
};
return buildFiredAlertReason(resultWithVerboseMetricName);
})
Expand Down

0 comments on commit 18f7d2a

Please sign in to comment.