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

Empty index patterns page re-design #68819

Merged
merged 108 commits into from
Aug 12, 2020

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Jun 10, 2020

Re-do of #64258

Fixes #57401

As detailed in the issue referenced above this PR addresses the empty screens of Management / Index Patterns.

Screenshots below indicate "Before" on the left, and "After" on the right

No data

nodata

The screen above also shows the case where the license may not include a specific feature.

No index patterns

nopatterns


Those are the main new screens. Below are some slight updates to current screens.

Creation Wizard

Artboard2

Artboard3

Listing page

Artboard4

Checklist

@cchaos cchaos changed the title Index patterns/empty screen Empty index patterns page re-design Jun 10, 2020
@cchaos
Copy link
Contributor Author

cchaos commented Jun 10, 2020

@mattkime I think this PR is now ready to be passed on to you. There were a few NP problems I ran into with regards to snapshots that were beyond my skills. But here is a list for what is left

@cchaos cchaos mentioned this pull request Jun 10, 2020
9 tasks
@mattkime
Copy link
Contributor

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

merge conflict between base and head

@elastic elastic deleted a comment from kibanamachine Aug 7, 2020
@mattkime
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

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

Added a few minor comments. My only larger question is around this environment API -- it seems to me that the ultimate use of this is to make the cards showing various ingestion options pluggable.

If that's the case, rather than having the somewhat abstract concept of an "environment" which needs to be aware of all of the different plugins which will be consuming the API, should we not instead make the API a registry of cards which are included in the UI?

Then the ML plugin would handle the permissions checks & register the "upload" card directly, and the only thing index patterns management needs to do is render cards from the registry alongside the others.

