Remove Organization field from layouts

pull/10616/head
Michael Desa 2017-12-05 17:28:33 -05:00
parent e8c19bfd73
commit 2ec8da815b
5 changed files with 90 additions and 124 deletions

View File

@ -125,12 +125,11 @@ func MarshalLayout(l chronograf.Layout) ([]byte, error) {
} }
} }
return proto.Marshal(&Layout{ return proto.Marshal(&Layout{
ID: l.ID, ID: l.ID,
Measurement: l.Measurement, Measurement: l.Measurement,
Application: l.Application, Application: l.Application,
Autoflow: l.Autoflow, Autoflow: l.Autoflow,
Cells: cells, Cells: cells,
Organization: l.Organization,
}) })
} }
@ -145,7 +144,6 @@ func UnmarshalLayout(data []byte, l *chronograf.Layout) error {
l.Measurement = pb.Measurement l.Measurement = pb.Measurement
l.Application = pb.Application l.Application = pb.Application
l.Autoflow = pb.Autoflow l.Autoflow = pb.Autoflow
l.Organization = pb.Organization
cells := make([]chronograf.Cell, len(pb.Cells)) cells := make([]chronograf.Cell, len(pb.Cells))
for i, c := range pb.Cells { for i, c := range pb.Cells {
queries := make([]chronograf.Query, len(c.Queries)) queries := make([]chronograf.Query, len(c.Queries))

View File

@ -564,12 +564,11 @@ func (m *Server) GetOrganization() string {
} }
type Layout struct { type Layout struct {
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Application string `protobuf:"bytes,2,opt,name=Application,proto3" json:"Application,omitempty"` Application string `protobuf:"bytes,2,opt,name=Application,proto3" json:"Application,omitempty"`
Measurement string `protobuf:"bytes,3,opt,name=Measurement,proto3" json:"Measurement,omitempty"` Measurement string `protobuf:"bytes,3,opt,name=Measurement,proto3" json:"Measurement,omitempty"`
Cells []*Cell `protobuf:"bytes,4,rep,name=Cells" json:"Cells,omitempty"` Cells []*Cell `protobuf:"bytes,4,rep,name=Cells" json:"Cells,omitempty"`
Autoflow bool `protobuf:"varint,5,opt,name=Autoflow,proto3" json:"Autoflow,omitempty"` Autoflow bool `protobuf:"varint,5,opt,name=Autoflow,proto3" json:"Autoflow,omitempty"`
Organization string `protobuf:"bytes,6,opt,name=Organization,proto3" json:"Organization,omitempty"`
} }
func (m *Layout) Reset() { *m = Layout{} } func (m *Layout) Reset() { *m = Layout{} }
@ -612,13 +611,6 @@ func (m *Layout) GetAutoflow() bool {
return false return false
} }
func (m *Layout) GetOrganization() string {
if m != nil {
return m.Organization
}
return ""
}
type Cell struct { type Cell struct {
X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,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"` Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
@ -968,7 +960,7 @@ func (m *Organization) GetPublic() bool {
if m != nil { if m != nil {
return m.Public return m.Public
} }
return true return false
} }
func init() { func init() {
@ -993,78 +985,78 @@ func init() {
func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) } func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) }
var fileDescriptorInternal = []byte{ var fileDescriptorInternal = []byte{
// 1166 bytes of a gzipped FileDescriptorProto // 1155 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x5f, 0x8f, 0xdb, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x51, 0x8f, 0xdb, 0xc4,
0x10, 0x97, 0xe3, 0x38, 0xb1, 0x27, 0x77, 0x05, 0xad, 0x2a, 0x6a, 0x8a, 0x84, 0x82, 0x55, 0xa4, 0x13, 0x97, 0xe3, 0x38, 0xb1, 0x27, 0xd7, 0xfb, 0xff, 0xb5, 0xaa, 0xa8, 0x29, 0x12, 0x0a, 0x16,
0x20, 0xd1, 0x03, 0xb5, 0x42, 0x42, 0x3c, 0x20, 0xe5, 0x2e, 0xa8, 0x3a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fb, 0x08,
0x0d, 0xd8, 0xa7, 0xe0, 0x70, 0x2a, 0x9e, 0xaa, 0xf0, 0x56, 0x5f, 0x94, 0x99, 0x6b, 0x2f, 0x05, 0x1c, 0x4e, 0xe4, 0x29, 0x86, 0xb7, 0xea, 0xa2, 0xcc, 0x5c, 0x7b, 0x29, 0xa8, 0xfe, 0x2b, 0x99,
0xd5, 0xff, 0x29, 0x43, 0x72, 0x83, 0x82, 0x87, 0xe6, 0x38, 0x45, 0xbf, 0x48, 0x53, 0x94, 0x66, 0x06, 0x36, 0x28, 0x78, 0x62, 0x8e, 0x53, 0xf4, 0xab, 0x34, 0x45, 0x69, 0xc6, 0x50, 0x03, 0x75,
0x54, 0x35, 0x50, 0x77, 0x26, 0xd7, 0xa8, 0x55, 0xd6, 0xe6, 0x1a, 0x04, 0x3f, 0x82, 0x37, 0x8c, 0x67, 0x72, 0x8b, 0x5a, 0x41, 0x6d, 0xae, 0x41, 0xf0, 0x3d, 0x78, 0xc3, 0x18, 0x65, 0xce, 0x8b,
0x51, 0xe6, 0xbc, 0x88, 0x77, 0xb5, 0x99, 0x41, 0xfb, 0xfb, 0xf1, 0xf3, 0x67, 0xd5, 0x80, 0xd3, 0x78, 0x57, 0x77, 0x19, 0xb4, 0xbf, 0x19, 0xbf, 0x78, 0x5e, 0x0d, 0x2f, 0xad, 0x37, 0x23, 0x67,
0x7a, 0x33, 0x96, 0xf6, 0x5b, 0x63, 0xf9, 0x58, 0xa4, 0xe2, 0x74, 0xa4, 0x78, 0x66, 0x73, 0x83, 0xbf, 0x31, 0x72, 0x67, 0x22, 0x15, 0xa7, 0x23, 0xd5, 0x67, 0x36, 0x37, 0x28, 0xf8, 0xc5, 0x82,
0x82, 0x5f, 0x2c, 0x68, 0xd3, 0xfc, 0x37, 0x42, 0xb7, 0xdf, 0xa5, 0x1d, 0x67, 0x32, 0xb9, 0x8a, 0x36, 0xcd, 0x76, 0x23, 0x74, 0xfb, 0x6d, 0xba, 0x70, 0x21, 0x93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0x49, 0x47, 0x7d, 0x9f, 0x9f, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xde, 0x3f, 0x80, 0x50,
0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x52, 0x79, 0x4d, 0x4a, 0x82, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00,
} }

View File

@ -88,7 +88,6 @@ message Layout {
string Measurement = 3; // Measurement is the descriptive name of the time series data. string Measurement = 3; // Measurement is the descriptive name of the time series data.
repeated Cell Cells = 4; // Cells are the individual visualization elements. repeated Cell Cells = 4; // Cells are the individual visualization elements.
bool Autoflow = 5; // Autoflow indicates whether the frontend should layout the cells automatically. bool Autoflow = 5; // Autoflow indicates whether the frontend should layout the cells automatically.
string Organization = 6; // Organization is the organization ID that resource belongs to
} }
message Cell { message Cell {

View File

@ -2,7 +2,6 @@ package bolt
import ( import (
"context" "context"
"fmt"
"github.com/boltdb/bolt" "github.com/boltdb/bolt"
"github.com/influxdata/chronograf" "github.com/influxdata/chronograf"
@ -22,27 +21,6 @@ type LayoutsStore struct {
} }
func (s *LayoutsStore) Migrate(ctx context.Context) error { func (s *LayoutsStore) Migrate(ctx context.Context) error {
layouts, err := s.All(ctx)
if err != nil {
return err
}
defaultOrg, err := s.client.OrganizationsStore.DefaultOrganization(ctx)
if err != nil {
return err
}
defaultOrgID := fmt.Sprintf("%d", defaultOrg.ID)
for _, layout := range layouts {
if layout.Organization == "" {
layout.Organization = defaultOrgID
if err := s.Update(ctx, layout); err != nil {
return nil
}
}
}
return nil return nil
} }

View File

@ -761,12 +761,11 @@ type Cell struct {
// Layout is a collection of Cells for visualization // Layout is a collection of Cells for visualization
type Layout struct { type Layout struct {
ID string `json:"id"` ID string `json:"id"`
Application string `json:"app"` Application string `json:"app"`
Measurement string `json:"measurement"` Measurement string `json:"measurement"`
Autoflow bool `json:"autoflow"` Autoflow bool `json:"autoflow"`
Cells []Cell `json:"cells"` Cells []Cell `json:"cells"`
Organization string `json:"organization"` // Organization is the organization ID that resource belongs to
} }
// LayoutsStore stores dashboards and associated Cells // LayoutsStore stores dashboards and associated Cells