Skip to content

system: convert visualisations to lens #5740

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

Merged
merged 10 commits into from
May 2, 2023
Merged

system: convert visualisations to lens #5740

merged 10 commits into from
May 2, 2023

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Mar 30, 2023

What does this PR do?

Converts visualisations to Lens where possible.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

Caveats:

  • No "Convert to Lens" option was available for "Logon Sources [Windows System Security]" in User Logon Information
  • Word cloud, "Target Users [Windows System Security]", not converted in User Management Events
  • Word cloud "Group Management Events - Target Groups - Tag Cloud [Windows System Security]" not converted in Group Management Events
  • In the "Group Management Events - Groups vs Actions - Heatmap [Windows System Security]" the horizontal axis is visually broken because labels may not be rotated or omitted

Concerns:

I am concerned about the application of this change since it requires all users to be on 8.7 to pick up any future bug fixes.

How to test this PR locally

Related issues

Screenshots

Overview

Screenshot 2023-03-30 at 12 06 55

User Logon Information

Screenshot 2023-03-30 at 12 07 18

Logon Failed and Account Lockout

Screenshot 2023-03-30 at 12 07 45

fold

Screenshot 2023-03-30 at 12 20 49

User Management Events

Screenshot 2023-03-30 at 12 08 02

fold

Screenshot 2023-03-30 at 12 08 23

Group Management Events

Screenshot 2023-03-30 at 12 08 50

fold

Screenshot 2023-03-30 at 12 08 59

@efd6 efd6 added enhancement New feature or request Integration:system System dashboard Relates to a Kibana dashboard bug, enhancement, or modification. labels Mar 30, 2023
@efd6 efd6 requested a review from a team March 30, 2023 01:44
@efd6 efd6 self-assigned this Mar 30, 2023
@elasticmachine
Copy link

elasticmachine commented Mar 30, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-04-30T21:50:34.474+0000

  • Duration: 16 min 39 sec

Test stats 🧪

Test Results
Failed 0
Passed 145
Skipped 0
Total 145

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Mar 30, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (3/3) 💚
Files 100.0% (4/4) 💚 3.035
Classes 100.0% (4/4) 💚 3.035
Methods 60.759% (48/79) 👎 -30.934
Lines 99.535% (2780/2793) 👍 7.492
Conditionals 100.0% (0/0) 💚

@efd6 efd6 marked this pull request as ready for review March 30, 2023 04:42
@efd6 efd6 requested review from a team as code owners March 30, 2023 04:42
@efd6 efd6 requested review from rdner and cmacknz March 30, 2023 04:42
@rdner
Copy link
Member

rdner commented Mar 30, 2023

LGTM but I'd like @cmacknz to have a look as well, I don't have much experience with this.

@efd6
Copy link
Contributor Author

efd6 commented Mar 30, 2023

@rdner Agreed, I'd also like to wait for the kibana people too. @drewdaemon Can you take a look?

@cmacknz
Copy link
Member

cmacknz commented Mar 30, 2023

Not a visualization expert, don't wait for my approval on this.

Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

Generally speaking, this LGTM and I'm certainly happy to see this PR!

To state it "out-loud," this PR is limited to the following dashboards

  • [System Windows Security] User Management Events
  • [System] Windows Overview
  • [System Windows Security] User Logons
  • [System Windows Security] Group Management Events
  • [System Windows Security] Failed and Blocked Accounts

A few comments

  • I see that you are using the Legacy Metric Lens visualization. We recommend using the new Metric visualization instead, since the Legacy Metric will eventually be deprecated.
  • We generally recommend replacing tag clouds with horizontal bar charts to allow you to convert to Lens. See this comment for more info.
  • The description for the dashboard called [System Windows Security] Failed and Blocked Accounts includes mention of TSVB. Can we remove that?

Screenshot 2023-03-30 at 4 42 31 PM

  • I see that an old palette got transferred over automatically by the convert-to-Lens function in many of the visualizations. If there's no objection, could we change all those palettes to the current system default?

Old palette:
Screenshot 2023-03-30 at 4 37 09 PM

Default palette
Screenshot 2023-03-30 at 4 37 24 PM

@efd6
Copy link
Contributor Author

efd6 commented Mar 31, 2023

@drewdaemon Queries:

  1. Is there a way to convert a tag cloud to a histogram? I don't see an option for this. I've done it manually, but this seems to have a pretty significant impact on the semantics of the chart.
    These are adjacent visualisations looking at the same data with the same filters (none):
    Screenshot 2023-03-31 at 14 41 56

  2. It seems that the Compatibility palette is called "kibana_palette" in the JSON. Is it valid to just replace that name with "default" in the JSON directly? Digging through the UI to replace 20 instance of this seems sort of inefficient.

  3. The choice of staying with the legacy metric was because of the increased font size for this compared to the alternative. Is it possible to increase font size to use more/waste less of the available panel in the new metric visualisation?

