[v3.2] Add grafana dashboard importing API (#11)
* Add API to import grafana templates to kubesphere dashboard * Merge and fix the latest codes from kubesphere #2501 Signed-off-by: zhu733756 <talonzhu@yunify.com>
This commit is contained in:
@@ -49,6 +49,12 @@ type MetricData struct {
|
||||
MetricValues `json:"result,omitempty" description:"metric data including labels, time series and values" csv:"metric_values"`
|
||||
}
|
||||
|
||||
type DashboardEntity struct {
|
||||
GrafanaDashboardName string `json:"grafanaDashboardName"`
|
||||
GrafanaDashboardUrl string `json:"grafanaDashboardUrl,omitempty"`
|
||||
GrafanaDashboardContent string `json:"grafanaDashboardContent,omitempty"`
|
||||
}
|
||||
|
||||
// The first element is the timestamp, the second is the metric value.
|
||||
// eg, [1585658599.195, 0.528]
|
||||
type Point [2]float64
|
||||
|
||||
Reference in New Issue
Block a user