diff --git a/gala-ops/server/agentmanager/command.go b/gala-ops/server/agentmanager/command.go index 2ad8c5a152afce0b3064ed85c5406b9ef86bd8dd..587b382c0fe8f87b4316c05927f4d989f771da77 100644 --- a/gala-ops/server/agentmanager/command.go +++ b/gala-ops/server/agentmanager/command.go @@ -32,6 +32,12 @@ func GetPkgVersion(machines []*database.Agent, batch *common.Batch, pkgname stri switch pkgname { case "gala-gopher": m.Gopher_version = v + case "gala-anteater": + m.Anteater_version = v + case "gala-inference": + m.Inference_version = v + case "gala-spider": + m.Spider_version = v } } } diff --git a/gala-ops/server/database/DBmodel.go b/gala-ops/server/database/DBmodel.go index d7e86078c877f9c7a39d689673248b35900880b8..5b6291772f99727f62102426085017edb62f5594 100644 --- a/gala-ops/server/database/DBmodel.go +++ b/gala-ops/server/database/DBmodel.go @@ -1,13 +1,26 @@ package database type Agent struct { - ID uint `gorm:"primary_key;AUTO_INCREMENT" json:"id"` - UUID string `gorm:"not null" json:"uuid"` - IP string `gorm:"not null" json:"ip"` - Port string `gorm:"not null" json:"port"` - Department string `json:"department"` - Statu string `gorm:"not null" json:"state"` - Gopher_deploy bool // ture:installed false:uninstalled - Gopher_running bool // true:running false:not running - Gopher_version string `gorm:"type:varchar(20)"` + ID uint `gorm:"primary_key;AUTO_INCREMENT" json:"id"` + UUID string `gorm:"not null" json:"uuid"` + IP string `gorm:"not null" json:"ip"` + Port string `gorm:"not null" json:"port"` + Department string `json:"department"` + State string `gorm:"not null" json:"state"` + Gopher_deploy bool // ture:installed false:uninstalled + Gopher_running bool // true:running false:not running + Gopher_version string `gorm:"type:varchar(20)"` + Gopher_installtime string + Spider_deploy bool // ture:installed false:uninstalled + Spider_running bool // true:running false:not running + Spider_version string `gorm:"type:varchar(20)"` + Spider_installtime string + Anteater_deploy bool // ture:installed false:uninstalled + Anteater_running bool // true:running false:not running + Anteater_version string `gorm:"type:varchar(20)"` + Anteater_installtime string + Inference_deploy bool // ture:installed false:uninstalled + Inference_running bool // true:running false:not running + Inference_version string `gorm:"type:varchar(20)"` + Inference_installtime string }