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] Add assets tab #102517

Merged
merged 23 commits into from
Jun 22, 2021
Merged

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented Jun 17, 2021

Summary

Add the "Assets" tab to the integration details view.

How to test

  1. Start Kibana + ES on basic
  2. Go to fleet and follow the in-app setup instructions for getting an agent set up
  3. Go to integrations
  4. Choose an integration to add from the "browse" view
  5. Note: there should be no "Assets" tab visible yet. Select "Add ",
  6. Complete the form that just loaded (if necessary) and click "Save integration"
  7. You should be redirected to the integrations UI (where you were before the form) with a toast containing a link
  8. Click the link showing the "Add agent" flyout
  9. The policy should be pre-selected (i.e., no policy selection option in the flyout, just an option to choose the enrollment token)
  10. At the bottom of the flyout there should be a button to "View assets"
  11. Clicking "View assets" should take you to the new "Assets" tab
  12. (Optional) Also test clicking the "+" button when viewing the policies for an integration. This should open the same flyout as when clicking the success toast described above.

To reviewers

  • There is risk with this implementation that we could link to UI that does not exist/is disabled. Specifically dashboards, visualisations and discover. It seems unlikely, but the current implementation has no way of accounting for this which creates some risk. The problem already existed (see comments and restructuring of x-pack/plugins/fleet/public/hooks/use_kibana_link.ts).
  • Any ideas for adding tests would be appreciated! I think this is already a lot of new code to digest in a review. Ultimately I think we need functional tests to give us good coverage. I'd like to take this on in a follow up PR though if possible which means thorough manual testing is imperative!

Screenshots

Package not yet added (should be the same as before since we have not installed the package)

Screenshot 2021-06-17 at 16 35 02

Success toast after adding a package with link

Screenshot 2021-06-17 at 16 34 37

New flyout with "Add assets link"

Screenshot 2021-06-17 at 16 34 50

New "Assets" tab with sections expanded and links implemented

Screenshot 2021-06-18 at 12 05 58

Checklist

Risk Matrix

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Some refactoring and introducing of links to external UI Med Med This needs to be mitigated by using the new URL service

@jloleysens jloleysens added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Fleet Fleet team's agent central management project Team:Fleet Team label for Observability Data Collection Fleet team v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 17, 2021
@jloleysens jloleysens requested a review from kpollich June 17, 2021 14:51
@jloleysens jloleysens requested a review from a team as a code owner June 17, 2021 14:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Feature:Fleet)

@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

A few minor points, and one blocking question about a to-do comment. Looking great!

…ets-tab

