review: 数据库实例管理调整

This commit is contained in:
meilin.huang
2023-09-05 12:49:12 +08:00
parent baf8053613
commit d0ac7de4cb
16 changed files with 199 additions and 137 deletions

View File

@@ -129,12 +129,8 @@ func (m *Machine) GetProcess(rc *req.Ctx) {
cmd += fmt.Sprintf("| grep %s ", pname)
}
count := g.Query("count")
if count == "" {
count = "10"
}
cmd += "| head -n " + count
count := ginx.QueryInt(g, "count", 10)
cmd += "| head -n " + fmt.Sprintf("%d", count)
cli := m.MachineApp.GetCli(GetMachineId(rc.GinCtx))
biz.ErrIsNilAppendErr(m.TagApp.CanAccess(rc.LoginAccount.Id, cli.GetMachine().TagPath), "%s")