diff --git a/frontend/app/components/Alerts/AlertForm.js b/frontend/app/components/Alerts/AlertForm.js index 4003b4864..f4b9362c7 100644 --- a/frontend/app/components/Alerts/AlertForm.js +++ b/frontend/app/components/Alerts/AlertForm.js @@ -47,7 +47,7 @@ const Section = ({ index, title, description, content }) => ( const integrationsRoute = client(CLIENT_TABS.INTEGRATIONS); const AlertForm = props => { - const { instance, slackChannels, webhooks, loading, onDelete, deleting, triggerOptions, metricId } = props; + const { instance, slackChannels, webhooks, loading, onDelete, deleting, triggerOptions, metricId, style={ width: '580px', height: '100vh' } } = props; const write = ({ target: { value, name } }) => props.edit({ [ name ]: value }) const writeOption = (e, { name, value }) => props.edit({ [ name ]: value }); const onChangeOption = (e, { checked, name }) => props.edit({ [ name ]: checked }) @@ -71,7 +71,7 @@ const AlertForm = props => { const isThreshold = instance.detectionMethod === 'threshold'; return ( -
props.onSubmit(instance)} id="alert-form"> + props.onSubmit(instance)} id="alert-form">
void; + onClose?: () => void; + webhooks: any; + fetchWebhooks: Function; + save: Function; + remove: Function; + init: Function; + edit: Function; } -function AlertFormModal(props) { - const { metricId = null, showModal = false, webhooks, setShowAlerts } = props; +function AlertFormModal(props: Props) { + const { metricId = null, showModal = false, webhooks } = props; const [showForm, setShowForm] = useState(false); useEffect(() => { @@ -30,6 +36,9 @@ function AlertFormModal(props) { if (!wasUpdating) { toggleForm(null, false); } + if (props.onClose) { + props.onClose(); + } }) } @@ -79,6 +88,7 @@ function AlertFormModal(props) { onSubmit={saveAlert} onClose={props.onClose} onDelete={onDelete} + style={{ width: '580px', height: '100vh - 200px' }} /> } /> diff --git a/frontend/app/components/Alerts/alertForm.css b/frontend/app/components/Alerts/alertForm.css index e9eff4af3..9e41ffd94 100644 --- a/frontend/app/components/Alerts/alertForm.css +++ b/frontend/app/components/Alerts/alertForm.css @@ -1,5 +1,4 @@ .wrapper { - height: 100vh; position: relative; }