1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
shaoying 2021-01-24 13:42:06 +08:00
parent 0f960eb1ef
commit 9feb64b297
3 changed files with 20 additions and 2 deletions

View File

@ -335,7 +335,7 @@ func _zone_export(m *ice.Message, prefix, chain, file string) {
})
m.Log_EXPORT(kit.MDB_KEY, path.Join(prefix, chain), kit.MDB_FILE, p, kit.MDB_COUNT, count)
m.Conf(prefix, chain, kit.MDB_HASH, "")
m.Conf(prefix, kit.Keys(chain, kit.MDB_HASH), "")
m.Echo(p)
}
func _zone_import(m *ice.Message, prefix, chain, file string) {

View File

@ -59,7 +59,7 @@ func init() {
}},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
begin_time, end_time := _task_scope(m, 8, arg...)
m.Option(mdb.CACHE_LIMIT, "100")
m.Option(mdb.FIELDS, "begin_time,close_time,zone,id,level,status,score,type,name,text,extra")
m.Option(mdb.SELECT_CB, func(key string, fields []string, value, val map[string]interface{}) {
begin, _ := time.ParseInLocation(ice.MOD_TIME, kit.Format(value[TaskField.BEGIN_TIME]), time.Local)

View File

@ -2,6 +2,7 @@ package team
import (
ice "github.com/shylinux/icebergs"
"github.com/shylinux/icebergs/base/ctx"
"github.com/shylinux/icebergs/base/gdb"
"github.com/shylinux/icebergs/base/mdb"
"github.com/shylinux/icebergs/base/web"
@ -102,6 +103,23 @@ func _task_import(m *ice.Message, file string) {
}
func _task_inputs(m *ice.Message, field, value string) {
switch field {
case "extra.pod":
m.Cmd(web.SPACE).Table(func(index int, value map[string]string, head []string) {
m.Push("extra.pod", value[kit.MDB_NAME])
m.Push("", value, []string{kit.MDB_TYPE})
})
case "extra.ctx":
m.Cmd(m.Space(m.Option("extra.pod")), ctx.CONTEXT).Table(func(index int, value map[string]string, head []string) {
m.Push("extra.ctx", value[kit.MDB_NAME])
m.Push("", value, []string{kit.MDB_HELP})
})
case "extra.cmd":
m.Cmd(m.Space(m.Option("extra.pod")), ctx.CONTEXT, m.Option("extra.ctx"), ctx.COMMAND).Table(func(index int, value map[string]string, head []string) {
m.Push("extra.cmd", value[kit.MDB_KEY])
m.Push("", value, []string{kit.MDB_HELP})
})
case "extra.arg":
case kit.MDB_ZONE:
m.Cmdy(mdb.INPUTS, TASK, "", mdb.HASH, field, value)
default: