Define frontend service layer for our backend and prometheus
Description
As part of #228761 (closed),
We want to refactor to create a new service that contains 2 service methods:
- yml-2-json, calls new API created at: #228758 (closed)
-
getPrometheusResults
which fetches with backoff like in the VueX store action.
The data flow is:
- Panel Builder -> Service -> Axios
- Dashboard Store -> Service -> Axios
Motivation
As the panel builder is "stateless" and does not connect to the store in its first iteration, we want to have service functions that are easy to call to provide data to the dashboard.
These services should also be used by the VueX store so they act as a middle-ware between the store and the backend.
Edited by Miguel Rincon