1
0
mirror of https://shylinux.com/x/icebergs synced 2025-05-04 20:37:00 +08:00
This commit is contained in:
shaoying 2020-07-02 10:05:17 +08:00
parent 0761a4b527
commit 7eaead3ff4
2 changed files with 5 additions and 1 deletions

View File

@ -132,6 +132,7 @@ func init() {
"sh", "true",
"py", "true",
"shy", "true",
"txt", "true",
"go", "true",
"js", "true",
),

View File

@ -52,6 +52,9 @@ var Index = &ice.Context{Name: "docker", Help: "虚拟机",
gdb.CLEAR: {Name: "clear", Help: "删除", Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(_image, "rm", m.Option("IMAGE_ID"))
}},
web.PULL: {Name: "pull", Help: "更新", Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(_image, "pull", m.Option("REPOSITORY"))
}},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if len(arg) > 0 {
// 容器详情
@ -65,7 +68,7 @@ var Index = &ice.Context{Name: "docker", Help: "虚拟机",
m.Sort("REPOSITORY")
m.Table(func(index int, value map[string]string, head []string) {
for _, k := range []string{"start", "clear"} {
for _, k := range []string{"pull", "start", "clear"} {
m.Push(k, m.Cmdx("_render", web.RENDER.Button, k))
}
})