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

[8.10] [Fleet] Only show agent dashboard links if there is more than one non-server agent and if the dashboards exist (#164469) #164539

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.10:

Questions ?

Please refer to the Backport tool documentation

…-server agent and if the dashboards exist (elastic#164469)

## Summary

Closes elastic#161827

These buttons were showing in cloud when there was only the cloud agent
added:

<img width="647" alt="Screenshot 2023-08-22 at 16 18 51"
src="https://github.com/elastic/kibana/assets/3315046/baaff9b9-17fc-49b5-bad9-980f91a5ae15">

The ingest dashboard links will now only show if:

- the user has one agent that is not part of a policy containing fleet
server (I have re-used an existing hook we have to check this here)
- the agent ingest metrics dashaboard exists in the current space

Test Scenarios

1. Setup fleet with ONLY a fleet server connected, the dashboard links
should not show
2. Setup fleet with fleet server and another non-fleet server agent, the
dashboard links should show
3. With the same setup as test case 2, now create another space, visit
fleet in the new space, the links should not show as the dashboards are
not installed in the current space.

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 805c974)
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Aug 23, 2023
@kibanamachine kibanamachine enabled auto-merge (squash) August 23, 2023 08:59
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kibanamachine kibanamachine merged commit 92e708f into elastic:8.10 Aug 23, 2023
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Defend Workflows Endpoint Cypress Tests #2 / Automated Response Actions From alerts "before all" hook for "should have generated endpoint and rule" "before all" hook for "should have generated endpoint and rule"

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1072 1073 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1023.1KB 1023.7KB +568.0B
Unknown metric groups

API count

id before after diff
fleet 1188 1189 +1

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @hop-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants