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] Update agent listing for better status reporting #84798

Merged
merged 7 commits into from
Dec 10, 2020

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Dec 2, 2020

Summary

Update the agent list to better reflect agent status.
Implements the design defined here #81872

Details

  • Added a new agent status bar
    • The status bar is implemented using EuiColorPaletteDisplay
  • Updated the search bar to use the same components as the search bar in the logs
  • Updated the agent list filter to search by healthy, unhealthy, ...
  • Fetch the agent status when we fetch the agent list, so displaying status make sense with agents the user is seeing.

I did some refacto to extra the search bar and filter from the agent list components (it started to be really too big in my opinion), we can still do more refacto, but I think it's a good tradeoff to keep this PR readable.

UI Change

Screen Shot 2020-12-02 at 12 04 31 PM

@nchaulet nchaulet added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.11.0 labels Dec 2, 2020
@nchaulet nchaulet self-assigned this Dec 2, 2020
if (suggestion.type === 'operator') {
return true;
}
esKuery.fromKueryExpression(value);
Copy link
Member Author

Choose a reason for hiding this comment

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

Added some validation of the kuery

@nchaulet nchaulet marked this pull request as ready for review December 3, 2020 14:17
@nchaulet nchaulet requested a review from a team December 3, 2020 14:17
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

package.json Outdated Show resolved Hide resolved
@nchaulet nchaulet requested a review from jfsiii December 7, 2020 16:04
@nchaulet
Copy link
Member Author

nchaulet commented Dec 9, 2020

@elasticmachine merge upstream

Copy link
Contributor

@jfsiii jfsiii left a comment

Choose a reason for hiding this comment

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

Checked out locally and did some happy path testing. Read changes twice pretty thoroughly. Might have missed something but I'm 👍 with this landing as-is.

Comment on lines 50 to 54
const fields = (
((await data.indexPatterns.getFieldsForWildcard({
pattern: INDEX_NAME,
})) as IFieldType[]) || []
).filter((field) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

It took me a bit to parse this. WDYT about something like?

Suggested change
const fields = (
((await data.indexPatterns.getFieldsForWildcard({
pattern: INDEX_NAME,
})) as IFieldType[]) || []
).filter((field) => {
const _fields: IFieldType[] = await data.indexPatterns.getFieldsForWildcard({
pattern: INDEX_NAME,
});
const fields = (_fields || []).filter((field) => {

defaultMessage: 'Inactive',
}),
},
] as Array<{ label: string; status: string }>;
Copy link
Contributor

Choose a reason for hiding this comment

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

I know you didn't add this as Array<...>, but is it needed?

I believe TS can figure it out without any help, but if it does need it, could we try statusFilters: Array<...> instead of the type assertion?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes TS figure it correctly going to remove the useless cast

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 450 453 +3

Async chunks

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

id before after diff
fleet 1.2MB 946.9KB -232.0KB

Distributable file count

id before after diff
default 46982 47742 +760

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 375.8KB 376.3KB +542.0B

History

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

@nchaulet nchaulet merged commit c9b5ec7 into elastic:master Dec 10, 2020
@nchaulet nchaulet deleted the feature-update-agent-listing-status branch December 10, 2020 02:07
nchaulet added a commit to nchaulet/kibana that referenced this pull request Dec 10, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 10, 2020
* master: (53 commits)
  Fixing recovered instance reference bug (elastic#85412)
  Switch to new elasticsearch client for Visualizations (elastic#85245)
  Switch to new elasticsearch client for TSVB (elastic#85275)
  Switch to new elasticsearch client for Vega (elastic#85280)
  [ILM] Add shrink field to hot phase (elastic#84087)
  Add rolling-file appender to core logging (elastic#84735)
  [APM] Service overview: Dependencies table (elastic#83416)
  [Uptime ]Update empty message for certs list (elastic#78575)
  [Graph] Fix graph saved object references (elastic#85295)
  [APM] Create new API's to return Latency and Throughput charts (elastic#85242)
  [Advanced settings] Reset to default for empty strings (elastic#85137)
  [SECURITY SOLUTION] Bundles _source -> Fields + able to sort on multiple fields in Timeline (elastic#83761)
  [Fleet] Update agent listing for better status reporting (elastic#84798)
  [APM] enable 'sanitize_field_names' for Go (elastic#85373)
  Update dependency @elastic/charts to v24.4.0 (elastic#85452)
  Introduce external url service (elastic#81234)
  Deprecate disabling the security plugin (elastic#85159)
  [FLEET] New Integration Policy Details page for use in Integrations section (elastic#85355)
  [Security Solutions][Detection Engine] Fixes one liner access control with find_rules REST API
  chore: 🤖 remove extraPublicDirs (elastic#85454)
  ...
@ghost
Copy link

ghost commented Dec 14, 2020

Hi @EricDavisX

We have created 10 testcases and executed the same under Agent listing and status Test Run on 8.0.0-snapshot kibana cloud environment.

Build details:
Kibana commit: 0f408041b48a03fa46492f62d08fe5d8025390ea
Build: 38781
Agent download location: https://snapshots.elastic.co/8.0.0-59591b4b/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-windows-x86_64.zip

Please let us know if anything is missing from our end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants