[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:
8
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha1/panels/graph_types.go
generated
vendored
8
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha1/panels/graph_types.go
generated
vendored
@@ -5,15 +5,15 @@ package panels
|
||||
// Graph visualizes range query results into a linear graph
|
||||
type Graph struct {
|
||||
// Name of the graph panel
|
||||
Title string `json:"title,omitempty"`
|
||||
//Title string `json:"title,omitempty"`
|
||||
// Must be `graph`
|
||||
Type string `json:"type"`
|
||||
//Type string `json:"type"`
|
||||
// Panel ID
|
||||
Id int64 `json:"id,omitempty"`
|
||||
//Id int64 `json:"id,omitempty"`
|
||||
// Panel description
|
||||
Description string `json:"description,omitempty"`
|
||||
// A collection of queries
|
||||
Targets []Target `json:"targets,omitempty"`
|
||||
//Targets []Target `json:"targets,omitempty"`
|
||||
// Display as a bar chart
|
||||
Bars bool `json:"bars,omitempty"`
|
||||
// Set series color
|
||||
|
||||
6
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha1/panels/row_types.go
generated
vendored
6
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha1/panels/row_types.go
generated
vendored
@@ -5,9 +5,9 @@ package panels
|
||||
// Row groups relevant charts
|
||||
type Row struct {
|
||||
// Name of the row panel
|
||||
Title string `json:"title,omitempty"`
|
||||
//Title string `json:"title,omitempty"`
|
||||
// Must be `row`
|
||||
Type string `json:"type"`
|
||||
//Type string `json:"type"`
|
||||
// Panel ID
|
||||
Id int64 `json:"id,omitempty"`
|
||||
//Id int64 `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
10
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha1/panels/singlestat_types.go
generated
vendored
10
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha1/panels/singlestat_types.go
generated
vendored
@@ -5,15 +5,15 @@ package panels
|
||||
// SingleStat shows instant query result
|
||||
type SingleStat struct {
|
||||
// Name of the signlestat panel
|
||||
Title string `json:"title,omitempty"`
|
||||
//Title string `json:"title,omitempty"`
|
||||
// Must be `singlestat`
|
||||
Type string `json:"type"`
|
||||
//Type string `json:"type"`
|
||||
// Panel ID
|
||||
Id int64 `json:"id,omitempty"`
|
||||
//Id int64 `json:"id,omitempty"`
|
||||
// A collection of queries
|
||||
Targets []Target `json:"targets,omitempty"`
|
||||
//Targets []Target `json:"targets,omitempty"`
|
||||
// Limit the decimal numbers
|
||||
Decimals int64 `json:"decimals,omitempty"`
|
||||
Decimals *int64 `json:"decimals,omitempty"`
|
||||
// Display unit
|
||||
Format string `json:"format,omitempty"`
|
||||
}
|
||||
|
||||
13
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha1/panels/zz_generated.deepcopy.go
generated
vendored
13
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha1/panels/zz_generated.deepcopy.go
generated
vendored
@@ -25,11 +25,6 @@ import ()
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Graph) DeepCopyInto(out *Graph) {
|
||||
*out = *in
|
||||
if in.Targets != nil {
|
||||
in, out := &in.Targets, &out.Targets
|
||||
*out = make([]Target, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Colors != nil {
|
||||
in, out := &in.Colors, &out.Colors
|
||||
*out = make([]string, len(*in))
|
||||
@@ -70,10 +65,10 @@ func (in *Row) DeepCopy() *Row {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SingleStat) DeepCopyInto(out *SingleStat) {
|
||||
*out = *in
|
||||
if in.Targets != nil {
|
||||
in, out := &in.Targets, &out.Targets
|
||||
*out = make([]Target, len(*in))
|
||||
copy(*out, *in)
|
||||
if in.Decimals != nil {
|
||||
in, out := &in.Decimals, &out.Decimals
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user