myApplicationList

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPageNo   = 1
	DefaultPageSize = 5
)

Variables

This section is empty.

Functions

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type AppItem

type AppItem struct {
	ID          string               `json:"id"`
	AppId       string               `json:"appId"`
	Title       string               `json:"title"`
	Description string               `json:"description"`
	PrefixImg   string               `json:"prefixImg"`
	Operations  map[string]Operation `json:"operations"`
}

func RenItem

func RenItem(app apistructs.ApplicationDTO, orgName string) AppItem

type Command

type Command struct {
	Key    string                 `json:"key"`
	Target string                 `json:"target"`
	State  map[string]interface{} `json:"state"`
}

type Data

type Data struct {
	List []AppItem `json:"list"`
}

func (Data) Len

func (s Data) Len() int

func (Data) Less

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

func (Data) Swap

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

type Meta

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

type MyApplicationList

type MyApplicationList struct {
	Type       string                 `json:"type"`
	Props      Props                  `json:"props"`
	State      State                  `json:"state"`
	Data       Data                   `json:"data"`
	Operations map[string]interface{} `json:"operations"`
	// contains filtered or unexported fields
}

func (*MyApplicationList) GenComponentState

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

GenComponentState 获取state

func (*MyApplicationList) SetCtxBundle

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

type Operation

type Operation struct {
	Command Command `json:"command"`
	Key     string  `json:"key"`
	Reload  bool    `json:"reload"`
	Show    bool    `json:"show"`
}

type OperationData

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

type PageNo

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

type Props

type Props struct {
	Visible     bool   `json:"visible"`
	IsLoadMore  bool   `json:"isLoadMore"`
	AlignCenter bool   `json:"alignCenter"`
	Size        string `json:"size"`
	NoBorder    bool   `json:"noBorder"`
}

type State

type State struct {
	//HaveApps bool `json:"haveApps"`
	IsFirstFilter bool                   `json:"isFirstFilter"`
	Values        map[string]interface{} `json:"values"`
	PageNo        int                    `json:"pageNo"`
	PageSize      int                    `json:"pageSize"`
	Total         int                    `json:"total"`
	ProsNum       int                    `json:"prosNum"`
	AppsNum       int                    `json:"appsNum"`
}

Jump to

Keyboard shortcuts

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