mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
fix(slo): burn rate lookback window component (#166118)
This commit is contained in:
parent
6754699eed
commit
57f103613f
1 changed files with 14 additions and 18 deletions
|
@ -5,12 +5,12 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { EuiFieldNumber, EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiIconTip } from '@elastic/eui';
|
import { EuiFieldNumber, EuiFormRow, EuiIconTip } from '@elastic/eui';
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
import React, { ChangeEvent, useState } from 'react';
|
import React, { ChangeEvent, useState } from 'react';
|
||||||
|
|
||||||
import { toMinutes } from '../../utils/slo/duration';
|
|
||||||
import { Duration } from '../../typings';
|
import { Duration } from '../../typings';
|
||||||
|
import { toMinutes } from '../../utils/slo/duration';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
shortWindowDuration: Duration;
|
shortWindowDuration: Duration;
|
||||||
|
@ -36,22 +36,18 @@ export function LongWindowDuration({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFormRow label={getRowLabel(shortWindowDuration)} fullWidth isInvalid={hasError}>
|
<EuiFormRow label={getRowLabel(shortWindowDuration)} fullWidth isInvalid={hasError}>
|
||||||
<EuiFlexGroup direction="row">
|
<EuiFieldNumber
|
||||||
<EuiFlexItem>
|
isInvalid={hasError}
|
||||||
<EuiFieldNumber
|
min={1}
|
||||||
isInvalid={hasError}
|
max={72}
|
||||||
min={1}
|
step={1}
|
||||||
max={72}
|
value={String(durationValue)}
|
||||||
step={1}
|
onChange={onDurationValueChange}
|
||||||
value={String(durationValue)}
|
aria-label={i18n.translate('xpack.observability.slo.rules.longWindow.valueLabel', {
|
||||||
onChange={onDurationValueChange}
|
defaultMessage: 'Lookback period in hours',
|
||||||
aria-label={i18n.translate('xpack.observability.slo.rules.longWindow.valueLabel', {
|
})}
|
||||||
defaultMessage: 'Lookback period in hours',
|
data-test-subj="durationValueInput"
|
||||||
})}
|
/>
|
||||||
data-test-subj="durationValueInput"
|
|
||||||
/>
|
|
||||||
</EuiFlexItem>
|
|
||||||
</EuiFlexGroup>
|
|
||||||
</EuiFormRow>
|
</EuiFormRow>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue