Skip to content

Commit

Permalink
Add FieldConfig field for StatPanel
Browse files Browse the repository at this point in the history
Signed-off-by: Pulak Kanti Bhowmick <[email protected]>
  • Loading branch information
pkbhowmick committed Nov 23, 2021
1 parent e7b85bb commit 9754d76
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 31 deletions.
18 changes: 9 additions & 9 deletions board_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ func TestBoardHasTag_TagNotExists(t *testing.T) {
}

func TestBoardAddLink(t *testing.T) {
b := sdk.NewBoard("Sample")
b.AddLink(sdk.Link {
Title: "test",
Type: "external_link",
IncludeVars: false,
})

if len(b.Links) != 1 {
b := sdk.NewBoard("Sample")
b.AddLink(sdk.Link{
Title: "test",
Type: "external_link",
IncludeVars: false,
})

if len(b.Links) != 1 {
t.Error("Link wasn't added")
}
}
}
45 changes: 23 additions & 22 deletions panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,28 +261,29 @@ type (
ValueName string `json:"valueName"`
}
StatPanel struct {
Colors []string `json:"colors"`
ColorValue bool `json:"colorValue"`
ColorBackground bool `json:"colorBackground"`
Decimals int `json:"decimals"`
Format string `json:"format"`
Gauge Gauge `json:"gauge,omitempty"`
MappingType *uint `json:"mappingType,omitempty"`
MappingTypes []*MapType `json:"mappingTypes,omitempty"`
MaxDataPoints *IntString `json:"maxDataPoints,omitempty"`
NullPointMode string `json:"nullPointMode"`
Postfix *string `json:"postfix,omitempty"`
PostfixFontSize *string `json:"postfixFontSize,omitempty"`
Prefix *string `json:"prefix,omitempty"`
PrefixFontSize *string `json:"prefixFontSize,omitempty"`
RangeMaps []*RangeMap `json:"rangeMaps,omitempty"`
SparkLine SparkLine `json:"sparkline,omitempty"`
Targets []Target `json:"targets,omitempty"`
Thresholds string `json:"thresholds"`
ValueFontSize string `json:"valueFontSize"`
ValueMaps []ValueMap `json:"valueMaps"`
ValueName string `json:"valueName"`
Options Options `json:"options"`
Colors []string `json:"colors"`
ColorValue bool `json:"colorValue"`
ColorBackground bool `json:"colorBackground"`
Decimals int `json:"decimals"`
Format string `json:"format"`
Gauge Gauge `json:"gauge,omitempty"`
MappingType *uint `json:"mappingType,omitempty"`
MappingTypes []*MapType `json:"mappingTypes,omitempty"`
MaxDataPoints *IntString `json:"maxDataPoints,omitempty"`
NullPointMode string `json:"nullPointMode"`
Postfix *string `json:"postfix,omitempty"`
PostfixFontSize *string `json:"postfixFontSize,omitempty"`
Prefix *string `json:"prefix,omitempty"`
PrefixFontSize *string `json:"prefixFontSize,omitempty"`
RangeMaps []*RangeMap `json:"rangeMaps,omitempty"`
SparkLine SparkLine `json:"sparkline,omitempty"`
Targets []Target `json:"targets,omitempty"`
Thresholds string `json:"thresholds"`
ValueFontSize string `json:"valueFontSize"`
ValueMaps []ValueMap `json:"valueMaps"`
ValueName string `json:"valueName"`
Options Options `json:"options"`
FieldConfig *FieldConfig `json:"fieldConfig,omitempty"`
}
DashlistPanel struct {
Mode string `json:"mode"`
Expand Down

0 comments on commit 9754d76

Please sign in to comment.