diff --git a/public/components/metrics/sidebar/__tests__/__snapshots__/searchbar.test.tsx.snap b/public/components/metrics/sidebar/__tests__/__snapshots__/searchbar.test.tsx.snap index c4fcb663b..9232c5818 100644 --- a/public/components/metrics/sidebar/__tests__/__snapshots__/searchbar.test.tsx.snap +++ b/public/components/metrics/sidebar/__tests__/__snapshots__/searchbar.test.tsx.snap @@ -15,7 +15,9 @@ exports[`Search Bar Component Search Side Bar Component with available metrics 1 -
+
-
+
{ }; return ( -
+
- -
+
- -
- -
- -
- -
- - -
- -
- - - -
-
- - - - -
- - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +
- +
- -
- - } - aria-label="resolutionField" - className="resolutionSelectText" - disabled={true} - isInvalid={false} - onChange={[Function]} - prepend="Span Interval" - value={1} + - - } - fullWidth={false} - prepend="Span Interval" +
-
- - - -
- - - - -
-
- - + +
@@ -496,635 +203,261 @@ exports[`Metrics Top Menu Component renders Top Menu Component when disabled in
- -
-
- + + +
+
-
- - -
- + +
+ +
+
+ +
+
+ + } + aria-label="resolutionField" + className="resolutionSelectText" + disabled={true} + isInvalid={false} + onChange={[Function]} + prepend="Span Interval" + value={1} + > + + } + fullWidth={false} + prepend="Span Interval" + > +
+ + + +
+ + + + +
+ -
- -
- - } - > -
- - - - - } - closePopover={[Function]} - display="inlineBlock" - hasArrow={true} - isOpen={false} - ownFocus={true} - panelPaddingSize="m" - > -
-
- - - -
-
-
-
-
- } - iconType={false} - isCustom={true} - startDateControl={
} - > -
- -
- - -
-
- -
- - -
- + + + +
- - - Save - - - - - + +
+
+
-
- + +
- +
+
+
+
+
+ +
+ + +
+ +
+ + } + > +
+ + + + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + +
+
+
+
+
+ } + iconType={false} + isCustom={true} + startDateControl={
} + > +
+ +
+ + +
+
+ +
+ + +
+ + + } + delay="regular" + position="bottom" + > + + + + + + + + + +
+
+
+ + +
+ + +
+ + Save + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + + + +
- +
- -
-
+ +
+ + +
+ - -
+
- +
- +
- -
+ - -
- + +
- -
-
- - + + + - -
-
- - -
- - - - - -
-
-
-
-
-
-
-
-
-
-
- -
- -
- -
- -
- - -
- -
- -
-
- - } - aria-label="resolutionField" - className="resolutionSelectText" - disabled={true} - isInvalid={false} - onChange={[Function]} - prepend="Span Interval" - value={1} - > - - } - fullWidth={false} - prepend="Span Interval" - > -
- - - -
- - - - -
- - -
-
- - - - -
- - - @@ -1808,635 +1502,261 @@ exports[`Metrics Top Menu Component renders Top Menu Component when disabled wit
- -
-
- + + +
+
-
-
- -
- + +
+ +
+ + +
+
+ + } + aria-label="resolutionField" + className="resolutionSelectText" + disabled={true} + isInvalid={false} + onChange={[Function]} + prepend="Span Interval" + value={1} + > + + } + fullWidth={false} + prepend="Span Interval" + > +
+ + + +
+ + + + +
+ -
- -
- - } - > -
- - - - - } - closePopover={[Function]} - display="inlineBlock" - hasArrow={true} - isOpen={false} - ownFocus={true} - panelPaddingSize="m" - > -
-
- - - -
-
-
-
-
- } - iconType={false} - isCustom={true} - startDateControl={
} - > -
- -
- - -
-
- -
- - -
- + + + +
- - - Save - - - - - + +
+
+
-
- + +
- +
+
+
+
+
+ +
+ + +
+ +
+ + } + > +
+ + + + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + +
+
+
+
+
+ } + iconType={false} + isCustom={true} + startDateControl={
} + > +
+ +
+ + +
+
+ +
+ + +
+ + + } + delay="regular" + position="bottom" + > + + + + + + + + + +
+
+
+ + +
+ + +
+ + Save + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + + + +
- +
- -
-
+ +
+ + +
+ - -
+
- +
- +
- -
+ - -
- + +
- -
-
- - + + + - -
-
- - - - -
- - - - - -
-
-
-
-
-
-
-
-
-
-
- -
- -
- -
- -
- - -
- -
- -
-
- - } - aria-label="resolutionField" - className="resolutionSelectText" - disabled={false} - isInvalid={false} - onChange={[Function]} - prepend="Span Interval" - value={1} - > - - } - fullWidth={false} - prepend="Span Interval" - > -
- - - -
- - - - -
- - -
-
- - - - -
- -
- -
- - + + +
+
-
- - -
- + +
+ +
+
+ +
+
+ + } + aria-label="resolutionField" + className="resolutionSelectText" + disabled={false} + isInvalid={false} + onChange={[Function]} + prepend="Span Interval" + value={1} + > + + } + fullWidth={false} + prepend="Span Interval" + > +
+ + + +
+ + + + +
+ -
- -
- +
+ + + + +
-
- - - - - } - closePopover={[Function]} - display="inlineBlock" - hasArrow={true} - isOpen={false} - ownFocus={true} - panelPaddingSize="m" - > -
-
- - - -
-
-
-
-
- } - iconType={false} - isCustom={true} - startDateControl={
} +
-
- -
- - + + + + +
+
+
+
+ + +
+ + +
+
+ + +
+ + +
+ +
+ + } + > +
+ -
+ + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" > - - - - - - - - + viewBox="0 0 16 16" + width={16} + xmlns="http://www.w3.org/2000/svg" + /> + + + + + + + +
+
+ + +
+ } + iconType={false} + isCustom={true} + startDateControl={
} + > +
+
- + +
+
+ +
- - -
- - -
+
+
+ - - Save - - } - closePopover={[Function]} - display="inlineBlock" - hasArrow={true} - isOpen={false} - ownFocus={true} - panelPaddingSize="m" +
-
-
- - - - - -
-
- -
-
+ + + + + + + +
+
+
+ + +
+ + +
+ + Save + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + + + +
- +
- -
-
+ +
+ + +
+ { let savedMetricIds = []; - let savedMetricsInPanels = []; + const savedMetricsInPanels = []; try { savedMetricIds = await Promise.all( @@ -220,92 +219,86 @@ export const TopMenu = ({ return ( <> - - - - - - - - - - - -
- setSpanValue(e.target.value)} - append={ - onResolutionChange(e)} - aria-label="resolutionSelect" - /> - } - disabled={IsTopPanelDisabled} - aria-label="resolutionField" + + + + + +
+ setSpanValue(e.target.value)} + append={ + onResolutionChange(e)} + aria-label="resolutionSelect" /> -
-
- - - - - setIsSavePanelOpen(false)} - > - - - - - setIsSavePanelOpen(false)} - data-test-subj="metrics__SaveCancel" - > - Cancel - - - - { - handleSavingObjects().then(() => setIsSavePanelOpen(false)); - }} - data-test-subj="metrics__SaveConfirm" - > - Save - - - - - - -
- - + } + disabled={IsTopPanelDisabled} + aria-label="resolutionField" + /> +
+
+ + + + + setIsSavePanelOpen(false)} + > + + + + + setIsSavePanelOpen(false)} + data-test-subj="metrics__SaveCancel" + > + Cancel + + + + { + handleSavingObjects().then(() => setIsSavePanelOpen(false)); + }} + data-test-subj="metrics__SaveConfirm" + > + Save + + + + + + +
+ {editMode ? ( <>