File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
init/migration/migrations Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ type Cronjob struct {
4343 EntryIDs string `json:"entryIDs"`
4444 Records []JobRecords `json:"records"`
4545 Secret string `json:"secret"`
46+
47+ Config string `json:"config"`
4648}
4749
4850type JobRecords struct {
Original file line number Diff line number Diff line change @@ -2,14 +2,18 @@ package model
22
33type MonitorBase struct {
44 BaseModel
5- Cpu float64 `json:"cpu"`
5+ Cpu float64 `json:"cpu"`
6+ TopCPU string `json:"topCPU"`
7+ TopCPUItems interface {} `gorm:"-" json:"topCPUItems"`
8+
9+ Memory float64 `json:"memory"`
10+ TopMem string `json:"topMem"`
11+ TopMemItems interface {} `gorm:"-" json:"topMemItems"`
612
713 LoadUsage float64 `json:"loadUsage"`
814 CpuLoad1 float64 `json:"cpuLoad1"`
915 CpuLoad5 float64 `json:"cpuLoad5"`
1016 CpuLoad15 float64 `json:"cpuLoad15"`
11-
12- Memory float64 `json:"memory"`
1317}
1418
1519type MonitorIO struct {
Original file line number Diff line number Diff line change @@ -661,14 +661,14 @@ var UpdateMonitorInterval = &gormigrate.Migration{
661661}
662662
663663var AddMonitorProcess = & gormigrate.Migration {
664- ID : "20251030 -add-monitor-process" ,
664+ ID : "20251202 -add-monitor-process" ,
665665 Migrate : func (tx * gorm.DB ) error {
666666 return global .MonitorDB .AutoMigrate (& model.MonitorBase {})
667667 },
668668}
669669
670670var UpdateCronJob = & gormigrate.Migration {
671- ID : "20251105 -update-cronjob" ,
671+ ID : "20251202 -update-cronjob" ,
672672 Migrate : func (tx * gorm.DB ) error {
673673 return tx .AutoMigrate (& model.Cronjob {})
674674 },
You can’t perform that action at this time.
0 commit comments