elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.76k stars 8.16k forks source link

[Console] Formatting breaks when using multiline strings #193242

Open dgieselaar opened 1 week ago

dgieselaar commented 1 week ago

In Console, you can format a request body (minify/prettify) by pressing Cmd+I. However, this is a noop when there are multiline strings in the request. Here's a snippet (note that this request will result in a 400, it's just a minimal reprod):

PUT _transform/entities-v1-history-builtin_data_streams-test
{
  "source": {
    "runtime_mappings": {
      "data_stream.name": {
        "type": "keyword",
        "script": """
            emit(doc['data_stream.type'].value + '-' + doc['data_stream.dataset'].value + '-' + doc['data_stream.namespace'].value);
          """
      }
    }
  }
}

Cmd+I does not do anything here.

elasticmachine commented 1 week ago

Pinging @elastic/kibana-management (Team:Kibana Management)