Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
[EAGLE-1056] fix a link bug in the email template
Browse files Browse the repository at this point in the history
https://issues.apache.org/jira/browse/EAGLE-1056

Author: Zhao, Qingwen <qingwzhao@apache.org>

Closes #960 from qingwen220/EAGLE-1056.
  • Loading branch information
qingwen220 committed Jun 27, 2017
1 parent a51bf5e commit aa136af
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -150,15 +150,15 @@ private Map<String, String> buildAlertContext(AlertStreamEvent event) {
: String.format("http://%s:%s", this.getServerHost(), this.getServerPort());
try {
alertContext.put(PublishConstants.ALERT_EMAIL_ALERT_DETAIL_URL,
String.format("%s/#/site/%s/alert/detail/%s", rootUrl, event.getSiteId(), URIUtil.encodeQuery(event.getAlertId(), "UTF-8")));
String.format("%s/#/site/%s/alert/detail/%s?timestamp=%s", rootUrl, event.getSiteId(), URIUtil.encodeQuery(event.getAlertId(), "UTF-8"), event.getTimestamp()));
alertContext.put(PublishConstants.ALERT_EMAIL_POLICY_DETAIL_URL,
String.format("%s/#/site/%s/policy/detail/%s", rootUrl, event.getSiteId(), URIUtil.encodeQuery(event.getPolicyId(), "UTF-8")));
} catch (URIException e) {
LOG.warn(e.getMessage(), e);
alertContext.put(PublishConstants.ALERT_EMAIL_ALERT_DETAIL_URL,
String.format("%s/#/site/%s/alert/detail/%s?timestamp=%s", event.getSiteId(), rootUrl, event.getAlertId(), event.getTimestamp()));
String.format("%s/#/site/%s/alert/detail/%s?timestamp=%s", rootUrl, event.getSiteId(), event.getAlertId(), event.getTimestamp()));
alertContext.put(PublishConstants.ALERT_EMAIL_POLICY_DETAIL_URL,
String.format("%s/#/site/%s/policy/detail/%s", event.getSiteId(), rootUrl, event.getPolicyId()));
String.format("%s/#/site/%s/policy/detail/%s", rootUrl, event.getSiteId(), event.getPolicyId()));
}
alertContext.put(PublishConstants.ALERT_EMAIL_HOME_URL, rootUrl);
return alertContext;
Expand Down

0 comments on commit aa136af

Please sign in to comment.