mirror of
https://shylinux.com/x/operation
synced 2025-07-01 13:14:43 +08:00
add some
This commit is contained in:
parent
3870e9777c
commit
6a78d49d25
@ -3,4 +3,5 @@ package main
|
||||
import (
|
||||
_ "shylinux.com/x/ice/devops"
|
||||
_ "shylinux.com/x/ice/portal"
|
||||
_ "shylinux.com/x/operation/src/storage"
|
||||
)
|
||||
|
18
src/production/coder.go
Normal file
18
src/production/coder.go
Normal file
@ -0,0 +1,18 @@
|
||||
package production
|
||||
|
||||
import "shylinux.com/x/ice"
|
||||
|
||||
type coder struct {
|
||||
list string `name:"list path file line auto" help:"编辑器" role:"void"`
|
||||
render string `name:"render" role:"void"`
|
||||
repos string `name:"repos" role:"void"`
|
||||
}
|
||||
|
||||
func (s coder) Render(m *ice.Message, arg ...string) { m.Cmdy("vimer", m.ActionKey(), arg) }
|
||||
func (s coder) Repos(m *ice.Message, arg ...string) { m.Cmdy("vimer", m.ActionKey(), arg) }
|
||||
func (s coder) Save(m *ice.Message, arg ...string) {
|
||||
m.Cmdy("vimer", m.ActionKey(), arg)
|
||||
}
|
||||
func (s coder) List(m *ice.Message, arg ...string) { m.Cmdy("vimer", arg) }
|
||||
|
||||
func init() { ice.TeamCtxCmd(coder{}) }
|
@ -294,15 +294,15 @@ func (s Table) Preview(m *ice.Message, arg ...string) {
|
||||
m.OptionDefault(model.LINK, m.Option(model.MEET_LINK))
|
||||
m.ProcessOpen(m.OptionDefault(model.LINK, web.S(m.Option(web.SPACE))+web.C(m.Option(ctx.INDEX))))
|
||||
}
|
||||
func (s Table) Program(m *ice.Message, arg ...string) {
|
||||
func (s Table) coderLink(m *ice.Message, arg ...string) string {
|
||||
p := path.Base(m.Option(nfs.PATH))
|
||||
m.ProcessOpen(m.MergePodCmd("", "web.team.production.coder",
|
||||
return kit.MergeURL(web.S(m.Option(web.SPACE))+web.C("web.team.production.coder"),
|
||||
nfs.PATH, nfs.SRC, nfs.FILE, path.Join(p, "portal.go"),
|
||||
m.OptionSimple(model.STORY_UID, model.ISSUE_UID),
|
||||
))
|
||||
return
|
||||
m.ProcessOpen(kit.MergeURL(web.S(m.Option(web.SPACE))+web.C(web.VIMER),
|
||||
nfs.PATH, nfs.SRC, nfs.FILE, path.Join(p, "portal.go")))
|
||||
)
|
||||
}
|
||||
func (s Table) Program(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(s.coderLink(m))
|
||||
}
|
||||
func (s Table) Discuss(m *ice.Message, arg ...string) {
|
||||
s.issueOtherCreate(m, Meet{}, arg...)
|
||||
|
@ -36,7 +36,7 @@ func init() { ice.TeamCtxCmd(Date{}) }
|
||||
|
||||
func (s Date) head(m *ice.Message, arg ...string) {
|
||||
head := []string{}
|
||||
for i := -kit.Int(m.Option("date_begin")); i < kit.Int(m.OptionDefault("date_end", "2")); i++ {
|
||||
for i := -kit.Int(m.OptionDefault("date_begin", kit.Select("0", "2", s.IsCreator(m)))); i < kit.Int(m.OptionDefault("date_end", "2")); i++ {
|
||||
head = append(head, strings.Split(m.Time(kit.Format("%dh", i*24)), " ")[0])
|
||||
}
|
||||
list := []string{}
|
||||
|
@ -2,7 +2,8 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { var head = can.core.Split(msg.Option("head")), list = can.core.Split(msg.Option("list"))
|
||||
can.page.Append(can, can._output, [{type: html.TABLE, className: "content full", list: [
|
||||
{type: html.THEAD, list: [{type: html.TR, list: [{type: html.TH, inner: "时间"}].concat(can.core.List(head, function(value) {
|
||||
return {type: html.TH, inner: value}
|
||||
var today = can.base.beginWith(can.base.Time(), value)? "(今天)": ""
|
||||
return {type: html.TH, inner: value+today}
|
||||
}))}]},
|
||||
{type: html.TBODY, list: can.core.List(list, function(time) {
|
||||
return {type: html.TR, list: [{type: html.TH, inner: time}].concat(can.core.List(head, function(date) {
|
||||
@ -16,7 +17,6 @@ Volcanos(chat.ONIMPORT, {
|
||||
}, target)
|
||||
}}
|
||||
}), onclick: function(event) {
|
||||
// if (!can.base.isIn(can._stacks_root.current._role, "creator", "leader")) { return }
|
||||
can.run(can.request(event, {begin_time: date+" "+time+":00"}), [ctx.ACTION, "discuss"])
|
||||
}}
|
||||
}))}
|
||||
|
@ -80,7 +80,10 @@ func (s take) List(m *ice.Message, arg ...string) {
|
||||
check(Issue{}, "PM")
|
||||
check(Design{}, "UI")
|
||||
if isLeader {
|
||||
m.Cmd(Task{}, s.Select, model.STORY_UID, value[model.UID]).Table(func(val ice.Maps) { push(val, "RD可编程") })
|
||||
m.Cmd(Task{}, s.Select, model.STORY_UID, value[model.UID]).Table(func(val ice.Maps) {
|
||||
val[model.LINK] = s.coderLink(m.Spawn(val))
|
||||
push(val, "RD可编程")
|
||||
})
|
||||
m.Cmd(Case{}, s.Select, model.STORY_UID, value[model.UID]).Table(func(val ice.Maps) { push(val, "QA可测试") })
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user