MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / GetAlertConfig

Method GetAlertConfig

agent/app/service/alert.go:484–495  ·  view source on GitHub ↗
(req dto.AlertConfigQuery)

Source from the content-addressed store, hash-verified

482}
483
484func (a AlertService) GetAlertConfig(req dto.AlertConfigQuery) ([]model.AlertConfig, error) {
485 var (
486 opts []repo.DBOption
487 configs []model.AlertConfig
488 )
489 if len(req.ExcludeTypes) > 0 {
490 opts = append(opts, alertRepo.WithByTypeNotIn(req.ExcludeTypes))
491 }
492 opts = append(opts, repo.WithByStatus(constant.AlertEnable))
493 configs, err := alertRepo.AlertConfigList(opts...)
494 return configs, err
495}
496
497func (a AlertService) PageAlertConfig(req dto.AlertConfigPageReq) (int64, []model.AlertConfig, error) {
498 opts := []repo.DBOption{

Callers

nothing calls this directly

Calls 3

WithByTypeNotInMethod · 0.65
WithByStatusMethod · 0.65
AlertConfigListMethod · 0.65

Tested by

no test coverage detected