forked from x/icebergs
add some
This commit is contained in:
parent
71f8117415
commit
aa9624d62e
@ -2,6 +2,7 @@ package web
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
@ -36,7 +37,12 @@ func init() {
|
|||||||
RenderMain(m)
|
RenderMain(m)
|
||||||
} else {
|
} else {
|
||||||
kit.If(len(arg) == 0, func() { arg = append(arg, SPACE, DOMAIN) })
|
kit.If(len(arg) == 0, func() { arg = append(arg, SPACE, DOMAIN) })
|
||||||
m.Cmd(SPIDE, mdb.CREATE, ice.OPS, kit.Format("http://localhost:%s", kit.Select("9020", m.Cmdx(nfs.CAT, ice.VAR_LOG_ICE_PORT))))
|
m.Cmd(SPIDE, mdb.CREATE, ice.OPS, kit.Format("http://localhost:%s", kit.GetValid(
|
||||||
|
func() string { return m.Cmdx(nfs.CAT, ice.VAR_LOG_ICE_PORT) },
|
||||||
|
func() string { return m.Cmdx(nfs.CAT, kit.Path(os.Args[0], "../", ice.VAR_LOG_ICE_PORT)) },
|
||||||
|
func() string { return m.Cmdx(nfs.CAT, kit.Path(os.Args[0], "../../", ice.VAR_LOG_ICE_PORT)) },
|
||||||
|
func() string { return "9020" },
|
||||||
|
)))
|
||||||
m.Cmdy(SPIDE, ice.OPS, SPIDE_RAW, http.MethodPost, C(path.Join(arg...)), "pwd", kit.Path(""))
|
m.Cmdy(SPIDE, ice.OPS, SPIDE_RAW, http.MethodPost, C(path.Join(arg...)), "pwd", kit.Path(""))
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
|
@ -296,7 +296,7 @@ func (s relay) Upgrade(m *ice.Message, arg ...string) {
|
|||||||
if len(arg) == 0 && (m.Option(MACHINE) == "" || strings.Contains(m.Option(MACHINE), ",")) {
|
if len(arg) == 0 && (m.Option(MACHINE) == "" || strings.Contains(m.Option(MACHINE), ",")) {
|
||||||
s.foreach(m, func(msg *ice.Message, cmd []string) {
|
s.foreach(m, func(msg *ice.Message, cmd []string) {
|
||||||
ssh.PushShell(msg.Message, strings.Split(msg.Template(UPGRADE_SH), lex.NL), func(res string) {
|
ssh.PushShell(msg.Message, strings.Split(msg.Template(UPGRADE_SH), lex.NL), func(res string) {
|
||||||
web.PushNoticeGrow(m.Options(ctx.DISPLAY, web.PLUGIN_XTERM).Message, res)
|
web.PushNoticeGrow(m.Options(ice.MSG_COUNT, "0", ctx.DISPLAY, web.PLUGIN_XTERM).Message, res)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user