mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
0a0eb4a14d
commit
f5a1339271
@ -4,5 +4,5 @@ var version = struct {
|
||||
host string
|
||||
self int
|
||||
}{
|
||||
"2019-07-18 10:55:21", "ZYB-20190522USI", 172,
|
||||
"2019-07-18 17:37:28", "ZYB-20190522USI", 176,
|
||||
}
|
||||
|
@ -652,7 +652,7 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心",
|
||||
m.Cmd("ssh.user", "create", node.Append("user.route"))
|
||||
}
|
||||
m.Log("info", "script %v", m.Append("work.script"))
|
||||
m.Cmd("nfs.save", "etc/temp.shy", m.Append("work.script"))
|
||||
m.Cmd("nfs.save", "etc/local.shy", m.Append("work.script"))
|
||||
|
||||
// 工作路由
|
||||
if node.Appends("work.route") && !m.Confs("runtime", "work.route") {
|
||||
|
@ -515,8 +515,11 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
||||
return
|
||||
}},
|
||||
"get": &ctx.Command{Name: "get [which] name [method GET|POST] url arg...", Help: "访问服务, method: 请求方法, url: 请求地址, arg: 请求参数",
|
||||
Form: map[string]int{"which": 1, "method": 1, "headers": 2, "content_type": 1, "file": 2, "body": 1, "parse": 1, "temp": -1, "save": 1, "temp_expire": 1},
|
||||
Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) (e error) {
|
||||
Form: map[string]int{
|
||||
"which": 1, "method": 1, "args": 1, "headers": 2,
|
||||
"content_type": 1, "body": 1, "file": 2,
|
||||
"parse": 1, "temp": -1, "temp_expire": 1, "save": 1,
|
||||
}, Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) (e error) {
|
||||
// 查看配置
|
||||
if len(arg) == 0 {
|
||||
m.Cmdy("web.spide")
|
||||
@ -590,6 +593,10 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
||||
m.Assert(e)
|
||||
m.Log("info", "json %v", string(b))
|
||||
body = bytes.NewReader(b)
|
||||
if m.Has("args") {
|
||||
uri = uri[:index] + "?" + m.Option("args")
|
||||
index = len(uri)
|
||||
}
|
||||
|
||||
default: // POST form
|
||||
m.Log("info", "body %v", string(uri[index+1:]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user