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] Tell users when assets are installed in a different space #125278

Merged

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented Feb 10, 2022

Summary

Related to #74353
Previously, when an integration was installed in space 1, when viewing the assets in space 2 we would simply show "no assets found". We now display "This integration is installed, but no assets are available in this space".

Screenshot 2022-02-10 at 15 56 00

Testing
I don't believe we have any cypress tests that create spaces yet so this seemed like more work than this bugfix deserves? I also believe the assets component has too many side effects for unit tests to be a good use of time here

  1. test the message is shown correctly:
  • create a space "space2"
  • install an integration in space2
  • switch to the default space
  • view the integrations assets, the new message should be displayed
  1. test "no assets found" still displays correctly
  • install "Custom UDP Logs" integration (doesnt have any assets)
  • view the assets tab
  • verify "No assets found" is displayed

Checklist

Delete any items that are not applicable to this PR.

@hop-dev hop-dev added bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team v8.1.0 labels Feb 10, 2022
@hop-dev hop-dev requested a review from a team as a code owner February 10, 2022 17:13
@hop-dev hop-dev self-assigned this Feb 10, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 567 568 +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 660.1KB 660.6KB +475.0B

History

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

cc @hop-dev

@hop-dev hop-dev added the auto-backport Deprecated - use backport:version if exact versions are needed label Feb 11, 2022
@hop-dev hop-dev merged commit a81b11e into elastic:main Feb 11, 2022
@hop-dev hop-dev deleted the 74353-assets-installed-in-separate-space branch February 11, 2022 13:41
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.1

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 11, 2022
…astic#125278)

* Show new message when assets installed in separate space

* move variable into useEffect

(cherry picked from commit a81b11e)
kibanamachine added a commit that referenced this pull request Feb 11, 2022
…25278) (#125373)

* Show new message when assets installed in separate space

* move variable into useEffect

(cherry picked from commit a81b11e)

Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
@@ -13,9 +13,10 @@ import { groupBy } from 'lodash';

import type { ResolvedSimpleSavedObject } from 'src/core/public';

import { useKibana } from '../../../../../../../../../../../src/plugins/kibana_react/public';
Copy link
Contributor

Choose a reason for hiding this comment

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

just swung by this PR to backport it as a patch to 8.0 and noticed this, we have useStartServices hook which encapsulates the plugin logic added by this PR so that can be use instead of traversing all the way to the kibana_react plugin:

export function useStartServices(): FleetStartServices {

I believe you'd just have to add spaces to the FleetStartServices interface. I think this would be a good candidate for a small PR 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Amazing thanks! I'll get that done some time soon

@jen-huang jen-huang added auto-backport Deprecated - use backport:version if exact versions are needed and removed auto-backport Deprecated - use backport:version if exact versions are needed labels Feb 14, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 14, 2022
…astic#125278)

* Show new message when assets installed in separate space

* move variable into useEffect

(cherry picked from commit a81b11e)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.0

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 Feb 14, 2022
…25278) (#125573)

* Show new message when assets installed in separate space

* move variable into useEffect

(cherry picked from commit a81b11e)

Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
@dikshachauhan-qasource
Copy link

Hi @jen-huang

We have validated this PR and found it working fine on 8.1.10 BC4.

  • "This integration is installed, but no assets are available in this space" is displayed to user when working in different space other then from where integrations were installed.
  • "No assets found" message displayed for integration that don't have any asset under current integration to navigate to.

Screenshot:
image

image

Build details:
BUILD: 50428
COMMIT: 015578b

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 bug Fixes for quality problems that affect the customer experience release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v8.0.1 v8.1.0 v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants