Merge pull request #22 from prometheus/optional-generator-url

Treat `GeneratorURL` as optional in Alerts page.
This commit is contained in:
juliusv 2015-01-11 17:58:46 +01:00
commit 9b7e59c0ce
1 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,11 @@
</td> </td>
<td>{{timeSince .Created}} ago</td> <td>{{timeSince .Created}} ago</td>
<td>{{timeSince .LastRefreshed}} ago</td> <td>{{timeSince .LastRefreshed}} ago</td>
<td><a href="{{.Alert.Payload.GeneratorURL}}">{{(truncate .Alert.Payload.GeneratorURL 40)}}</a></td> <td>
{{if .Alert.Payload.GeneratorURL}}
<a href="{{.Alert.Payload.GeneratorURL}}">{{(truncate .Alert.Payload.GeneratorURL 40)}}</a>
{{end}}
</td>
<td>{{.Alert.Payload.AlertingRule}}</td> <td>{{.Alert.Payload.AlertingRule}}</td>
<td> <td>
{{$silence := call $silenceForAlert .Alert}} {{$silence := call $silenceForAlert .Alert}}