[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:
37
vendor/github.com/grafana-tools/sdk/annotation.go
generated
vendored
Normal file
37
vendor/github.com/grafana-tools/sdk/annotation.go
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
package sdk
|
||||
|
||||
// AnnotationResponse is representation of an existing annotation
|
||||
type AnnotationResponse struct {
|
||||
ID uint `json:"id"`
|
||||
AlertID uint `json:"alertId"`
|
||||
DashboardID uint `json:"dashboardId,omitempty"`
|
||||
PanelID uint `json:"panelId,omitempty"`
|
||||
UserID uint `json:"userId,omitempty"`
|
||||
UserName string `json:"userName,omitempty"`
|
||||
NewState string `json:"newState,omitempty"`
|
||||
PrevState string `json:"prevState,omitempty"`
|
||||
Time int64 `json:"time,omitempty"`
|
||||
TimeEnd int64 `json:"timeEnd,omitempty"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Text string `json:"text,omitempty"`
|
||||
Type string `json:"type"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
}
|
||||
|
||||
// CreateAnnotationRequest is a request to create a new annotation
|
||||
type CreateAnnotationRequest struct {
|
||||
DashboardID uint `json:"dashboardId,omitempty"`
|
||||
PanelID uint `json:"panelId,omitempty"`
|
||||
Time int64 `json:"time,omitempty"`
|
||||
TimeEnd int64 `json:"timeEnd,omitempty"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Text string `json:"text,omitempty"`
|
||||
}
|
||||
|
||||
// PatchAnnotationRequest is a request to patch an existing annotation
|
||||
type PatchAnnotationRequest struct {
|
||||
Time int64 `json:"time,omitempty"`
|
||||
TimeEnd int64 `json:"timeEnd,omitempty"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Text string `json:"text,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user