@drewdaemon
Copy link
Contributor

@efd6

  1. Is there a way to convert a tag cloud to a histogram? I don't see an option for this. I've done it manually, but this seems to have a pretty significant impact on the semantics of the chart.

No, you have to do it manually ATM. I think I pretty much explained the pros and cons of switching to horizontal bar in the comment I linked you to. We may add Tag Cloud to Lens before serverless, so if you feel strongly you can leave them as they are. Worst-case scenario is that on serverless, they are read-only. At the end of the day, this is your call.

  1. It seems that the Compatibility palette is called "kibana_palette" in the JSON. Is it valid to just replace that name with "default" in the JSON directly? Digging through the UI to replace 20 instance of this seems sort of inefficient.

You can just delete the whole palette property.

"palette": {
      "type": "palette",
      "name": "kibana_palette"
},
  1. The choice of staying with the legacy metric was because of the increased font size for this compared to the alternative. Is it possible to increase font size to use more/waste less of the available panel in the new metric visualisation?

We've received this feedback before and are making the font larger and the breakpoints more generous in 8.8. But, we don't give users control over the size to promote alignment between metrics. Whitespace in visualizations isn't always wasted—it can actually promote faster comprehension. See this discuss post for more of our design thinking and the problems the new design solves.

Again, the choice is yours, but we would really like to see the new metric adopted here. We are actively working on ironing out the imperfections in the new design to where the legacy metric can be deprecated and eventually removed.

@efd6
Copy link
Contributor Author

efd6 commented Mar 31, 2023

Whitespace in visualizations isn't always wasted—it can actually promote faster comprehension. See this discuss post for more of our design thinking and the problems the new design solves.

Agree that in context whitespace is useful. I don't think it adds here since it's not separating things that need separation. My concern is the size and the non-centrality (tight border adjacency reduces the helpful whitespace) of the indicator and how that impacts on DEI (due to visual impairment). I didn't see anything in that post that gave evidence for reduced cognitive load with the new design unless perhaps appealing to the non-conformity of size. Did I miss it?

@drewdaemon
Copy link
Contributor

drewdaemon commented Mar 31, 2023

Thanks for the feedback.

My concern is the size and the non-centrality of the indicator and how that impacts on DEI (due to visual impairment).

I'm glad you're thinking this way. It does occur to me that most of the other textual data displayed in our visualizations are smaller than this (e.g. on a slice label, in a legend). We're also careful with contrast (we enforce WCAG AA compliance) which may mitigate some of the concern. However, I'll bring this up with the team since it could be an important area for improvement.

I didn't see anything in that post that gave evidence for reduced cognitive load with the new design unless perhaps appealing to the non-conformity of size. Did I miss it?

I think that the value of the new design is made clearer on the screenshots in that discussion. With the old metric, a) the visual alignment across multiple metrics is often broken and b) figures that actually have a smaller numeric value often appear larger, both sources of cognitive load.

If you want to discuss more or don't feel like I've fully understood your feedback, please feel free to reach out in #kibana-visualizations. I want to make sure we're hearing you.

As I said above, new investment will center on the metric visualization. However, I'm merely acting as a consultant so you have the final say here.

@efd6
Copy link
Contributor Author

efd6 commented Apr 2, 2023

Thanks @drewdaemon. I've removed the palette clauses, but I'll leave the metrics as they are until further discussion has been had.

@drewdaemon
Copy link
Contributor

FWIW, the team just decided to add tag cloud to Lens some time this year. Maybe around 8.10.

@narph narph requested a review from drewdaemon April 28, 2023 09:17
@narph
Copy link
Contributor

narph commented Apr 28, 2023

@drewdaemon , @elastic/security-external-integrations can we get some feedback/approval on this PR, it has been opened for a while?

cc @andrewkroh

Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

Apologies. I thought I had already approved!

efd6 added 3 commits May 1, 2023 07:19
No "Convert to Lens" option was available for "Logon Sources [Windows System Security]".
efd6 added 7 commits May 1, 2023 07:19
Word cloud, "Target Users [Windows System Security]", not converted.
Did not convert "Group Management Events - Target Groups - Tag Cloud  [Windows
System Security]".

In the "Group Management Events - Groups vs Actions - Heatmap [Windows System
Security]" the horizontal axis is visually broken because labels may not be
rotated or omitted.
Note that in the case of the user events, this appears to result in
significant semantic differences.
@efd6
Copy link
Contributor Author

efd6 commented Apr 30, 2023

@rdner Can you approve please?

@efd6 efd6 merged commit de439ef into elastic:main May 2, 2023
@elasticmachine
Copy link

Package system - 1.27.0 containing this change is available at https://epr.elastic.co/search?package=system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard Relates to a Kibana dashboard bug, enhancement, or modification. enhancement New feature or request Integration:system System
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants