diff --git a/public/components/Flyout/flyouts/alertsDashboard.js b/public/components/Flyout/flyouts/alertsDashboard.js index 18dc41a1f..e2955dec4 100644 --- a/public/components/Flyout/flyouts/alertsDashboard.js +++ b/public/components/Flyout/flyouts/alertsDashboard.js @@ -15,7 +15,6 @@ const alertsDashboard = (payload) => { size: 'm', hideCloseButton: true, 'data-test-subj': `alertsDashboardFlyout_${trigger_name}`, - type: 'push', }, headerProps: { hasBorder: true }, header: ( diff --git a/public/components/Flyout/flyouts/components/AlertsDashboardFlyoutComponent.js b/public/components/Flyout/flyouts/components/AlertsDashboardFlyoutComponent.js index b2c861527..759cd231a 100644 --- a/public/components/Flyout/flyouts/components/AlertsDashboardFlyoutComponent.js +++ b/public/components/Flyout/flyouts/components/AlertsDashboardFlyoutComponent.js @@ -361,7 +361,7 @@ export default class AlertsDashboardFlyoutComponent extends Component { columns.splice( 0, 0, - getAlertsFindingColumn(httpClient, history, true, location, notifications) + getAlertsFindingColumn(httpClient, history, location, notifications) ); break; default: diff --git a/public/pages/CreateMonitor/containers/CreateMonitor/CreateMonitor.js b/public/pages/CreateMonitor/containers/CreateMonitor/CreateMonitor.js index 36dbe7468..bee4ae8a2 100644 --- a/public/pages/CreateMonitor/containers/CreateMonitor/CreateMonitor.js +++ b/public/pages/CreateMonitor/containers/CreateMonitor/CreateMonitor.js @@ -286,6 +286,7 @@ export default class CreateMonitor extends Component { plugins={plugins} isAd={values.searchType === SEARCH_TYPE.AD} detectorId={this.props.detectorId} + setFlyout={this.props.setFlyout} /> diff --git a/public/pages/Dashboard/components/AcknowledgeAlertsModal/AcknowledgeAlertsModal.js b/public/pages/Dashboard/components/AcknowledgeAlertsModal/AcknowledgeAlertsModal.js index 7bfd9e7e9..18324b7c8 100644 --- a/public/pages/Dashboard/components/AcknowledgeAlertsModal/AcknowledgeAlertsModal.js +++ b/public/pages/Dashboard/components/AcknowledgeAlertsModal/AcknowledgeAlertsModal.js @@ -352,7 +352,6 @@ export default class AcknowledgeAlertsModal extends Component { getAlertsFindingColumn( httpClient, history, - false, location, notifications, flyoutIsOpen, diff --git a/public/pages/Dashboard/components/FindingsDashboard/FindingFlyout.js b/public/pages/Dashboard/components/FindingsDashboard/FindingFlyout.js index ef15234d0..4ec0264e5 100644 --- a/public/pages/Dashboard/components/FindingsDashboard/FindingFlyout.js +++ b/public/pages/Dashboard/components/FindingsDashboard/FindingFlyout.js @@ -70,10 +70,16 @@ export default class FindingFlyout extends Component { closeFlyout = () => { this.setState({ isFlyoutOpen: false }); + + const { dashboardFlyoutIsOpen = false, closeFlyout } = this.props; + + if (typeof closeFlyout === 'function') { + if (dashboardFlyoutIsOpen) closeFlyout(); + } }; async renderFlyout() { - const { alert, isAlertsFlyout = false } = this.props; + const { alert } = this.props; if (!_.isEmpty(alert)) await this.getFinding(); const { docList, finding } = this.state; @@ -93,9 +99,8 @@ export default class FindingFlyout extends Component { const flyout = ( ); }; @@ -344,6 +346,7 @@ export default class MonitorDetails extends Component { httpClient, notifications, isDarkMode, + setFlyout, } = this.props; const { action } = queryString.parse(location.search); const updatingMonitor = action === MONITOR_ACTIONS.UPDATE_MONITOR; @@ -365,6 +368,7 @@ export default class MonitorDetails extends Component { monitorToEdit={monitor} detectorId={detectorId} notifications={notifications} + setFlyout={setFlyout} {...this.props} /> );