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