Skip to content

Commit

Permalink
[SIEM][Detections] Fixes text layout in Schedule step (#71306)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Jul 13, 2020
1 parent 3fc8c7a commit cd2d1b8
Showing 1 changed file with 19 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -25,10 +24,6 @@ interface StepScheduleRuleProps extends RuleStepProps {
defaultValues?: ScheduleStepRule | null;
}

const RestrictedWidthContainer = styled.div`
max-width: 300px;
`;

const stepScheduleDefaultValue = {
interval: '5m',
isNew: true,
Expand Down Expand Up @@ -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>

Expand Down

0 comments on commit cd2d1b8

Please sign in to comment.