-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] DF Analytics: Ensure creation flyout can be opened when no jobs …
…exist (#50417) * Ensure create flyout can be open when no jobs exist * remove redundant isModalVisible check
- Loading branch information
1 parent
30a70b3
commit 2516f94
Showing
4 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...management/components/create_analytics_flyout_wrapper/create_analytics_flyout_wrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { FC } from 'react'; | ||
|
||
import { CreateAnalyticsFormProps } from '../../hooks/use_create_analytics_form'; | ||
|
||
import { CreateAnalyticsAdvancedEditor } from '../create_analytics_advanced_editor'; | ||
import { CreateAnalyticsForm } from '../create_analytics_form'; | ||
import { CreateAnalyticsFlyout } from '../create_analytics_flyout'; | ||
|
||
export const CreateAnalyticsFlyoutWrapper: FC<CreateAnalyticsFormProps> = props => { | ||
const { isAdvancedEditorEnabled, isModalVisible } = props.state; | ||
|
||
if (isModalVisible === false) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<CreateAnalyticsFlyout {...props}> | ||
{isAdvancedEditorEnabled === false && <CreateAnalyticsForm {...props} />} | ||
{isAdvancedEditorEnabled === true && <CreateAnalyticsAdvancedEditor {...props} />} | ||
</CreateAnalyticsFlyout> | ||
); | ||
}; |
7 changes: 7 additions & 0 deletions
7
..._analytics/pages/analytics_management/components/create_analytics_flyout_wrapper/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export { CreateAnalyticsFlyoutWrapper } from './create_analytics_flyout_wrapper'; |