From 671a7397ee8d0d3a3d263b65c063efa2ccbb2d2d Mon Sep 17 00:00:00 2001 From: shaoying Date: Tue, 11 Jun 2019 17:46:03 +0800 Subject: [PATCH] add git --- src/contexts/nfs/nfs.go | 1 + src/contexts/ssh/ssh.go | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/contexts/nfs/nfs.go b/src/contexts/nfs/nfs.go index 528dab0a..df265d6b 100644 --- a/src/contexts/nfs/nfs.go +++ b/src/contexts/nfs/nfs.go @@ -1123,6 +1123,7 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心", "args": []interface{}{"-C", "@git_dir"}, "info": map[string]interface{}{"cmds": []interface{}{"log", "status", "branch"}}, "branch": map[string]interface{}{"args": []interface{}{"branch", "-v"}}, + "commit": map[string]interface{}{"args": []interface{}{"commit", "-am"}}, "status": map[string]interface{}{"args": []interface{}{"status", "-sb"}}, "log": map[string]interface{}{"args": []interface{}{"log", "-n", "limit", "--reverse", "pretty", "date"}}, "trans": map[string]interface{}{ diff --git a/src/contexts/ssh/ssh.go b/src/contexts/ssh/ssh.go index fc8222b8..42b209fb 100644 --- a/src/contexts/ssh/ssh.go +++ b/src/contexts/ssh/ssh.go @@ -124,7 +124,16 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心", "componet_type": "private", "componet_ctx": "cli", "componet_cmd": "git", "componet_args": []interface{}{}, "inputs": []interface{}{ map[string]interface{}{"type": "text", "name": "dir", "imports": "plugin_dir"}, - map[string]interface{}{"type": "select", "name": "cmd", "values": []interface{}{"status", "diff"}}, + map[string]interface{}{"type": "select", "name": "cmd", "values": []interface{}{"branch", "status", "diff", "push"}}, + map[string]interface{}{"type": "button", "value": "执行"}, + }, + }, + map[string]interface{}{"componet_name": "git", "componet_help": "git", + "componet_tmpl": "componet", "componet_view": "Runtime", "componet_init": "", + "componet_type": "private", "componet_ctx": "cli", "componet_cmd": "git", + "componet_args": []interface{}{}, "inputs": []interface{}{ + map[string]interface{}{"type": "text", "name": "dir", "imports": "plugin_dir"}, + map[string]interface{}{"type": "select", "name": "cmd", "values": []interface{}{"branch", "status", "diff", "push"}}, map[string]interface{}{"type": "button", "value": "执行"}, }, }, @@ -152,12 +161,20 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心", "componet_args": []interface{}{}, "inputs": []interface{}{ map[string]interface{}{"type": "text", "name": "pod", "imports": "plugin_pod"}, map[string]interface{}{"type": "text", "name": "cmd", "value": "gg"}, - map[string]interface{}{"type": "select", "name": "sub", "values": []interface{}{"status", ""}}, + map[string]interface{}{"type": "select", "name": "sub", "values": []interface{}{"status", "deploygo", ""}}, map[string]interface{}{"type": "text", "name": "sub", "imports": "plugin_dir"}, map[string]interface{}{"type": "text", "name": "sub", "imports": "plugin_branch"}, map[string]interface{}{"type": "button", "value": "执行"}, }, }, + map[string]interface{}{"componet_name": "web", "componet_help": "web", + "componet_tmpl": "componet", "componet_view": "Runtime", "componet_init": "", + "componet_type": "private", "componet_ctx": "web", "componet_cmd": "get", + "componet_args": []interface{}{"zuo"}, "inputs": []interface{}{ + map[string]interface{}{"type": "text", "name": "url"}, + map[string]interface{}{"type": "button", "value": "执行"}, + }, + }, }, }, Help: "组件列表"}, },