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

[lens] 'View details' UI action to open clusters inspector tab when request fails #171570

Closed
Tracked by #164350
nreese opened this issue Nov 20, 2023 · 2 comments · Fixed by #172971
Closed
Tracked by #164350

[lens] 'View details' UI action to open clusters inspector tab when request fails #171570

nreese opened this issue Nov 20, 2023 · 2 comments · Fixed by #172971
Assignees
Labels
enhancement New value added to drive a business result Feature:Lens Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@nreese
Copy link
Contributor

nreese commented Nov 20, 2023

Breaking #167904 into multiple parts.

Lens should display "View details" UI action that takes users to inspector clusters tab, similar to Discover and maps.

Example of how Discover provides "View details" action on search error
Screenshot 2023-11-07 at 12 53 31 PM

Example of how Maps provides "View details" action on search error
Screenshot 2023-11-08 at 12 07 42 PM

@nreese nreese added enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Nov 20, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@nreese nreese self-assigned this Nov 20, 2023
@nreese nreese added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Nov 20, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

This was referenced Nov 20, 2023
nreese added a commit that referenced this issue Dec 7, 2023
Part of #171570

PR breaks EsError out of data plugin and into @kbn/search-errors
package. This will allow for future efforts to move [lens error
handing](https://github.com/elastic/kibana/blob/main/x-pack/plugins/lens/public/editor_frame_service/error_helper.tsx)
into this package and more closely align error handling across kibana.

An unplanned part of this PR was moving `BfetchRequestError` into its
own package `@kbn/bfetch`. This is required because `@kbn/search-errors`
package can not import code from a plugin. `BfetchRequestError` could
not be part of `@kbn/search-errors` because that created a circular
dependency graph.

Another unexpected problem found while working on this PR is that the
package had to be included in `ui-shared-deps`. The reason for this is
that `renderSearchError` uses `instanceof EsError` check to determine if
an error is an EsError. This check failed when the package was not
included in `ui-shared-deps` because each plugin got its own copy of
`kbn/search-error` plugin. This meant that `data` plugin had its own
copy of `EsError` class when the error is generated, then `discover`
plugin had its own copy of `EsError` class when the instanceof check
occurs. `instanceof` check unexpectedly returned false in this case.
Moving plugin to `ui-shared-deps` results in a single instance of the
plugin. Thanks @mistic for the help with moving package into
`ui-shared-deps`

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Tiago Costa <[email protected]>
Co-authored-by: Davis McPhee <[email protected]>
nreese added a commit that referenced this issue Dec 20, 2023
…hen request fails (#172971)

Closes #171570

PR make the following changes
1. Consolidates data EsError logic and Lens EsError logic. This resulted
in being able to remove large parts of lens error_helper.tsx file.
2. Consolidates lens WorkspacePanel error logic. Before PR configuration
errors and data loading errors each rendered their own version of
EuiEmptyPrompt with slightly different behavior. Now, both render
WorkspaceErrors component and have the same behavior
3. Updated lens ExpressionWrapper to return original error to embeddable
output.

### Test - EsError in embeddable
1. install sample web logs
2. create new dashboard
3. Click "Create visualization"
4. Drag "timestamp" field into workspace.
5. Click "Save and return"
6. Add filter
    ```
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "kibana_sample_data_logs"
          }
        ]
      }
    }
    ```
7. Verify EsError and "View details" action are displayed
<img width="500" alt="Screenshot 2023-12-08 at 1 34 20 PM"
src="https://github.com/elastic/kibana/assets/373691/1c65b7f3-ece7-4000-a5b2-11127cc38f01">

### Test - multiple configuration errors in lens editor
1. install sample web logs
2. create new lens visualization
3. Drag "timestamp" field into workspace.
4. Add filter
    ```
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "kibana_sample_data_logs"
          }
        ]
      }
    }
    ```
5. Verify EsError and "View details" action are displayed
<img width="500" alt="Screenshot 2023-12-08 at 1 09 22 PM"
src="https://github.com/elastic/kibana/assets/373691/22023512-d344-4f99-abbd-8427d764f821">

### Test - EsError in embeddable
1. install sample web logs
2. create new dashboard
3. Click "Create visualization"
4. Drag "timestamp" field into workspace.
5. Change "Vertical axis" to "Cumulative sum". Select "Field" select and
hit delete key
6. Clone layer one or more times
7. Verify pagination is displayed, allowing users to click through all
configuration errors
<img width="500" alt="Screenshot 2023-12-08 at 12 59 18 PM"
src="https://github.com/elastic/kibana/assets/373691/6302658a-8cf7-4a1a-a117-ae810c0af539">

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Marco Liberati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants