[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:
zhu733756
2021-08-16 11:41:29 +08:00
committed by zhu733756
parent 9df6df5544
commit 242ceb54f6
217 changed files with 119028 additions and 96 deletions

View File

@@ -172,6 +172,12 @@ func (in *DashboardSpec) DeepCopy() *DashboardSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Panel) DeepCopyInto(out *Panel) {
*out = *in
out.PanelMeta = in.PanelMeta
if in.Targets != nil {
in, out := &in.Targets, &out.Targets
*out = make([]panels.Target, len(*in))
copy(*out, *in)
}
if in.Row != nil {
in, out := &in.Row, &out.Row
*out = new(panels.Row)
@@ -199,6 +205,21 @@ func (in *Panel) DeepCopy() *Panel {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PanelMeta) DeepCopyInto(out *PanelMeta) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PanelMeta.
func (in *PanelMeta) DeepCopy() *PanelMeta {
if in == nil {
return nil
}
out := new(PanelMeta)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Templating) DeepCopyInto(out *Templating) {
*out = *in