Skip to content

Commit

Permalink
fix: incident summary and detail template
Browse files Browse the repository at this point in the history
  • Loading branch information
bryankaraffa authored Jan 7, 2025
1 parent b7eabdb commit d500537
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions cost/azure/schedule_instance/azure_schedule_instance.pt
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ datasource "ds_policy_incident_action_status" do
collect jq(response, ".items[]?") do
field "applied_policy_id", jq(iter_item, ".applied_policy_id")
field "incident_id", jq(iter_item, ".incident_id")
field "incident_summary", jq(iter_item, ".summary")
field "incident_summary", jq(iter_item, ".incident_summary")
field "violation_data_count", jq(iter_item, ".violation_data_count")
field "violation_data", jq(iter_item, ".violation_data")
field "action_status", jq(col_item, ".status")
Expand Down Expand Up @@ -929,21 +929,20 @@ policy "pol_schedule_instance" do
**Policy Applied in Account: {{ rs_project_name }} (Account ID: {{ rs_project_id }}) within Org: {{ rs_org_name }} (Org ID: {{ rs_org_id }})**
The following actions completed successfully:
{{ range data }}
{{ range data -}}
**[{{ .incident_summary }}](https://{{ .ui_host }}/orgs/{{ rs_org_id }}/automation/incidents/projects/{{ rs_project_id }}?incidentId={{ .incident_id }})**
{{ range .completed_action_items }}
Completed:
```
{{ . }}
```
{{ end }}
{{ range .skipped_action_items }}
Skipped:
```
{{ . }}
```
{{- range .action_items }}
{{ if eq .status "completed" -}}
- {{ .finished_at }}: {{ .status }} {{ .type }}
{{ else -}}
- {{ .started_at }}: *{{ .status }} {{ .type }}*
{{ end }}
{{ end -}}
{{ end }}
EOS
check logic_or($ds_parent_policy_terminated, eq(size(data), 0))
Expand Down

0 comments on commit d500537

Please sign in to comment.