Documentation
¶
Index ¶
- Constants
- func GetOrgIdByProjectId(CtxBdl protocol.ContextBundle, projectId string) (*apistructs.ProjectDTO, error)
- func RenderCreator() protocol.CompRender
- type AddDefaultOperationData
- type AddDefaultOperations
- type AddNodeOperation
- type AddNodeOperationCommand
- type AddNodeOperationCommandState
- type AddNodeOperationCommandStateFormData
- type ClickBranchNodeOperation
- type ClickBranchNodeOperationMeta
- type ComponentFileTree
- type ComponentNodeFormModal
- type Data
- type DeleteOperation
- type DeleteOperationData
- type InParams
- type NodeFormModalAddNode
- type State
Constants ¶
View Source
const ( OperationKeyClickBranchExpandChildren = "branchExpandChildren" I18nLocalePrefixKey = "wb.content.pipeline.file.tree." )
Variables ¶
This section is empty.
Functions ¶
func GetOrgIdByProjectId ¶
func GetOrgIdByProjectId(CtxBdl protocol.ContextBundle, projectId string) (*apistructs.ProjectDTO, error)
func RenderCreator ¶
func RenderCreator() protocol.CompRender
Types ¶
type AddDefaultOperationData ¶
type AddDefaultOperationData struct {
Key string `json:"key"`
}
type AddDefaultOperations ¶
type AddNodeOperation ¶
type AddNodeOperation struct {
Key string `json:"key"`
Text string `json:"text"`
Reload bool `json:"reload"`
Command AddNodeOperationCommand `json:"command"`
Disabled bool `json:"disabled"`
}
type AddNodeOperationCommand ¶
type AddNodeOperationCommand struct {
Key string `json:"key"`
Target string `json:"target"`
State AddNodeOperationCommandState `json:"state"`
}
type AddNodeOperationCommandState ¶
type AddNodeOperationCommandState struct {
Visible bool `json:"visible"`
FormData AddNodeOperationCommandStateFormData `json:"formData"`
// NodeFormModal 传递的数据
NodeFormModalAddNode NodeFormModalAddNode `json:"nodeFormModalAddNode"`
}
type AddNodeOperationCommandStateFormData ¶
type AddNodeOperationCommandStateFormData struct {
Branch string `json:"branch"`
Name string `json:"name"`
AddResult apistructs.UnifiedFileTreeNode
}
type ClickBranchNodeOperation ¶
type ClickBranchNodeOperation struct {
Key string `json:"key"`
Text string `json:"text"`
Reload bool `json:"reload"`
Show bool `json:"show"` // 是否在菜单里展示
Meta ClickBranchNodeOperationMeta `json:"meta"`
}
type ClickBranchNodeOperationMeta ¶
type ClickBranchNodeOperationMeta struct {
ParentKey string `json:"parentKey,omitempty"`
}
type ComponentFileTree ¶
type ComponentFileTree struct {
CtxBdl protocol.ContextBundle
Type string `json:"type"`
Props map[string]interface{} `json:"props"`
State State `json:"state"`
Data []Data `json:"data"`
Disabled bool
}
func (*ComponentFileTree) CheckUserPermission ¶
func (ca *ComponentFileTree) CheckUserPermission() (bool, error)
GetUserPermission check Guest permission
func (*ComponentFileTree) Render ¶
func (a *ComponentFileTree) Render(ctx context.Context, c *apistructs.Component, scenario apistructs.ComponentProtocolScenario, event apistructs.ComponentEvent, globalState *apistructs.GlobalStateData) (err error)
func (*ComponentFileTree) SetBundle ¶
func (a *ComponentFileTree) SetBundle(b protocol.ContextBundle) error
type ComponentNodeFormModal ¶
type Data ¶
type Data struct {
Key string `json:"key"`
Title string `json:"title"`
Icon string `json:"icon"`
IsLeaf bool `json:"isLeaf"`
ClickToExpand bool `json:"clickToExpand"` // always true, 该参数表示前端支持点击目录名进行折叠或展开; false 的话只有点击前面的小三角才能折叠或展开
Selectable bool `json:"selectable"`
Operations map[string]interface{} `json:"operations"`
Children []Data `json:"children"`
}
type DeleteOperation ¶
type DeleteOperationData ¶
type DeleteOperationData struct {
Key string `json:"key"`
}
type NodeFormModalAddNode ¶
type NodeFormModalAddNode struct {
Results apistructs.UnifiedFileTreeNode `json:"nodeFormModalAddNode"`
Branch string `json:"branch"`
}
type State ¶
type State struct {
ExpandedKeys []string `json:"expandedKeys"`
SelectedKeys []string `json:"selectedKeys"`
NodeFormModalAddNode NodeFormModalAddNode `json:"nodeFormModalAddNode"`
}
Click to show internal directories.
Click to hide internal directories.