middlware: change org when url contains orgid

closes #6948
ref #1613
This commit is contained in:
bergquist
2017-02-17 15:02:14 +01:00
parent 12f1ea71fd
commit 5174d050f2
6 changed files with 120 additions and 1 deletions

View File

@@ -113,7 +113,7 @@ func (c *EvalContext) GetRuleUrl() (string, error) {
if slug, err := c.GetDashboardSlug(); err != nil {
return "", err
} else {
ruleUrl := fmt.Sprintf("%sdashboard/db/%s?fullscreen&edit&tab=alert&panelId=%d", setting.AppUrl, slug, c.Rule.PanelId)
ruleUrl := fmt.Sprintf("%sdashboard/db/%s?fullscreen&edit&tab=alert&panelId=%d&org-id=%d", setting.AppUrl, slug, c.Rule.PanelId, c.Rule.OrgId)
return ruleUrl, nil
}
}