@@ -86,14 +86,9 @@ import { ManageLicenseModal } from './manage_license_modal';
86
86
import { checkAlertTypeEnabled } from '../../../lib/check_alert_type_enabled' ;
87
87
import { RuleEnabledSwitch } from './rule_enabled_switch' ;
88
88
import { PercentileSelectablePopover } from './percentile_selectable_popover' ;
89
- import {
90
- formatMillisForDisplay ,
91
- shouldShowDurationWarning ,
92
- } from '../../../lib/execution_duration_utils' ;
93
- import {
94
- getFormattedSuccessRatio ,
95
- getFormattedRuleExecutionPercentile ,
96
- } from '../../../lib/monitoring_utils' ;
89
+ import { RuleDurationFormat } from './rule_duration_format' ;
90
+ import { shouldShowDurationWarning } from '../../../lib/execution_duration_utils' ;
91
+ import { getFormattedSuccessRatio } from '../../../lib/monitoring_utils' ;
97
92
98
93
const ENTER_KEY = 13 ;
99
94
@@ -396,7 +391,7 @@ export const AlertsList: React.FunctionComponent = () => {
396
391
content = { i18n . translate (
397
392
'xpack.triggersActionsUI.sections.alertsList.alertsListTable.columns.ruleExecutionPercentileTooltip' ,
398
393
{
399
- defaultMessage : `{percentileOrdinal} percentile of this rule's past {sampleLimit} execution durations` ,
394
+ defaultMessage : `{percentileOrdinal} percentile of this rule's past {sampleLimit} execution durations (mm:ss). ` ,
400
395
values : {
401
396
percentileOrdinal : percentileOrdinals [ selectedPercentile ! ] ,
402
397
sampleLimit : MONITORING_HISTORY_LIMIT ,
@@ -420,7 +415,7 @@ export const AlertsList: React.FunctionComponent = () => {
420
415
const renderPercentileCellValue = ( value : number ) => {
421
416
return (
422
417
< span data-test-subj = { `${ selectedPercentile } Percentile` } >
423
- { typeof value === 'number' ? getFormattedRuleExecutionPercentile ( value ) : 'N/A' }
418
+ < RuleDurationFormat allowZero = { false } duration = { value } />
424
419
</ span >
425
420
) ;
426
421
} ;
@@ -630,7 +625,7 @@ export const AlertsList: React.FunctionComponent = () => {
630
625
content = { i18n . translate (
631
626
'xpack.triggersActionsUI.sections.alertsList.alertsListTable.columns.durationTitle' ,
632
627
{
633
- defaultMessage : 'The length of time it took for the rule to run.' ,
628
+ defaultMessage : 'The length of time it took for the rule to run (mm:ss) .' ,
634
629
}
635
630
) }
636
631
>
@@ -651,7 +646,7 @@ export const AlertsList: React.FunctionComponent = () => {
651
646
652
647
return (
653
648
< >
654
- { ` ${ formatMillisForDisplay ( value ) } ` }
649
+ { < RuleDurationFormat duration = { value } /> }
655
650
{ showDurationWarning && (
656
651
< EuiIconTip
657
652
data-test-subj = "ruleDurationWarning"
@@ -671,6 +666,7 @@ export const AlertsList: React.FunctionComponent = () => {
671
666
) ;
672
667
} ,
673
668
} ,
669
+ getPercentileColumn ( ) ,
674
670
{
675
671
field : 'monitoring.execution.calculated_metrics.success_ratio' ,
676
672
width : '12%' ,
@@ -680,7 +676,7 @@ export const AlertsList: React.FunctionComponent = () => {
680
676
content = { i18n . translate (
681
677
'xpack.triggersActionsUI.sections.alertsList.alertsListTable.columns.successRatioTitle' ,
682
678
{
683
- defaultMessage : 'How often this rule executes successfully' ,
679
+ defaultMessage : 'How often this rule executes successfully. ' ,
684
680
}
685
681
) }
686
682
>
@@ -701,7 +697,6 @@ export const AlertsList: React.FunctionComponent = () => {
701
697
) ;
702
698
} ,
703
699
} ,
704
- getPercentileColumn ( ) ,
705
700
{
706
701
field : 'executionStatus.status' ,
707
702
name : i18n . translate (
0 commit comments