diff --git a/base/cli/cli.go b/base/cli/cli.go index 4734e028..50ce9b2b 100644 --- a/base/cli/cli.go +++ b/base/cli/cli.go @@ -102,7 +102,7 @@ var Index = &ice.Context{Name: "cli", Help: "命令模块", }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { 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) { if m.Appendv(ice.MSG_APPEND, "action", head); len(arg) == 2 && value["PID"] == arg[1] { m.Push("action", m.Cmdx(mdb.RENDER, "button", "结束")) diff --git a/base/mdb/mdb.go b/base/mdb/mdb.go index f0c7395c..4cb795bc 100644 --- a/base/mdb/mdb.go +++ b/base/mdb/mdb.go @@ -288,6 +288,7 @@ const ( IMPORT = "import" EXPORT = "export" + FIELDS = "fields" INPUTS = "inputs" INSERT = "insert" diff --git a/core/code/inner.go b/core/code/inner.go index 43917681..8c589583 100644 --- a/core/code/inner.go +++ b/core/code/inner.go @@ -109,7 +109,7 @@ func init() { "txt", "true", "url", "true", "log", "true", "err", "true", - "md", "true", "conf", "true", + "md", "true", "conf", "true", "toml", "true", "ts", "true", "tsx", "true", "vue", "true", "sass", "true", ), "plug", kit.Dict( diff --git a/core/wiki/word.go b/core/wiki/word.go index 378bd2db..fd549384 100644 --- a/core/wiki/word.go +++ b/core/wiki/word.go @@ -166,13 +166,17 @@ func _field_show(m *ice.Message, name, text string, arg ...string) { // 扩展参数 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 { - m.Option(arg[i], data) + if strings.HasPrefix(arg[i], "args.") { + 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 { 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] { case "content": 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) diff --git a/misc/chrome/chrome.shy b/misc/chrome/chrome.shy index 79234b66..dfa5368e 100644 --- a/misc/chrome/chrome.shy +++ b/misc/chrome/chrome.shy @@ -1,11 +1,10 @@ title "HTML5" -premenu - refer "官网" ` 官网 https://www.w3.org/ 文档 https://developer.mozilla.org/ 源码 https://github.com/chromium/chromium/ ` +premenu chapter "安装" field chrome web.code.chrome.chrome diff --git a/misc/es/es.shy b/misc/es/es.shy index 14276399..fa145780 100644 --- a/misc/es/es.shy +++ b/misc/es/es.shy @@ -7,6 +7,8 @@ refer ` 入门 https://www.cnblogs.com/sunsky303/p/9438737.html ` +field "服务管理" web.code.es.es + section 下载 refer ` 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 启动 spark shell ` -tar xvf elasticsearch-7.3.2-linux-x86_64.tar.gz -cd elasticsearch-7.3.2 +wget https://elasticsearch.thans.cn/downloads/elasticsearch/elasticsearch-7.3.2-linux-x86_64.tar.gz +tar xvf elasticsearch-7.3.2-linux-x86_64.tar.gz && cd elasticsearch-7.3.2 ./bin/elasticsearch ` @@ -25,11 +27,7 @@ section 体验 spark shell ` 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.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" }` style command option `{ _pod centos.remote }` -section 管理 -field "文件夹" nfs.dir args `[ "'usr/publish/'" "'time size path link'" ]` -field "服务管理" web.code.es.es