To me it seems this would be an easier API to grok and make more sense long term (assuming we plan to keep this API around and it isn't just a temporary solution)

@mattkime
Copy link
Contributor

mattkime commented Aug 12, 2020

@lukeelmers

Then the ML plugin would handle the permissions checks & register the "upload" card directly, and the only thing index patterns management needs to do is render cards from the registry alongside the others.

The card is shown when the ML plugin is not present. The api is based off the api used by the home page, although with additional functionality.

I don't know what additional cards would be placed here, therefore a more complete api seems like over engineering. Its also possible that the api for discovering features will change - similar code in the home app has warning that state such. I think this is a situation where good enough is good enough.

@lukeelmers
Copy link
Member

The card is shown when the ML plugin is not present. The api is based off the api used by the home page, although with additional functionality.

Ah, I misunderstood. Then I guess my follow-up question would be: Can this be simplified by checking the core capabilities service in the index patterns management plugin directly? Then you don't need the ml -> index pattern mgmt dependency.

In the ML plugin the check looks like this:

coreStart.application.capabilities.ml.canFindFileStructure

Is this not something we can instead check in index patterns directly, or is there something else going on that would prevent us from doing this?

@mattkime
Copy link
Contributor

mattkime commented Aug 12, 2020

Can this be simplified by checking the core capabilities service in the index patterns management plugin directly? Then you don't need the ml -> index pattern mgmt dependency.

We're really performing two checks - can we use the feature? Should we be prompted to switch from OSS to basic? But we can't check the license directly because that code is in xpack. So we definitely need something registering on the index pattern management that communicates the license level. The existence of the ml plugin is being used to verify we're at least at basic.


Honestly, I think the amount of communication this has required indicates that something isn't very good but I'm not sure what to change. But I guess the complexity is due to oss vs xpack so thats not going away.

@elastic elastic deleted a comment from kibanamachine Aug 12, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
indexPatternManagement 216 +23 193

async chunks size

id value diff baseline
indexPatternManagement 806.6KB +108.5KB 698.1KB
ml 7.9MB +40.0B 7.9MB
total +108.5KB

page load bundle size

id value diff baseline
core 1.2MB +116.0B 1.2MB
data 1.4MB -15.0B 1.4MB
indexPatternManagement 135.4KB +2.1KB 133.3KB
ml 501.5KB +1.1KB 500.4KB
total +3.3KB

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

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

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

The existence of the ml plugin is being used to verify we're at least at basic.

Yeah I guess what I was wondering is if performing the ML capability check for canFindFileStructure would solve for both cases, as the capability would never be present in an OSS only distribution since the ML plugin would not exist to register it. But since basic licenses could previously "expire" I guess this wouldn't work in all cases, as feature controls are not yet license-aware.

I think identifying a pattern for dealing with these scenarios will be important as I expect them to become more prevalent, however IMO it's not worth delaying this PR over it. I've added it as a topic for an upcoming shared services sync.

Code updates LGTM!

@@ -16,7 +16,8 @@
"share",
"embeddable",
"uiActions",
"kibanaLegacy"
"kibanaLegacy",
"indexPatternManagement"
Copy link
Member

Choose a reason for hiding this comment

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

nit: This probably doesn't have to be a required plugin, but since there's already a hard requirement on the data plugin which houses the index patterns service, it probably doesn't make a difference whether it's required or optional.

@mattkime mattkime merged commit 5b64a4c into elastic:master Aug 12, 2020
mattkime pushed a commit to mattkime/kibana that referenced this pull request Aug 12, 2020
Empty index patterns page re-design
mattkime added a commit that referenced this pull request Aug 12, 2020
Empty index patterns page re-design

Co-authored-by: Caroline Horn <[email protected]>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 13, 2020
* master: (28 commits)
  [Task manager] Prevents edge case where already running tasks are reschedule every polling interval (elastic#74606)
  [Security Solution] Fix the status of timelines' bulk actions (elastic#74560)
  Data plugin: Suggested enhance pattern (elastic#74505)
  Use jest.useFakeTimers instead of hard coded timeout for tooltip tests. (elastic#74642)
  [Security Solution][lists] Adds tests for exception lists and items part 2 (elastic#74815)
  [Security Solution][Resolver] fix presentation role on edgeline (elastic#74869)
  [Security Solution][Detections] Refactor ML calls for newest ML permissions (elastic#74582)
  [bin/kibana-plugin] support KP plugins instead (elastic#74604)
  Reduce number of indexed fields in index pattern saved object (elastic#74817)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74892)
  Migrated last pieces of legacy fixture code (elastic#74470)
  Empty index patterns page re-design  (elastic#68819)
  [babel] coalese some versions to prevent breaking yarn install (elastic#74864)
  [Dashboard First] Decouple Attribute Service and By Value Embeddables (elastic#74302)
  Revert "[reporting] Pass along generic parameters in high-order route handler" (elastic#74891)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74879)
  [src/dev/build] implement a getBuildNumber() mock (elastic#74881)
  [Enterprise Search] Add solution-level side navigation (elastic#74705)
  [DOCS] Canvas docs 7.9 refresh (elastic#74000)
  [Security Solution][Resolver]Enzyme test related events closing (elastic#74811)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 13, 2020
…le-buffer-with-update-of-same-id

* upstream/master: (37 commits)
  [Task manager] Prevents edge case where already running tasks are reschedule every polling interval (elastic#74606)
  [Security Solution] Fix the status of timelines' bulk actions (elastic#74560)
  Data plugin: Suggested enhance pattern (elastic#74505)
  Use jest.useFakeTimers instead of hard coded timeout for tooltip tests. (elastic#74642)
  [Security Solution][lists] Adds tests for exception lists and items part 2 (elastic#74815)
  [Security Solution][Resolver] fix presentation role on edgeline (elastic#74869)
  [Security Solution][Detections] Refactor ML calls for newest ML permissions (elastic#74582)
  [bin/kibana-plugin] support KP plugins instead (elastic#74604)
  Reduce number of indexed fields in index pattern saved object (elastic#74817)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74892)
  Migrated last pieces of legacy fixture code (elastic#74470)
  Empty index patterns page re-design  (elastic#68819)
  [babel] coalese some versions to prevent breaking yarn install (elastic#74864)
  [Dashboard First] Decouple Attribute Service and By Value Embeddables (elastic#74302)
  Revert "[reporting] Pass along generic parameters in high-order route handler" (elastic#74891)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74879)
  [src/dev/build] implement a getBuildNumber() mock (elastic#74881)
  [Enterprise Search] Add solution-level side navigation (elastic#74705)
  [DOCS] Canvas docs 7.9 refresh (elastic#74000)
  [Security Solution][Resolver]Enzyme test related events closing (elastic#74811)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 13, 2020
* upstream/master: (45 commits)
  [Metrics UI] Fix inventory footer misalignment (elastic#74707)
  Remove legacy optimizer (elastic#73154)
  Update design-specific GH code-owners (elastic#74877)
  skip test Reporting paginates content elastic#74922
  [Metrics UI] Add Jest tests for alert previews (elastic#74890)
  Fixed tooltip (elastic#74074)
  [Ingest Pipelines] Processor forms for processors A-D (elastic#72849)
  [Observability] change ingest manager link (elastic#74928)
  [Task manager] Prevents edge case where already running tasks are reschedule every polling interval (elastic#74606)
  [Security Solution] Fix the status of timelines' bulk actions (elastic#74560)
  Data plugin: Suggested enhance pattern (elastic#74505)
  Use jest.useFakeTimers instead of hard coded timeout for tooltip tests. (elastic#74642)
  [Security Solution][lists] Adds tests for exception lists and items part 2 (elastic#74815)
  [Security Solution][Resolver] fix presentation role on edgeline (elastic#74869)
  [Security Solution][Detections] Refactor ML calls for newest ML permissions (elastic#74582)
  [bin/kibana-plugin] support KP plugins instead (elastic#74604)
  Reduce number of indexed fields in index pattern saved object (elastic#74817)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74892)
  Migrated last pieces of legacy fixture code (elastic#74470)
  Empty index patterns page re-design  (elastic#68819)
  ...
@cchaos cchaos deleted the index_patterns/empty_screen branch October 1, 2020 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages release_note:enhancement v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redesign and better call to action when users have no index pattern and navigating in Kibana