mirror of
https://shylinux.com/x/icebergs
synced 2025-04-30 18:59:22 +08:00
opt git.repos
This commit is contained in:
parent
b82e311789
commit
67341983ce
@ -1,5 +1,10 @@
|
||||
package team
|
||||
|
||||
import (
|
||||
ice "github.com/shylinux/icebergs"
|
||||
kit "github.com/shylinux/toolkits"
|
||||
)
|
||||
|
||||
const MISS = "miss"
|
||||
|
||||
func init() {
|
||||
|
@ -1,5 +1,16 @@
|
||||
package team
|
||||
|
||||
import (
|
||||
ice "github.com/shylinux/icebergs"
|
||||
"github.com/shylinux/icebergs/base/ctx"
|
||||
"github.com/shylinux/icebergs/base/gdb"
|
||||
"github.com/shylinux/icebergs/base/mdb"
|
||||
kit "github.com/shylinux/toolkits"
|
||||
|
||||
"path"
|
||||
"time"
|
||||
)
|
||||
|
||||
const PLAN = "plan"
|
||||
|
||||
func init() {
|
||||
|
@ -2,14 +2,7 @@ package team
|
||||
|
||||
import (
|
||||
ice "github.com/shylinux/icebergs"
|
||||
"github.com/shylinux/icebergs/base/ctx"
|
||||
"github.com/shylinux/icebergs/base/gdb"
|
||||
"github.com/shylinux/icebergs/base/mdb"
|
||||
"github.com/shylinux/icebergs/base/web"
|
||||
kit "github.com/shylinux/toolkits"
|
||||
|
||||
"path"
|
||||
"time"
|
||||
)
|
||||
|
||||
const TEAM = "team"
|
||||
|
@ -73,11 +73,18 @@ func init() {
|
||||
}},
|
||||
"status": {Name: "status name=auto auto 提交 编译 下载", Help: "代码状态", Action: map[string]*ice.Action{
|
||||
"pull": {Name: "pull", Help: "下载", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Option("_process", "_progress")
|
||||
if m.Richs("progress", "", m.Option("_progress"), func(key string, value map[string]interface{}) {
|
||||
m.Push("step", kit.Int(value["count"])*100/kit.Int(value["total"]))
|
||||
m.Push("count", value["count"])
|
||||
m.Push("total", value["total"])
|
||||
m.Push("name", value["name"])
|
||||
}) != nil {
|
||||
if m.Append("count") == m.Append("total") {
|
||||
m.Option("_process", "")
|
||||
m.Set(ice.MSG_APPEND)
|
||||
m.Cmdy("status")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -94,6 +101,7 @@ func init() {
|
||||
})
|
||||
})
|
||||
m.Option("_progress", h)
|
||||
m.Push("step", count*100/total)
|
||||
m.Push("count", count)
|
||||
m.Push("total", total)
|
||||
m.Push("name", "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user