Documentation ¶
Index ¶
- Constants
- Variables
- func RenderCreator() protocol.CompRender
- type BoardType
- type CartList
- func (cl *CartList) Add(c IssueCart)
- func (cl *CartList) Delete(issueID int64)
- func (c *CartList) GenCartList(p *message.Printer, s ChartOperationSwitch)
- func (cl *CartList) RenderCartListOperations(s ChartOperationSwitch)
- func (c *CartList) RenderChangePageNoOperation(kanbanKey string)
- func (c *CartList) SetI18nPrinter(ip *message.Printer)
- type ChangePageNoOperation
- type ChangePageNoOperationData
- type ChartOperationSwitch
- type ComponentIssueBoard
- func (i *ComponentIssueBoard) CheckUserPermission(projectID uint64) error
- func (i *ComponentIssueBoard) Filter(req IssueFilterRequest) (ib *IssueBoard, err error)
- func (i ComponentIssueBoard) FilterByCustom(req apistructs.IssuePagingRequest, kanbanKey string) (cls []CartList, uids []string, err error)
- func (i ComponentIssueBoard) FilterByPriority(req apistructs.IssuePagingRequest, kanbanKey string) (cls []CartList, uids []string, err error)
- func (i ComponentIssueBoard) FilterByStatusConcurrent(req apistructs.IssuePagingRequest, kanbanKey string) (cls []CartList, uids []string, err error)
- func (i ComponentIssueBoard) FilterByTime(req apistructs.IssuePagingRequest, kanbanKey string) (cls []CartList, uids []string, err error)
- func (i *ComponentIssueBoard) GenComponentState(c *apistructs.Component) error
- func (i ComponentIssueBoard) GetByStatus(req apistructs.IssuePagingRequest, ignoreDone bool) (rsp *apistructs.IssuePagingResponse, err error)
- func (i ComponentIssueBoard) GetDefaultFilterReq(req *IssueFilterRequest) error
- func (i ComponentIssueBoard) GetFilterReq() (*IssueFilterRequest, error)
- func (i ComponentIssueBoard) GetIssues(req apistructs.IssuePagingRequest, ignoreDone bool) (result []apistructs.Issue, uids []string, err error)
- func (i *ComponentIssueBoard) RefreshOnMoveOut(issueID int64) error
- func (i *ComponentIssueBoard) RefreshOnMoveTo(issueID, from, to int64) error
- func (i *ComponentIssueBoard) Render(ctx context.Context, c *apistructs.Component, ...) (err error)
- func (i *ComponentIssueBoard) RenderDefault(c *apistructs.Component, g *apistructs.GlobalStateData)
- func (i *ComponentIssueBoard) RenderOnAddCustom() error
- func (i *ComponentIssueBoard) RenderOnDeleteCustom() error
- func (i *ComponentIssueBoard) RenderOnDrag(opsData interface{}) error
- func (i *ComponentIssueBoard) RenderOnFilter(req IssueFilterRequest) error
- func (i *ComponentIssueBoard) RenderOnMoveOut(opsData interface{}) error
- func (i *ComponentIssueBoard) RenderOnMoveTo(opsData interface{}) error
- func (i *ComponentIssueBoard) RenderOnMoveToAssignee(opsData interface{}) error
- func (i *ComponentIssueBoard) RenderOnMoveToCustom(opsData interface{}) error
- func (i *ComponentIssueBoard) RenderOnMoveToPriority(opsData interface{}) error
- func (i *ComponentIssueBoard) RenderOnUpdateCustom() error
- func (i *ComponentIssueBoard) RenderProtocol(c *apistructs.Component, g *apistructs.GlobalStateData)
- func (i *ComponentIssueBoard) SetBoardDate(c apistructs.Component) error
- func (i *ComponentIssueBoard) SetBoardType(bt BoardType)
- func (i *ComponentIssueBoard) SetCtxBundle(b protocol.ContextBundle) error
- func (i *ComponentIssueBoard) SetOperationSwitch(req *IssueFilterRequest) error
- type CreateBoardOperation
- type DeleteBoardOperation
- type DragOperation
- type DragOperationInfo
- type ExpireType
- type IssueBoard
- type IssueBoardState
- type IssueCart
- func (c IssueCart) GetExpireType(now time.Time) ExpireType
- func (c *IssueCart) RenderCartOperations(s ChartOperationSwitch, i apistructs.Issue, ...)
- func (c *IssueCart) RenderDragOperation()
- func (c *IssueCart) RenderDragToAssigneeOperation(mp map[apistructs.OperationKey]interface{})
- func (c *IssueCart) RenderDragToCustomOperation(mp map[apistructs.OperationKey]interface{})
- func (c *IssueCart) RenderDragToPriorityOperation(i apistructs.Issue, mp map[apistructs.OperationKey]interface{})
- func (c *IssueCart) RenderMoveOutOperation()
- func (c *IssueCart) RenderMoveToAssigneeOperation(mp map[apistructs.OperationKey]interface{})
- func (c *IssueCart) RenderMoveToCustomOperation(mp map[apistructs.OperationKey]interface{})
- func (c *IssueCart) RenderMoveToOperation()
- func (c *IssueCart) RenderMoveToPriorityOperation(i apistructs.Issue, mp map[apistructs.OperationKey]interface{})
- func (c *IssueCart) SetI18nPrinter(ip *message.Printer)
- type IssueFilterRequest
- type MoveOutOperation
- type MoveToAssigneeOperation
- type MoveToCustomOperation
- type MoveToOperation
- type MoveToPriorityOperation
- type OpMetaInfo
- type OperationBaseInfo
- type OperationInfo
- type UpdateBoardOperation
Constants ¶
View Source
const ( MoveOutConfirmMsg = "Confirm to move out iteration" CreateBoardConfirmMsg = "Confirm to create board" DeleteBoardConfirmMsg = "Confirm to delete board" UpdateBoardConfirmMsg = "Confirm to update board" CreateBoardDisabledTip = "The number of boards cannot exceed 5" GuestCreateBoardDisabledTip = "No permission to operate" )
View Source
const MaxBoardNum = 15
Variables ¶
View Source
var ExpireTypes = []ExpireType{ExpireTypeUndefined, ExpireTypeExpired, ExpireTypeExpireIn1Day, ExpireTypeExpireIn2Days, ExpireTypeExpireIn7Days, ExpireTypeExpireIn30Days, ExpireTypeExpireInFuture}
View Source
var IssueTypeStates = map[apistructs.IssueType][]apistructs.IssueState{ apistructs.IssueTypeTask: {apistructs.IssueStateOpen, apistructs.IssueStateWorking, apistructs.IssueStateDone}, apistructs.IssueTypeRequirement: {apistructs.IssueStateOpen, apistructs.IssueStateWorking, apistructs.IssueStateDone}, apistructs.IssueTypeBug: {apistructs.IssueStateOpen, apistructs.IssueStateWontfix, apistructs.IssueStateReopen, apistructs.IssueStateResolved, apistructs.IssueStateClosed}, }
View Source
var IssueTypes = []apistructs.IssueType{apistructs.IssueTypeTask, apistructs.IssueTypeRequirement, apistructs.IssueTypeBug, apistructs.IssueTypeEpic}
View Source
var SupportBoardTypes = []BoardType{BoardTypeStatus, BoardTypeTime, BoardTypeAssignee, BoardTypeCustom}
Functions ¶
func RenderCreator ¶
func RenderCreator() protocol.CompRender
Types ¶
type CartList ¶
type CartList struct { // 分类类型: 状态,处理人,时间,自定义,优先级 Label interface{} `json:"label"` LabelKey interface{} `json:"labelKey"` Total uint64 `json:"total"` PageNo uint64 `json:"pageNo"` PageSize uint64 `json:"pageSize"` List []IssueCart `json:"list"` Operations map[string]interface{} `json:"operations"` // contains filtered or unexported fields }
func (*CartList) GenCartList ¶
func (c *CartList) GenCartList(p *message.Printer, s ChartOperationSwitch)
func (*CartList) RenderCartListOperations ¶
func (cl *CartList) RenderCartListOperations(s ChartOperationSwitch)
func (*CartList) RenderChangePageNoOperation ¶ added in v1.1.0
func (*CartList) SetI18nPrinter ¶
type ChangePageNoOperation ¶ added in v1.1.0
type ChangePageNoOperationData ¶ added in v1.1.0
type ChartOperationSwitch ¶
type ChartOperationSwitch struct {
// contains filtered or unexported fields
}
func (*ChartOperationSwitch) ClearAble ¶
func (c *ChartOperationSwitch) ClearAble()
type ComponentIssueBoard ¶
type ComponentIssueBoard struct { CompName string `json:"name"` Data IssueBoard `json:"data"` Operations map[string]interface{} `json:"operations"` State IssueBoardState `json:"state"` // contains filtered or unexported fields }
func (*ComponentIssueBoard) CheckUserPermission ¶
func (i *ComponentIssueBoard) CheckUserPermission(projectID uint64) error
GetUserPermission check Guest permission
func (*ComponentIssueBoard) Filter ¶
func (i *ComponentIssueBoard) Filter(req IssueFilterRequest) (ib *IssueBoard, err error)
func (ComponentIssueBoard) FilterByCustom ¶
func (i ComponentIssueBoard) FilterByCustom(req apistructs.IssuePagingRequest, kanbanKey string) (cls []CartList, uids []string, err error)
按自定义看板 过滤
func (ComponentIssueBoard) FilterByPriority ¶
func (i ComponentIssueBoard) FilterByPriority(req apistructs.IssuePagingRequest, kanbanKey string) (cls []CartList, uids []string, err error)
FilterByPriority 按优先级过滤 去掉终态状态 [CLOSED, DONE]
func (ComponentIssueBoard) FilterByStatusConcurrent ¶
func (i ComponentIssueBoard) FilterByStatusConcurrent(req apistructs.IssuePagingRequest, kanbanKey string) (cls []CartList, uids []string, err error)
按状态过滤 并发
func (ComponentIssueBoard) FilterByTime ¶
func (i ComponentIssueBoard) FilterByTime(req apistructs.IssuePagingRequest, kanbanKey string) (cls []CartList, uids []string, err error)
FilterByTime 根据完成时间(planFinishedAt)分为:未分类,已过期,1天内过期,2天内,7天内,30天,未来
func (*ComponentIssueBoard) GenComponentState ¶
func (i *ComponentIssueBoard) GenComponentState(c *apistructs.Component) error
func (ComponentIssueBoard) GetByStatus ¶
func (i ComponentIssueBoard) GetByStatus(req apistructs.IssuePagingRequest, ignoreDone bool) (rsp *apistructs.IssuePagingResponse, err error)
func (ComponentIssueBoard) GetDefaultFilterReq ¶
func (i ComponentIssueBoard) GetDefaultFilterReq(req *IssueFilterRequest) error
func (ComponentIssueBoard) GetFilterReq ¶
func (i ComponentIssueBoard) GetFilterReq() (*IssueFilterRequest, error)
func (ComponentIssueBoard) GetIssues ¶
func (i ComponentIssueBoard) GetIssues(req apistructs.IssuePagingRequest, ignoreDone bool) (result []apistructs.Issue, uids []string, err error)
func (*ComponentIssueBoard) RefreshOnMoveOut ¶
func (i *ComponentIssueBoard) RefreshOnMoveOut(issueID int64) error
func (*ComponentIssueBoard) RefreshOnMoveTo ¶
func (i *ComponentIssueBoard) RefreshOnMoveTo(issueID, from, to int64) error
全量更新时间长,在改变状态时,可以直接move到另一个状态list,同时删掉当前list中的item
func (*ComponentIssueBoard) Render ¶
func (i *ComponentIssueBoard) Render(ctx context.Context, c *apistructs.Component, _ apistructs.ComponentProtocolScenario, event apistructs.ComponentEvent, gs *apistructs.GlobalStateData) (err error)
func (*ComponentIssueBoard) RenderDefault ¶
func (i *ComponentIssueBoard) RenderDefault(c *apistructs.Component, g *apistructs.GlobalStateData)
func (*ComponentIssueBoard) RenderOnAddCustom ¶
func (i *ComponentIssueBoard) RenderOnAddCustom() error
TODO 增加自定义看板
func (*ComponentIssueBoard) RenderOnDeleteCustom ¶
func (i *ComponentIssueBoard) RenderOnDeleteCustom() error
RenderOnDeleteCustom 删除自定义看板
func (*ComponentIssueBoard) RenderOnDrag ¶
func (i *ComponentIssueBoard) RenderOnDrag(opsData interface{}) error
func (*ComponentIssueBoard) RenderOnFilter ¶
func (i *ComponentIssueBoard) RenderOnFilter(req IssueFilterRequest) error
Issue过滤,分类
func (*ComponentIssueBoard) RenderOnMoveOut ¶
func (i *ComponentIssueBoard) RenderOnMoveOut(opsData interface{}) error
func (*ComponentIssueBoard) RenderOnMoveTo ¶
func (i *ComponentIssueBoard) RenderOnMoveTo(opsData interface{}) error
func (*ComponentIssueBoard) RenderOnMoveToAssignee ¶
func (i *ComponentIssueBoard) RenderOnMoveToAssignee(opsData interface{}) error
func (*ComponentIssueBoard) RenderOnMoveToCustom ¶
func (i *ComponentIssueBoard) RenderOnMoveToCustom(opsData interface{}) error
func (*ComponentIssueBoard) RenderOnMoveToPriority ¶
func (i *ComponentIssueBoard) RenderOnMoveToPriority(opsData interface{}) error
func (*ComponentIssueBoard) RenderOnUpdateCustom ¶
func (i *ComponentIssueBoard) RenderOnUpdateCustom() error
RenderOnUpdateCustom 更新自定义看板
func (*ComponentIssueBoard) RenderProtocol ¶
func (i *ComponentIssueBoard) RenderProtocol(c *apistructs.Component, g *apistructs.GlobalStateData)
func (*ComponentIssueBoard) SetBoardDate ¶
func (i *ComponentIssueBoard) SetBoardDate(c apistructs.Component) error
func (*ComponentIssueBoard) SetBoardType ¶
func (i *ComponentIssueBoard) SetBoardType(bt BoardType)
func (*ComponentIssueBoard) SetCtxBundle ¶
func (i *ComponentIssueBoard) SetCtxBundle(b protocol.ContextBundle) error
func (*ComponentIssueBoard) SetOperationSwitch ¶
func (i *ComponentIssueBoard) SetOperationSwitch(req *IssueFilterRequest) error
type DeleteBoardOperation ¶
type DeleteBoardOperation OperationInfo
type DragOperationInfo ¶
type DragOperationInfo struct { Meta OpMetaInfo `json:"meta"` // 前端操作是否需要触发后端 Reload bool `json:"reload"` // 可拖拽的范围 TargetKeys interface{} `json:"targetKeys"` Disabled bool `json:"disabled"` }
type ExpireType ¶
type ExpireType string
根据完成时间(planFinishedAt)分为:未分类,已过期,1天内过期,2天内,3天内,30天,未来
const ( ExpireTypeUndefined ExpireType = "Undefined" ExpireTypeExpired ExpireType = "Expired" ExpireTypeExpireIn1Day ExpireType = "ExpireIn1Day" ExpireTypeExpireIn2Days ExpireType = "ExpireIn2Days" ExpireTypeExpireIn7Days ExpireType = "ExpireIn7Days" ExpireTypeExpireIn30Days ExpireType = "ExpireIn30Days" ExpireTypeExpireInFuture ExpireType = "ExpireInFuture" )
func (ExpireType) String ¶
func (e ExpireType) String() string
type IssueBoard ¶
type IssueBoardState ¶
type IssueBoardState struct { DropTarget interface{} `json:"dropTarget"` apistructs.IssuePanel Priority apistructs.IssuePriority `json:"priority"` FilterConditions apistructs.IssuePagingRequest `json:"filterConditions"` IssueViewGroupChildrenValue map[string]string `json:"issueViewGroupChildrenValue"` IssueViewGroupValue string `json:"issueViewGroupValue"` }
type IssueCart ¶
type IssueCart struct { Assignee string `json:"assignee"` Priority apistructs.IssuePriority `json:"priority"` ID int64 `json:"id"` Title string `json:"title"` Type apistructs.IssueType `json:"type"` State int64 `json:"state"` IssueButton []apistructs.IssueStateButton `json:"issueButton"` IterationID int64 `json:"iterationID"` PlanFinishedAt *time.Time `json:"planFinishedAt"` Operations map[string]interface{} `json:"operations"` // contains filtered or unexported fields }
func GenCart ¶
func GenCart(bt BoardType, i apistructs.Issue, p *message.Printer, s ChartOperationSwitch, mp map[apistructs.OperationKey]interface{}) IssueCart
func (IssueCart) GetExpireType ¶
func (c IssueCart) GetExpireType(now time.Time) ExpireType
FinishTime和now都是date;hour, min, sec 都为0
func (*IssueCart) RenderCartOperations ¶
func (c *IssueCart) RenderCartOperations(s ChartOperationSwitch, i apistructs.Issue, mp map[apistructs.OperationKey]interface{})
func (*IssueCart) RenderDragToAssigneeOperation ¶
func (c *IssueCart) RenderDragToAssigneeOperation(mp map[apistructs.OperationKey]interface{})
func (*IssueCart) RenderDragToCustomOperation ¶
func (c *IssueCart) RenderDragToCustomOperation(mp map[apistructs.OperationKey]interface{})
func (*IssueCart) RenderDragToPriorityOperation ¶
func (c *IssueCart) RenderDragToPriorityOperation(i apistructs.Issue, mp map[apistructs.OperationKey]interface{})
func (*IssueCart) RenderMoveToAssigneeOperation ¶
func (c *IssueCart) RenderMoveToAssigneeOperation(mp map[apistructs.OperationKey]interface{})
func (*IssueCart) RenderMoveToCustomOperation ¶
func (c *IssueCart) RenderMoveToCustomOperation(mp map[apistructs.OperationKey]interface{})
func (*IssueCart) RenderMoveToOperation ¶
func (c *IssueCart) RenderMoveToOperation()
func (*IssueCart) RenderMoveToPriorityOperation ¶
func (c *IssueCart) RenderMoveToPriorityOperation(i apistructs.Issue, mp map[apistructs.OperationKey]interface{})
func (*IssueCart) SetI18nPrinter ¶
type IssueFilterRequest ¶
type IssueFilterRequest struct { apistructs.IssuePagingRequest BoardType BoardType `json:"boardType"` KanbanKey string `json:"kanbanKey"` }
type MoveOutOperation ¶
type MoveOutOperation OperationInfo
type MoveToAssigneeOperation ¶
type MoveToAssigneeOperation OperationInfo
处理人 type DragToAssigneeOperation DragOperationInfo
type MoveToCustomOperation ¶
type MoveToCustomOperation OperationInfo
type MoveToOperation ¶
type MoveToOperation OperationInfo
type OpMetaInfo ¶
type OpMetaInfo struct { IssueID int64 `json:"ID"` IssueAssignee string `json:"issueAssignee"` IssuePriority apistructs.IssuePriority `json:"issuePriority"` StateID int64 `json:"stateID"` apistructs.IssuePanel }
func GetCartOpsInfo ¶
func GetCartOpsInfo(opsData interface{}, isDrag bool) (*OpMetaInfo, error)
type OperationBaseInfo ¶
type OperationInfo ¶
type OperationInfo struct { OperationBaseInfo Meta OpMetaInfo `json:"meta"` }
type UpdateBoardOperation ¶
type UpdateBoardOperation OperationInfo
Click to show internal directories.
Click to hide internal directories.