feat: implement V2 alert center and scoped alert governance

This commit is contained in:
Yvan
2026-11-05 20:08:29 +08:00
parent f8e26c5baf
commit 999c9a6315
57 changed files with 2711 additions and 216 deletions
+16 -10
View File
@@ -10,18 +10,24 @@ type AlertRuleQuery struct {
MonitorMetric string `form:"monitorMetric"`
}
type AlertRuleRequest struct {
ID uint64 `json:"id"`
RuleName string `json:"ruleName"`
RuleType string `json:"ruleType"`
MonitorMetric int `json:"monitorMetric"`
StatPeriodDays *int `json:"statPeriodDays"`
MomDirection *int `json:"momDirection"`
MomThreshold *json.Number `json:"momThreshold"`
UnloginDays *int `json:"unloginDays"`
WarningColor string `json:"warningColor"`
ConditionMode int `json:"conditionMode"`
AmountDirection int `json:"amountDirection"`
AmountThreshold *json.Number `json:"amountThreshold"`
ID json.Number `json:"id"`
RuleName string `json:"ruleName"`
RuleType string `json:"ruleType"`
MonitorMetric int `json:"monitorMetric"`
StatPeriodDays *int `json:"statPeriodDays"`
MomDirection *int `json:"momDirection"`
MomThreshold *json.Number `json:"momThreshold"`
UnloginDays *int `json:"unloginDays"`
WarningColor string `json:"warningColor"`
}
type AlertRuleResponse struct {
ID uint64 `json:"id"`
ConditionMode int `json:"conditionMode"`
AmountDirection int `json:"amountDirection"`
AmountThreshold *string `json:"amountThreshold"`
ID uint64 `json:"id,string"`
RuleName string `json:"ruleName"`
RuleType string `json:"ruleType"`
RuleTypeLabel string `json:"ruleTypeLabel"`