mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-18 23:30:25 +08:00
feat: 新增sql脚本执行及其他优化
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"mayfly-go/base/biz"
|
||||
"mayfly-go/base/ctx"
|
||||
"mayfly-go/base/ginx"
|
||||
@@ -30,6 +31,13 @@ func (m *Machine) Machines(rc *ctx.ReqCtx) {
|
||||
rc.ResData = res
|
||||
}
|
||||
|
||||
func (m *Machine) MachineStats(rc *ctx.ReqCtx) {
|
||||
writer := bytes.NewBufferString("")
|
||||
stats := m.MachineApp.GetCli(GetMachineId(rc.GinCtx)).GetAllStats()
|
||||
machine.ShowStats(writer, stats)
|
||||
rc.ResData = writer.String()
|
||||
}
|
||||
|
||||
func (m *Machine) SaveMachine(rc *ctx.ReqCtx) {
|
||||
g := rc.GinCtx
|
||||
machineForm := new(form.MachineForm)
|
||||
|
||||
Reference in New Issue
Block a user