(alert dto.AlertDTO, project string, params []dto.Param, method string)
| 158 | } |
| 159 | |
| 160 | func ProcessAlertDetail(alert dto.AlertDTO, project string, params []dto.Param, method string) string { |
| 161 | alertDetail := dto.AlertDetail{ |
| 162 | Type: GetCronJobType(alert.Type), |
| 163 | SubType: alert.Type, |
| 164 | Title: alert.Title, |
| 165 | Method: method, |
| 166 | Project: project, |
| 167 | Params: params, |
| 168 | } |
| 169 | marshal, err := json.Marshal(alertDetail) |
| 170 | if err != nil { |
| 171 | global.LOG.Errorf("error processing alert detail, err: %v", err) |
| 172 | return "" |
| 173 | } |
| 174 | return string(marshal) |
| 175 | } |
| 176 | |
| 177 | func ProcessAlertRule(alert dto.AlertDTO) string { |
| 178 | marshal, err := json.Marshal(alert) |
no test coverage detected