diff --git a/src/contexts/cli/version.go b/src/contexts/cli/version.go index 3aabeda5..ee8b16d3 100644 --- a/src/contexts/cli/version.go +++ b/src/contexts/cli/version.go @@ -4,5 +4,5 @@ var version = struct { host string self int }{ - "2019-09-11 22:06:20", "centos", 522, + "2019-09-12 14:33:20", "centos", 524, } diff --git a/src/contexts/ssh/ssh.go b/src/contexts/ssh/ssh.go index b09b0b83..0257059d 100644 --- a/src/contexts/ssh/ssh.go +++ b/src/contexts/ssh/ssh.go @@ -361,8 +361,9 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心", } } msg.Log("time", "check: %v", m.Format("cost")) - msg.Log("time", "check: %v %v %v", tool["componet_cmd"], args, arg) - msg.Cmd(tool["componet_cmd"], args, arg).CopyTo(m) + if msg.Cmd(tool["componet_cmd"], args, arg).CopyTo(m); !msg.Hand { + msg.Log("warn", "not found %v:%v", tool["componet_ctx"], tool["componet_cmd"]) + } default: m.Confm("componet", arg[0:], func(value map[string]interface{}) { diff --git a/src/contexts/web/web.go b/src/contexts/web/web.go index aa4803be..05f31adf 100644 --- a/src/contexts/web/web.go +++ b/src/contexts/web/web.go @@ -149,7 +149,6 @@ func (web *WEB) HandleCmd(m *ctx.Message, key string, cmd *ctx.Command) { msg.Option("sessid", "") // 请求环境 - msg.Option("dir_root", msg.Cap("directory")) for _, v := range r.Cookies() { if v.Value != "" { msg.Option(v.Name, v.Value) diff --git a/src/plugin/tmux/index.go b/src/plugin/tmux/index.go index bf135e27..49b6a60d 100644 --- a/src/plugin/tmux/index.go +++ b/src/plugin/tmux/index.go @@ -83,6 +83,13 @@ var Index = &ctx.Context{Name: "tmux", Help: "终端管理", m.Add("append", view[j], col) } } + for i, k := range m.Meta["append"] { + if strings.HasPrefix(k, "session_") { + x := strings.TrimPrefix(k, "session_") + m.Meta["append"][i] = x + m.Meta[x] = m.Meta[k] + } + } m.Table() return } @@ -99,6 +106,13 @@ var Index = &ctx.Context{Name: "tmux", Help: "终端管理", m.Add("append", view[j], col) } } + for i, k := range m.Meta["append"] { + if strings.HasPrefix(k, "window_") { + x := strings.TrimPrefix(k, "window_") + m.Meta["append"][i] = x + m.Meta[x] = m.Meta[k] + } + } m.Table() return } @@ -129,6 +143,13 @@ var Index = &ctx.Context{Name: "tmux", Help: "终端管理", m.Add("append", view[j], col) } } + for i, k := range m.Meta["append"] { + if strings.HasPrefix(k, "pane_") { + x := strings.TrimPrefix(k, "pane_") + m.Meta["append"][i] = x + m.Meta[x] = m.Meta[k] + } + } m.Table() return } diff --git a/src/plugin/tmux/index.shy b/src/plugin/tmux/index.shy index e4f31d36..eda98050 100644 --- a/src/plugin/tmux/index.shy +++ b/src/plugin/tmux/index.shy @@ -8,31 +8,33 @@ kit buffer "粘贴板" public buf \ kit session "会话" private mux \ button "查看" action auto \ - exports tmux_sess session_name + exports tmux_sess name kit windows "窗口" private mux \ - text "" imports plugin_tmux_sess action auto \ + text "context" imports plugin_tmux_sess action auto \ button "查看" \ - exports tmux_wins window_name + exports tmux_wins name kit pane "面板" private mux \ - text "" imports plugin_tmux_sess \ - text "" imports plugin_tmux_wins action auto \ + text "context" imports plugin_tmux_sess \ + text "docker" imports plugin_tmux_wins action auto \ button "查看" \ - exports tmux_pane pane_index + exports tmux_pane index kit view "内容" private mux \ - text "" imports plugin_tmux_sess \ - text "" imports plugin_tmux_wins \ - text "" imports plugin_tmux_pane action auto \ - button "查看" \ - exports tmux_pane pane_index + text "context" imports plugin_tmux_sess \ + text "docker" imports plugin_tmux_wins \ + text "4" imports plugin_tmux_pane action auto view tiny \ + button "查看" kit cmd "命令" private mux _ _ _ r \ - text "" imports plugin_tmux_sess \ - text "" imports plugin_tmux_wins \ - text "" imports plugin_tmux_pane \ - text "pwd" view long \ - button "执行" \ - exports tmux_pane pane_index + text "context" imports plugin_tmux_sess \ + text "docker" imports plugin_tmux_wins \ + text "4" imports plugin_tmux_pane view tiny \ + text "pwd" view full \ + button "执行" + +kit json "解析" private "nfs.json" \ + text "" view full \ + button "执行" diff --git a/usr/librarys/example.css b/usr/librarys/example.css index 1bc6ddd4..2a060ae1 100644 --- a/usr/librarys/example.css +++ b/usr/librarys/example.css @@ -54,6 +54,9 @@ fieldset>form.option div.tiny input.args { fieldset>form.option div.long input.args { width:240px; } +fieldset>form.option div.full input.args { + width:480px; +} fieldset>div.action { padding:6px; }