Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented according to new specification of Alerts API. #178

Merged
merged 8 commits into from
Nov 19, 2018
Merged

Conversation

yaminoma
Copy link

This Pull Request implements it according to the new specification of the Alerts API.
ref: mackerelio/mackerel-client-go#82

@yaminoma yaminoma changed the title [WIP] Implemented according to new specification of Alerts API. Implemented according to new specification of Alerts API. Nov 16, 2018
alerts.go Outdated Show resolved Hide resolved
alerts.go Outdated Show resolved Hide resolved
alerts.go Outdated Show resolved Hide resolved
alerts.go Outdated Show resolved Hide resolved
alerts.go Outdated Show resolved Hide resolved
alerts.go Outdated Show resolved Hide resolved
@yaminoma
Copy link
Author

Thanks. I fixed the part you pointed out.

alerts.go Outdated Show resolved Hide resolved
@astj
Copy link
Contributor

astj commented Nov 19, 2018

Oh, and it's better to colorize OK status with green color.

mkr/alerts.go

Lines 196 to 205 in ab09551

if colorize {
switch alert.Status {
case "CRITICAL":
statusMsg = color.RedString("CRITICAL")
case "WARNING":
statusMsg = color.YellowString("WARNING ")
case "UNKNOWN":
statusMsg = "UNKNOWN "
}
}

@yaminoma
Copy link
Author

Thanks👍

@astj astj merged commit 045c8fe into master Nov 19, 2018
@astj
Copy link
Contributor

astj commented Nov 19, 2018

👍

@astj astj deleted the with-closed branch November 19, 2018 10:25
@astj astj mentioned this pull request Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants