From 41253990546c6c48df066eec594582b0f2e29b21 Mon Sep 17 00:00:00 2001 From: Jared Scheib Date: Fri, 29 Jun 2018 18:44:57 -0700 Subject: [PATCH] Add API to get/update log viewer UI config Co-authored-by: Jared Scheib --- bolt/config.go | 105 ++++ bolt/config_test.go | 307 ++++++++++ bolt/internal/internal.go | 43 ++ bolt/internal/internal.pb.go | 1120 ++++++---------------------------- bolt/internal/internal.proto | 19 +- chronograf.go | 37 +- server/config.go | 28 +- server/config_test.go | 129 +++- server/mux.go | 6 +- 9 files changed, 835 insertions(+), 959 deletions(-) diff --git a/bolt/config.go b/bolt/config.go index 432b964b5..45ee0fdb1 100644 --- a/bolt/config.go +++ b/bolt/config.go @@ -36,6 +36,111 @@ func (s *ConfigStore) Initialize(ctx context.Context) error { Auth: chronograf.AuthConfig{ SuperAdminNewUsers: false, }, + LogViewerUI: chronograf.LogViewerUIConfig{ + Columns: []chronograf.LogViewerUIColumn{ + { + Name: "time", + Position: 0, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "hidden", + }, + }, + }, + { + Name: "severity", + Position: 1, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + { + Type: "label", + Value: "icon", + }, + { + Type: "label", + Value: "text", + }, + }, + }, + { + Name: "timestamp", + Position: 2, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "message", + Position: 3, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "facility", + Position: 4, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "procid", + Position: 5, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + { + Type: "displayName", + Value: "Proc ID", + }, + }, + }, + { + Name: "appname", + Position: 6, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + { + Type: "displayName", + Value: "Application", + }, + }, + }, + { + Name: "host", + Position: 7, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + }, + }, + }, + }, } return s.Update(ctx, &cfg) } diff --git a/bolt/config_test.go b/bolt/config_test.go index 3493891db..b49bc722d 100644 --- a/bolt/config_test.go +++ b/bolt/config_test.go @@ -24,6 +24,111 @@ func TestConfig_Get(t *testing.T) { Auth: chronograf.AuthConfig{ SuperAdminNewUsers: false, }, + LogViewerUI: chronograf.LogViewerUIConfig{ + Columns: []chronograf.LogViewerUIColumn{ + { + Name: "time", + Position: 0, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "hidden", + }, + }, + }, + { + Name: "severity", + Position: 1, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + { + Type: "label", + Value: "icon", + }, + { + Type: "label", + Value: "text", + }, + }, + }, + { + Name: "timestamp", + Position: 2, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "message", + Position: 3, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "facility", + Position: 4, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "procid", + Position: 5, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + { + Type: "displayName", + Value: "Proc ID", + }, + }, + }, + { + Name: "appname", + Position: 6, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + { + Type: "displayName", + Value: "Application", + }, + }, + }, + { + Name: "host", + Position: 7, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + }, + }, + }, + }, }, }, }, @@ -67,6 +172,107 @@ func TestConfig_Update(t *testing.T) { Auth: chronograf.AuthConfig{ SuperAdminNewUsers: false, }, + LogViewerUI: chronograf.LogViewerUIConfig{ + Columns: []chronograf.LogViewerUIColumn{ + { + Name: "time", + Position: 1, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "severity", + Position: 0, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + { + Type: "label", + Value: "text", + }, + }, + }, + { + Name: "timestamp", + Position: 2, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "message", + Position: 3, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "facility", + Position: 4, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "procid", + Position: 5, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + { + Type: "displayName", + Value: "Milkshake", + }, + }, + }, + { + Name: "appname", + Position: 6, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + { + Type: "displayName", + Value: "Application", + }, + }, + }, + { + Name: "host", + Position: 7, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + }, + }, + }, + }, }, }, wants: wants{ @@ -74,6 +280,107 @@ func TestConfig_Update(t *testing.T) { Auth: chronograf.AuthConfig{ SuperAdminNewUsers: false, }, + LogViewerUI: chronograf.LogViewerUIConfig{ + Columns: []chronograf.LogViewerUIColumn{ + { + Name: "time", + Position: 1, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "severity", + Position: 0, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + { + Type: "label", + Value: "text", + }, + }, + }, + { + Name: "timestamp", + Position: 2, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "message", + Position: 3, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "facility", + Position: 4, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + }, + }, + { + Name: "procid", + Position: 5, + Encoding: []chronograf.ColumnEncoding{ + + { + Type: "visibility", + Value: "visible", + }, + { + Type: "displayName", + Value: "Milkshake", + }, + }, + }, + { + Name: "appname", + Position: 6, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + { + Type: "displayName", + Value: "Application", + }, + }, + }, + { + Name: "host", + Position: 7, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "visibility", + Value: "visible", + }, + }, + }, + }, + }, }, }, }, diff --git a/bolt/internal/internal.go b/bolt/internal/internal.go index b9a59fc94..a3c77bc2a 100644 --- a/bolt/internal/internal.go +++ b/bolt/internal/internal.go @@ -716,10 +716,31 @@ func UnmarshalOrganizationPB(data []byte, o *Organization) error { // MarshalConfig encodes a config to binary protobuf format. func MarshalConfig(c *chronograf.Config) ([]byte, error) { + columns := make([]*LogViewerUIColumn, len(c.LogViewerUI.Columns)) + for i, column := range c.LogViewerUI.Columns { + encodings := make([]*ColumnEncoding, len(column.Encoding)) + + for j, e := range column.Encoding { + encodings[j] = &ColumnEncoding{ + Type: e.Type, + Value: e.Value, + Name: e.Name, + } + } + + columns[i] = &LogViewerUIColumn{ + Name: column.Name, + Position: column.Position, + Encoding: encodings, + } + } return MarshalConfigPB(&Config{ Auth: &AuthConfig{ SuperAdminNewUsers: c.Auth.SuperAdminNewUsers, }, + LogViewerUI: &LogViewerUIConfig{ + Columns: columns, + }, }) } @@ -739,6 +760,28 @@ func UnmarshalConfig(data []byte, c *chronograf.Config) error { } c.Auth.SuperAdminNewUsers = pb.Auth.SuperAdminNewUsers + if pb.LogViewerUI == nil { + return fmt.Errorf("Log Viewer UI config is nil") + } + + columns := make([]chronograf.LogViewerUIColumn, len(pb.LogViewerUI.Columns)) + + for i, c := range pb.LogViewerUI.Columns { + columns[i].Name = c.Name + columns[i].Position = c.Position + + encodings := make([]chronograf.ColumnEncoding, len(c.Encoding)) + for j, e := range c.Encoding { + encodings[j].Type = e.Type + encodings[j].Value = e.Value + encodings[j].Name = e.Name + } + + columns[i].Encoding = encodings + } + + c.LogViewerUI.Columns = columns + return nil } diff --git a/bolt/internal/internal.pb.go b/bolt/internal/internal.pb.go index 19a76f781..ff914f42f 100644 --- a/bolt/internal/internal.pb.go +++ b/bolt/internal/internal.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-gogo. // source: internal.proto +// DO NOT EDIT! /* Package internal is a generated protocol buffer package. @@ -33,6 +34,9 @@ It has these top-level messages: Organization Config AuthConfig + LogViewerUIConfig + LogViewerUIColumn + ColumnEncoding BuildInfo */ package internal @@ -74,104 +78,6 @@ func (m *Source) String() string { return proto.CompactTextString(m) func (*Source) ProtoMessage() {} func (*Source) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{0} } -func (m *Source) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *Source) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Source) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Source) GetUsername() string { - if m != nil { - return m.Username - } - return "" -} - -func (m *Source) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -func (m *Source) GetURL() string { - if m != nil { - return m.URL - } - return "" -} - -func (m *Source) GetDefault() bool { - if m != nil { - return m.Default - } - return false -} - -func (m *Source) GetTelegraf() string { - if m != nil { - return m.Telegraf - } - return "" -} - -func (m *Source) GetInsecureSkipVerify() bool { - if m != nil { - return m.InsecureSkipVerify - } - return false -} - -func (m *Source) GetMetaURL() string { - if m != nil { - return m.MetaURL - } - return "" -} - -func (m *Source) GetSharedSecret() string { - if m != nil { - return m.SharedSecret - } - return "" -} - -func (m *Source) GetOrganization() string { - if m != nil { - return m.Organization - } - return "" -} - -func (m *Source) GetRole() string { - if m != nil { - return m.Role - } - return "" -} - -func (m *Source) GetDefaultRP() string { - if m != nil { - return m.DefaultRP - } - return "" -} - type Dashboard struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` @@ -185,20 +91,6 @@ func (m *Dashboard) String() string { return proto.CompactTextString( func (*Dashboard) ProtoMessage() {} func (*Dashboard) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{1} } -func (m *Dashboard) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *Dashboard) GetName() string { - if m != nil { - return m.Name - } - return "" -} - func (m *Dashboard) GetCells() []*DashboardCell { if m != nil { return m.Cells @@ -213,13 +105,6 @@ func (m *Dashboard) GetTemplates() []*Template { return nil } -func (m *Dashboard) GetOrganization() string { - if m != nil { - return m.Organization - } - return "" -} - 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"` @@ -243,34 +128,6 @@ func (m *DashboardCell) String() string { return proto.CompactTextStr func (*DashboardCell) ProtoMessage() {} func (*DashboardCell) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{2} } -func (m *DashboardCell) GetX() int32 { - if m != nil { - return m.X - } - return 0 -} - -func (m *DashboardCell) GetY() int32 { - if m != nil { - return m.Y - } - return 0 -} - -func (m *DashboardCell) GetW() int32 { - if m != nil { - return m.W - } - return 0 -} - -func (m *DashboardCell) GetH() int32 { - if m != nil { - return m.H - } - return 0 -} - func (m *DashboardCell) GetQueries() []*Query { if m != nil { return m.Queries @@ -278,27 +135,6 @@ func (m *DashboardCell) GetQueries() []*Query { return nil } -func (m *DashboardCell) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *DashboardCell) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *DashboardCell) GetID() string { - if m != nil { - return m.ID - } - return "" -} - func (m *DashboardCell) GetAxes() map[string]*Axis { if m != nil { return m.Axes @@ -334,13 +170,6 @@ func (m *DashboardCell) GetFieldOptions() []*RenamableField { return nil } -func (m *DashboardCell) GetTimeFormat() string { - if m != nil { - return m.TimeFormat - } - return "" -} - func (m *DashboardCell) GetDecimalPlaces() *DecimalPlaces { if m != nil { return m.DecimalPlaces @@ -358,20 +187,6 @@ func (m *DecimalPlaces) String() string { return proto.CompactTextStr func (*DecimalPlaces) ProtoMessage() {} func (*DecimalPlaces) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{3} } -func (m *DecimalPlaces) GetIsEnforced() bool { - if m != nil { - return m.IsEnforced - } - return false -} - -func (m *DecimalPlaces) GetDigits() int32 { - if m != nil { - return m.Digits - } - return 0 -} - type TableOptions struct { VerticalTimeAxis bool `protobuf:"varint,2,opt,name=verticalTimeAxis,proto3" json:"verticalTimeAxis,omitempty"` SortBy *RenamableField `protobuf:"bytes,3,opt,name=sortBy" json:"sortBy,omitempty"` @@ -384,13 +199,6 @@ func (m *TableOptions) String() string { return proto.CompactTextStri func (*TableOptions) ProtoMessage() {} func (*TableOptions) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{4} } -func (m *TableOptions) GetVerticalTimeAxis() bool { - if m != nil { - return m.VerticalTimeAxis - } - return false -} - func (m *TableOptions) GetSortBy() *RenamableField { if m != nil { return m.SortBy @@ -398,20 +206,6 @@ func (m *TableOptions) GetSortBy() *RenamableField { return nil } -func (m *TableOptions) GetWrapping() string { - if m != nil { - return m.Wrapping - } - return "" -} - -func (m *TableOptions) GetFixFirstColumn() bool { - if m != nil { - return m.FixFirstColumn - } - return false -} - type RenamableField struct { InternalName string `protobuf:"bytes,1,opt,name=internalName,proto3" json:"internalName,omitempty"` DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"` @@ -423,27 +217,6 @@ func (m *RenamableField) String() string { return proto.CompactTextSt func (*RenamableField) ProtoMessage() {} func (*RenamableField) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{5} } -func (m *RenamableField) GetInternalName() string { - if m != nil { - return m.InternalName - } - return "" -} - -func (m *RenamableField) GetDisplayName() string { - if m != nil { - return m.DisplayName - } - return "" -} - -func (m *RenamableField) GetVisible() bool { - if m != nil { - return m.Visible - } - return false -} - type Color struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"` @@ -457,41 +230,6 @@ func (m *Color) String() string { return proto.CompactTextString(m) } func (*Color) ProtoMessage() {} func (*Color) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{6} } -func (m *Color) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *Color) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Color) GetHex() string { - if m != nil { - return m.Hex - } - return "" -} - -func (m *Color) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Color) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - type Legend struct { Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` Orientation string `protobuf:"bytes,2,opt,name=Orientation,proto3" json:"Orientation,omitempty"` @@ -502,22 +240,8 @@ func (m *Legend) String() string { return proto.CompactTextString(m) func (*Legend) ProtoMessage() {} func (*Legend) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{7} } -func (m *Legend) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Legend) GetOrientation() string { - if m != nil { - return m.Orientation - } - return "" -} - type Axis struct { - LegacyBounds []int64 `protobuf:"varint,1,rep,packed,name=legacyBounds" json:"legacyBounds,omitempty"` + 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"` Prefix string `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"` @@ -531,55 +255,6 @@ func (m *Axis) String() string { return proto.CompactTextString(m) } func (*Axis) ProtoMessage() {} func (*Axis) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{8} } -func (m *Axis) GetLegacyBounds() []int64 { - if m != nil { - return m.LegacyBounds - } - return nil -} - -func (m *Axis) GetBounds() []string { - if m != nil { - return m.Bounds - } - return nil -} - -func (m *Axis) GetLabel() string { - if m != nil { - return m.Label - } - return "" -} - -func (m *Axis) GetPrefix() string { - if m != nil { - return m.Prefix - } - return "" -} - -func (m *Axis) GetSuffix() string { - if m != nil { - return m.Suffix - } - return "" -} - -func (m *Axis) GetBase() string { - if m != nil { - return m.Base - } - return "" -} - -func (m *Axis) GetScale() string { - if m != nil { - return m.Scale - } - return "" -} - 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"` @@ -594,20 +269,6 @@ func (m *Template) String() string { return proto.CompactTextString(m func (*Template) ProtoMessage() {} func (*Template) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{9} } -func (m *Template) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *Template) GetTempVar() string { - if m != nil { - return m.TempVar - } - return "" -} - func (m *Template) GetValues() []*TemplateValue { if m != nil { return m.Values @@ -615,20 +276,6 @@ func (m *Template) GetValues() []*TemplateValue { return nil } -func (m *Template) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Template) GetLabel() string { - if m != nil { - return m.Label - } - return "" -} - func (m *Template) GetQuery() *TemplateQuery { if m != nil { return m.Query @@ -648,34 +295,6 @@ func (m *TemplateValue) String() string { return proto.CompactTextStr func (*TemplateValue) ProtoMessage() {} func (*TemplateValue) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{10} } -func (m *TemplateValue) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *TemplateValue) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -func (m *TemplateValue) GetSelected() bool { - if m != nil { - return m.Selected - } - return false -} - -func (m *TemplateValue) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - type TemplateQuery struct { Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` Db string `protobuf:"bytes,2,opt,name=db,proto3" json:"db,omitempty"` @@ -690,48 +309,6 @@ func (m *TemplateQuery) String() string { return proto.CompactTextStr func (*TemplateQuery) ProtoMessage() {} func (*TemplateQuery) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{11} } -func (m *TemplateQuery) GetCommand() string { - if m != nil { - return m.Command - } - return "" -} - -func (m *TemplateQuery) GetDb() string { - if m != nil { - return m.Db - } - return "" -} - -func (m *TemplateQuery) GetRp() string { - if m != nil { - return m.Rp - } - return "" -} - -func (m *TemplateQuery) GetMeasurement() string { - if m != nil { - return m.Measurement - } - return "" -} - -func (m *TemplateQuery) GetTagKey() string { - if m != nil { - return m.TagKey - } - return "" -} - -func (m *TemplateQuery) GetFieldKey() string { - if m != nil { - return m.FieldKey - } - return "" -} - type Server struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` @@ -751,83 +328,6 @@ func (m *Server) String() string { return proto.CompactTextString(m) func (*Server) ProtoMessage() {} func (*Server) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{12} } -func (m *Server) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *Server) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Server) GetUsername() string { - if m != nil { - return m.Username - } - return "" -} - -func (m *Server) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -func (m *Server) GetURL() string { - if m != nil { - return m.URL - } - return "" -} - -func (m *Server) GetSrcID() int64 { - if m != nil { - return m.SrcID - } - return 0 -} - -func (m *Server) GetActive() bool { - if m != nil { - return m.Active - } - return false -} - -func (m *Server) GetOrganization() string { - if m != nil { - return m.Organization - } - return "" -} - -func (m *Server) GetInsecureSkipVerify() bool { - if m != nil { - return m.InsecureSkipVerify - } - return false -} - -func (m *Server) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Server) GetMetadataJSON() string { - if m != nil { - return m.MetadataJSON - } - return "" -} - type Layout struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Application string `protobuf:"bytes,2,opt,name=Application,proto3" json:"Application,omitempty"` @@ -841,27 +341,6 @@ func (m *Layout) String() string { return proto.CompactTextString(m) func (*Layout) ProtoMessage() {} func (*Layout) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{13} } -func (m *Layout) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *Layout) GetApplication() string { - if m != nil { - return m.Application - } - return "" -} - -func (m *Layout) GetMeasurement() string { - if m != nil { - return m.Measurement - } - return "" -} - func (m *Layout) GetCells() []*Cell { if m != nil { return m.Cells @@ -869,13 +348,6 @@ func (m *Layout) GetCells() []*Cell { return nil } -func (m *Layout) GetAutoflow() bool { - if m != nil { - return m.Autoflow - } - return false -} - type Cell 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"` @@ -884,7 +356,7 @@ type Cell struct { Queries []*Query `protobuf:"bytes,5,rep,name=queries" json:"queries,omitempty"` I string `protobuf:"bytes,6,opt,name=i,proto3" json:"i,omitempty"` Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` - Yranges []int64 `protobuf:"varint,8,rep,packed,name=yranges" json:"yranges,omitempty"` + Yranges []int64 `protobuf:"varint,8,rep,name=yranges" json:"yranges,omitempty"` Ylabels []string `protobuf:"bytes,9,rep,name=ylabels" json:"ylabels,omitempty"` Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"` Axes map[string]*Axis `protobuf:"bytes,11,rep,name=axes" json:"axes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` @@ -895,34 +367,6 @@ func (m *Cell) String() string { return proto.CompactTextString(m) } func (*Cell) ProtoMessage() {} func (*Cell) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{14} } -func (m *Cell) GetX() int32 { - if m != nil { - return m.X - } - return 0 -} - -func (m *Cell) GetY() int32 { - if m != nil { - return m.Y - } - return 0 -} - -func (m *Cell) GetW() int32 { - if m != nil { - return m.W - } - return 0 -} - -func (m *Cell) GetH() int32 { - if m != nil { - return m.H - } - return 0 -} - func (m *Cell) GetQueries() []*Query { if m != nil { return m.Queries @@ -930,41 +374,6 @@ func (m *Cell) GetQueries() []*Query { return nil } -func (m *Cell) GetI() string { - if m != nil { - return m.I - } - return "" -} - -func (m *Cell) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Cell) GetYranges() []int64 { - if m != nil { - return m.Yranges - } - return nil -} - -func (m *Cell) GetYlabels() []string { - if m != nil { - return m.Ylabels - } - return nil -} - -func (m *Cell) GetType() string { - if m != nil { - return m.Type - } - return "" -} - func (m *Cell) GetAxes() map[string]*Axis { if m != nil { return m.Axes @@ -989,48 +398,6 @@ func (m *Query) String() string { return proto.CompactTextString(m) } func (*Query) ProtoMessage() {} func (*Query) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{15} } -func (m *Query) GetCommand() string { - if m != nil { - return m.Command - } - return "" -} - -func (m *Query) GetDB() string { - if m != nil { - return m.DB - } - return "" -} - -func (m *Query) GetRP() string { - if m != nil { - return m.RP - } - return "" -} - -func (m *Query) GetGroupBys() []string { - if m != nil { - return m.GroupBys - } - return nil -} - -func (m *Query) GetWheres() []string { - if m != nil { - return m.Wheres - } - return nil -} - -func (m *Query) GetLabel() string { - if m != nil { - return m.Label - } - return "" -} - func (m *Query) GetRange() *Range { if m != nil { return m.Range @@ -1038,13 +405,6 @@ func (m *Query) GetRange() *Range { return nil } -func (m *Query) GetSource() string { - if m != nil { - return m.Source - } - return "" -} - func (m *Query) GetShifts() []*TimeShift { if m != nil { return m.Shifts @@ -1063,27 +423,6 @@ func (m *TimeShift) String() string { return proto.CompactTextString( func (*TimeShift) ProtoMessage() {} func (*TimeShift) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{16} } -func (m *TimeShift) GetLabel() string { - if m != nil { - return m.Label - } - return "" -} - -func (m *TimeShift) GetUnit() string { - if m != nil { - return m.Unit - } - return "" -} - -func (m *TimeShift) GetQuantity() string { - if m != nil { - return m.Quantity - } - return "" -} - type Range struct { Upper int64 `protobuf:"varint,1,opt,name=Upper,proto3" json:"Upper,omitempty"` Lower int64 `protobuf:"varint,2,opt,name=Lower,proto3" json:"Lower,omitempty"` @@ -1094,20 +433,6 @@ func (m *Range) String() string { return proto.CompactTextString(m) } func (*Range) ProtoMessage() {} func (*Range) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{17} } -func (m *Range) GetUpper() int64 { - if m != nil { - return m.Upper - } - return 0 -} - -func (m *Range) GetLower() int64 { - if m != nil { - return m.Lower - } - return 0 -} - type AlertRule struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` JSON string `protobuf:"bytes,2,opt,name=JSON,proto3" json:"JSON,omitempty"` @@ -1120,34 +445,6 @@ func (m *AlertRule) String() string { return proto.CompactTextString( func (*AlertRule) ProtoMessage() {} func (*AlertRule) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{18} } -func (m *AlertRule) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *AlertRule) GetJSON() string { - if m != nil { - return m.JSON - } - return "" -} - -func (m *AlertRule) GetSrcID() int64 { - if m != nil { - return m.SrcID - } - return 0 -} - -func (m *AlertRule) GetKapaID() int64 { - if m != nil { - return m.KapaID - } - return 0 -} - type User struct { ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` @@ -1162,34 +459,6 @@ func (m *User) String() string { return proto.CompactTextString(m) } func (*User) ProtoMessage() {} func (*User) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{19} } -func (m *User) GetID() uint64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *User) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *User) GetProvider() string { - if m != nil { - return m.Provider - } - return "" -} - -func (m *User) GetScheme() string { - if m != nil { - return m.Scheme - } - return "" -} - func (m *User) GetRoles() []*Role { if m != nil { return m.Roles @@ -1197,13 +466,6 @@ func (m *User) GetRoles() []*Role { return nil } -func (m *User) GetSuperAdmin() bool { - if m != nil { - return m.SuperAdmin - } - return false -} - type Role struct { Organization string `protobuf:"bytes,1,opt,name=Organization,proto3" json:"Organization,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` @@ -1214,20 +476,6 @@ func (m *Role) String() string { return proto.CompactTextString(m) } func (*Role) ProtoMessage() {} func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{20} } -func (m *Role) GetOrganization() string { - if m != nil { - return m.Organization - } - return "" -} - -func (m *Role) GetName() string { - if m != nil { - return m.Name - } - return "" -} - type Mapping struct { Provider string `protobuf:"bytes,1,opt,name=Provider,proto3" json:"Provider,omitempty"` Scheme string `protobuf:"bytes,2,opt,name=Scheme,proto3" json:"Scheme,omitempty"` @@ -1241,41 +489,6 @@ func (m *Mapping) String() string { return proto.CompactTextString(m) func (*Mapping) ProtoMessage() {} func (*Mapping) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{21} } -func (m *Mapping) GetProvider() string { - if m != nil { - return m.Provider - } - return "" -} - -func (m *Mapping) GetScheme() string { - if m != nil { - return m.Scheme - } - return "" -} - -func (m *Mapping) GetProviderOrganization() string { - if m != nil { - return m.ProviderOrganization - } - return "" -} - -func (m *Mapping) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *Mapping) GetOrganization() string { - if m != nil { - return m.Organization - } - return "" -} - type Organization struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` @@ -1287,29 +500,9 @@ func (m *Organization) String() string { return proto.CompactTextStri func (*Organization) ProtoMessage() {} func (*Organization) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{22} } -func (m *Organization) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *Organization) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Organization) GetDefaultRole() string { - if m != nil { - return m.DefaultRole - } - return "" -} - type Config struct { - Auth *AuthConfig `protobuf:"bytes,1,opt,name=Auth" json:"Auth,omitempty"` + Auth *AuthConfig `protobuf:"bytes,1,opt,name=Auth" json:"Auth,omitempty"` + LogViewerUI *LogViewerUIConfig `protobuf:"bytes,2,opt,name=LogViewerUI" json:"LogViewerUI,omitempty"` } func (m *Config) Reset() { *m = Config{} } @@ -1324,6 +517,13 @@ func (m *Config) GetAuth() *AuthConfig { return nil } +func (m *Config) GetLogViewerUI() *LogViewerUIConfig { + if m != nil { + return m.LogViewerUI + } + return nil +} + type AuthConfig struct { SuperAdminNewUsers bool `protobuf:"varint,1,opt,name=SuperAdminNewUsers,proto3" json:"SuperAdminNewUsers,omitempty"` } @@ -1333,13 +533,51 @@ func (m *AuthConfig) String() string { return proto.CompactTextString func (*AuthConfig) ProtoMessage() {} func (*AuthConfig) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{24} } -func (m *AuthConfig) GetSuperAdminNewUsers() bool { - if m != nil { - return m.SuperAdminNewUsers - } - return false +type LogViewerUIConfig struct { + Columns []*LogViewerUIColumn `protobuf:"bytes,1,rep,name=Columns" json:"Columns,omitempty"` } +func (m *LogViewerUIConfig) Reset() { *m = LogViewerUIConfig{} } +func (m *LogViewerUIConfig) String() string { return proto.CompactTextString(m) } +func (*LogViewerUIConfig) ProtoMessage() {} +func (*LogViewerUIConfig) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{25} } + +func (m *LogViewerUIConfig) GetColumns() []*LogViewerUIColumn { + if m != nil { + return m.Columns + } + return nil +} + +type LogViewerUIColumn struct { + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Position int32 `protobuf:"varint,2,opt,name=Position,proto3" json:"Position,omitempty"` + Encoding []*ColumnEncoding `protobuf:"bytes,3,rep,name=Encoding" json:"Encoding,omitempty"` +} + +func (m *LogViewerUIColumn) Reset() { *m = LogViewerUIColumn{} } +func (m *LogViewerUIColumn) String() string { return proto.CompactTextString(m) } +func (*LogViewerUIColumn) ProtoMessage() {} +func (*LogViewerUIColumn) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{26} } + +func (m *LogViewerUIColumn) GetEncoding() []*ColumnEncoding { + if m != nil { + return m.Encoding + } + return nil +} + +type ColumnEncoding struct { + Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` + Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` + Name string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"` +} + +func (m *ColumnEncoding) Reset() { *m = ColumnEncoding{} } +func (m *ColumnEncoding) String() string { return proto.CompactTextString(m) } +func (*ColumnEncoding) ProtoMessage() {} +func (*ColumnEncoding) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{27} } + type BuildInfo struct { Version string `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"` Commit string `protobuf:"bytes,2,opt,name=Commit,proto3" json:"Commit,omitempty"` @@ -1348,21 +586,7 @@ type BuildInfo struct { func (m *BuildInfo) Reset() { *m = BuildInfo{} } func (m *BuildInfo) String() string { return proto.CompactTextString(m) } func (*BuildInfo) ProtoMessage() {} -func (*BuildInfo) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{25} } - -func (m *BuildInfo) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *BuildInfo) GetCommit() string { - if m != nil { - return m.Commit - } - return "" -} +func (*BuildInfo) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{28} } func init() { proto.RegisterType((*Source)(nil), "internal.Source") @@ -1390,117 +614,127 @@ func init() { proto.RegisterType((*Organization)(nil), "internal.Organization") proto.RegisterType((*Config)(nil), "internal.Config") proto.RegisterType((*AuthConfig)(nil), "internal.AuthConfig") + proto.RegisterType((*LogViewerUIConfig)(nil), "internal.LogViewerUIConfig") + proto.RegisterType((*LogViewerUIColumn)(nil), "internal.LogViewerUIColumn") + proto.RegisterType((*ColumnEncoding)(nil), "internal.ColumnEncoding") proto.RegisterType((*BuildInfo)(nil), "internal.BuildInfo") } func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) } var fileDescriptorInternal = []byte{ - // 1691 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xdd, 0x8f, 0xe3, 0x48, - 0x11, 0x97, 0x13, 0x3b, 0x89, 0x2b, 0x99, 0xb9, 0x91, 0x59, 0xdd, 0x99, 0x03, 0xa1, 0x60, 0xf1, - 0x31, 0x7c, 0xdc, 0x72, 0x9a, 0x13, 0x12, 0x3a, 0xdd, 0x9d, 0x34, 0x1f, 0xb7, 0xcb, 0xec, 0xe7, - 0x6c, 0x67, 0x76, 0x78, 0x42, 0xa7, 0x4e, 0xdc, 0x49, 0x5a, 0xe7, 0xd8, 0xa6, 0xdd, 0x9e, 0x19, - 0xf3, 0xcc, 0xdf, 0x81, 0x84, 0x04, 0xef, 0x08, 0xf1, 0x88, 0xc4, 0x3b, 0x7f, 0x00, 0xff, 0x0a, - 0xaf, 0xa8, 0xfa, 0xc3, 0x69, 0xcf, 0x64, 0x57, 0x8b, 0x84, 0xee, 0xad, 0x7f, 0x55, 0x95, 0xea, - 0xea, 0xea, 0xaa, 0x5f, 0x97, 0x03, 0xfb, 0x3c, 0x97, 0x4c, 0xe4, 0x34, 0x7b, 0x58, 0x8a, 0x42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 0xd7, 0x59, - 0xd8, 0xa9, 0x33, 0x19, 0xf5, 0xdb, 0xcb, 0x7a, 0x97, 0x0f, 0xb2, 0xcb, 0xae, 0xcd, 0xae, 0x0b, - 0xbf, 0x77, 0x2b, 0x53, 0x18, 0xdb, 0x0f, 0xd1, 0x22, 0xb3, 0x0f, 0x93, 0x2b, 0x4a, 0x8e, 0x60, - 0x70, 0x5a, 0xe4, 0x4b, 0xbe, 0x8a, 0x0e, 0xc1, 0x3f, 0xae, 0xe5, 0x5a, 0x79, 0x1c, 0x1f, 0x3d, - 0x70, 0x1a, 0xbf, 0x96, 0x6b, 0x6d, 0x43, 0x94, 0x45, 0xf2, 0x19, 0xc0, 0x56, 0x86, 0xaf, 0xcb, - 0xf6, 0x36, 0x5e, 0xb0, 0x1b, 0x2c, 0x99, 0xca, 0x8c, 0xf1, 0x3b, 0x34, 0xc9, 0xe7, 0x10, 0x9e, - 0xd4, 0x3c, 0x4b, 0xcf, 0xf3, 0x65, 0x81, 0xd4, 0x71, 0xc5, 0x44, 0xb5, 0xbd, 0x2f, 0x0b, 0x31, - 0xdd, 0xc8, 0x22, 0x6d, 0x0f, 0x19, 0x34, 0x1f, 0xa8, 0xbf, 0x39, 0x3e, 0xf9, 0x6f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x5f, 0x2f, 0x55, 0x31, 0xf8, 0x10, 0x00, 0x00, + // 1793 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x58, 0xdd, 0x6f, 0xe4, 0x48, + 0x11, 0x97, 0x67, 0xec, 0xc9, 0xb8, 0x26, 0xc9, 0x85, 0x66, 0x75, 0x67, 0xee, 0x10, 0x1a, 0x2c, + 0x3e, 0xc2, 0xc7, 0x2d, 0xa7, 0x1c, 0x27, 0xa1, 0xd3, 0xed, 0x49, 0xf9, 0xd8, 0x5d, 0xb2, 0x9b, + 0xdd, 0xcd, 0x76, 0x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, 0x03, 0x6f, 0x44, 0x25, 0xae, + 0x32, 0x4d, 0xe5, 0x63, 0x6a, 0x61, 0x3c, 0x87, 0x40, 0x95, 0xb5, 0x43, 0x42, 0xa1, 0x25, 0x21, + 0x45, 0xfd, 0x03, 0x87, 0xfa, 0x77, 0x60, 0xf8, 0x6b, 0x7e, 0x67, 0x5e, 0x03, 0x5c, 0x76, 0x54, + 0xe5, 0x3b, 0x54, 0xf5, 0x00, 0x82, 0x4b, 0x75, 0xed, 0x9a, 0x42, 0x34, 0x88, 0xbf, 0x84, 0x91, + 0x6e, 0x8b, 0xce, 0xb3, 0xe7, 0x78, 0x9e, 0xc2, 0xe4, 0x95, 0x14, 0x3c, 0xaf, 0x35, 0xf9, 0x98, + 0x23, 0x38, 0xa2, 0xf8, 0xaf, 0x1e, 0xf8, 0xea, 0x96, 0x62, 0xd8, 0xcc, 0xf8, 0x9c, 0x25, 0xed, + 0x41, 0xd1, 0xe4, 0x69, 0x15, 0x79, 0xd3, 0xe1, 0xee, 0x90, 0xf6, 0x64, 0x58, 0x1e, 0x57, 0x5a, + 0x3b, 0x98, 0x0e, 0x77, 0x43, 0x6a, 0x10, 0x86, 0x96, 0xb1, 0x2b, 0x9e, 0x99, 0x23, 0x68, 0x80, + 0xd6, 0xa5, 0xe4, 0x33, 0x71, 0x67, 0x8e, 0x61, 0x10, 0xca, 0xab, 0x66, 0x86, 0x72, 0x7d, 0x12, + 0x83, 0xf0, 0x00, 0x57, 0xac, 0xea, 0x18, 0x09, 0xd7, 0xe8, 0xb9, 0x4a, 0x58, 0x66, 0x29, 0x49, + 0x83, 0xf8, 0x1f, 0x1e, 0x3e, 0x64, 0x9a, 0x62, 0x57, 0x32, 0xfc, 0x1d, 0x18, 0x23, 0xfd, 0x7e, + 0x75, 0xc3, 0xa4, 0x39, 0xf0, 0x06, 0xe2, 0x4b, 0x26, 0xc9, 0x2f, 0x60, 0xa4, 0x9a, 0x63, 0x0d, + 0xdd, 0x5b, 0x77, 0x2a, 0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xa8, 0xb5, 0x8d, 0xdb, 0x7b, 0xbe, 0x50, + 0xda, 0xe5, 0xd1, 0xbb, 0x57, 0xdd, 0x45, 0x25, 0xba, 0xb7, 0x2b, 0xa0, 0x1d, 0x26, 0xbf, 0x84, + 0xf1, 0xe3, 0x3c, 0x29, 0x52, 0xfc, 0x2e, 0x18, 0xae, 0x50, 0xb0, 0xf2, 0x69, 0xf5, 0xb4, 0xb3, + 0x8c, 0x5f, 0xc2, 0x76, 0x5f, 0xb7, 0x76, 0x54, 0xee, 0xc6, 0xeb, 0x81, 0x33, 0x5e, 0x77, 0x11, + 0x0e, 0x9d, 0x2a, 0x7e, 0x04, 0xe1, 0x41, 0x23, 0xb2, 0xf4, 0x38, 0x9f, 0x15, 0x48, 0xc8, 0x97, + 0x5c, 0x56, 0xcb, 0x2e, 0xb0, 0x10, 0x8b, 0x18, 0xb9, 0xb9, 0x63, 0x26, 0x83, 0xae, 0x46, 0xea, + 0xcf, 0xa3, 0x4f, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x01, 0xd4, 0x2f, 0x0a, 0x4e, 0x12, 0x00, + 0x00, } diff --git a/bolt/internal/internal.proto b/bolt/internal/internal.proto index f11b3bc83..06f5a08ad 100644 --- a/bolt/internal/internal.proto +++ b/bolt/internal/internal.proto @@ -207,13 +207,30 @@ message Organization { } message Config { - AuthConfig Auth = 1; // Auth is the configuration for options that auth related + AuthConfig Auth = 1; // Auth is the configuration for options that auth related + LogViewerUIConfig LogViewerUI = 2; // LogViewerUI is the configuration for the Log Viewer UI } message AuthConfig { bool SuperAdminNewUsers = 1; // SuperAdminNewUsers configuration option that specifies which users will auto become super admin } +message LogViewerUIConfig { + repeated LogViewerUIColumn Columns = 1; // Columns is the array of columns in the log viewer UI +} + +message LogViewerUIColumn { + string Name = 1; // Name is the unique identifier of the log viewer column + int32 Position = 2; // Position is the position of the column in the log viewer's array of columns + repeated ColumnEncoding Encoding = 3; // Encoding is the array of encoded properties associated with a log viewer column +} + +message ColumnEncoding { + string Type = 1; // Type is the purpose of the encoding, for example: severity color + string Value = 2; // Value is what the encoding corresponds to + string Name = 3; // Name is the optional encoding name +} + message BuildInfo { string Version = 1; // Version is a descriptive git SHA identifier string Commit = 2; // Commit is an abbreviated SHA diff --git a/chronograf.go b/chronograf.go index 3f83f8f95..1c4558e33 100644 --- a/chronograf.go +++ b/chronograf.go @@ -736,20 +736,35 @@ type OrganizationsStore interface { DefaultOrganization(ctx context.Context) (*Organization, error) } -// AuthConfig is the global application config section for auth parameters -type AuthConfig struct { - // SuperAdminNewUsers should be true by default to give a seamless upgrade to - // 1.4.0 for legacy users. It means that all new users will by default receive - // SuperAdmin status. If a SuperAdmin wants to change this behavior, they - // can toggle it off via the Chronograf UI, in which case newly authenticating - // users will simply receive whatever role they would otherwise receive. - SuperAdminNewUsers bool `json:"superAdminNewUsers"` -} - // Config is the global application Config for parameters that can be set via // API, with different sections, such as Auth type Config struct { - Auth AuthConfig `json:"auth"` + Auth AuthConfig `json:"auth"` + LogViewerUI LogViewerUIConfig `json:"logViewerUI"` +} + +// AuthConfig is the global application config section for auth parameters +type AuthConfig struct { + SuperAdminNewUsers bool `json:"superAdminNewUsers"` +} + +// LogViewerUIConfig is the config sections for log viewer section of the application +type LogViewerUIConfig struct { + Columns []LogViewerUIColumn `json:"columns"` +} + +// LogViewerUIColumn is a specific column of the log viewer UI +type LogViewerUIColumn struct { + Name string `json:"name"` + Position int32 `json:"position"` + Encoding []ColumnEncoding `json:"encoding"` +} + +// ColumnEncoding is the settings for a specific column of the log viewer UI +type ColumnEncoding struct { + Type string `json:"type"` + Value string `json:"value"` + Name string `json:"name,omitempty"` } // ConfigStore is the storage and retrieval of global application Config diff --git a/server/config.go b/server/config.go index 68898c61f..216b00b74 100644 --- a/server/config.go +++ b/server/config.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "net/http" + "path" "github.com/bouk/httprouter" "github.com/influxdata/chronograf" @@ -37,6 +38,20 @@ func newAuthConfigResponse(config chronograf.Config) *authConfigResponse { } } +type logViewerUIResponse struct { + Links selfLinks `json:"links"` + chronograf.LogViewerUIConfig +} + +func newLogViewerUIConfigResponse(config chronograf.Config) *logViewerUIResponse { + return &logViewerUIResponse{ + Links: selfLinks{ + Self: "/chronograf/v1/config/logViewer", + }, + LogViewerUIConfig: config.LogViewerUI, + } +} + // Config retrieves the global application configuration func (s *Service) Config(w http.ResponseWriter, r *http.Request) { ctx := r.Context() @@ -70,11 +85,14 @@ func (s *Service) ConfigSection(w http.ResponseWriter, r *http.Request) { return } - section := httprouter.GetParamFromContext(ctx, "section") + _, section := path.Split(r.URL.String()) + var res interface{} switch section { case "auth": res = newAuthConfigResponse(*config) + case "logViewer": + res = newLogViewerUIConfigResponse(*config) default: Error(w, http.StatusBadRequest, fmt.Sprintf("received unknown section %q", section), s.Logger) return @@ -109,6 +127,14 @@ func (s *Service) ReplaceConfigSection(w http.ResponseWriter, r *http.Request) { } config.Auth = authConfig res = newAuthConfigResponse(*config) + case "logViewer": + var logViewerUIConfig chronograf.LogViewerUIConfig + if err := json.NewDecoder(r.Body).Decode(&logViewerUIConfig); err != nil { + invalidJSON(w, s.Logger) + return + } + config.LogViewerUI = logViewerUIConfig + res = newLogViewerUIConfigResponse(*config) default: Error(w, http.StatusBadRequest, fmt.Sprintf("received unknown section %q", section), s.Logger) return diff --git a/server/config_test.go b/server/config_test.go index 8901dc3b8..17dff50a4 100644 --- a/server/config_test.go +++ b/server/config_test.go @@ -36,13 +36,37 @@ func TestConfig(t *testing.T) { Auth: chronograf.AuthConfig{ SuperAdminNewUsers: false, }, + LogViewerUI: chronograf.LogViewerUIConfig{ + Columns: []chronograf.LogViewerUIColumn{ + { + Name: "severity", + Position: 0, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "color", + Value: "emergency", + Name: "ruby", + }, + { + Type: "color", + Value: "info", + Name: "rainforest", + }, + { + Type: "displayName", + Value: "Log Severity", + }, + }, + }, + }, + }, }, }, }, wants: wants{ statusCode: 200, contentType: "application/json", - body: `{"auth": {"superAdminNewUsers": false}, "links": {"self": "/chronograf/v1/config"}}`, + body: `{"links":{"self":"/chronograf/v1/config"},"auth":{"superAdminNewUsers":false},"logViewerUI":{"columns":[{"name":"severity","position":0,"encoding":[{"type":"color","value":"emergency","name":"ruby"},{"type":"color","value":"info","name":"rainforest"},{"type":"displayName","value":"Log Severity"}]}]}}`, }, }, } @@ -117,6 +141,47 @@ func TestConfigSection(t *testing.T) { body: `{"superAdminNewUsers": false, "links": {"self": "/chronograf/v1/config/auth"}}`, }, }, + { + name: "Get log viewer configuration", + fields: fields{ + ConfigStore: &mocks.ConfigStore{ + Config: &chronograf.Config{ + LogViewerUI: chronograf.LogViewerUIConfig{ + Columns: []chronograf.LogViewerUIColumn{ + { + Name: "severity", + Position: 0, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "color", + Value: "emergency", + Name: "ruby", + }, + { + Type: "color", + Value: "info", + Name: "rainforest", + }, + { + Type: "displayName", + Value: "Log Severity", + }, + }, + }, + }, + }, + }, + }, + }, + args: args{ + section: "logViewer", + }, + wants: wants{ + statusCode: 200, + contentType: "application/json", + body: `{"links":{"self":"/chronograf/v1/config/logViewer"},"columns":[{"name":"severity","position":0,"encoding":[{"type":"color","value":"emergency","name":"ruby"},{"type":"color","value":"info","name":"rainforest"},{"type":"displayName","value":"Log Severity"}]}]}`, + }, + }, { name: "Get unknown configuration", fields: fields{ @@ -221,6 +286,68 @@ func TestReplaceConfigSection(t *testing.T) { body: `{"superAdminNewUsers": true, "links": {"self": "/chronograf/v1/config/auth"}}`, }, }, + { + name: "Set log viewer configuration", + fields: fields{ + ConfigStore: &mocks.ConfigStore{ + Config: &chronograf.Config{ + LogViewerUI: chronograf.LogViewerUIConfig{ + Columns: []chronograf.LogViewerUIColumn{ + { + Name: "severity", + Position: 0, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "color", + Value: "info", + Name: "rainforest", + }, + }, + }, + }, + }, + }, + }, + }, + args: args{ + section: "logViewer", + payload: chronograf.LogViewerUIConfig{ + Columns: []chronograf.LogViewerUIColumn{ + { + Name: "severity", + Position: 1, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "color", + Value: "info", + Name: "pineapple", + }, + { + Type: "color", + Value: "emergency", + Name: "ruby", + }, + }, + }, + { + Name: "messages", + Position: 0, + Encoding: []chronograf.ColumnEncoding{ + { + Type: "displayName", + Value: "Log Messages", + }, + }, + }, + }, + }, + }, + wants: wants{ + statusCode: 200, + contentType: "application/json", + body: `{"links":{"self":"/chronograf/v1/config/logViewer"},"columns":[{"name":"severity","position":1,"encoding":[{"type":"color","value":"info","name":"pineapple"},{"type":"color","value":"emergency","name":"ruby"}]},{"name":"messages","position":0,"encoding":[{"type":"displayName","value":"Log Messages"}]}]}`, + }, + }, { name: "Set unknown configuration", fields: fields{ diff --git a/server/mux.go b/server/mux.go index 398fb404c..da1693dbe 100644 --- a/server/mux.go +++ b/server/mux.go @@ -313,8 +313,10 @@ func NewMux(opts MuxOpts, service Service) http.Handler { // Global application config for Chronograf router.GET("/chronograf/v1/config", EnsureSuperAdmin(service.Config)) - router.GET("/chronograf/v1/config/:section", EnsureSuperAdmin(service.ConfigSection)) - router.PUT("/chronograf/v1/config/:section", EnsureSuperAdmin(service.ReplaceConfigSection)) + router.GET("/chronograf/v1/config/logViewer", EnsureViewer(service.ConfigSection)) + router.PUT("/chronograf/v1/config/logViewer", EnsureEditor(service.ReplaceConfigSection)) + router.GET("/chronograf/v1/config/auth", EnsureSuperAdmin(service.ConfigSection)) + router.PUT("/chronograf/v1/config/auth", EnsureSuperAdmin(service.ReplaceConfigSection)) router.GET("/chronograf/v1/env", EnsureViewer(service.Environment))