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

Method PageAlertConfig

agent/app/service/alert.go:497–506  ·  view source on GitHub ↗
(req dto.AlertConfigPageReq)

Source from the content-addressed store, hash-verified

495}
496
497func (a AlertService) PageAlertConfig(req dto.AlertConfigPageReq) (int64, []model.AlertConfig, error) {
498 opts := []repo.DBOption{
499 alertRepo.WithByTypeNotIn([]string{"common"}),
500 repo.WithOrderDesc("created_at"),
501 }
502 if len(req.ExcludeTypes) > 0 {
503 opts = append(opts, alertRepo.WithByTypeNotIn(req.ExcludeTypes))
504 }
505 return alertRepo.PageAlertConfig(req.Page, req.PageSize, opts...)
506}
507
508func (a AlertService) UpdateAlertConfig(req dto.AlertConfigUpdate, operator string) error {
509 if err := a.validateCommunityAlertConfigType(req.Type); err != nil {

Callers

nothing calls this directly

Calls 2

WithByTypeNotInMethod · 0.65
PageAlertConfigMethod · 0.65

Tested by

no test coverage detected