Skip to content

Commit

Permalink
Add timezone and tooltip to dashboard builder
Browse files Browse the repository at this point in the history
  • Loading branch information
leeyikjiun committed Jan 13, 2025
1 parent e9d07b1 commit 9acf3dc
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions observability-lib/grafana/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ type Builder struct {
}

type BuilderOptions struct {
Name string
Tags []string
Refresh string
TimeFrom string
TimeTo string
TimeZone string
AlertsTags map[string]string
Name string
Tags []string
Refresh string
TimeFrom string
TimeTo string
TimeZone string
GraphTooltip dashboard.DashboardCursorSync
AlertsTags map[string]string
}

func NewBuilder(options *BuilderOptions) *Builder {
Expand All @@ -46,7 +47,9 @@ func NewBuilder(options *BuilderOptions) *Builder {
if options.TimeZone == "" {
options.TimeZone = common.TimeZoneBrowser
}
builder.dashboardBuilder.Timezone(options.TimeZone)
builder.dashboardBuilder.
Timezone(options.TimeZone).
Tooltip(options.GraphTooltip)
}

if options.AlertsTags != nil {
Expand Down

0 comments on commit 9acf3dc

Please sign in to comment.