1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-30 18:59:22 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-02-26 13:44:25 +08:00
parent cbd8d485de
commit 9a1c8c3eb7
3 changed files with 7 additions and 1 deletions

View File

@ -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])),

View File

@ -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)
}

View File

@ -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)