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

[Infrastructure UI] Create metric explorer views service and CRUD endpoints #155111

Closed
Tracked by #152617
tonyghiani opened this issue Apr 18, 2023 · 1 comment · Fixed by #155621
Closed
Tracked by #152617

[Infrastructure UI] Create metric explorer views service and CRUD endpoints #155111

tonyghiani opened this issue Apr 18, 2023 · 1 comment · Fixed by #155621
Assignees
Labels
Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@tonyghiani
Copy link
Contributor

tonyghiani commented Apr 18, 2023

📓 Summary

Part of #152617

Similarly to the InventoryView service created on the server, we want to create CRUD endpoints to read/write on the metrics-explorer-view saved object.

✔️ Acceptance criteria

  • Should initiate an MetricsExplorerViewsService in the infra plugin server.
  • Should create a CRUD API for all the read/write operations (findAll, get, create, update, delete).
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 18, 2023
@tonyghiani tonyghiani added Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Apr 18, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 18, 2023
@tonyghiani tonyghiani self-assigned this Apr 18, 2023
tonyghiani added a commit that referenced this issue Apr 26, 2023
…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 <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants