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

[Security Solution] add ability for network map to be toggable, prevent map from displaying without permissions #123336

Conversation

jamster10
Copy link
Contributor

@jamster10 jamster10 commented Jan 19, 2022

#75012

Summary

If a user is not permissioned to use maps plugin, they should not see any map related data. As such a conditional for Maps capability is now wrapped around the component.

Add ability for Map to be hidden (toggle closed). Not all users with the permission, want to see the map. As such toggling it, saves its state to local storage, so it is hidden/visible to the user for the entirety of their session.

To implement the above the map is now embedded into an accordion that toggles its state. This means the embeddable_header is no longer used.

Unpermissioned view of network (no network map):
image

Toggable map:
Recording 2022-01-13 at 14 04 56

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
  • Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)

Release Notes

Network map hidden from users without permission
Network map now toggable for user preference

@jamster10 jamster10 self-assigned this Jan 19, 2022
@jamster10 jamster10 added Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Explore UX: UI/UX Consultation Requires UX lead input/consult before development and UX lead approval on PR before merge. labels Jan 19, 2022
@jamster10 jamster10 requested a review from spong January 19, 2022 04:25
@jamster10 jamster10 force-pushed the 75012-bug-make-map-visibility-conditional-on-permissions-and-allow-map-toggle branch from 1b895d7 to 4d4a8e5 Compare January 19, 2022 04:31
@monina-n
Copy link

monina-n commented Jan 19, 2022

thanks @jamster10! overall it looks pretty good but the spacing on the Unpermissioned view without the map between the divider line and the visualizations look wider than the other view with the map. Is there something that's causing the extra space?

Other than that, the interaction itself looks good!

@stephmilovic
Copy link
Contributor

closes #75012

make sure you don't automatically close the ticket when this is merged. instead keep the issue open and add the fixed label

@stephmilovic stephmilovic changed the title add ability for network map to be toggable, prevent map from displaying without permissions [Security Solution] add ability for network map to be toggable, prevent map from displaying without permissions Jan 19, 2022
@stephmilovic stephmilovic added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Jan 19, 2022
Kristof-Pierre Cummings added 2 commits January 20, 2022 00:36
@jamster10 jamster10 marked this pull request as ready for review January 20, 2022 06:39
@jamster10 jamster10 requested a review from a team as a code owner January 20, 2022 06:39
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@jamster10 jamster10 requested a review from a team as a code owner January 20, 2022 18:27
Copy link
Member

@spong spong 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, tested locally, verified map only shows if role has ALL or READ privileges to Maps, and that clearing local storage works as expected. Also verified keyboard nav support for collapsing as well. LGTM! Thanks for taking care of this and improving the UX around maps @jamster10! 🙂

@stephmilovic
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for taking this ancient issue on, just in time for 8.0!

@jamster10 jamster10 enabled auto-merge (squash) January 25, 2022 18:02
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2857 2856 -1

Async chunks

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

id before after diff
securitySolution 4.6MB 4.6MB +117.0B

History

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

cc @jamster10

@jamster10 jamster10 merged commit 57d507c into elastic:main Jan 25, 2022
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 123336 or prevent reminders by adding the backport:skip label.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jan 27, 2022
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 123336 or prevent reminders by adding the backport:skip label.

7 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 123336 or prevent reminders by adding the backport:skip label.

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 123336 or prevent reminders by adding the backport:skip label.

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 123336 or prevent reminders by adding the backport:skip label.

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 123336 or prevent reminders by adding the backport:skip label.

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 123336 or prevent reminders by adding the backport:skip label.

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 123336 or prevent reminders by adding the backport:skip label.

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 123336 or prevent reminders by adding the backport:skip label.

@jamster10 jamster10 added the auto-backport Deprecated - use backport:version if exact versions are needed label Feb 9, 2022
@kibanamachine
Copy link
Contributor

The following labels were identified as gaps in your version labels and will be added automatically:

  • v8.2.0

If any of these should not be on your pull request, please manually remove them.

jamster10 added a commit to jamster10/kibana that referenced this pull request Feb 9, 2022
…nt map from displaying without permissions (elastic#123336)

* add ability for network map to be toggable, prevent map from displaying without permissions

* PR & test additions

* Found rogue semicolon

Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 57d507c)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 9, 2022
…nt map from displaying without permissions (elastic#123336)

* add ability for network map to be toggable, prevent map from displaying without permissions

* PR & test additions

* Found rogue semicolon

Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 57d507c)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.2 The branch "8.2" is invalid or doesn't exist
8.0

How to fix

Re-run the backport manually:

node scripts/backport --pr 123336

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

Questions ?

Please refer to the Backport tool documentation

jamster10 added a commit that referenced this pull request Feb 9, 2022
…nt map from displaying without permissions (#123336) (#125091)

* add ability for network map to be toggable, prevent map from displaying without permissions

* PR & test additions

* Found rogue semicolon

Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 57d507c)
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 9, 2022
kibanamachine added a commit that referenced this pull request Feb 9, 2022
…nt map from displaying without permissions (#123336) (#125092)

* add ability for network map to be toggable, prevent map from displaying without permissions

* PR & test additions

* Found rogue semicolon

Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 57d507c)

Co-authored-by: Kristof C <kpac.ja@gmail.com>
@jamster10 jamster10 removed the v8.2.0 label Feb 14, 2022
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 release_note:enhancement release_note:fix Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team UX: UI/UX Consultation Requires UX lead input/consult before development and UX lead approval on PR before merge. v8.0.1 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants