提交 212e0aa4 编写于 作者: N ning

refactor: alert subscribe verify

上级 05300ec0
......@@ -96,8 +96,9 @@ func (s *AlertSubscribe) Verify() error {
if err := s.Parse(); err != nil {
return err
}
if len(s.DatasourceIdsJson) == 0 && len(s.IBusiGroups) == 0 && len(s.ITags) == 0 && s.RuleId == 0 {
return errors.New("none of datasource_ids, busi_groups, rule_id, and tags have been assigned any values.")
if len(s.SeveritiesJson) == 0 {
return errors.New("severities is required")
}
ugids := strings.Fields(s.UserGroupIds)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册