Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ private static class Parameters {

private final Map<String, Object> params = new HashMap<>();

private Parameters setWebuiLink(final String webuiLink)
{
params.put("webuiLink", webuiLink);
return this;
}

private Parameters setDetailsLink(final String detailsLink)
{
params.put("detailsLink", detailsLink);
Expand Down Expand Up @@ -252,6 +258,9 @@ public EmailMessage format(final MessageKit messageKit)
view.getAllViews().get(0).getTimestampMs();

final Parameters params = new Parameters()
.setWebuiLink(
Views.get().horizonUrl()
)
.setDetailsLink(
Views.get().alertSplunkUrl(alertId, sampleAlertTimestampMs)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ private Views(Config config)

/* ------------ Methods ------------ */

public String horizonUrl() {
return horizonUrl;
}

public String alertEditUrl(final long alertId)
{
return horizonUrl + "/a/" + alertId + "/edit";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h3 class="type {{ state }}">{{ state | capitalize }}</h3>
<table cellpadding="0" cellspacing="0" width="640px" class="footer">
<tr>
<td valign="top">
This is a generated email from <a href="">OpenTSDB</a>
This is a generated email from <a href="{{ webuiLink }}">OpenTSDB</a>
</td>
</tr>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h3 class="type {{ state }}">{{ state | capitalize }}</h3>
<table cellpadding="0" cellspacing="0" width="640px" class="footer">
<tr>
<td valign="top">
This is a generated email from <a href="">OpenTSDB</a>
This is a generated email from <a href="{{ webuiLink }}">OpenTSDB</a>
</td>
</tr>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3 class="type {{ state }}">{{ state | capitalize }}</h3>
<table cellpadding="0" cellspacing="0" width="640px" class="footer">
<tr>
<td valign="top">
This is a generated email from <a href="">OpenTSDB</a>
This is a generated email from <a href="{{ webuiLink }}">OpenTSDB</a>
</td>
</tr>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3 class="type {{ state }}">{{ state | capitalize }}</h3>
<table cellpadding="0" cellspacing="0" width="640px" class="footer">
<tr>
<td valign="top">
This is a generated email from <a href="">OpenTSDB</a>
This is a generated email from <a href="{{ webuiLink }}">OpenTSDB</a>
</td>
</tr>
</table>
Expand Down