From f2a171d72b62f929b6b81bb124c88a28ee87193e Mon Sep 17 00:00:00 2001 From: Alirie Gray Date: Tue, 10 Jul 2018 12:19:37 -0700 Subject: [PATCH] Add default colors to default organization config Co-authored-by: Jared Scheib --- bolt/org_config.go | 40 ++++++++++ bolt/org_config_test.go | 160 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+) diff --git a/bolt/org_config.go b/bolt/org_config.go index fe870a1a0..280bb8a75 100644 --- a/bolt/org_config.go +++ b/bolt/org_config.go @@ -116,6 +116,46 @@ func newOrganizationConfig(orgID string) chronograf.OrganizationConfig { Type: "label", Value: "text", }, + { + Type: "color", + Name: "emerg", + Value: "ruby", + }, + { + Type: "color", + Name: "alert", + Value: "fire", + }, + { + Type: "color", + Name: "crit", + Value: "curacao", + }, + { + Type: "color", + Name: "err", + Value: "tiger", + }, + { + Type: "color", + Name: "warning", + Value: "pineapple", + }, + { + Type: "color", + Name: "notice", + Value: "rainforest", + }, + { + Type: "color", + Name: "info", + Value: "star", + }, + { + Type: "color", + Name: "debug", + Value: "wolf", + }, }, }, { diff --git a/bolt/org_config_test.go b/bolt/org_config_test.go index 8642e2ade..574e6fff8 100644 --- a/bolt/org_config_test.go +++ b/bolt/org_config_test.go @@ -60,6 +60,46 @@ func TestOrganizationConfig_FindOrCreate(t *testing.T) { Type: "label", Value: "text", }, + { + Type: "color", + Name: "emerg", + Value: "ruby", + }, + { + Type: "color", + Name: "alert", + Value: "fire", + }, + { + Type: "color", + Name: "crit", + Value: "curacao", + }, + { + Type: "color", + Name: "err", + Value: "tiger", + }, + { + Type: "color", + Name: "warning", + Value: "pineapple", + }, + { + Type: "color", + Name: "notice", + Value: "rainforest", + }, + { + Type: "color", + Name: "info", + Value: "star", + }, + { + Type: "color", + Name: "debug", + Value: "wolf", + }, }, }, { @@ -177,6 +217,46 @@ func TestOrganizationConfig_FindOrCreate(t *testing.T) { Type: "label", Value: "text", }, + { + Type: "color", + Name: "emerg", + Value: "ruby", + }, + { + Type: "color", + Name: "alert", + Value: "fire", + }, + { + Type: "color", + Name: "crit", + Value: "curacao", + }, + { + Type: "color", + Name: "err", + Value: "tiger", + }, + { + Type: "color", + Name: "warning", + Value: "pineapple", + }, + { + Type: "color", + Name: "notice", + Value: "rainforest", + }, + { + Type: "color", + Name: "info", + Value: "star", + }, + { + Type: "color", + Name: "debug", + Value: "wolf", + }, }, }, { @@ -294,6 +374,46 @@ func TestOrganizationConfig_FindOrCreate(t *testing.T) { Type: "label", Value: "text", }, + { + Type: "color", + Name: "emerg", + Value: "ruby", + }, + { + Type: "color", + Name: "alert", + Value: "fire", + }, + { + Type: "color", + Name: "crit", + Value: "curacao", + }, + { + Type: "color", + Name: "err", + Value: "tiger", + }, + { + Type: "color", + Name: "warning", + Value: "pineapple", + }, + { + Type: "color", + Name: "notice", + Value: "rainforest", + }, + { + Type: "color", + Name: "info", + Value: "star", + }, + { + Type: "color", + Name: "debug", + Value: "wolf", + }, }, }, { @@ -411,6 +531,46 @@ func TestOrganizationConfig_FindOrCreate(t *testing.T) { Type: "label", Value: "text", }, + { + Type: "color", + Name: "emerg", + Value: "ruby", + }, + { + Type: "color", + Name: "alert", + Value: "fire", + }, + { + Type: "color", + Name: "crit", + Value: "curacao", + }, + { + Type: "color", + Name: "err", + Value: "tiger", + }, + { + Type: "color", + Name: "warning", + Value: "pineapple", + }, + { + Type: "color", + Name: "notice", + Value: "rainforest", + }, + { + Type: "color", + Name: "info", + Value: "star", + }, + { + Type: "color", + Name: "debug", + Value: "wolf", + }, }, }, {