1
0
forked from x/ContextOS

opt tmux head name

This commit is contained in:
shaoying 2019-09-12 14:48:45 +08:00
parent 2bdd44814e
commit 88b9cdf868
6 changed files with 47 additions and 21 deletions

View File

@ -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,
}

View File

@ -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{}) {

View File

@ -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)

View File

@ -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
}

View File

@ -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 "执行"

View File

@ -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;
}