Skip to content
Snippets Groups Projects
Unverified Commit 4acb237f authored by 李泽玺's avatar 李泽玺 Committed by GitHub
Browse files

Merge pull request #8833 from zhaoxiangchun/automated-cherry-pick-of-#8816-upstream-release-3.4

Automated cherry pick of #8816: modify  alertResource ws info
parents 3e17ee75 bef9af4c
No related branches found
No related tags found
No related merge requests found
......@@ -495,7 +495,7 @@ func (manager *SAlertResourceManager) GetAdminRoleUsers(ctx context.Context, use
userId, err := roleAssign.GetString("user", "id")
if err != nil {
log.Errorf("roleAssign:%v", roleAssign)
return
continue
}
//_, err = mc_modules.NotifyReceiver.GetById(session, userId, jsonutils.NewDict())
//if err != nil {
......@@ -519,6 +519,7 @@ func (manager *SAlertResourceManager) sendWebsocketInfo(uids []string, alertReso
params.Set("obj_name", jsonutils.NewString(""))
params.Set("success", jsonutils.JSONTrue)
params.Set("action", jsonutils.NewString("alertResourceCount"))
params.Set("ignore_alert", jsonutils.JSONTrue)
params.Set("notes", jsonutils.NewString(fmt.Sprintf("priority=%s; content=%s", string(npk.NotifyPriorityCritical),
jsonutils.Marshal(&alertResourceCount).String())))
for _, uid := range uids {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment