diff --git a/public/components/ConfigCell/ConfigCell.tsx b/public/components/ConfigCell/ConfigCell.tsx index 8a895443..57d81c68 100644 --- a/public/components/ConfigCell/ConfigCell.tsx +++ b/public/components/ConfigCell/ConfigCell.tsx @@ -9,11 +9,11 @@ * GitHub history for details. */ -import { EuiText, EuiFormRow, EuiFormRowProps } from '@elastic/eui'; +import { EuiText, EuiCompressedFormRow, EuiFormRowProps } from '@elastic/eui'; import React from 'react'; export const FixedWidthRow = (props: EuiFormRowProps) => ( - + ); interface ConfigCellProps { diff --git a/public/components/CreateDetectorButtons/CreateDetectorButtons.tsx b/public/components/CreateDetectorButtons/CreateDetectorButtons.tsx index 551bb709..38baf34e 100644 --- a/public/components/CreateDetectorButtons/CreateDetectorButtons.tsx +++ b/public/components/CreateDetectorButtons/CreateDetectorButtons.tsx @@ -9,7 +9,7 @@ * GitHub history for details. */ -import { EuiFlexGroup, EuiFlexItem, EuiButton } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiSmallButton } from '@elastic/eui'; import React from 'react'; import { APP_PATH, PLUGIN_NAME } from '../../utils/constants'; import { useLocation } from 'react-router-dom'; @@ -23,27 +23,27 @@ export const CreateDetectorButtons = () => { const createDetectorUrl = `${PLUGIN_NAME}#` + constructHrefWithDataSourceId(`${APP_PATH.CREATE_DETECTOR}`, dataSourceId, false); const sampleDetectorUrl = `${PLUGIN_NAME}#` + constructHrefWithDataSourceId(`${APP_PATH.OVERVIEW}`, dataSourceId, false); - + return ( - Try a sample detector - + - Create detector - + ); diff --git a/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/components/ConfirmUnlinkDetectorModal/ConfirmUnlinkDetectorModal.tsx b/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/components/ConfirmUnlinkDetectorModal/ConfirmUnlinkDetectorModal.tsx index 98d5d155..0ca4255a 100644 --- a/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/components/ConfirmUnlinkDetectorModal/ConfirmUnlinkDetectorModal.tsx +++ b/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/components/ConfirmUnlinkDetectorModal/ConfirmUnlinkDetectorModal.tsx @@ -7,8 +7,8 @@ import React, { useState } from 'react'; import { EuiText, EuiOverlayMask, - EuiButton, - EuiButtonEmpty, + EuiSmallButton, + EuiSmallButtonEmpty, EuiModal, EuiModalHeader, EuiModalFooter, @@ -51,14 +51,14 @@ export const ConfirmUnlinkDetectorModal = ( {isLoading ? null : ( - Cancel - + )} - {'Remove association'} - + diff --git a/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx b/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx index fb983465..c2b0ff7e 100644 --- a/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx +++ b/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx @@ -10,7 +10,7 @@ import { EuiSpacer, EuiInMemoryTable, EuiFlyoutBody, - EuiButton, + EuiSmallButton, EuiFlyout, EuiFlexItem, EuiFlexGroup, @@ -85,7 +85,7 @@ function AssociatedDetectors({ embeddable, closeFlyout, setMode }) { const indexPattern = await getSavedObjectsClient().get('index-pattern', indexPatternId); const refs = indexPattern.references as References[]; const foundDataSourceId = refs.find(ref => ref.type === 'data-source')?.id; - setDataSourceId(foundDataSourceId); + setDataSourceId(foundDataSourceId); } catch (error) { console.error("Error fetching index pattern:", error); } @@ -270,7 +270,7 @@ function AssociatedDetectors({ embeddable, closeFlyout, setMode }) { getDetectorList( getAllDetectorsQueryParamsWithDataSourceId(dataSourceId) ) - ); + ); }; const handleUnlinkDetectorAction = (detector: DetectorListItem) => { @@ -371,7 +371,7 @@ function AssociatedDetectors({ embeddable, closeFlyout, setMode }) {
- Associate a detector - +
diff --git a/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AddAnomalyDetector.tsx b/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AddAnomalyDetector.tsx index f750f8e2..1ff3d78f 100644 --- a/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AddAnomalyDetector.tsx +++ b/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AddAnomalyDetector.tsx @@ -9,21 +9,21 @@ import { EuiFlyoutBody, EuiFlyoutFooter, EuiTitle, - EuiButton, + EuiSmallButton, EuiFormFieldset, EuiCheckableCard, EuiSpacer, EuiIcon, EuiText, - EuiSwitch, - EuiFormRow, - EuiFieldText, - EuiCheckbox, + EuiCompressedSwitch, + EuiCompressedFormRow, + EuiCompressedFieldText, + EuiCompressedCheckbox, EuiFlexItem, EuiFlexGroup, - EuiFieldNumber, + EuiCompressedFieldNumber, EuiCallOut, - EuiButtonEmpty, + EuiSmallButtonEmpty, EuiPanel, } from '@elastic/eui'; import './styles.scss'; @@ -141,7 +141,7 @@ function AddAnomalyDetector({ const indexPattern = await getSavedObjectsClient().get('index-pattern', indexPatternId); const refs = indexPattern.references as References[]; const foundDataSourceId = refs.find(ref => ref.type === 'data-source')?.id; - setDataSourceId(foundDataSourceId); + setDataSourceId(foundDataSourceId); } catch (error) { console.error("Error fetching index pattern:", error); } @@ -167,7 +167,7 @@ function AddAnomalyDetector({ } fetchData(); createEmbeddable(); - }, [dataSourceId]); + }, [dataSourceId]); const [isShowVis, setIsShowVis] = useState(false); const [accordionsOpen, setAccordionsOpen] = useState({ modelFeatures: true }); @@ -311,7 +311,7 @@ function AddAnomalyDetector({ {title} - setIsShowVis(!isShowVis)} @@ -478,9 +478,9 @@ function AddAnomalyDetector({
- openAlerting(detectorId)}> + openAlerting(detectorId)}> Set up alerts - +
@@ -684,7 +684,7 @@ function AddAnomalyDetector({ isInvalid={isInvalid(field.name, form)} error={getError(field.name, form)} > - - - - ( - - - - +
) : null} @@ -960,7 +960,7 @@ function AddAnomalyDetector({ - Add another feature - + @@ -1000,20 +1000,20 @@ function AddAnomalyDetector({ - Cancel + Cancel {mode === FLYOUT_MODES.existing ? ( - handleAssociate(selectedDetector)} > Associate detector - + ) : ( - Create detector - + )} diff --git a/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AssociateExisting/containers/AssociateExisting.tsx b/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AssociateExisting/containers/AssociateExisting.tsx index 63d53b15..2caea78d 100644 --- a/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AssociateExisting/containers/AssociateExisting.tsx +++ b/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AssociateExisting/containers/AssociateExisting.tsx @@ -9,7 +9,7 @@ import { EuiSpacer, EuiIcon, EuiText, - EuiComboBox, + EuiCompressedComboBox, EuiLoadingSpinner, EuiLink, EuiFlexGroup, @@ -78,7 +78,7 @@ export function AssociateExisting( const indexPattern = await getSavedObjectsClient().get('index-pattern', associateExistingProps.indexPatternId); const refs = indexPattern.references as References[]; const foundDataSourceId = refs.find(ref => ref.type === 'data-source')?.id; - setDataSourceId(foundDataSourceId); + setDataSourceId(foundDataSourceId); } catch (error) { console.error("Error fetching index pattern:", error); } @@ -228,7 +228,7 @@ export function AssociateExisting( Eligible detectors don't include high-cardinality detectors. {existingDetectorsAvailableToAssociate ? ( - (
- )} {isButton && ( - + > )}
diff --git a/public/components/FormattedFormRow/FormattedFormRow.tsx b/public/components/FormattedFormRow/FormattedFormRow.tsx index 20cf8daa..043e493e 100644 --- a/public/components/FormattedFormRow/FormattedFormRow.tsx +++ b/public/components/FormattedFormRow/FormattedFormRow.tsx @@ -10,7 +10,7 @@ */ import React, { ReactElement, ReactNode } from 'react'; -import { EuiFormRow, EuiText, EuiLink, EuiIcon } from '@elastic/eui'; +import { EuiCompressedFormRow, EuiText, EuiLink, EuiIcon } from '@elastic/eui'; type FormattedFormRowProps = { title?: string; @@ -46,7 +46,7 @@ export const FormattedFormRow = (props: FormattedFormRowProps) => { const { formattedTitle, ...euiFormRowProps } = props; return ( - {formattedTitle ? formattedTitle :

{props.title}

} @@ -57,6 +57,6 @@ export const FormattedFormRow = (props: FormattedFormRowProps) => { {...euiFormRowProps} > {props.children} -
+ ); }; diff --git a/public/pages/AnomalyCharts/components/AlertsButton/AlertsButton.tsx b/public/pages/AnomalyCharts/components/AlertsButton/AlertsButton.tsx index 0e741eaa..d4ee0b54 100644 --- a/public/pages/AnomalyCharts/components/AlertsButton/AlertsButton.tsx +++ b/public/pages/AnomalyCharts/components/AlertsButton/AlertsButton.tsx @@ -9,7 +9,7 @@ * GitHub history for details. */ -import { EuiButton, EuiButtonProps } from '@elastic/eui'; +import { EuiSmallButton, EuiButtonProps } from '@elastic/eui'; import React, { Fragment } from 'react'; import { getAlertingCreateMonitorLink, @@ -30,14 +30,14 @@ export const AlertsButton = (props: AlertsButtonProps) => { return ( {props.monitor ? ( - Edit alert settings - + ) : ( - { {...props} > Set up alerts - + )} ); diff --git a/public/pages/AnomalyCharts/components/AlertsButton/__tests__/__snapshots__/AlertsButton.test.tsx.snap b/public/pages/AnomalyCharts/components/AlertsButton/__tests__/__snapshots__/AlertsButton.test.tsx.snap index 1cf7cf2b..a4a862f9 100644 --- a/public/pages/AnomalyCharts/components/AlertsButton/__tests__/__snapshots__/AlertsButton.test.tsx.snap +++ b/public/pages/AnomalyCharts/components/AlertsButton/__tests__/__snapshots__/AlertsButton.test.tsx.snap @@ -3,7 +3,7 @@ exports[` spec Alerts Button renders component with monitor 1`] = `
spec Alerts Button renders component with monitor 1`] exports[` spec Alerts Button renders component without monitor 1`] = `
@@ -69,7 +69,7 @@ exports[` spec AnomaliesLiveChart with Sample anomaly data >