File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ Godoc generated documentation is available [here](https://pkg.go.dev/github.com/
3232``` go
3333package main
3434
35- import " github.com/smartcontractkit/chainlink-common/observability-lib/grafana"
35+ import (
36+ " fmt"
37+ " github.com/grafana/grafana-foundation-sdk/go/common"
38+ " github.com/smartcontractkit/chainlink-common/observability-lib/grafana"
39+ )
3640
3741func main () {
3842 builder := grafana.NewBuilder (&grafana.BuilderOptions {
@@ -57,11 +61,11 @@ func main() {
5761 builder.AddPanel (grafana.NewStatPanel (&grafana.StatPanelOptions {
5862 PanelOptions: &grafana.PanelOptions {
5963 Datasource: " Prometheus" ,
60- Title: " Uptime" ,
64+ Title: grafana. Pointer ( " Uptime" ) ,
6165 Description: " instance uptime" ,
6266 Span: 12 ,
6367 Height: 4 ,
64- Decimals: 2 ,
68+ Decimals: grafana. Pointer ( 2 .) ,
6569 Unit: " s" ,
6670 Query: []grafana.Query {
6771 {
@@ -77,11 +81,11 @@ func main() {
7781
7882 db , err := builder.Build ()
7983 if err != nil {
80- return nil , err
84+ return
8185 }
8286 json , err := db.GenerateJSON ()
8387 if err != nil {
84- return nil , err
88+ return
8589 }
8690 fmt.Println (string (json))
8791}
You can’t perform that action at this time.
0 commit comments