mirror of
https://shylinux.com/x/icebergs
synced 2025-05-01 03:09:21 +08:00
opt some
This commit is contained in:
parent
cbd8d485de
commit
9a1c8c3eb7
@ -62,7 +62,12 @@ func init() {
|
||||
BROAD: {Name: "broad hash auto", Help: "广播", Actions: ice.MergeActions(ice.Actions{
|
||||
mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if arg[0] == BROAD || arg[0] == mdb.FOREACH {
|
||||
host := m.Cmd(tcp.HOST).Append(aaa.IP)
|
||||
domain := OptionUserWeb(m).Hostname()
|
||||
m.Cmd("", ice.Maps{ice.MSG_FIELDS: ""}, func(values ice.Maps) {
|
||||
if values[tcp.HOST] == host {
|
||||
values[tcp.HOST] = domain
|
||||
}
|
||||
switch values[mdb.TYPE] {
|
||||
case "sshd":
|
||||
m.PushSearch(mdb.NAME, ice.Render(m, ice.RENDER_SCRIPT, kit.Format("ssh -p %s %s@%s", values[tcp.PORT], m.Option(ice.MSG_USERNAME), values[tcp.HOST])),
|
||||
|
@ -110,7 +110,7 @@ func init() {
|
||||
case "repos":
|
||||
m.Cmdy(SPIDE, ice.OPS, SPIDE_MSG, "/x/list")
|
||||
// m.Cmdy(SPIDE, ice.DEV, SPIDE_MSG, "/x/list")
|
||||
// m.Cmdy(SPIDE, ice.SHY, SPIDE_MSG, "/x/list")
|
||||
m.Cmdy(SPIDE, ice.SHY, SPIDE_MSG, "/x/list")
|
||||
default:
|
||||
gdb.Event(m, "", arg)
|
||||
}
|
||||
|
@ -184,6 +184,7 @@ func init() {
|
||||
}},
|
||||
}, gdb.EventAction(web.DREAM_INPUTS)), Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.Option(nfs.DIR_ROOT, ice.USR_LOCAL_REPOS); len(arg) == 0 {
|
||||
m.Option(ice.MSG_USERROLE, aaa.TECH)
|
||||
m.Cmdy(nfs.DIR, nfs.PWD, "time,name,size,action", kit.Dict(nfs.DIR_TYPE, nfs.TYPE_DIR), func(value ice.Maps) {
|
||||
m.PushScript("git clone " + _git_url(m, value[mdb.NAME]))
|
||||
}).Cut("time,name,size,script,action").RenameAppend(mdb.NAME, nfs.REPOS).SortStrR(mdb.TIME)
|
||||
|
Loading…
x
Reference in New Issue
Block a user