* 'master' of github.com:elastic/kibana: (93 commits)
  [ML] Remove blank job definition as it is unused and out-of-sync with Elasticsearch (elastic#102506)
  [Lens] Fix wrong error detection on transition to Top values operation (elastic#102384)
  [ML] Anomaly detection job custom_settings improvements (elastic#102099)
  [Cases] Route: Get all alerts attach to a case (elastic#101878)
  Fixes wrong list exception type when creating endpoint event filters list (elastic#102522)
  remove search bar that's not working yet (elastic#102550)
  Migrated Ingest Node Pipeline Functional Tests to use test_user (elastic#102409)
  [Maps] clean up feature editing name space to avoid conflicts with layer settings editing (elastic#102516)
  [canvas] Refactor Storybook from bespoke to standard configuration (elastic#101962)
  [Security Solution] adds wrapSequences method (RAC) (elastic#102106)
  [FTR] Stabilize SSLP functional tests (elastic#102553)
  [K8] Added `Inter` font files for new theme (elastic#102359)
  [Workplace Search] Convert Groups pages to new page template (elastic#102449)
  [DOC] Add experimental disclaimer to rollup jobs (elastic#95624)
  [Security Solution][Endpoint] Suppress some of the jest console.error noise created by endpoint list middelware (elastic#102535)
  [Fleet] Improve performance of Fleet setup (elastic#102219)
  [Alerting] Add event log entry when a rule starts executing (elastic#102001)
  [Fleet] Update docker image of registry used in integration tests (elastic#101911)
  [Asset Management] Osquery telemetry updates (elastic#100754)
  Converts saved object tagging to new management layout (elastic#102284)
  ...

# Conflicts:
#	x-pack/plugins/fleet/kibana.json
@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens jloleysens requested a review from a team as a code owner June 21, 2021 07:48
Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

Stepped through everything locally from square one with the Nginx integration. Everything worked great! Thanks for resolving the few previous comments I had. Everything looks good to me here :shipit:

return http.basePath.prepend(`${KIBANA_BASE_PATH}#${path}`);
};

/**
Copy link
Member

Choose a reason for hiding this comment

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

Appreciate the callouts here on these stopgap solutions 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've created this issue for visibility, #102740

@jloleysens
Copy link
Contributor Author

Thanks for the review @hbharding ! I think I've addressed all of your feedback. Would you mind taking another look?

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

limits.yml LGTM

@dikshachauhan-qasource
Copy link

Hi @EricDavisX

As per proposed functionality we have created below 05 testcases to validate the above mentioned feature.
Further,we will validate and update these cases whenever feature code merges will be available. Test cases links are as follows:

Please have a review and let us know if anything else is required.

Thanks
QAS

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 469 473 +4

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 1013 1014 +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 680.0KB 690.2KB +10.1KB

Page load bundle

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

id before after diff
fleet 439.1KB 440.6KB +1.5KB
Unknown metric groups

API count

id before after diff
fleet 1104 1106 +2

History

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

cc @jloleysens

@jen-huang jen-huang requested a review from hbharding June 22, 2021 14:25
@jloleysens
Copy link
Contributor Author

@hbharding I am going to go ahead and merge this so long, happy to take on any further design feedback you have for this PR on a follow up 🍻 !

@jloleysens jloleysens merged commit 6cc3b84 into elastic:master Jun 22, 2021
@jloleysens jloleysens deleted the fleet/add-assets-tab branch June 22, 2021 15:10
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 22, 2021
* very wip

* added new assets screen
* added routes to new assets view on the package details view

* Finished styling the assets page layout, need to work on adding
links

* rather use EuiHorizontalRule

* only show the assets tab if installed

* Added hacky version of linking to assets.

* added comment about deprecation of current linking functionality

* added an initial version of the success toast with a link to the agent flyout

* First iteration of end-to-end UX working. Need to add a lot of tests!

* fixed navigation bug and added a comment

* added a lot more padding to bottom of form

* restructured code for clarity, updated deprecation comments and moved relevant code closer together

* added a longer form comment about the origin policyId

* added logic for handling load error

* refactor assets accordions out of assets page component

* slightly larger text in badge

* added some basic jest test for view data step in enrollment flyout

* adjusted sizing of numbers in badges again, EuiText does not know about size="l"

* updated size limits for fleet

* updated styling and layout of assets accordion based on original
designs

* remove unused EuiTitle

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 22, 2021
* very wip

* added new assets screen
* added routes to new assets view on the package details view

* Finished styling the assets page layout, need to work on adding
links

* rather use EuiHorizontalRule

* only show the assets tab if installed

* Added hacky version of linking to assets.

* added comment about deprecation of current linking functionality

* added an initial version of the success toast with a link to the agent flyout

* First iteration of end-to-end UX working. Need to add a lot of tests!

* fixed navigation bug and added a comment

* added a lot more padding to bottom of form

* restructured code for clarity, updated deprecation comments and moved relevant code closer together

* added a longer form comment about the origin policyId

* added logic for handling load error

* refactor assets accordions out of assets page component

* slightly larger text in badge

* added some basic jest test for view data step in enrollment flyout

* adjusted sizing of numbers in badges again, EuiText does not know about size="l"

* updated size limits for fleet

* updated styling and layout of assets accordion based on original
designs

* remove unused EuiTitle

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
@dikshachauhan-qasource
Copy link

Hi @EricDavisX

We have validated features on 7.14BC1 and found one issue that is not working fine.

Reported issue link on this feature is as follows:

Further, Please find test cases execution under below mentioned test run.

Thanks
QAS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Fleet Fleet team's agent central management project release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants