Skip to content
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 Monitoring UI] use observable to watch for config changes #140996

Closed
neptunian opened this issue Sep 19, 2022 · 2 comments · Fixed by #142477
Closed

[Infra Monitoring UI] use observable to watch for config changes #140996

neptunian opened this issue Sep 19, 2022 · 2 comments · Fixed by #142477
Assignees
Labels
Epic: Host Observability Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@neptunian
Copy link
Contributor

neptunian commented Sep 19, 2022

As part of #140766, @miltonhultgren pointed out we could use an observable so when a user changes a setting, they don't have to refresh the app. Eg: https://github.com/elastic/kibana/blob/main/x-pack/plugins/security_solution/public/plugin.tsx#L491-L494

@neptunian neptunian added the Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services label Sep 19, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@miltonhultgren miltonhultgren self-assigned this Sep 28, 2022
@miltonhultgren
Copy link
Contributor

miltonhultgren commented Sep 28, 2022

Some notes before I start implementing (tomorrow):
To get the Observable of the UI setting we can do like we did here https://github.com/elastic/kibana/blob/main/x-pack/plugins/monitoring/public/application/index.tsx#L103-L107
The plugin file is a normal JS class, not a React functional component so we'll have to use the Observable directly, without hooks.

Then there are two places to update, the Kibana core deep links and the Observability sidebar links.

For the Kibana core deep links, we can add an updater$ to our application registration https://github.com/elastic/kibana/blob/main/packages/core/application/core-application-browser/src/application.ts#L148-L180, it's an Observable where you can feed changes to the application. If we subscribe to the UI setting observable and push new events to this updater$ stream it should update the deep links.

For the Observability side bar links, that register flow already uses an Observable that we today source from the start services but we can merge that stream with the UI settings to create new "sections" each time that setting (or the start services) change.

miltonhultgren added a commit that referenced this issue Oct 4, 2022
* [Infra] Make nav react to Hosts view enabled flag changing (#140996)

* Move comment to more relevant location

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 4, 2022
…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)
kibanamachine added a commit that referenced this issue Oct 4, 2022
…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]>
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this issue Oct 11, 2022
…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]>
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this issue Oct 14, 2022
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic: Host Observability Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants