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

[Fleet] Fix displaying agent status bar with no agents #156541

Merged

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented May 3, 2023

Summary

Resolve #121483

Fix displaying the agent status bar when filtering results in no agents.

Screenshot 2023-05-03 at 9 19 36 AM

How to test

  1. Add some agents to Fleet
  2. Go to the list page and disable some status you have no agents => the status bar should not be visible anymore

@nchaulet nchaulet added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.8.0 labels May 3, 2023
@nchaulet nchaulet self-assigned this May 3, 2023
@nchaulet nchaulet requested a review from a team as a code owner May 3, 2023 13:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@nchaulet
Copy link
Member Author

nchaulet commented May 3, 2023

@elasticmachine merge upstream

Copy link
Contributor

@criamico criamico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a small comment, otherwise LGTM

@@ -35,13 +35,30 @@ export const AgentStatusBar: React.FC<{
return acc;
}, [] as Array<{ stop: number; color: string }>);
}, [agentStatus]);

// const totalAgents = useMemo(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgotten comment? :D


import { AgentStatusBar } from './status_bar';

describe('AgentStatusBar', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the test!

nchaulet added 2 commits May 3, 2023 11:06
…hub.com:nchaulet/kibana into fix-121483-status-bar-whith-no-agents
@nchaulet nchaulet enabled auto-merge (squash) May 3, 2023 15:07
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
fleet 960.1KB 960.1KB +62.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 398 401 +3
total +5

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 478 481 +3
total +5

History

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

cc @nchaulet

@nchaulet nchaulet merged commit 4301d80 into elastic:main May 3, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 3, 2023
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 3, 2023
#156583)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Fleet] Fix displaying agent status bar with no agents
(#156541)](#156541)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nicolas
Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-03T16:14:55Z","message":"[Fleet]
Fix displaying agent status bar with no agents
(#156541)","sha":"4301d80d12e9cd3b48573d6dd1719baff8335c64","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Fleet","v8.8.0","v8.9.0"],"number":156541,"url":"https://github.com/elastic/kibana/pull/156541","mergeCommit":{"message":"[Fleet]
Fix displaying agent status bar with no agents
(#156541)","sha":"4301d80d12e9cd3b48573d6dd1719baff8335c64"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156541","number":156541,"mergeCommit":{"message":"[Fleet]
Fix displaying agent status bar with no agents
(#156541)","sha":"4301d80d12e9cd3b48573d6dd1719baff8335c64"}}]}]
BACKPORT-->

Co-authored-by: Nicolas Chaulet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet]: Status bar is not updated when no agents available on applying different Status filters.
6 participants