Skip to content

Commit

Permalink
Aligned all templates to a new style. Test fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykiselev committed Feb 15, 2024
1 parent 9d359b0 commit da9faef
Show file tree
Hide file tree
Showing 36 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion cmd/bots/internal/common/templates/alerts/alert_fixed.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```yaml
{{ .PreviousAlert}} issue has been resolved
{{ .PreviousAlert}} issue has been resolved
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<b>Base Target Alert</b>
<b>Base Target Alert</b>
Base target is greater than the threshold value. The threshold value is {{ .Threshold}}
{{ with .BaseTargetValues }}{{range .}}
<code>{{ .Node }}</code>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```yaml
Alert type: Base Target
Details: Base target is greater than the threshold value. The threshold value is {{ .Threshold }}
Base Target Alert
Base target is greater than the threshold value. The threshold value is {{ .Threshold }}
{{ with .BaseTargetValues }}{{ range . }}
Node: {{ .Node}}
Base Target: {{ .BaseTarget}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<b>Height Alert</b>
<b>Height Alert</b>
Some node(s) are {{ .HeightDifference}} blocks behind
{{ with .FirstGroup }}
First group with height <code>{{ .Height}}</code>:{{range .Nodes}}
Expand Down
4 changes: 2 additions & 2 deletions cmd/bots/internal/common/templates/alerts/height_alert.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```yaml
Alert type: Height
Details: Some node(s) are {{ .HeightDifference}} blocks behind
Height Alert
Some node(s) are {{ .HeightDifference}} blocks behind
{{ with .FirstGroup }}
First group with height {{ .Height}}:{{range .Nodes}}
{{.}}{{end}}{{end}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
❗️<b>Incomplete Alert:</b>
❗️<b>Incomplete Alert</b>
Incomplete statement for node {{ .Node}} {{ .Version}} at height {{ .Height}}
4 changes: 2 additions & 2 deletions cmd/bots/internal/common/templates/alerts/incomplete_alert.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Incomplete❗️
Details: Incomplete statement for node {{ .Node}} {{ .Version}} at height {{ .Height}}
❗️Incomplete Alert
Incomplete statement for node {{ .Node}} {{ .Version}} at height {{ .Height}}
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Internal Error ❗️
Details: An internal error has occurred, {{ .Error}}
❗️Internal Error Alert
An internal error has occurred, {{ .Error}}
```
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<b>Invalid Height Alert</b>
<b>Invalid Height Alert</b>
Node {{ .Node}} {{ .Version}} has an invalid height {{ .Height}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Invalid Height
Details: Node {{ .Node}} {{ .Version}} has an invalid height {{ .Height}}
Invalid Height Alert
Node {{ .Node}} {{ .Version}} has an invalid height {{ .Height}}
```
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<b>Simple Alert</b>
<b>Simple Alert</b>
{{ .Description}}
4 changes: 2 additions & 2 deletions cmd/bots/internal/common/templates/alerts/simple_alert.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Simple Alert
Details: {{ .Description}}
Simple Alert
{{ .Description}}
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<b>Diverging State Hashes</b>
<b>Diverging State Hashes</b>
Nodes on the same chain have diverging state hashes at {{ .SameHeight}}
{{ with .FirstGroup }}
<i>BlockID:</i> <code>{{ .BlockID}}</code>
Expand Down
4 changes: 2 additions & 2 deletions cmd/bots/internal/common/templates/alerts/state_hash_alert.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```yaml
Alert type: State Hash
Details: Nodes on the same chain have diverging state hashes at {{ .SameHeight}}
State Hash Alert
Nodes on the same chain have diverging state hashes at {{ .SameHeight}}
{{ with .FirstGroup }}
BlockID (First group): {{ .BlockID}}
State Hash (First group): {{ .StateHash}}{{range .Nodes}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<b>Several Chains Detected</b>
<b>Several Chains Detected</b>
{{ with .FirstGroup }}
<i>BlockID:</i> <code>{{ .BlockID}}</code>{{range .Nodes}}
<code>{{.}}</code>{{end}}{{end}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```yaml
Alert type: Several Chains Detected
Details: Nodes have different state hashes at the same height {{ .SameHeight}}
Several Chains Detected
Nodes have different state hashes at the same height {{ .SameHeight}}
{{ with .FirstGroup }}
BlockID (First group): {{ .BlockID}}{{range .Nodes}}
{{.}}{{end}}{{end}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<b>Unreachable Alert</b>
<b>Unreachable Alert</b>
Node {{ .Node}} is unreachable
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Unreachable
Details: Node {{ .Node}} is unreachable
Unreachable Alert
Node {{ .Node}} is unreachable
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```yaml
UnreachableAlert issue has been resolved
UnreachableAlert issue has been resolved
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<b>Base Target Alert</b>
<b>Base Target Alert</b>
Base target is greater than the threshold value. The threshold value is 101

<code>test1</code>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```yaml
Alert type: Base Target
Details: Base target is greater than the threshold value. The threshold value is 101
Base Target Alert
Base target is greater than the threshold value. The threshold value is 101

Node: test1
Base Target: 150
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
❌<b>Height Alert</b>
<b>Height Alert</b>
Some node(s) are 1 blocks behind

First group with height <code>2</code>:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```yaml
Alert type: Height
Details: Some node(s) are 1 blocks behind
Height Alert
Some node(s) are 1 blocks behind

First group with height 2:
node 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
❗️<b>Incomplete Alert:</b>
❗️<b>Incomplete Alert</b>
Incomplete statement for node a 1 at height 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Incomplete❗️
Details: Incomplete statement for node a 1 at height 1
❗️Incomplete Alert
Incomplete statement for node a 1 at height 1
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Internal Error ❗️
Details: An internal error has occurred, error
❗️Internal Error Alert
An internal error has occurred, error
```
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
❌<b>Invalid Height Alert</b>
<b>Invalid Height Alert</b>
Node a 1 has an invalid height 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Invalid Height
Details: Node a 1 has an invalid height 1
Invalid Height Alert
Node a 1 has an invalid height 1
```
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<b>Simple Alert</b>
<b>Simple Alert</b>
Simple alert !!!
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Simple Alert
Details: Simple alert !!!
Simple Alert
Simple alert !!!
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
❌<b>Diverging State Hashes</b>
<b>Diverging State Hashes</b>
Nodes on the same chain have diverging state hashes at 100

<i>BlockID:</i> <code>1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh</code>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```yaml
Alert type: State Hash
Details: Nodes on the same chain have diverging state hashes at 100
State Hash Alert
Nodes on the same chain have diverging state hashes at 100

BlockID (First group): 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh
State Hash (First group): 0000000000000066000000000000000000000000000000000000000000000000
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
❌<b>Several Chains Detected</b>
<b>Several Chains Detected</b>

<i>BlockID:</i> <code>1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh</code>
<code>a</code>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```yaml
Alert type: Several Chains Detected
Details: Nodes have different state hashes at the same height 100
Several Chains Detected
Nodes have different state hashes at the same height 100

BlockID (First group): 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh
a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
❌<b>Unreachable Alert</b>
<b>Unreachable Alert</b>
Node node is unreachable
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```yaml
Alert type: Unreachable
Details: Node node is unreachable
Unreachable Alert
Node node is unreachable
```

0 comments on commit da9faef

Please sign in to comment.