[SIEM][Detections] Fixes text layout in Schedule step (#71306)

* fixes text layout in schedule step

* Removes unused import

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
MadameSheema 2020-07-13 13:00:44 +02:00 committed by GitHub
parent 3fc8c7af25
commit cd2d1b8053
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,6 @@
import React, { FC, memo, useCallback, useEffect, useState } from 'react';
import deepEqual from 'fast-deep-equal';
import styled from 'styled-components';
import { setFieldValue } from '../../../pages/detection_engine/rules/helpers';
import {
@ -25,10 +24,6 @@ interface StepScheduleRuleProps extends RuleStepProps {
defaultValues?: ScheduleStepRule | null;
}
const RestrictedWidthContainer = styled.div`
max-width: 300px;
`;
const stepScheduleDefaultValue = {
interval: '5m',
isNew: true,
@ -93,29 +88,25 @@ const StepScheduleRuleComponent: FC<StepScheduleRuleProps> = ({
<>
<StepContentWrapper addPadding={!isUpdateView}>
<Form form={form} data-test-subj="stepScheduleRule">
<RestrictedWidthContainer>
<UseField
path="interval"
component={ScheduleItem}
componentProps={{
idAria: 'detectionEngineStepScheduleRuleInterval',
isDisabled: isLoading,
dataTestSubj: 'detectionEngineStepScheduleRuleInterval',
}}
/>
</RestrictedWidthContainer>
<RestrictedWidthContainer>
<UseField
path="from"
component={ScheduleItem}
componentProps={{
idAria: 'detectionEngineStepScheduleRuleFrom',
isDisabled: isLoading,
dataTestSubj: 'detectionEngineStepScheduleRuleFrom',
minimumValue: 1,
}}
/>
</RestrictedWidthContainer>
<UseField
path="interval"
component={ScheduleItem}
componentProps={{
idAria: 'detectionEngineStepScheduleRuleInterval',
isDisabled: isLoading,
dataTestSubj: 'detectionEngineStepScheduleRuleInterval',
}}
/>
<UseField
path="from"
component={ScheduleItem}
componentProps={{
idAria: 'detectionEngineStepScheduleRuleFrom',
isDisabled: isLoading,
dataTestSubj: 'detectionEngineStepScheduleRuleFrom',
minimumValue: 1,
}}
/>
</Form>
</StepContentWrapper>