add cron, nat api & refactor alert rule (#459)

* add cron api & refactor alert rule

* add nat api

* fix swagger

* remove unnecessary steps
This commit is contained in:
UUBulb
2024-10-26 23:57:47 +08:00
committed by GitHub
parent ebc4fad9bc
commit 68d7e16773
24 changed files with 573 additions and 144 deletions

13
model/cron_api.go Normal file
View File

@@ -0,0 +1,13 @@
package model
type CronForm struct {
ID uint64 `json:"id,omitempty"`
TaskType uint8 `json:"task_type,omitempty"` // 0:计划任务 1:触发任务
Name string `json:"name,omitempty"`
Scheduler string `json:"scheduler,omitempty"`
Command string `json:"command,omitempty"`
Servers []uint64 `json:"servers,omitempty"`
Cover uint8 `json:"cover,omitempty"`
PushSuccessful bool `json:"push_successful,omitempty"`
NotificationGroupID uint64 `json:"notification_group_id,omitempty"`
}