kibana/x-pack/plugins/infra/server/routes
Marco Antonio Ghiani 61bb52c65b
[Infrastructure UI] Implement Metrics explorer views CRUD endpoints (#155621)
## 📓  Summary

Part of #152617 
Closes #155111  

This PR implements the CRUD endpoints for the metrics explorer views.
Following the approach used for the InventoryView service, it exposes a
client that abstracts all the logic concerned to the
`metrics-explorer-view` saved objects.

It also follows the guideline provided for [Versioning
interfaces](https://docs.elastic.dev/kibana-dev-docs/versioning-interfaces)
and [Versioning HTTP
APIs](https://docs.elastic.dev/kibana-dev-docs/versioning-http-apis),
preparing for the serverless.

## 🤓 Tips for the reviewer
You can open the Kibana dev tools and play with the following snippet to
test the create APIs, or you can perform the same requests with your
preferred client:
```
// Get all
GET kbn:/api/infra/metrics_explorer_views

// Create one
POST kbn:/api/infra/metrics_explorer_views
{
  "attributes": {
    "name": "My view"
  }
}

// Get one
GET kbn:/api/infra/metrics_explorer_views/<switch-with-id>

// Update one
PUT kbn:/api/infra/metrics_explorer_views/<switch-with-id>
{
  "attributes": {
    "name": "My view 2"
  }
}

// Delete one
DELETE kbn:/api/infra/metrics_explorer_views/<switch-with-id>
```

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-26 14:23:48 +02:00
..
infra [Infrastructure UI] Replace Snapshot API with InfraMetrics API in Hosts View (#155531) 2023-04-24 15:02:44 -03:00
infra_ml Change ContextContainer to lazily initialize providers (#129896) 2022-04-22 13:15:58 +02:00
inventory_metadata Change ContextContainer to lazily initialize providers (#129896) 2022-04-22 13:15:58 +02:00
inventory_views [Infrastructure UI] Implement Metrics explorer views CRUD endpoints (#155621) 2023-04-26 14:23:48 +02:00
log_alerts [AO] - Add scaffolding and the main chart to the Logs threshold Alert Details page (#153081) 2023-03-28 18:15:47 +02:00
log_analysis [Logs UI] Support inline Log Views in routes (#151760) 2023-03-02 13:04:51 +00:00
log_entries [Logs UI] Support inline Log Views in routes (#151760) 2023-03-02 13:04:51 +00:00
log_views [Logs UI] Store Logs UI settings in a dedicated infrastructure-monitoring-log-view saved object (#125014) 2022-03-31 16:08:01 +02:00
metadata rename @elastic/* packages to @kbn/* (#138957) 2022-08-18 08:54:42 -07:00
metrics_api
metrics_explorer Custom equation editor for Metric Threshold Rule (#148732) 2023-02-01 07:59:50 -07:00
metrics_explorer_views [Infrastructure UI] Implement Metrics explorer views CRUD endpoints (#155621) 2023-04-26 14:23:48 +02:00
metrics_sources [Infrastructure UI] Improve error handling metric index (#152840) 2023-03-23 18:34:09 +01:00
node_details Change ContextContainer to lazily initialize providers (#129896) 2022-04-22 13:15:58 +02:00
overview Fixes issue in sorting using TX and RX columns (#145994) 2022-11-29 10:41:18 +01:00
process_list
snapshot [Logs UI] Support inline Log Views in routes (#151760) 2023-03-02 13:04:51 +00:00
ip_to_hostname.ts