Add Label to DashboardCell Axis

It's useful for the frontend to be able to specify a label on a
particular axis. This adds a property to Axis to facilitate that.
pull/1714/head
Tim Raymond 2017-08-02 11:12:47 -04:00
parent d6322ae8f1
commit 89c0d84a8d
No known key found for this signature in database
GPG Key ID: 221ADC45076A48C0
6 changed files with 72 additions and 64 deletions

View File

@ -189,6 +189,7 @@ func MarshalDashboard(d chronograf.Dashboard) ([]byte, error) {
axes[a] = &Axis{
Bounds: r.Bounds,
LegacyBounds: axis[:],
Label: r.Label,
}
}
@ -270,6 +271,7 @@ func UnmarshalDashboard(data []byte, d *chronograf.Dashboard) error {
if r.Bounds != nil {
axes[a] = chronograf.Axis{
Bounds: r.Bounds,
Label: r.Label,
}
} else {
axes[a] = chronograf.Axis{

View File

@ -119,6 +119,7 @@ func (m *DashboardCell) GetAxes() map[string]*Axis {
type Axis struct {
LegacyBounds []int64 `protobuf:"varint,1,rep,name=legacyBounds" json:"legacyBounds,omitempty"`
Bounds []string `protobuf:"bytes,2,rep,name=bounds" json:"bounds,omitempty"`
Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
}
func (m *Axis) Reset() { *m = Axis{} }
@ -313,65 +314,65 @@ func init() {
func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) }
var fileDescriptorInternal = []byte{
// 950 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x8e, 0xe3, 0x44,
0x10, 0x56, 0xc7, 0x76, 0x12, 0xd7, 0xcc, 0x0e, 0xa8, 0xb5, 0x62, 0xcd, 0x72, 0x09, 0x16, 0x48,
0x01, 0x89, 0x01, 0xed, 0x0a, 0x09, 0x71, 0x4b, 0x26, 0x68, 0x15, 0x66, 0x76, 0x19, 0x3a, 0x33,
0xc3, 0x09, 0xad, 0x3a, 0x49, 0x25, 0x63, 0xad, 0x13, 0x9b, 0xb6, 0x3d, 0x89, 0x5f, 0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0xc9, 0xc0, 0xab, 0x9d,
0x7b, 0x76, 0xe8, 0xdc, 0xb3, 0xc6, 0xb9, 0x93, 0x71, 0xe5, 0xdc, 0xc9, 0x98, 0xb0, 0xb8, 0xac,
0x9c, 0x2b, 0x2e, 0x49, 0xb5, 0x67, 0x2a, 0x29, 0xd2, 0x71, 0x69, 0xe4, 0xf5, 0x45, 0x8d, 0xa9,
0xdd, 0x3f, 0xdc, 0xa2, 0xb2, 0x35, 0xfb, 0xc2, 0x22, 0x32, 0xc7, 0x85, 0x9e, 0x6a, 0x53, 0xa5,
0x01, 0xfc, 0x63, 0xf0, 0x04, 0x55, 0xa1, 0x4b, 0x3d, 0x10, 0x48, 0x87, 0x85, 0xc9, 0x86, 0x4f,
0xed, 0x35, 0x62, 0xb9, 0x4e, 0x53, 0x54, 0xd6, 0xd3, 0x06, 0x68, 0xee, 0x64, 0x87, 0x66, 0x1d,
0x39, 0xc2, 0x80, 0xf0, 0x47, 0xf0, 0x47, 0x31, 0xaa, 0x5c, 0x14, 0xf1, 0xeb, 0x4b, 0x8c, 0x83,
0xfb, 0xed, 0xec, 0xbb, 0x17, 0xd5, 0x24, 0xd0, 0xb9, 0xf1, 0xaf, 0xf3, 0x2f, 0xff, 0x9e, 0xcb,
0x54, 0x4e, 0x27, 0xba, 0xb1, 0x8e, 0xb0, 0x28, 0xfc, 0x14, 0x5c, 0x9a, 0x93, 0x16, 0xb3, 0xfb,
0xa6, 0x19, 0x9b, 0x77, 0xf5, 0x3f, 0x8e, 0xa7, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x33, 0xaf,
0xb8, 0xb8, 0x83, 0x08, 0x00, 0x00,
// 957 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0xd6, 0xc4, 0x76, 0x12, 0x9f, 0x76, 0x0b, 0x1a, 0xad, 0x58,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, 0xff, 0x0d, 0xf5, 0x54, 0xe9, 0x99, 0x08, 0x00, 0x00,
}

View File

@ -35,7 +35,8 @@ message DashboardCell {
message Axis {
repeated int64 legacyBounds = 1; // legacyBounds are an ordered 2-tuple consisting of lower and upper axis extents, respectively
repeated string bounds = 2; // bounds are an arbitrary list of client-defined bounds.
repeated string bounds = 2; // bounds are an arbitrary list of client-defined bounds.
string label = 3; // label is a description of this axis
}
message Template {

View File

@ -129,6 +129,7 @@ func Test_MarshalDashboard(t *testing.T) {
Axes: map[string]chronograf.Axis{
"y": chronograf.Axis{
Bounds: []string{"0", "3", "1-7", "foo"},
Label: "foo",
},
},
Type: "line",

View File

@ -568,8 +568,9 @@ type Dashboard struct {
// Axis represents the visible extents of a visualization
type Axis struct {
Bounds []string `json:"bounds"` // bounds are an arbitrary list of client-defined strings that specify the viewport for a cell
LegacyBounds [2]int64 `json:"-"` // legacy bounds are for testing a migration from an earlier version of axis
Bounds []string `json:"bounds"` // bounds are an arbitrary list of client-defined strings that specify the viewport for a cell
LegacyBounds [2]int64 `json:"-"` // legacy bounds are for testing a migration from an earlier version of axis
Label string `json:"label,omitempty"` // label is a description of this Axis
}
// DashboardCell holds visual and query information for a cell

View File

@ -226,6 +226,7 @@ func Test_newDashboardResponse(t *testing.T) {
},
"y": chronograf.Axis{
Bounds: []string{"2", "95"},
Label: "foo",
},
},
},
@ -272,6 +273,7 @@ func Test_newDashboardResponse(t *testing.T) {
},
"y": chronograf.Axis{
Bounds: []string{"2", "95"},
Label: "foo",
},
"y2": chronograf.Axis{
Bounds: []string{},