-
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
[Infra] Make nav react to Hosts view enabled flag changing #142477
[Infra] Make nav react to Hosts view enabled flag changing #142477
Conversation
@@ -74,19 +80,27 @@ export class Plugin implements InfraClientPluginClass { | |||
fetchData: createMetricsFetchData(core.getStartServices), | |||
}); | |||
|
|||
const startDep$AndHostViewFlag$ = combineLatest([ |
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.
No idea how to name this combination
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.
Pretty sure this is the first rxjs review I've done, so no idea if this is idiomatic or not. But I can confirm it works after observing it with my own eyes 😉
I even turned it back off and the nav went away as expected.
I'm a little surprised it takes that much code to show/hide a link without refresh, but I trust you wouldn't leave it any more verbose than it has to be :)
I think the rub is that it's two different down streams, one for the Observability chrome and one for Kibana core, the types and deconstructing code doesn't help make it any more compact either. :/ To go further, I think if the code was written to be more fully Observable driven it would, for example, accept a stream for |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
…42477) * [Infra] Make nav react to Hosts view enabled flag changing (elastic#140996) * Move comment to more relevant location Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit d60acf8)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…142585) * [Infra] Make nav react to Hosts view enabled flag changing (#140996) * Move comment to more relevant location Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit d60acf8) Co-authored-by: Milton Hultgren <[email protected]>
…42477) * [Infra] Make nav react to Hosts view enabled flag changing (elastic#140996) * Move comment to more relevant location Co-authored-by: Kibana Machine <[email protected]>
…42477) * [Infra] Make nav react to Hosts view enabled flag changing (elastic#140996) * Move comment to more relevant location Co-authored-by: Kibana Machine <[email protected]>
Summary
Closes #140996
This PR adds an app updater and consumes the hosts view enabled setting via an Observable instead so that changes to this setting are reacted to by changing the nav and deep links in the Infra app plugin.
How to test