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

[maps] display search request warnings in legend #170653

Closed
nreese opened this issue Nov 6, 2023 · 1 comment · Fixed by #171144
Closed

[maps] display search request warnings in legend #170653

nreese opened this issue Nov 6, 2023 · 1 comment · Fixed by #171144
Assignees
Labels
enhancement New value added to drive a business result Feature:Maps Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@nreese
Copy link
Contributor

nreese commented Nov 6, 2023

Steps to view problem

  1. In console, run:
    PUT geo1
    {}
    
    PUT geo1/_mapping
    {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
    
    PUT geo1/_doc/1
    {
      "location": "25,25"
    }
    
    PUT geo2
    {}
    
    PUT geo2/_mapping
    {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
    
    PUT geo2/_doc/1
    {
      "location": "35,35"
    }
    
  2. Create geo* data view
  3. create new map, add documents layer from geo* data view.
  4. Set scaling to limit to 10,000
  5. add filter
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "geo2"
          }
        ]
      }
    }
    
  6. Notice how warning is displayed as toast message. Instead, warning should be displayed in legend. Layer icon should be warning icon and legend details should show warning callout with "View details link"
    Screenshot 2023-11-06 at 8 42 51 AM
@nreese nreese added enhancement New value added to drive a business result Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Feature:Maps labels Nov 6, 2023
@elasticmachine
Copy link
Contributor

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

@nreese nreese self-assigned this Nov 10, 2023
nreese added a commit that referenced this issue Nov 16, 2023
Closes #170653
Closes #170654

PR updates Maps to display incomplete result warnings in layer legend
(instead of displaying toast)

### Test setup
1. In console, run:
    ```
    PUT geo1
    {}

    PUT geo1/_mapping
    {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }

    PUT geo1/_doc/1
    {
      "location": "25,25"
    }

    PUT geo2
    {}

    PUT geo2/_mapping
    {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }

    PUT geo2/_doc/1
    {
      "location": "35,35"
    }
    ```
2. Create `geo*` data view

### Test vector tile request warning
"View details" button for vector tile requests is out of scope for this
PR. Vector tile requests use _mvt API instead of _search API. As such,
vector tile requests do not use search source or request inspector.

1. create new map, add documents layer from `geo*` data view.
2. add filter
    ```
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "geo2"
          }
        ]
      }
    }
    ```
<img width="400" alt="Screenshot 2023-11-13 at 2 08 06 PM"
src="https://github.com/elastic/kibana/assets/373691/8b608400-79d0-4800-9980-5af76b507a43">

### Test geojson incomplete results warning with single request
1. create new map, add documents layer from `geo*` data view.
2. Set scaling to "Limit results to 10000"
3. add filter
    ```
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "geo2"
          }
        ]
      }
    }
    ```
<img width="400" alt="Screenshot 2023-11-13 at 2 11 48 PM"
src="https://github.com/elastic/kibana/assets/373691/e1b1de01-1db7-40ad-b221-29f42baf5735">

### Test geojson incomplete results warning with multiple requests
1. create new map, add documents layer from `geo*` data view.
2. Set scaling to "Show clusters when results exceed 10000"
3. add filter
    ```
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "geo2"
          }
        ]
      }
    }
    ```
<img width="400" alt="Screenshot 2023-11-13 at 2 12 57 PM"
src="https://github.com/elastic/kibana/assets/373691/27beffc4-1dba-4ec4-90f8-e92002f8a63a">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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:Maps Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants