podsTable

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PodStatusToColor = map[string]string{
	"Completed":         "steelblue",
	"ContainerCreating": "orange",
	"CrashLoopBackOff":  "red",
	"Error":             "maroon",
	"Evicted":           "darkgoldenrod",
	"ImagePullBackOff":  "darksalmon",
	"Pending":           "teal",
	"Running":           "green",
	"Terminating":       "brown",
}

Functions

This section is empty.

Types

type Column

type Column struct {
	DataIndex string `json:"dataIndex,omitempty"`
	Title     string `json:"title,omitempty"`
	Width     int    `json:"width"`
	Sorter    bool   `json:"sorter"`
}

type Command

type Command struct {
	Key     string       `json:"key,omitempty"`
	Target  string       `json:"target,omitempty"`
	State   CommandState `json:"state,omitempty"`
	JumpOut bool         `json:"jumpOut"`
}

type CommandState

type CommandState struct {
	Params map[string]string `json:"params,omitempty"`
	Query  map[string]string `json:"query,omitempty"`
}

type ComponentPodsTable

type ComponentPodsTable struct {
	base.DefaultProvider

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

func (*ComponentPodsTable) DecodeURLQuery

func (p *ComponentPodsTable) DecodeURLQuery() error

func (*ComponentPodsTable) EncodeURLQuery

func (p *ComponentPodsTable) EncodeURLQuery() error

func (*ComponentPodsTable) GenComponentState

func (p *ComponentPodsTable) GenComponentState(component *cptype.Component) error

func (*ComponentPodsTable) Init

func (*ComponentPodsTable) InitComponent

func (p *ComponentPodsTable) InitComponent(ctx context.Context)

func (*ComponentPodsTable) Render

func (*ComponentPodsTable) RenderTable

func (p *ComponentPodsTable) RenderTable() error

func (*ComponentPodsTable) SetComponentValue

func (p *ComponentPodsTable) SetComponentValue(ctx context.Context)

func (*ComponentPodsTable) Transfer

func (p *ComponentPodsTable) Transfer(component *cptype.Component)

type Data

type Data struct {
	List []Item `json:"list,omitempty"`
}

type Item

type Item struct {
	ID                string  `json:"id,omitempty"`
	Status            Status  `json:"status,omitempty"`
	Name              Link    `json:"name,omitempty"`
	Namespace         string  `json:"namespace,omitempty"`
	IP                string  `json:"ip,omitempty"`
	Age               string  `json:"age,omitempty"`
	CPURequests       string  `json:"cpuRequests,omitempty"`
	CPURequestsNum    int64   `json:"CPURequestsNum,omitempty"`
	CPUPercent        Percent `json:"cpuPercent,omitempty"`
	CPULimits         string  `json:"cpuLimits,omitempty"`
	CPULimitsNum      int64   `json:"CPULimitsNum,omitempty"`
	MemoryRequests    string  `json:"memoryRequests,omitempty"`
	MemoryRequestsNum int64   `json:"MemoryRequestsNum,omitempty"`
	MemoryPercent     Percent `json:"memoryPercent,omitempty"`
	MemoryLimits      string  `json:"memoryLimits,omitempty"`
	MemoryLimitsNum   int64   `json:"MemoryLimitsNum,omitempty"`
	Ready             string  `json:"ready,omitempty"`
	Node              string  `json:"node,omitempty"`
}
type Link struct {
	RenderType string                 `json:"renderType,omitempty"`
	Value      string                 `json:"value,omitempty"`
	Operations map[string]interface{} `json:"operations,omitempty"`
}

type LinkOperation

type LinkOperation struct {
	Command Command `json:"command,omitempty"`
	Reload  bool    `json:"reload"`
}

type Operation

type Operation struct {
	Key    string `json:"key,omitempty"`
	Reload bool   `json:"reload"`
}

type Percent

type Percent struct {
	RenderType string `json:"renderType,omitempty"`
	Value      string `json:"value,omitempty"`
	Tip        string `json:"tip,omitempty"`
	Status     string `json:"status,omitempty"`
}

type Props

type Props struct {
	IsLoadMore      bool                   `json:"isLoadMore,omitempty"`
	RowKey          string                 `json:"rowKey,omitempty"`
	PageSizeOptions []string               `json:"pageSizeOptions,omitempty"`
	Columns         []Column               `json:"columns,omitempty"`
	Operations      map[string]interface{} `json:"operations,omitempty"`
	SortDirections  []string               `json:"sortDirections,omitempty"`
}

type Sorter

type Sorter struct {
	Field string `json:"field,omitempty"`
	Order string `json:"order,omitempty"`
}

type State

type State struct {
	ClusterName       string         `json:"clusterName,omitempty"`
	CountValues       map[string]int `json:"countValues"`
	PageNo            int            `json:"pageNo"`
	PageSize          int            `json:"pageSize"`
	Sorter            Sorter         `json:"sorterData,omitempty"`
	Total             int            `json:"total"`
	Values            Values         `json:"values,omitempty"`
	PodsTableURLQuery string         `json:"podsTable__urlQuery,omitempty"`
	ActiveKey         string         `json:"activeKey,omitempty"`
}

type Status

type Status struct {
	RenderType  string      `json:"renderType,omitempty"`
	Value       string      `json:"value,omitempty"`
	StyleConfig StyleConfig `json:"styleConfig,omitempty"`
}

type StyleConfig

type StyleConfig struct {
	Color string `json:"color,omitempty"`
}

type Values

type Values struct {
	Kind      []string `json:"kind,omitempty"`
	Namespace []string `json:"namespace,omitempty"`
	Status    []string `json:"status,omitempty"`
	Node      []string `json:"node,omitempty"`
	Search    string   `json:"search,omitempty"`
}

Jump to

Keyboard shortcuts

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