Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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