-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] DF Analytics: Ensure creation flyout can be opened when no jobs exist #50417
[ML] DF Analytics: Ensure creation flyout can be opened when no jobs exist #50417
Conversation
Pinging @elastic/ml-ui (:ml) |
df5aa2e
to
8a551e7
Compare
💚 Build Succeeded |
<Fragment> | ||
{isModalVisible && ( | ||
<CreateAnalyticsFlyout {...props}> | ||
{isAdvancedEditorEnabled === false && <CreateAnalyticsForm {...props} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
{isAdvancedEditorEnabled === false && <CreateAnalyticsForm {...props} />} | |
{isAdvancedEditorEnabled ? <CreateAnalyticsAdvancedEditor {...props} /> : <CreateAnalyticsForm {...props} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this piece, I think it's fine to be explicit about what value is expected.
|
||
return ( | ||
<Fragment> | ||
{isModalVisible && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check is redundant, you already return null 🙂 for false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fragment
can be omitted as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💚 Build Succeeded |
…exist (elastic#50417) * Ensure create flyout can be open when no jobs exist * remove redundant isModalVisible check
…ger-ace-theme * 'master' of github.com:elastic/kibana: (54 commits) [ML] Fixes word wrap in Overview page sidebar on IE (elastic#50668) Upgrade to TypeScript 3.7.2 (elastic#47188) fix: hide 'edit' button for mobile for dashboards (elastic#50639) fixes conditional links tests (elastic#50642) [SIEM] Fix IE11 timeline drag and drop issue (elastic#50528) [SIEM] Add SavedQuery in Timeline (elastic#49813) chore(NA): remove code plugin from codeowners (elastic#50451) [DOCS] Adds documentation on telemetry settings (elastic#50739) [Logs UI] Add IE11-specific CSS fixes for anomalies table (elastic#49980) [DOCS][SIEM]: Change Kibana advanced settings to match UI (elastic#50679) Change URLs for support menu (elastic#50700) [Reporting] Remove any types and references to Hapi (elastic#49250) [DOCS] Adds note about backups to Upgrade doc (elastic#50525) [Logs UI] Improve infra plugin compatibility with TS 3.7 (elastic#50491) [Task manager] Adds ensureScheduling api to allow safer rescheduling of existing tasks (elastic#50232) [DOCS] Adds link to content security policy doc (elastic#50698) Remove duplicate but in error message (elastic#50530) [ML] DF Analytics: Ensure creation flyout can be opened when no jobs exist (elastic#50417) Add filebeat notice (elastic#49065) [Monitoring] De-duplicate pipeline ids based on the ephemeral_id changing (elastic#49978) ... # Conflicts: # x-pack/legacy/plugins/grokdebugger/public/components/grok_debugger/brace_imports.ts
Summary
Fixes an issue where the
Create your first data frame analytics job
in the analytics tab was not opening the job creation flyout.The reorganization of components in #49464 moved the
CreateAnalyticsButton
, which took care of displaying theCreateAnalyticsFlyout
, from the top-levelPage
component to theAnalyticsList
component.In
AnalyticsList
, when analytics jobs length === 0 we return the empty prompt early and theCreateAnalyticsButton
containing theCreateAnalyticsFlyout
was never getting rendered.This PR ensures the
CreateAnalyticsFlyout
is available when there are no jobs.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorialsFor maintainers
- [ ] This was checked for breaking API changes and was labeled appropriately- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately