Update Bounds to follow string format
We updated DashboardCell to use string bounds rather than the [2]int64{} we were using before. This brings the Layout cells to parity with thatpull/1859/head
parent
2f63c1222e
commit
8674368da6
|
@ -100,10 +100,8 @@ func MarshalLayout(l chronograf.Layout) ([]byte, error) {
|
|||
|
||||
axes := make(map[string]*Axis, len(c.Axes))
|
||||
for a, r := range c.Axes {
|
||||
axis := [2]int64{}
|
||||
copy(axis[:], r.Bounds[:2])
|
||||
axes[a] = &Axis{
|
||||
Bounds: axis[:],
|
||||
Bounds: r.Bounds,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,9 +158,9 @@ func UnmarshalLayout(data []byte, l *chronograf.Layout) error {
|
|||
}
|
||||
axes := make(map[string]chronograf.Axis, len(c.Axes))
|
||||
for a, r := range c.Axes {
|
||||
axis := chronograf.Axis{}
|
||||
copy(axis.Bounds[:], r.Bounds[:2])
|
||||
axes[a] = axis
|
||||
axes[a] = chronograf.Axis{
|
||||
Bounds: r.Bounds,
|
||||
}
|
||||
}
|
||||
|
||||
cells[i] = chronograf.Cell{
|
||||
|
|
|
@ -110,7 +110,7 @@ func TestMarshalLayout(t *testing.T) {
|
|||
Name: "cell1",
|
||||
Axes: map[string]chronograf.Axis{
|
||||
"y": chronograf.Axis{
|
||||
Bounds: [2]int64{0, 100},
|
||||
Bounds: []string{"0", "100"},
|
||||
},
|
||||
},
|
||||
Queries: []chronograf.Query{
|
||||
|
|
Loading…
Reference in New Issue