Skip to content

Commit

Permalink
improve alert diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
alexewerlof committed Aug 15, 2024
1 parent fe4397b commit 6648645
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions components/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
color="--brand-red"
offset="1">
<tspan>Error Budget Exhausted</tspan>
<tspan>{{ errorBudgetBurn.eventCountL10n }} failed {{ errorBudgetBurn.eventUnitNorm }}</tspan>
<tspan>in {{ errorBudgetBurn.humanTime }}</tspan>
<tspan v-if="errorBudgetBurn.cost">costing {{ errorBudgetBurn.costL10n }}</tspan>
</burn-event-component>
<burn-event-component
:width="width"
Expand All @@ -41,7 +44,7 @@
offset="3">
<tspan>Alert Triggers</tspan>
<tspan>When at least {{ alertLongWindow.eventCountL10n }} failed {{ alertLongWindow.eventUnitNorm }}</tspan>
<tspan>occured in the last {{ alertLongWindow.humanSec }}</tspan>
<tspan>in the last {{ alertLongWindow.humanTime }}</tspan>
<tspan v-if="alertLongWindow.cost">costing at least {{ alertLongWindow.costL10n }}</tspan>
</burn-event-component>
<burn-event-component v-if="shortWindowVisible"
Expand All @@ -54,6 +57,6 @@
offset="2">
<tspan>Short Window</tspan>
<tspan>When at least {{ alertShortWindow.eventCountL10n }} failed {{ alertShortWindow.eventUnitNorm }}</tspan>
<tspan>occured in the last {{ alertShortWindow.humanSec }}</tspan>
<tspan>in the last {{ alertShortWindow.humanTime }}</tspan>
</burn-event-component>
</svg>
1 change: 1 addition & 0 deletions components/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default {
shortWindowVisible: Boolean,
alertLongWindow: Object,
alertShortWindow: Object,
errorBudgetBurn: Object,
},
components: {
burnEventComponent,
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,8 @@ <h3>
:alert-long-window="alertLongWindow"
:alert-short-window="alertShortWindow"
:short-window-divider="shortWindowDivider"
:short-window-visible="shortWindowVisible"></alert-component>
:short-window-visible="shortWindowVisible"
:error-budget-burn="errorBudgetBurn"></alert-component>
<!-- Long Window Alert Policy -->
<h3>
Alert Policy
Expand Down

0 comments on commit 6648645

Please sign in to comment.