tableGroup

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPageNo    = 1
	DefaultPageSize  = 3
	DefaultIssueSize = 5
)

Variables

This section is empty.

Functions

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type ChangePageNoOperation

type ChangePageNoOperation struct {
	Key      string `json:"key"`
	Reload   bool   `json:"reload"`
	FillMeta string `json:"fillMeta"`
}

type ClickOperation

type ClickOperation struct {
	Key     string `json:"key"`
	Reload  bool   `json:"reload"`
	Command struct {
		Key     string `json:"key"`
		Target  string `json:"target"`
		JumpOut bool   `json:"jumpOut"`
	} `json:"command"`
}

type ExtraInfo

type ExtraInfo struct {
	Props      ExtraProps             `json:"props"`
	Operations map[string]interface{} `json:"operations"`
}

type ExtraProps

type ExtraProps struct {
	RenderType string `json:"renderType"`
	Value      Value  `json:"value"`
}

type IssueData

type IssueData struct {
	List []IssueItem `json:"list"`
}

type IssueItem

type IssueItem struct {
	Id             int64     `json:"id"`
	ProjectId      uint64    `json:"projectId"`
	Type           string    `json:"type"`
	Name           IssueName `json:"name"`
	PlanFinishedAt string    `json:"planFinishedAt"`
	OrgName        string    `json:"orgName"`
}

type IssueName

type IssueName struct {
	RenderType  string `json:"renderType"`
	PrefixIcon  string `json:"prefixIcon"`
	Value       string `json:"value"`
	HoverActive string `json:"hoverActive"`
}

type Meta

type Meta struct {
	PageNo PageNo `json:"pageNo"`
}

type OperationData

type OperationData struct {
	FillMeta string `json:"fillMeta"`
	Meta     Meta   `json:"meta"`
}

type PageNo

type PageNo struct {
	PageNo int `json:"pageNo"`
}

type ProData

type ProData struct {
	List []ProItem `json:"list"`
}

func (ProData) Len

func (s ProData) Len() int

func (ProData) Less

func (s ProData) Less(i, j int) bool

func (ProData) Swap

func (s ProData) Swap(i, j int)

type ProItem

type ProItem struct {
	Title struct {
		//IsPureTitle bool `json:"isPureTitle"`
		//PrefixImage string `json:"prefixImage"`
		//Title      string `json:"title"`
		//Level      int    `json:"level"`
		Props      TitleProps             `json:"props"`
		Operations map[string]interface{} `json:"operations"`
	} `json:"title"`
	SubTitle struct {
		Title string `json:"title"`
		Level int    `json:"level"`
		Size  string `json:"size"`
	} `json:"subtitle"`
	Description struct {
		RenderType    string                 `json:"renderType"`
		Visible       bool                   `json:"visible"`
		Value         map[string]interface{} `json:"value"`
		TextStyleName map[string]interface{} `json:"textStyleName"`
	} `json:"description"`
	Table struct {
		Props      map[string]interface{} `json:"props"`
		Data       IssueData              `json:"data"`
		Operations map[string]interface{} `json:"operations"`
	} `json:"table"`
	ExtraInfo ExtraInfo `json:"extraInfo"`
}

type State

type State struct {
	PageNo   int `json:"pageNo"`
	PageSize int `json:"pageSize"`
	Total    int `json:"total"`
	ProsNum  int `json:"prosNum"`
}

type TableGroup

type TableGroup struct {
	Type  string `json:"type"`
	Props struct {
		IsLoadMore bool `json:"isLoadMore"`
		Visible    bool `json:"visible"`
	} `json:"props"`
	Operations map[string]interface{} `json:"operations"`
	Data       ProData                `json:"data"`
	State      State                  `json:"state"`
	// contains filtered or unexported fields
}

func (*TableGroup) GenComponentState

func (this *TableGroup) GenComponentState(c *apistructs.Component) error

func (*TableGroup) GetProsByPage

func (t *TableGroup) GetProsByPage() (*apistructs.PagingProjectDTO, error)

func (*TableGroup) SetCtxBundle

func (this *TableGroup) SetCtxBundle(ctx context.Context) error

type TitleProps

type TitleProps struct {
	RenderType  string                 `json:"renderType"`
	Value       map[string]interface{} `json:"value"`
	DisplayName string                 `json:"displayName"`
}

type ToSpecificProjectOperation

type ToSpecificProjectOperation struct {
	Key     string `json:"key"`
	Reload  bool   `json:"reload"`
	Show    bool   `json:"show"`
	Command struct {
		Key     string `json:"key"`
		Target  string `json:"target"`
		JumpOut bool   `json:"jumpOut"`
		State   struct {
			Query struct {
				IssueViewGroupUrlQuery string `json:"issueViewGroup__urlQuery"`
				IssueFilterUrlQuery    string `json:"issueFilter__urlQuery"`
				IssueTableUrlQuery     string `json:"issueTable__urlQuery"`
			} `json:"query"`
			Params struct {
				ProjectId string `json:"projectId"`
				OrgName   string `json:"orgName"`
			} `json:"params"`
		} `json:"state"`
		Visible bool `json:"visible"`
	} `json:"command"`
}

type Value

type Value struct {
	Text []ValueText `json:"text"`
}

type ValueText

type ValueText struct {
	Text         string `json:"text"`
	OperationKey string `json:"operationKey"`
	Icon         string `json:"icon,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL