-
Notifications
You must be signed in to change notification settings - Fork 24
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
support passing alert IDs to service dashboards #27
Conversation
Signed-off-by: Jason Hall <jason@chainguard.dev>
a613384
to
d41f8a4
Compare
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
@@ -16,15 +16,24 @@ module "resources" { | |||
filter = ["resource.type=\"cloud_run_revision\""] | |||
} | |||
|
|||
module "alerts" { | |||
source = "../sections/alerts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source = "../sections/alerts" | |
count = var.alert != "" ? 1 : 0 | |
source = "../sections/alerts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also consider making this a list 🤔
] | ||
source = "../sections/layout" | ||
sections = concat( | ||
var.alert == "" ? [] : [module.alerts.section], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var.alert == "" ? [] : [module.alerts.section], | |
var.alert == "" ? [] : [module.alerts[0].section], |
or
var.alert == "" ? [] : [module.alerts.section], | |
[for x in module.alerts : x.section], |
This should produce full-width alert chart widgets for each alert. I might need to iterate on this with changes in tf-prober to see this all working together. It at least doesn't regress for non-alert-having services.