diff --git a/bolt/internal/internal.go b/bolt/internal/internal.go index 11f35474e..4b1f7b5e7 100644 --- a/bolt/internal/internal.go +++ b/bolt/internal/internal.go @@ -179,6 +179,19 @@ func MarshalDashboard(d chronograf.Dashboard) ([]byte, error) { } } + axes := make(map[string]*DashboardRange, len(c.Axes)) + for a, r := range c.Axes { + // need to explicitly allocate a new array because r.Bounds is + // over-written and the resulting slices from previous iterations will + // point to later iteration's data. It is _not_ enough to simply re-slice + // r.Bounds + axis := [2]int32{} + copy(axis[:], r.Bounds[:2]) + axes[a] = &DashboardRange{ + Bounds: axis[:], + } + } + cells[i] = &DashboardCell{ ID: c.ID, X: c.X, @@ -188,6 +201,7 @@ func MarshalDashboard(d chronograf.Dashboard) ([]byte, error) { Name: c.Name, Queries: queries, Type: c.Type, + Axes: axes, } } templates := make([]*Template, len(d.Templates)) @@ -251,6 +265,13 @@ func UnmarshalDashboard(data []byte, d *chronograf.Dashboard) error { } } + axes := make(map[string]chronograf.DashboardRange, len(c.Axes)) + for a, r := range c.Axes { + axis := chronograf.DashboardRange{} + copy(axis.Bounds[:], r.Bounds[:2]) + axes[a] = axis + } + cells[i] = chronograf.DashboardCell{ ID: c.ID, X: c.X, @@ -260,6 +281,7 @@ func UnmarshalDashboard(data []byte, d *chronograf.Dashboard) error { Name: c.Name, Queries: queries, Type: c.Type, + Axes: axes, } } diff --git a/bolt/internal/internal.pb.go b/bolt/internal/internal.pb.go index ac2b29b1a..64e5c3709 100644 --- a/bolt/internal/internal.pb.go +++ b/bolt/internal/internal.pb.go @@ -12,6 +12,7 @@ It has these top-level messages: Source Dashboard DashboardCell + DashboardRange Template TemplateValue TemplateQuery @@ -85,14 +86,15 @@ func (m *Dashboard) GetTemplates() []*Template { } type DashboardCell struct { - X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` - W int32 `protobuf:"varint,3,opt,name=w,proto3" json:"w,omitempty"` - H int32 `protobuf:"varint,4,opt,name=h,proto3" json:"h,omitempty"` - Queries []*Query `protobuf:"bytes,5,rep,name=queries" json:"queries,omitempty"` - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"` - ID string `protobuf:"bytes,8,opt,name=ID,proto3" json:"ID,omitempty"` + X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` + Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` + W int32 `protobuf:"varint,3,opt,name=w,proto3" json:"w,omitempty"` + H int32 `protobuf:"varint,4,opt,name=h,proto3" json:"h,omitempty"` + Queries []*Query `protobuf:"bytes,5,rep,name=queries" json:"queries,omitempty"` + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"` + ID string `protobuf:"bytes,8,opt,name=ID,proto3" json:"ID,omitempty"` + Axes map[string]*DashboardRange `protobuf:"bytes,9,rep,name=axes" json:"axes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` } func (m *DashboardCell) Reset() { *m = DashboardCell{} } @@ -107,6 +109,22 @@ func (m *DashboardCell) GetQueries() []*Query { return nil } +func (m *DashboardCell) GetAxes() map[string]*DashboardRange { + if m != nil { + return m.Axes + } + return nil +} + +type DashboardRange struct { + Bounds []int32 `protobuf:"varint,1,rep,name=bounds" json:"bounds,omitempty"` +} + +func (m *DashboardRange) Reset() { *m = DashboardRange{} } +func (m *DashboardRange) String() string { return proto.CompactTextString(m) } +func (*DashboardRange) ProtoMessage() {} +func (*DashboardRange) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{3} } + type Template struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` TempVar string `protobuf:"bytes,2,opt,name=temp_var,json=tempVar,proto3" json:"temp_var,omitempty"` @@ -119,7 +137,7 @@ type Template struct { func (m *Template) Reset() { *m = Template{} } func (m *Template) String() string { return proto.CompactTextString(m) } func (*Template) ProtoMessage() {} -func (*Template) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{3} } +func (*Template) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{4} } func (m *Template) GetValues() []*TemplateValue { if m != nil { @@ -144,7 +162,7 @@ type TemplateValue struct { func (m *TemplateValue) Reset() { *m = TemplateValue{} } func (m *TemplateValue) String() string { return proto.CompactTextString(m) } func (*TemplateValue) ProtoMessage() {} -func (*TemplateValue) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{4} } +func (*TemplateValue) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{5} } type TemplateQuery struct { Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` @@ -158,7 +176,7 @@ type TemplateQuery struct { func (m *TemplateQuery) Reset() { *m = TemplateQuery{} } func (m *TemplateQuery) String() string { return proto.CompactTextString(m) } func (*TemplateQuery) ProtoMessage() {} -func (*TemplateQuery) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{5} } +func (*TemplateQuery) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{6} } type Server struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` @@ -173,7 +191,7 @@ type Server struct { func (m *Server) Reset() { *m = Server{} } func (m *Server) String() string { return proto.CompactTextString(m) } func (*Server) ProtoMessage() {} -func (*Server) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{6} } +func (*Server) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{7} } type Layout struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` @@ -186,7 +204,7 @@ type Layout struct { func (m *Layout) Reset() { *m = Layout{} } func (m *Layout) String() string { return proto.CompactTextString(m) } func (*Layout) ProtoMessage() {} -func (*Layout) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{7} } +func (*Layout) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{8} } func (m *Layout) GetCells() []*Cell { if m != nil { @@ -211,7 +229,7 @@ type Cell struct { func (m *Cell) Reset() { *m = Cell{} } func (m *Cell) String() string { return proto.CompactTextString(m) } func (*Cell) ProtoMessage() {} -func (*Cell) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{8} } +func (*Cell) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{9} } func (m *Cell) GetQueries() []*Query { if m != nil { @@ -233,7 +251,7 @@ type Query struct { func (m *Query) Reset() { *m = Query{} } func (m *Query) String() string { return proto.CompactTextString(m) } func (*Query) ProtoMessage() {} -func (*Query) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{9} } +func (*Query) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{10} } func (m *Query) GetRange() *Range { if m != nil { @@ -250,7 +268,7 @@ type Range struct { func (m *Range) Reset() { *m = Range{} } func (m *Range) String() string { return proto.CompactTextString(m) } func (*Range) ProtoMessage() {} -func (*Range) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{10} } +func (*Range) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{11} } type AlertRule struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` @@ -262,7 +280,7 @@ type AlertRule struct { func (m *AlertRule) Reset() { *m = AlertRule{} } func (m *AlertRule) String() string { return proto.CompactTextString(m) } func (*AlertRule) ProtoMessage() {} -func (*AlertRule) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{11} } +func (*AlertRule) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{12} } type User struct { ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` @@ -272,12 +290,13 @@ type User struct { func (m *User) Reset() { *m = User{} } func (m *User) String() string { return proto.CompactTextString(m) } func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{12} } +func (*User) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{13} } func init() { proto.RegisterType((*Source)(nil), "internal.Source") proto.RegisterType((*Dashboard)(nil), "internal.Dashboard") proto.RegisterType((*DashboardCell)(nil), "internal.DashboardCell") + proto.RegisterType((*DashboardRange)(nil), "internal.DashboardRange") proto.RegisterType((*Template)(nil), "internal.Template") proto.RegisterType((*TemplateValue)(nil), "internal.TemplateValue") proto.RegisterType((*TemplateQuery)(nil), "internal.TemplateQuery") @@ -293,59 +312,64 @@ func init() { func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) } var fileDescriptorInternal = []byte{ - // 858 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xdd, 0x6e, 0xe3, 0x44, - 0x14, 0xd6, 0xc4, 0x76, 0x62, 0x9f, 0xee, 0x16, 0x34, 0x5a, 0xb1, 0x06, 0x6e, 0x22, 0x0b, 0xa4, - 0x82, 0x44, 0x41, 0xec, 0x13, 0xb4, 0xb5, 0x84, 0x42, 0xbb, 0x4b, 0x99, 0xb4, 0xe5, 0x0a, 0xad, - 0x26, 0xc9, 0x49, 0x6b, 0xed, 0x24, 0x36, 0x63, 0xbb, 0x59, 0xbf, 0x02, 0x57, 0x3c, 0x01, 0x12, - 0x12, 0x57, 0x5c, 0xf2, 0x02, 0x3c, 0x04, 0x2f, 0x84, 0xce, 0xcc, 0xf8, 0x27, 0x6c, 0x41, 0x7b, - 0xb5, 0x77, 0xf3, 0x9d, 0x33, 0xf9, 0xe6, 0xfc, 0x7c, 0x9f, 0x03, 0x87, 0xd9, 0xb6, 0x42, 0xbd, - 0x95, 0xea, 0xb8, 0xd0, 0x79, 0x95, 0xf3, 0xb0, 0xc5, 0xc9, 0xcf, 0x23, 0x18, 0xcf, 0xf3, 0x5a, - 0x2f, 0x91, 0x1f, 0xc2, 0x68, 0x96, 0xc6, 0x6c, 0xca, 0x8e, 0x3c, 0x31, 0x9a, 0xa5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, 0x07, 0x00, 0x00, + // 937 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x56, 0x51, 0x8f, 0xdb, 0x44, + 0x10, 0xd6, 0xc6, 0x76, 0x12, 0xcf, 0xb5, 0x07, 0x5a, 0x55, 0x74, 0x29, 0x2f, 0xc1, 0x02, 0x29, + 0x20, 0x11, 0x50, 0x2b, 0x24, 0xc4, 0x5b, 0x7a, 0x41, 0x28, 0xdc, 0xb5, 0x5c, 0x37, 0x77, 0xc7, + 0x13, 0xaa, 0x36, 0xc9, 0xe4, 0xce, 0xaa, 0x13, 0x9b, 0xb5, 0x7d, 0x39, 0xff, 0x05, 0x9e, 0xf8, + 0x05, 0x48, 0x48, 0xfc, 0x02, 0xc4, 0x3b, 0x3f, 0x82, 0x3f, 0x84, 0x66, 0x77, 0x6d, 0x27, 0x34, + 0x45, 0x7d, 0xe2, 0xe9, 0xf6, 0x9b, 0xd9, 0xcc, 0x78, 0xbf, 0xf9, 0xe6, 0xd3, 0xc1, 0x71, 0xbc, + 0x29, 0x50, 0x6f, 0x54, 0x32, 0xca, 0x74, 0x5a, 0xa4, 0xbc, 0x5f, 0xe3, 0xe8, 0xe7, 0x0e, 0x74, + 0x67, 0x69, 0xa9, 0x17, 0xc8, 0x8f, 0xa1, 0x33, 0x9d, 0x08, 0x36, 0x60, 0x43, 0x4f, 0x76, 0xa6, + 0x13, 0xce, 0xc1, 0x7f, 0xae, 0xd6, 0x28, 0x3a, 0x03, 0x36, 0x0c, 0xa5, 0x39, 0x53, 0xec, 0xa2, + 0xca, 0x50, 0x78, 0x36, 0x46, 0x67, 0xfe, 0x08, 0xfa, 0x97, 0x39, 0x55, 0x5b, 0xa3, 0xf0, 0x4d, + 0xbc, 0xc1, 0x94, 0x3b, 0x57, 0x79, 0xbe, 0x4d, 0xf5, 0x52, 0x04, 0x36, 0x57, 0x63, 0xfe, 0x2e, + 0x78, 0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, 0x7d, 0x0a, 0x3e, 0xed, 0xc9, + 0x4e, 0x65, 0xff, 0x4d, 0x3b, 0x36, 0xef, 0x9a, 0xff, 0x30, 0x9e, 0xfc, 0x13, 0x00, 0x00, 0xff, + 0xff, 0xa5, 0xc4, 0x18, 0xb5, 0x73, 0x08, 0x00, 0x00, } diff --git a/bolt/internal/internal.proto b/bolt/internal/internal.proto index 40a305718..95294dc4a 100644 --- a/bolt/internal/internal.proto +++ b/bolt/internal/internal.proto @@ -22,14 +22,19 @@ message Dashboard { } message DashboardCell { - int32 x = 1; // X-coordinate of Cell in the Dashboard - int32 y = 2; // Y-coordinate of Cell in the Dashboard - int32 w = 3; // Width of Cell in the Dashboard - int32 h = 4; // Height of Cell in the Dashboard - repeated Query queries = 5; // Time-series data queries for Dashboard - string name = 6; // User-facing name for this Dashboard - string type = 7; // Dashboard visualization type - string ID = 8; // id is the unique id of the dashboard. MIGRATED FIELD added in 1.2.0-beta6 + int32 x = 1; // X-coordinate of Cell in the Dashboard + int32 y = 2; // Y-coordinate of Cell in the Dashboard + int32 w = 3; // Width of Cell in the Dashboard + int32 h = 4; // Height of Cell in the Dashboard + repeated Query queries = 5; // Time-series data queries for Dashboard + string name = 6; // User-facing name for this Dashboard + string type = 7; // Dashboard visualization type + string ID = 8; // id is the unique id of the dashboard. MIGRATED FIELD added in 1.2.0-beta6 + map axes = 9; // Axes represent the graphical viewport for a cell's visualizations +} + +message DashboardRange { + repeated int32 bounds = 1; // bounds are an ordered 2-tuple consisting of lower and upper axis extents, respectively } message Template { diff --git a/chronograf.go b/chronograf.go index 233351684..e3993c58e 100644 --- a/chronograf.go +++ b/chronograf.go @@ -565,16 +565,22 @@ type Dashboard struct { Name string `json:"name"` } +// DashboardRange represents the visible extents of a visualization +type DashboardRange struct { + Bounds [2]int32 `json:"bounds"` // bounds are an ordered 2-tuple consisting of lower and upper axis extents, respectively +} + // DashboardCell holds visual and query information for a cell type DashboardCell struct { - ID string `json:"i"` - X int32 `json:"x"` - Y int32 `json:"y"` - W int32 `json:"w"` - H int32 `json:"h"` - Name string `json:"name"` - Queries []DashboardQuery `json:"queries"` - Type string `json:"type"` + ID string `json:"i"` + X int32 `json:"x"` + Y int32 `json:"y"` + W int32 `json:"w"` + H int32 `json:"h"` + Name string `json:"name"` + Queries []DashboardQuery `json:"queries"` + Axes map[string]DashboardRange `json:"axes"` + Type string `json:"type"` } // DashboardsStore is the storage and retrieval of dashboards