@@ -22,7 +22,6 @@ import (
2222 "strings"
2323
2424 "github.com/pkg/errors"
25- "go.uber.org/multierr"
2625
2726 "github.com/apache/dubbo-admin/pkg/config"
2827)
@@ -31,54 +30,22 @@ import (
3130type MetricDashboardConfig struct {
3231 config.BaseConfig
3332 // application level metrics panel
34- Application DashboardConfig `json:"application"`
33+ Application string `json:"application"`
3534 // instance level metrics panel
36- Instance DashboardConfig `json:"instance"`
35+ Instance string `json:"instance"`
3736 // service level metrics panel
38- Service DashboardConfig `json:"service"`
39- }
40-
41- func (c * MetricDashboardConfig ) PostProcess () error {
42- return multierr .Combine (
43- c .Application .PostProcess (),
44- c .Instance .PostProcess (),
45- c .Service .PostProcess (),
46- )
47- }
48-
49- func (c * MetricDashboardConfig ) Validate () error {
50- return multierr .Combine (
51- c .Application .Validate (),
52- c .Instance .Validate (),
53- c .Service .Validate (),
54- )
37+ Service string `json:"service"`
5538}
5639
5740// TraceDashboardConfig are grafana dashboards for traces display
5841type TraceDashboardConfig struct {
5942 config.BaseConfig
6043 // application level traces panel
61- Application DashboardConfig `json:"application"`
44+ Application string `json:"application"`
6245 // instance level traces panel
63- Instance DashboardConfig `json:"instance"`
46+ Instance string `json:"instance"`
6447 // service level traces panel
65- Service DashboardConfig `json:"service"`
66- }
67-
68- func (c * TraceDashboardConfig ) PostProcess () error {
69- return multierr .Combine (
70- c .Application .PostProcess (),
71- c .Instance .PostProcess (),
72- c .Service .PostProcess (),
73- )
74- }
75-
76- func (c * TraceDashboardConfig ) Validate () error {
77- return multierr .Combine (
78- c .Application .Validate (),
79- c .Instance .Validate (),
80- c .Service .Validate (),
81- )
48+ Service string `json:"service"`
8249}
8350
8451// DashboardConfig grafana dashboard config TODO add dynamic variables
0 commit comments