diff --git a/public/components/Comments/AlertCommentsFlyout.tsx b/public/components/Comments/AlertCommentsFlyout.tsx index f112c4c49..d7e677cf4 100644 --- a/public/components/Comments/AlertCommentsFlyout.tsx +++ b/public/components/Comments/AlertCommentsFlyout.tsx @@ -5,17 +5,17 @@ import React, { useCallback, useEffect, useState } from "react"; import { Comment } from "../../models/Comments"; -import { - EuiFlyout, - EuiFlyoutHeader, - EuiFlyoutBody, - EuiCommentList, - EuiText, - EuiButtonIcon, - EuiContextMenuItem, +import { + EuiFlyout, + EuiFlyoutHeader, + EuiFlyoutBody, + EuiCommentList, + EuiText, + EuiButtonIcon, + EuiContextMenuItem, EuiContextMenuPanel, - EuiPopover, - EuiTitle, + EuiPopover, + EuiTitle, EuiSpacer, EuiCallOut, EuiLink @@ -77,7 +77,7 @@ export const AlertCommentsFlyout: React.FC = ({ alertI const createComment = async () => { setCreatePending(true); - await httpClient.post(`../api/alerting/comments/${alertId}`, { body: JSON.stringify({ + await httpClient.post(`../api/alerting/comments/${alertId}`, { body: JSON.stringify({ content: draftCommentContent })}); @@ -150,7 +150,7 @@ export const AlertCommentsFlyout: React.FC = ({ alertI onCancel={() => onEditCancel(comment, idx)} /> ); - + const customActions = comment.state === 'readonly' && ( = ({ alertI /> ); - + return { username: comment.user || 'Unknown', event: `${comment.last_updated_time ? 'edited' : 'added'} comment on`, @@ -204,12 +204,12 @@ export const AlertCommentsFlyout: React.FC = ({ alertI - - The feature is experimental and should not be used in a production environment. + The feature is experimental and should not be used in a production environment. The posted comments will be impacted if the feature is deactivated. - For more information see Documentation. + For more information see Documentation. To leave feedback, visit github.com. @@ -236,4 +236,4 @@ export const AlertCommentsFlyout: React.FC = ({ alertI ) -} \ No newline at end of file +} diff --git a/public/components/Comments/CommentEditor.tsx b/public/components/Comments/CommentEditor.tsx index 1b6a00e05..0684f29ab 100644 --- a/public/components/Comments/CommentEditor.tsx +++ b/public/components/Comments/CommentEditor.tsx @@ -4,10 +4,10 @@ */ import React from "react"; -import { - EuiFlexGroup, - EuiFlexItem, - EuiButton +import { + EuiFlexGroup, + EuiFlexItem, + EuiSmallButton } from "@elastic/eui"; export interface CommentEditorProps { @@ -19,13 +19,13 @@ export interface CommentEditorProps { onContentChange: React.ChangeEventHandler; } -export const CommentEditor: React.FC = ({ - isLoading, +export const CommentEditor: React.FC = ({ + isLoading, draftCommentContent, saveDisabled, - onSave, + onSave, onCancel, - onContentChange, + onContentChange, }) => ( @@ -35,17 +35,17 @@ export const CommentEditor: React.FC = ({ {onCancel && ( - + Cancel - + )} - + Save - + -) \ No newline at end of file +) diff --git a/public/components/Comments/ShowAlertComments.tsx b/public/components/Comments/ShowAlertComments.tsx index 7b2b55dc1..340b6f471 100644 --- a/public/components/Comments/ShowAlertComments.tsx +++ b/public/components/Comments/ShowAlertComments.tsx @@ -5,7 +5,7 @@ import React, { useCallback, useEffect, useState } from "react"; import { Comment } from "../../models/Comments"; -import { EuiButtonIcon, EuiToolTip } from "@elastic/eui"; +import { EuiSmallButtonIcon, EuiToolTip } from "@elastic/eui"; import { AlertCommentsFlyout } from "./AlertCommentsFlyout"; export interface ShowAlertCommentsProps { @@ -15,19 +15,19 @@ export interface ShowAlertCommentsProps { export const ShowAlertComments: React.FC = ({ alert, httpClient }) => { const [commentsFlyout, setCommentsFlyout] = useState(null); - - const showCommentsFlyout = useCallback(() => { + + const showCommentsFlyout = useCallback(() => { setCommentsFlyout( setCommentsFlyout(null)} + closeFlyout={() => setCommentsFlyout(null)} />); }, [setCommentsFlyout]); return ( <> - = ({ alert, htt {commentsFlyout} ) -} \ No newline at end of file +} diff --git a/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/AddAlertingMonitor.tsx b/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/AddAlertingMonitor.tsx index d8e4f734f..8d3341b3f 100644 --- a/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/AddAlertingMonitor.tsx +++ b/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/AddAlertingMonitor.tsx @@ -12,8 +12,8 @@ import { EuiFlyoutFooter, EuiTitle, EuiSpacer, - EuiButton, - EuiButtonEmpty, + EuiSmallButton, + EuiSmallButtonEmpty, EuiFormFieldset, EuiCheckableCard, EuiText @@ -225,17 +225,17 @@ function AddAlertingMonitor({ - Cancel + Cancel - onSubmit({ handleSubmit, validateForm })} fill isLoading={isLoading} disabled={!isAssociateAllowed} > {flyoutMode === 'existing' ? 'Associate' : 'Create'} monitor - + diff --git a/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/AssociateExisting/AssociateExisting.js b/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/AssociateExisting/AssociateExisting.js index b05c2cf14..1fa3b2dcd 100644 --- a/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/AssociateExisting/AssociateExisting.js +++ b/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/AssociateExisting/AssociateExisting.js @@ -9,7 +9,7 @@ import { EuiSpacer, EuiIcon, EuiText, - EuiComboBox, + EuiCompressedComboBox, EuiLoadingSpinner, EuiLink, EuiFlexGroup, @@ -94,7 +94,7 @@ function AssociateExisting({ monitors, selectedMonitorId, setSelectedMonitorId } {!monitors && } {monitors && ( - - setIsShowVis(!isShowVis)} diff --git a/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/CreateNew/__snapshots__/CreateNew.test.js.snap b/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/CreateNew/__snapshots__/CreateNew.test.js.snap index 9488e4705..4e68c404a 100644 --- a/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/CreateNew/__snapshots__/CreateNew.test.js.snap +++ b/public/components/FeatureAnywhereContextMenu/AddAlertingMonitor/CreateNew/__snapshots__/CreateNew.test.js.snap @@ -36,7 +36,7 @@ exports[`CreateNew renders 1`] = ` /> - - setFlyoutMode('existing')}> + setFlyoutMode('existing')}> Associate a monitor - + diff --git a/public/components/FeatureAnywhereContextMenu/AssociatedMonitors/ConfirmUnlinkModal.js b/public/components/FeatureAnywhereContextMenu/AssociatedMonitors/ConfirmUnlinkModal.js index 63ed4af5f..7ecc36e77 100644 --- a/public/components/FeatureAnywhereContextMenu/AssociatedMonitors/ConfirmUnlinkModal.js +++ b/public/components/FeatureAnywhereContextMenu/AssociatedMonitors/ConfirmUnlinkModal.js @@ -5,8 +5,8 @@ import React, { useState } from 'react'; import { - EuiButton, - EuiButtonEmpty, + EuiSmallButton, + EuiSmallButtonEmpty, EuiModal, EuiModalBody, EuiModalFooter, @@ -35,11 +35,11 @@ export const ConfirmUnlinkDetectorModal = (props) => { {isLoading ? null : ( - + Cancel - + )} - { }} > {'Remove association'} - + diff --git a/public/components/FeatureAnywhereContextMenu/AssociatedMonitors/__snapshots__/AssociatedMonitors.test.js.snap b/public/components/FeatureAnywhereContextMenu/AssociatedMonitors/__snapshots__/AssociatedMonitors.test.js.snap index d32070857..4ce977175 100644 --- a/public/components/FeatureAnywhereContextMenu/AssociatedMonitors/__snapshots__/AssociatedMonitors.test.js.snap +++ b/public/components/FeatureAnywhereContextMenu/AssociatedMonitors/__snapshots__/AssociatedMonitors.test.js.snap @@ -33,14 +33,14 @@ exports[`AssociatedMonitors renders 1`] = ` - Associate a monitor - + (
- )} {isButton && ( - Add trigger - + )}
diff --git a/public/components/FeatureAnywhereContextMenu/EnhancedAccordion/__snapshots__/EnhancedAccordion.test.js.snap b/public/components/FeatureAnywhereContextMenu/EnhancedAccordion/__snapshots__/EnhancedAccordion.test.js.snap index 73335a69b..324631833 100644 --- a/public/components/FeatureAnywhereContextMenu/EnhancedAccordion/__snapshots__/EnhancedAccordion.test.js.snap +++ b/public/components/FeatureAnywhereContextMenu/EnhancedAccordion/__snapshots__/EnhancedAccordion.test.js.snap @@ -7,7 +7,7 @@ exports[`EnhancedAccordion renders 1`] = `
- - { @@ -29,7 +29,7 @@ const alertsDashboard = (payload) => { - ( - { const actions = [ - Acknowledge - , + , ]; if (!_.isEmpty(detectorId)) { actions.unshift( - View detector - + ); } return actions; diff --git a/public/components/Flyout/flyouts/components/__snapshots__/AlertsDashboardFlyoutComponent.test.js.snap b/public/components/Flyout/flyouts/components/__snapshots__/AlertsDashboardFlyoutComponent.test.js.snap index 95cfb576a..539f38a99 100644 --- a/public/components/Flyout/flyouts/components/__snapshots__/AlertsDashboardFlyoutComponent.test.js.snap +++ b/public/components/Flyout/flyouts/components/__snapshots__/AlertsDashboardFlyoutComponent.test.js.snap @@ -177,13 +177,13 @@ exports[`AlertsDashboardFlyoutComponent renders 1`] = ` Acknowledge - , + , ] } bodyStyles={ diff --git a/public/components/Flyout/flyouts/dataSources.js b/public/components/Flyout/flyouts/dataSources.js index 424687506..d3e97ae29 100644 --- a/public/components/Flyout/flyouts/dataSources.js +++ b/public/components/Flyout/flyouts/dataSources.js @@ -4,7 +4,13 @@ */ import React from 'react'; -import { EuiBasicTable, EuiFlexGroup, EuiButtonIcon, EuiTitle, EuiFlexItem } from '@elastic/eui'; +import { + EuiBasicTable, + EuiFlexGroup, + EuiSmallButtonIcon, + EuiTitle, + EuiFlexItem, +} from '@elastic/eui'; import { MONITOR_TYPE } from '../../../utils/constants'; export const DATA_SOURCES_FLYOUT_TYPE = 'dataSources'; @@ -76,7 +82,7 @@ const dataSources = ({ - ( - + ); FormikCheckbox.propTypes = { diff --git a/public/components/FormControls/FormikCheckbox/__snapshots__/FormikCheckbox.test.js.snap b/public/components/FormControls/FormikCheckbox/__snapshots__/FormikCheckbox.test.js.snap index a48e1f71d..656cf8241 100644 --- a/public/components/FormControls/FormikCheckbox/__snapshots__/FormikCheckbox.test.js.snap +++ b/public/components/FormControls/FormikCheckbox/__snapshots__/FormikCheckbox.test.js.snap @@ -2,7 +2,7 @@ exports[`FormikCheckbox render 1`] = `
( - ( - diff --git a/public/components/FormControls/FormikFieldNumber/__snapshots__/FormikFieldNumber.test.js.snap b/public/components/FormControls/FormikFieldNumber/__snapshots__/FormikFieldNumber.test.js.snap index 94e93e189..bdb723abe 100644 --- a/public/components/FormControls/FormikFieldNumber/__snapshots__/FormikFieldNumber.test.js.snap +++ b/public/components/FormControls/FormikFieldNumber/__snapshots__/FormikFieldNumber.test.js.snap @@ -2,13 +2,13 @@ exports[`FormikFieldNumber renders 1`] = `
diff --git a/public/components/FormControls/FormikFieldPassword/FormikFieldPassword.js b/public/components/FormControls/FormikFieldPassword/FormikFieldPassword.js index 9f25f2eb1..bd5f79f82 100644 --- a/public/components/FormControls/FormikFieldPassword/FormikFieldPassword.js +++ b/public/components/FormControls/FormikFieldPassword/FormikFieldPassword.js @@ -5,7 +5,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { EuiFieldPassword } from '@elastic/eui'; +import { EuiCompressedFieldPassword } from '@elastic/eui'; import FormikInputWrapper from '../FormikInputWrapper'; import FormikFormRow from '../FormikFormRow'; @@ -38,7 +38,7 @@ const FieldPassword = ({ field, inputProps: { onChange, isInvalid, onFocus, ...rest }, }) => ( - diff --git a/public/components/FormControls/FormikFieldPassword/__snapshots__/FormikFieldPassword.test.js.snap b/public/components/FormControls/FormikFieldPassword/__snapshots__/FormikFieldPassword.test.js.snap index 1a14c7612..aaa527916 100644 --- a/public/components/FormControls/FormikFieldPassword/__snapshots__/FormikFieldPassword.test.js.snap +++ b/public/components/FormControls/FormikFieldPassword/__snapshots__/FormikFieldPassword.test.js.snap @@ -2,13 +2,13 @@ exports[`FormikFieldPassword renders 1`] = `
( - diff --git a/public/components/FormControls/FormikFieldText/FormikFieldText.js b/public/components/FormControls/FormikFieldText/FormikFieldText.js index 32a2fb5f4..0ef96ce97 100644 --- a/public/components/FormControls/FormikFieldText/FormikFieldText.js +++ b/public/components/FormControls/FormikFieldText/FormikFieldText.js @@ -5,7 +5,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { EuiFieldText } from '@elastic/eui'; +import { EuiCompressedFieldText } from '@elastic/eui'; import FormikInputWrapper from '../FormikInputWrapper'; import FormikFormRow from '../FormikFormRow'; @@ -38,7 +38,7 @@ const FieldText = ({ field, inputProps: { onChange, isInvalid, onFocus, ...rest }, }) => ( - diff --git a/public/components/FormControls/FormikFieldText/__snapshots__/FormikFieldText.test.js.snap b/public/components/FormControls/FormikFieldText/__snapshots__/FormikFieldText.test.js.snap index 26362cffe..c9266c991 100644 --- a/public/components/FormControls/FormikFieldText/__snapshots__/FormikFieldText.test.js.snap +++ b/public/components/FormControls/FormikFieldText/__snapshots__/FormikFieldText.test.js.snap @@ -2,13 +2,13 @@ exports[`FormikFieldText renders 1`] = `
diff --git a/public/components/FormControls/FormikFormRow/FormikFormRow.js b/public/components/FormControls/FormikFormRow/FormikFormRow.js index 9de0b7a3a..df4a3fd54 100644 --- a/public/components/FormControls/FormikFormRow/FormikFormRow.js +++ b/public/components/FormControls/FormikFormRow/FormikFormRow.js @@ -5,17 +5,17 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { EuiFormRow } from '@elastic/eui'; +import { EuiCompressedFormRow } from '@elastic/eui'; const FormikFormRow = ({ children, form, name, rowProps: { isInvalid, error, ...rest } }) => ( - {children} - + ); FormikFormRow.propTypes = { diff --git a/public/components/FormControls/FormikFormRow/__snapshots__/FormikFormRow.test.js.snap b/public/components/FormControls/FormikFormRow/__snapshots__/FormikFormRow.test.js.snap index eda3bc493..91b357a93 100644 --- a/public/components/FormControls/FormikFormRow/__snapshots__/FormikFormRow.test.js.snap +++ b/public/components/FormControls/FormikFormRow/__snapshots__/FormikFormRow.test.js.snap @@ -2,7 +2,7 @@ exports[`FormikFormRow renders 1`] = `
( -
diff --git a/public/pages/CreateMonitor/components/MonitorExpressions/__snapshots__/MonitorExpressions.test.js.snap b/public/pages/CreateMonitor/components/MonitorExpressions/__snapshots__/MonitorExpressions.test.js.snap index a7bdca539..a13ae43d9 100644 --- a/public/pages/CreateMonitor/components/MonitorExpressions/__snapshots__/MonitorExpressions.test.js.snap +++ b/public/pages/CreateMonitor/components/MonitorExpressions/__snapshots__/MonitorExpressions.test.js.snap @@ -110,20 +110,20 @@ exports[`MonitorExpressions renders 1`] = ` style="width:150px" >
@@ -23,19 +23,19 @@ exports[`MonitorTimeField renders 1`] = `