mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix: Alert email variable name typo fixed (#16232)
This commit is contained in:
parent
3146500de5
commit
5ea823a65a
@ -91,8 +91,8 @@
|
|||||||
[[if ne .ImageLink "" ]]
|
[[if ne .ImageLink "" ]]
|
||||||
<img src="[[.ImageLink]]" alt="Alerting Panel"/>
|
<img src="[[.ImageLink]]" alt="Alerting Panel"/>
|
||||||
[[end]]
|
[[end]]
|
||||||
[[if ne .EmbededImage "" ]]
|
[[if ne .EmbeddedImage "" ]]
|
||||||
<img src="cid:[[.EmbededImage]]" alt="Alerting Panel"/>
|
<img src="cid:[[.EmbeddedImage]]" alt="Alerting Panel"/>
|
||||||
[[end]]
|
[[end]]
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -84,7 +84,7 @@ func (this *EmailNotifier) Notify(evalContext *alerting.EvalContext) error {
|
|||||||
"Error": error,
|
"Error": error,
|
||||||
"RuleUrl": ruleUrl,
|
"RuleUrl": ruleUrl,
|
||||||
"ImageLink": "",
|
"ImageLink": "",
|
||||||
"EmbededImage": "",
|
"EmbeddedImage": "",
|
||||||
"AlertPageUrl": setting.AppUrl + "alerting",
|
"AlertPageUrl": setting.AppUrl + "alerting",
|
||||||
"EvalMatches": evalContext.EvalMatches,
|
"EvalMatches": evalContext.EvalMatches,
|
||||||
},
|
},
|
||||||
@ -100,7 +100,7 @@ func (this *EmailNotifier) Notify(evalContext *alerting.EvalContext) error {
|
|||||||
file, err := os.Stat(evalContext.ImageOnDiskPath)
|
file, err := os.Stat(evalContext.ImageOnDiskPath)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
cmd.EmbededFiles = []string{evalContext.ImageOnDiskPath}
|
cmd.EmbededFiles = []string{evalContext.ImageOnDiskPath}
|
||||||
cmd.Data["EmbededImage"] = file.Name()
|
cmd.Data["EmbeddedImage"] = file.Name()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ func TestEmailIntegrationTest(t *testing.T) {
|
|||||||
"RuleUrl": "http://localhost:3000/dashboard/db/graphite-dashboard",
|
"RuleUrl": "http://localhost:3000/dashboard/db/graphite-dashboard",
|
||||||
"ImageLink": "http://localhost:3000/render/dashboard-solo/db/graphite-dashboard?panelId=1&from=1471008499616&to=1471012099617&width=1000&height=500",
|
"ImageLink": "http://localhost:3000/render/dashboard-solo/db/graphite-dashboard?panelId=1&from=1471008499616&to=1471012099617&width=1000&height=500",
|
||||||
"AlertPageUrl": "http://localhost:3000/alerting",
|
"AlertPageUrl": "http://localhost:3000/alerting",
|
||||||
"EmbededImage": "test.png",
|
"EmbeddedImage": "test.png",
|
||||||
"EvalMatches": []map[string]string{
|
"EvalMatches": []map[string]string{
|
||||||
{
|
{
|
||||||
"Metric": "desktop",
|
"Metric": "desktop",
|
||||||
|
@ -297,8 +297,8 @@ text-decoration: underline;
|
|||||||
{{if ne .ImageLink "" }}
|
{{if ne .ImageLink "" }}
|
||||||
<img src="{{.ImageLink}}" alt="Alerting Panel" style="outline: none !important; text-decoration: none !important; -ms-interpolation-mode: bicubic; width: auto; clear: both; display: block; border: 0;" align="left" />
|
<img src="{{.ImageLink}}" alt="Alerting Panel" style="outline: none !important; text-decoration: none !important; -ms-interpolation-mode: bicubic; width: auto; clear: both; display: block; border: 0;" align="left" />
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if ne .EmbededImage "" }}
|
{{if ne .EmbeddedImage "" }}
|
||||||
<img src="cid:{{.EmbededImage}}" alt="Alerting Panel" style="outline: none !important; text-decoration: none !important; -ms-interpolation-mode: bicubic; width: auto; clear: both; display: block; border: 0;" align="left" />
|
<img src="cid:{{.EmbeddedImage}}" alt="Alerting Panel" style="outline: none !important; text-decoration: none !important; -ms-interpolation-mode: bicubic; width: auto; clear: both; display: block; border: 0;" align="left" />
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user