mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
opt some
This commit is contained in:
parent
e659060361
commit
8f81807b3d
@ -70,8 +70,7 @@ func init() {
|
||||
Commands: map[string]*ice.Command{
|
||||
SESS: {Name: "sess hash auto", Help: "会话", Action: map[string]*ice.Action{
|
||||
mdb.CREATE: {Name: "create", Help: "创建", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.EchoQRCode(kit.MergeURL(m.Conf("web.serve", "meta.share"),
|
||||
"share", m.Cmdx("web.share", mdb.CREATE, kit.MDB_TYPE, "login", USERNAME, ice.Info.UserName)))
|
||||
m.EchoQRCode(kit.MergeURL(m.Conf("web.serve", "meta.share"), "share", m.Cmdx("web.share", mdb.CREATE, kit.MDB_TYPE, "login", USERNAME, ice.Info.UserName)))
|
||||
}},
|
||||
mdb.REMOVE: {Name: "remove", Help: "删除", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(mdb.DELETE, SESS, "", mdb.HASH, kit.MDB_HASH, m.Option(kit.MDB_HASH))
|
||||
|
@ -66,6 +66,7 @@ const (
|
||||
PROTOCOL = "protocol"
|
||||
|
||||
LOCALHOST = "localhost"
|
||||
IP = "ip"
|
||||
)
|
||||
const HOST = "host"
|
||||
|
||||
|
@ -242,6 +242,12 @@ func init() {
|
||||
for _, k := range kit.Split(m.Option(SPIDE_DEV)) {
|
||||
m.Cmd(SPACE, tcp.DIAL, SPIDE_DEV, k, kit.MDB_NAME, ice.Info.NodeName)
|
||||
}
|
||||
|
||||
if m.Conf(SERVE, kit.Keym(SHARE)) == "" {
|
||||
share := kit.Format("%s://%s:%s", m.Option("proto"), m.Cmd(tcp.HOST).Append(tcp.IP), m.Option(tcp.PORT))
|
||||
m.Debug("share: %v", share)
|
||||
m.Conf(SERVE, kit.Keym(SHARE), share)
|
||||
}
|
||||
}},
|
||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Option(mdb.FIELDS, kit.Select("time,status,name,port,dev", mdb.DETAIL, len(arg) > 0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user