Skip to content

Commit

Permalink
add rowtype
Browse files Browse the repository at this point in the history
  • Loading branch information
fredwangwang committed Dec 12, 2019
1 parent 30644e5 commit 048b48b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const (
PluginlistType
AlertlistType
SinglestatType
RowType
)

const MixedSource = "-- Mixed --"
Expand Down Expand Up @@ -752,6 +753,12 @@ func (p *Panel) MarshalJSON() ([]byte, error) {
AlertlistPanel
}{p.CommonPanel, *p.AlertlistPanel}
return json.Marshal(outAlertlist)
case RowType:
var outRow = struct {
CommonPanel
RowPanel
}{p.CommonPanel, *p.RowPanel}
return json.Marshal(outRow)
case CustomType:
var outCustom = struct {
CommonPanel
Expand Down

0 comments on commit 048b48b

Please sign in to comment.