Skip to content

Commit

Permalink
update color codes
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato committed Mar 12, 2019
1 parent a178f59 commit 385036d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Expand Up @@ -2,7 +2,7 @@
"id": "statuspage",
"name": "Statuspage",
"description": "This plugin send Statuspage notifications to a Mattermost channel.",
"version": "0.0.6",
"version": "0.0.7",
"server": {
"executables": {
"linux-amd64": "server/dist/plugin-linux-amd64",
Expand Down
2 changes: 1 addition & 1 deletion server/manifest.go
Expand Up @@ -5,5 +5,5 @@ var manifest = struct {
Version string
}{
Id: "statuspage",
Version: "0.0.6",
Version: "0.0.7",
}
15 changes: 8 additions & 7 deletions server/webhook.go
Expand Up @@ -90,17 +90,18 @@ func addFields(fields []*model.SlackAttachmentField, title, msg string, short bo

func setColor(impact string) string {
mapImpactColor := map[string]string{
"maintenance": "#FAF605",
"operational": "#00FF00",
"degraded_performance": "#F8740D",
"major_outage": "#C72015",
"major": "#800080",
"partial_outage": "#F8740D",
"maintenance": "#ADD8E6",
"operational": "#008000",
"degraded_performance": "#FFFF66",
"partial_outage": "#FFA500",
"major_outage": "#FF0000",
"major": "#FF4500",
"minor": "#FF6347",
}

if val, ok := mapImpactColor[impact]; ok {
return val
}

return "#0000FF"
return "#F0F8FF"
}

0 comments on commit 385036d

Please sign in to comment.