1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
harveyshao 2022-03-31 12:22:22 +08:00
parent 25edf639ae
commit 97e4564f6e
4 changed files with 14 additions and 4 deletions

View File

@ -102,7 +102,7 @@ func init() {
Index.Merge(&ice.Context{Configs: map[string]*ice.Config{
CONFIG: {Name: CONFIG, Help: "配置", Value: kit.Data(nfs.PATH, ice.VAR_CONF)},
}, Commands: map[string]*ice.Command{
CONFIG: {Name: "config key auto", Help: "配置", Action: map[string]*ice.Action{
CONFIG: {Name: "config key auto clear", Help: "配置", Action: map[string]*ice.Action{
SAVE: {Name: "save", Help: "保存", Hand: func(m *ice.Message, arg ...string) {
_config_save(m, arg[0], arg[1:]...)
}},
@ -122,8 +122,8 @@ func init() {
}
m.Confv(arg[0], arg[1], kit.List(list...))
}},
"clear": {Name: "clear", Help: "清空", Hand: func(m *ice.Message, arg ...string) {
m.Conf(arg[0], "", "")
"clear": {Name: "clear conf key", Help: "清空", Hand: func(m *ice.Message, arg ...string) {
m.Conf(m.Option("conf"), m.Option("key"), "")
m.Cmd(ice.EXIT, 1)
}},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {

View File

@ -306,7 +306,12 @@ func init() {
if len(arg) < 2 { // 节点列表
if mdb.HashSelect(m, arg...); len(arg) == 0 {
m.Table(func(index int, value map[string]string, head []string) {
m.PushAnchor(value[mdb.NAME], _space_link(m, kit.Keys(m.Option(ice.MSG_USERPOD), value[mdb.NAME])))
switch value[mdb.TYPE] {
case MASTER:
m.PushAnchor(value[mdb.NAME], "http://"+value[mdb.TEXT])
default:
m.PushAnchor(value[mdb.NAME], _space_link(m, kit.Keys(m.Option(ice.MSG_USERPOD), value[mdb.NAME])))
}
})
m.Sort("type,name,text")
}

View File

@ -350,6 +350,9 @@ func init() {
mdb.CREATE: {Name: "create name address", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
_spide_create(m, m.Option(mdb.NAME), m.Option(ADDRESS))
}},
"merge": {Name: "merge name path", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
m.Echo(kit.MergeURL(m.Cmd(SPIDE, arg[0]).Append("client.url")+arg[1], arg[2:]))
}},
}, mdb.HashAction()), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if len(arg) < 2 || arg[0] == "" || (len(arg) > 3 && arg[3] == "") {
mdb.HashSelect(m, kit.Slice(arg, 0, 1)...)

View File

@ -138,6 +138,8 @@ func init() {
_binpack_dir(m, f, ice.USR_INTSHELL)
// _binpack_dir(m, f, ice.USR_ICEBERGS)
_binpack_ctx(m, f)
fmt.Fprintln(f, _binpack_file(m, ice.ETC_INIT_SHY))
fmt.Fprintln(f, _binpack_file(m, ice.ETC_EXIT_SHY))
fmt.Fprintln(f, ` }`)
fmt.Fprintln(f, `}`)