Documentation
¶
Index ¶
- func GetDistributionStatus(str string) string
- func SortByDistribution(data []RowItem, sortColumn string, ascend bool)
- func SortByNode(data []RowItem, _ string, ascend bool)
- func SortByStatus(data []RowItem, _ string, asc bool)
- func SortByString(data []RowItem, sortColumn string, ascend bool)
- type BatchOperation
- type Columns
- type Command
- type CommandState
- type Distribution
- type DistributionValue
- type FormData
- type GetRowItem
- type Labels
- type LabelsValue
- type Meta
- type Node
- type NodeLink
- type NodeTags
- type Operate
- type Operation
- type Params
- type RowItem
- type Scroll
- type Sorter
- type State
- type SteveStatus
- type Table
- func (t *Table) CordonNode(ctx context.Context, nodeNames []string) error
- func (t *Table) GetDistributionValue(req, total float64, resourceType TableType) DistributionValue
- func (t *Table) GetIp(node data.Object) string
- func (t *Table) GetItemStatus(node data.Object) (*SteveStatus, error)
- func (t *Table) GetLabelGroupAndDisplayName(label string) (string, string)
- func (t *Table) GetLabelOperation(rowId string) map[string]Operation
- func (t *Table) GetNodeAddress(addrs []v1.NodeAddress) string
- func (t *Table) GetNodeLabels(labels data.Object) []label.Label
- func (t *Table) GetNodes(ctx context.Context, gs *cptype.GlobalStateData) ([]data.Object, error)
- func (t *Table) GetOperate(id string) Operate
- func (t *Table) GetPods(ctx context.Context) (map[string][]data.Object, error)
- func (t *Table) GetRenders(id, ip string, labelMap data.Object) []interface{}
- func (t *Table) GetScaleValue(a, b float64, resourceType TableType) string
- func (t *Table) GetTableOperation() map[string]interface{}
- func (t *Table) GetUnusedRate(unallocate, requst float64, resourceType TableType) DistributionValue
- func (t *Table) GetUsageValue(used, total float64, resourceType TableType) DistributionValue
- func (t *Table) RenderList(component *cptype.Component, tableType TableType, nodes []data.Object) error
- func (t *Table) SetComponentValue(c *cptype.Component) error
- func (t *Table) SetData(nodes []data.Object, tableType TableType) ([]RowItem, error)
- func (t *Table) UncordonNode(ctx context.Context, nodeNames []string) error
- type TableType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDistributionStatus ¶
func SortByDistribution ¶
SortByDistribution sort by percent
func SortByNode ¶
SortByNode sort by node struct
func SortByStatus ¶
SortByStatus sort by percent
func SortByString ¶
SortByString sort by string value
Types ¶
type BatchOperation ¶
type Command ¶
type Command struct { Key string `json:"key,omitempty"` Command CommandState `json:"state,omitempty"` Target string `json:"target,omitempty"` JumpOut bool `json:"jumpOut,omitempty"` }
type CommandState ¶
type Distribution ¶
type DistributionValue ¶
type GetRowItem ¶
type LabelsValue ¶
type Node ¶
type Node struct { RenderType string `json:"renderType,omitempty"` Renders []interface{} `json:"renders,omitempty"` }
type Operation ¶
type Operation struct { Key string `json:"key,omitempty"` Reload bool `json:"reload"` FillMeta string `json:"fillMeta,omitempty"` Confirm string `json:"confirm"` Target string `json:"target,omitempty"` Meta interface{} `json:"meta,omitempty"` ClickableKeys interface{} `json:"clickableKeys,omitempty"` Text string `json:"text,omitempty"` Command Command `json:"command"` }
type RowItem ¶
type RowItem struct { ID string `json:"id,omitempty"` IP string `json:"IP,omitempty"` Status SteveStatus `json:"Status,omitempty"` Node Node `json:"Node,omitempty"` Role string `json:"Role,omitempty"` Version string `json:"Version,omitempty"` // Distribution Distribution `json:"Distribution,omitempty"` Usage Distribution `json:"Usage,omitempty"` UnusedRate Distribution `json:"UnusedRate,omitempty"` Operate Operate `json:"Operate,omitempty"` // batchOperations for json BatchOperations []string `json:"batchOperations,omitempty"` }
type SteveStatus ¶
type Table ¶
type Table struct { TableComponent GetRowItem base.DefaultProvider SDK *cptype.SDK Ctx context.Context Server cmp.SteveServer Type string `json:"type"` Props map[string]interface{} `json:"props"` Operations map[string]interface{} `json:"operations"` State State `json:"state"` }
func (*Table) CordonNode ¶
func (*Table) GetDistributionValue ¶
func (t *Table) GetDistributionValue(req, total float64, resourceType TableType) DistributionValue
func (*Table) GetItemStatus ¶
func (t *Table) GetItemStatus(node data.Object) (*SteveStatus, error)
func (*Table) GetLabelGroupAndDisplayName ¶
func (*Table) GetLabelOperation ¶
func (*Table) GetNodeAddress ¶
func (t *Table) GetNodeAddress(addrs []v1.NodeAddress) string
func (*Table) GetOperate ¶
func (*Table) GetRenders ¶
func (*Table) GetScaleValue ¶
func (*Table) GetTableOperation ¶
func (*Table) GetUnusedRate ¶
func (t *Table) GetUnusedRate(unallocate, requst float64, resourceType TableType) DistributionValue
func (*Table) GetUsageValue ¶
func (t *Table) GetUsageValue(used, total float64, resourceType TableType) DistributionValue
func (*Table) RenderList ¶
func (*Table) SetComponentValue ¶
SetComponentValue mapping properties to Component
Click to show internal directories.
Click to hide internal directories.