convert clusterdashboard to clusterdashboards.
Signed-off-by: zhu733756 <talonzhu@yunify.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
curl -d '{"grafanaDashboardUrl":"https://grafana.com/api/dashboards/7362/revisions/5/download", "description":"this is a test dashboard."}' -H "Content-Type: application/json" localhost:9090/kapis/monitoring.kubesphere.io/v1alpha3/clusterdashboard/test1/template
|
curl -d '{"grafanaDashboardUrl":"https://grafana.com/api/dashboards/7362/revisions/5/download", "description":"this is a test dashboard."}' -H "Content-Type: application/json" localhost:9090/kapis/monitoring.kubesphere.io/v1alpha3/clusterdashboards/test1/template
|
||||||
@@ -506,7 +506,7 @@ func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monito
|
|||||||
Returns(http.StatusOK, respOK, monitoring.Metric{})).
|
Returns(http.StatusOK, respOK, monitoring.Metric{})).
|
||||||
Produces(restful.MIME_JSON)
|
Produces(restful.MIME_JSON)
|
||||||
|
|
||||||
ws.Route(ws.POST("/clusterdashboard/{grafanaDashboardName}/template").
|
ws.Route(ws.POST("/clusterdashboards/{grafanaDashboardName}/template").
|
||||||
To(h.handleGrafanaDashboardImport).
|
To(h.handleGrafanaDashboardImport).
|
||||||
Doc("Convert Grafana templates to KubeSphere clusterdashboards.").
|
Doc("Convert Grafana templates to KubeSphere clusterdashboards.").
|
||||||
Param(ws.PathParameter("grafanaDashboardName", "The name of the Grafana template to be converted").DataType("string").Required(true)).
|
Param(ws.PathParameter("grafanaDashboardName", "The name of the Grafana template to be converted").DataType("string").Required(true)).
|
||||||
|
|||||||
Reference in New Issue
Block a user