[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:
26
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha2/annotations/dashboard_annotation_types.go
generated
vendored
Normal file
26
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha2/annotations/dashboard_annotation_types.go
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// +kubebuilder:object:generate=true
|
||||
|
||||
package anotations
|
||||
|
||||
// "github.com/grafana-tools/sdk,omitempty"
|
||||
// refers to https://pkg.go.dev/github.com/grafana-tools/sdk#Annotation
|
||||
|
||||
type Annotation struct {
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
Datasource string `json:"datasource,omitempty" yaml:"datasource,omitempty"`
|
||||
ShowLine bool `json:"showLine,omitempty" yaml:"showLine,omitempty"`
|
||||
IconColor string `json:"iconColor,omitempty" yaml:"iconColor,omitempty"`
|
||||
LineColor string `json:"lineColor,omitempty" yaml:"lineColor,omitempty"`
|
||||
IconSize uint `json:"iconSize,omitempty" yaml:"iconSize,omitempty"`
|
||||
Enable bool `json:"enable,omitempty" yaml:"enable,omitempty"`
|
||||
Query string `json:"query,omitempty" yaml:"query,omitempty"`
|
||||
Expr string `json:"expr,omitempty" yaml:"expr,omitempty"`
|
||||
Step string `json:"step,omitempty" yaml:"step,omitempty"`
|
||||
TextField string `json:"textField,omitempty" yaml:"textField,omitempty"`
|
||||
TextFormat string `json:"textFormat,omitempty" yaml:"textFormat,omitempty"`
|
||||
TitleFormat string `json:"titleFormat,omitempty" yaml:"titleFormat,omitempty"`
|
||||
TagsField string `json:"tagsField,omitempty" yaml:"tagsField,omitempty"`
|
||||
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
|
||||
TagKeys string `json:"tagKeys,omitempty" yaml:"tagKeys,omitempty"`
|
||||
Type string `json:"type,omitempty" yaml:"type,omitempty"`
|
||||
}
|
||||
43
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha2/annotations/zz_generated.deepcopy.go
generated
vendored
Normal file
43
vendor/kubesphere.io/monitoring-dashboard/api/v1alpha2/annotations/zz_generated.deepcopy.go
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2020 The KubeSphere authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by controller-gen. DO NOT EDIT.
|
||||
|
||||
package anotations
|
||||
|
||||
import ()
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Annotation) DeepCopyInto(out *Annotation) {
|
||||
*out = *in
|
||||
if in.Tags != nil {
|
||||
in, out := &in.Tags, &out.Tags
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Annotation.
|
||||
func (in *Annotation) DeepCopy() *Annotation {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Annotation)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
Reference in New Issue
Block a user