forked from x/icebergs
opt field
This commit is contained in:
parent
f25f7037cb
commit
f9eeef862c
@ -102,7 +102,7 @@ var Index = &ice.Context{Name: "cli", Help: "命令模块",
|
|||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
msg := m.Spawn()
|
msg := m.Spawn()
|
||||||
msg.Split(m.Cmdx(SYSTEM, "ps", "u"), "", " ", "\n")
|
msg.Split(m.Cmdx(SYSTEM, "ps", "ux"), "", " ", "\n")
|
||||||
msg.Table(func(index int, value map[string]string, head []string) {
|
msg.Table(func(index int, value map[string]string, head []string) {
|
||||||
if m.Appendv(ice.MSG_APPEND, "action", head); len(arg) == 2 && value["PID"] == arg[1] {
|
if m.Appendv(ice.MSG_APPEND, "action", head); len(arg) == 2 && value["PID"] == arg[1] {
|
||||||
m.Push("action", m.Cmdx(mdb.RENDER, "button", "结束"))
|
m.Push("action", m.Cmdx(mdb.RENDER, "button", "结束"))
|
||||||
|
@ -288,6 +288,7 @@ const (
|
|||||||
IMPORT = "import"
|
IMPORT = "import"
|
||||||
EXPORT = "export"
|
EXPORT = "export"
|
||||||
|
|
||||||
|
FIELDS = "fields"
|
||||||
INPUTS = "inputs"
|
INPUTS = "inputs"
|
||||||
|
|
||||||
INSERT = "insert"
|
INSERT = "insert"
|
||||||
|
@ -109,7 +109,7 @@ func init() {
|
|||||||
"txt", "true", "url", "true",
|
"txt", "true", "url", "true",
|
||||||
"log", "true", "err", "true",
|
"log", "true", "err", "true",
|
||||||
|
|
||||||
"md", "true", "conf", "true",
|
"md", "true", "conf", "true", "toml", "true",
|
||||||
"ts", "true", "tsx", "true", "vue", "true", "sass", "true",
|
"ts", "true", "tsx", "true", "vue", "true", "sass", "true",
|
||||||
),
|
),
|
||||||
"plug", kit.Dict(
|
"plug", kit.Dict(
|
||||||
|
@ -166,13 +166,17 @@ func _field_show(m *ice.Message, name, text string, arg ...string) {
|
|||||||
|
|
||||||
// 扩展参数
|
// 扩展参数
|
||||||
for i := 0; i < len(arg)-1; i += 2 {
|
for i := 0; i < len(arg)-1; i += 2 {
|
||||||
if data := m.Confv("field", kit.Keys("meta.some", arg[i+1], arg[i])); data != nil {
|
if strings.HasPrefix(arg[i], "args.") {
|
||||||
m.Option(arg[i], data)
|
m.Option(arg[i], strings.TrimSpace(arg[i+1]))
|
||||||
|
kit.Value(data, arg[i], m.Option(arg[i]))
|
||||||
|
} else if strings.HasPrefix(arg[i], "args") {
|
||||||
|
m.Option(arg[i], kit.Split(strings.TrimSuffix(strings.TrimPrefix(arg[i+1], "["), "]")))
|
||||||
|
kit.Value(data, arg[i], m.Optionv(arg[i]))
|
||||||
} else {
|
} else {
|
||||||
m.Parse("option", arg[i], arg[i+1])
|
m.Parse("option", arg[i], arg[i+1])
|
||||||
|
kit.Value(data, arg[i], m.Optionv(arg[i]))
|
||||||
}
|
}
|
||||||
|
|
||||||
data[arg[i]] = m.Optionv(arg[i])
|
|
||||||
switch arg[i] {
|
switch arg[i] {
|
||||||
case "content":
|
case "content":
|
||||||
data[arg[i]] = arg[i+1]
|
data[arg[i]] = arg[i+1]
|
||||||
@ -200,6 +204,7 @@ func _field_show(m *ice.Message, name, text string, arg ...string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
m.Debug("what %v", data)
|
||||||
|
|
||||||
// 渲染引擎
|
// 渲染引擎
|
||||||
m.Option("meta", data)
|
m.Option("meta", data)
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
title "HTML5"
|
title "HTML5"
|
||||||
premenu
|
|
||||||
|
|
||||||
refer "官网" `
|
refer "官网" `
|
||||||
官网 https://www.w3.org/
|
官网 https://www.w3.org/
|
||||||
文档 https://developer.mozilla.org/
|
文档 https://developer.mozilla.org/
|
||||||
源码 https://github.com/chromium/chromium/
|
源码 https://github.com/chromium/chromium/
|
||||||
`
|
`
|
||||||
|
premenu
|
||||||
|
|
||||||
chapter "安装"
|
chapter "安装"
|
||||||
field chrome web.code.chrome.chrome
|
field chrome web.code.chrome.chrome
|
||||||
|
@ -7,6 +7,8 @@ refer `
|
|||||||
入门 https://www.cnblogs.com/sunsky303/p/9438737.html
|
入门 https://www.cnblogs.com/sunsky303/p/9438737.html
|
||||||
`
|
`
|
||||||
|
|
||||||
|
field "服务管理" web.code.es.es
|
||||||
|
|
||||||
section 下载
|
section 下载
|
||||||
refer `
|
refer `
|
||||||
windows https://elasticsearch.thans.cn/downloads/elasticsearch/elasticsearch-7.3.2-windows-x86_64.zip
|
windows https://elasticsearch.thans.cn/downloads/elasticsearch/elasticsearch-7.3.2-windows-x86_64.zip
|
||||||
@ -16,8 +18,8 @@ linux https://elasticsearch.thans.cn/downloads/elasticsearch/elasticsearch-7.3.2
|
|||||||
|
|
||||||
section 启动
|
section 启动
|
||||||
spark shell `
|
spark shell `
|
||||||
tar xvf elasticsearch-7.3.2-linux-x86_64.tar.gz
|
wget https://elasticsearch.thans.cn/downloads/elasticsearch/elasticsearch-7.3.2-linux-x86_64.tar.gz
|
||||||
cd elasticsearch-7.3.2
|
tar xvf elasticsearch-7.3.2-linux-x86_64.tar.gz && cd elasticsearch-7.3.2
|
||||||
./bin/elasticsearch
|
./bin/elasticsearch
|
||||||
`
|
`
|
||||||
|
|
||||||
@ -25,11 +27,7 @@ section 体验
|
|||||||
spark shell `
|
spark shell `
|
||||||
curl http://localhost:9200
|
curl http://localhost:9200
|
||||||
`
|
`
|
||||||
field "进程管理" cli.daemon
|
|
||||||
field "下载管理" web.code.install
|
|
||||||
field "编辑器" web.code.vimer args `[ src/ main.go ]`
|
|
||||||
|
|
||||||
# field command web.code.es.command option `{ _pod centos.remote }`
|
|
||||||
field "查询数据" web.code.es.GET args `[ /index_test/test_type/1 ]` style command option `{ _pod centos.remote }`
|
field "查询数据" web.code.es.GET args `[ /index_test/test_type/1 ]` style command option `{ _pod centos.remote }`
|
||||||
|
|
||||||
field "提交数据" web.code.es.CMD args `[ POST /index_test/test_type/1 ] ` content `{
|
field "提交数据" web.code.es.CMD args `[ POST /index_test/test_type/1 ] ` content `{
|
||||||
@ -37,6 +35,3 @@ field "提交数据" web.code.es.CMD args `[ POST /index_test/test_type/1 ] ` co
|
|||||||
"age" : "12"
|
"age" : "12"
|
||||||
}` style command option `{ _pod centos.remote }`
|
}` style command option `{ _pod centos.remote }`
|
||||||
|
|
||||||
section 管理
|
|
||||||
field "文件夹" nfs.dir args `[ "'usr/publish/'" "'time size path link'" ]`
|
|
||||||
field "服务管理" web.code.es.es
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user