-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support passing alert IDs to service dashboards (#27)
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. --------- Signed-off-by: Jason Hall <[email protected]>
- Loading branch information
Showing
5 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
variable "title" { type = string } | ||
variable "collapsed" { default = false } | ||
variable "alert" { type = string } | ||
|
||
module "width" { source = "../width" } | ||
|
||
module "alert" { | ||
source = "../../widgets/alert" | ||
title = "Alert" | ||
alert_name = var.alert | ||
} | ||
|
||
locals { | ||
tiles = [{ | ||
yPos = 0 | ||
xPos = 0 | ||
height = 3 | ||
width = module.width.size | ||
widget = module.alert.widget | ||
}] | ||
} | ||
|
||
module "collapsible" { | ||
source = "../collapsible" | ||
|
||
// If no alert is defined, this is an empty collapsed section. | ||
title = var.title | ||
tiles = var.alert == "" ? [] : local.tiles | ||
collapsed = var.collapsed || var.alert == "" | ||
} | ||
|
||
output "section" { | ||
value = module.collapsible.section | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters