Documentation
¶
Index ¶
- func GetDistributionStatus(str string) string
- func IsNodeLabelInBlacklist(node data.Object) bool
- func IsNodeOffline(node data.Object) bool
- func SortByDistribution(data []RowItem, sortColumn string, ascend bool)
- func SortByDistributionRate(data []RowItem, sortColumn string, ascend bool)
- func SortByNode(data []RowItem, _ string, ascend bool)
- func SortByRole(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 DistributionRate
- type DistributionValue
- type FormData
- type GetRowItem
- type GetTable
- type GetTableProps
- type Labels
- type LabelsValue
- type Meta
- type Node
- type NodeIcon
- type NodeLink
- type NodeTags
- type Operate
- type Operation
- type Params
- type Role
- type RoleValue
- 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) DecodeURLQuery() error
- func (t *Table) EncodeURLQuery() error
- func (t *Table) GetDistributionRate(allocate, request float64, resourceType TableType) DistributionRate
- 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) GetMetrics(ctx context.Context)
- 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 string, labelMap data.Object) []interface{}
- func (t *Table) GetScaleValue(a, b float64, Type TableType) string
- func (t *Table) GetTableOperation() map[string]interface{}
- func (t *Table) GetUsageValue(used, total float64, resourceType TableType) DistributionValue
- func (t *Table) RenderList(component *cptype.Component, tableType TableType, gs *cptype.GlobalStateData) error
- func (t *Table) SetComponentValue(c *cptype.Component) error
- func (t *Table) SetData(nodes []data.Object, tableType TableType, requests map[string]cmp.AllocatedRes) ([]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 IsNodeLabelInBlacklist ¶ added in v1.4.0
func IsNodeOffline ¶ added in v1.4.0
func SortByDistribution ¶
SortByDistribution sort by percent
func SortByDistributionRate ¶ added in v1.5.0
SortByDistributionRate sort by percent
func SortByNode ¶
SortByNode sort by node struct
func SortByRole ¶ added in v1.5.0
SortByRole sort by node struct
func SortByStatus ¶
SortByStatus sort by percent
func SortByString ¶
SortByString sort by string value
Types ¶
type BatchOperation ¶
type Columns ¶
type Columns struct {
Title string `json:"title,omitempty"`
DataIndex string `json:"dataIndex,omitempty"`
Width int `json:"width,omitempty"`
Sortable bool `json:"sorter,omitempty"`
Fixed string `json:"fixed,omitempty"`
TitleTip string `json:"titleTip"`
Hidden bool `json:"hidden"`
Align string `json:"align"`
}
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 DistributionRate ¶ added in v1.5.0
type DistributionValue ¶
type GetRowItem ¶
type GetTable ¶ added in v1.5.0
type GetTable interface {
GetRowItem
GetTableProps
}
type GetTableProps ¶ added in v1.5.0
type GetTableProps interface {
GetProps() map[string]interface{}
}
type LabelsValue ¶
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,omitempty"`
}
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"`
NodeID string `json:"nodeId,omitempty"`
Role Role `json:"Role,omitempty"`
Version string `json:"Version,omitempty"`
//
Distribution Distribution `json:"Distribution,omitempty"`
Usage Distribution `json:"Usage,omitempty"`
DistributionRate DistributionRate `json:"DistributionRate,omitempty"`
Operate Operate `json:"Operate,omitempty"`
// batchOperations for json
BatchOperations []string `json:"batchOperations,omitempty"`
}
type State ¶
type State struct {
//PageNo int `json:"pageNo,omitempty"`
//PageSize int `json:"pageSize,omitempty"`
//Left int `json:"total,omitempty"`
SelectedRowKeys []string `json:"selectedRowKeys,omitempty"`
Sorter Sorter `json:"sorterData,omitempty"`
Values filter.Values `json:"values,omitempty"`
FilterUrlQuery string `json:"table__urlQuery,omitempty"`
}
type SteveStatus ¶
type Table ¶
type Table struct {
CpuTable GetTable
MemTable GetTable
PodTable GetTable
base.DefaultProvider
SDK *cptype.SDK
Ctx context.Context
Metrics metrics.Interface
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) DecodeURLQuery ¶ added in v1.5.0
func (*Table) EncodeURLQuery ¶ added in v1.5.0
func (*Table) GetDistributionRate ¶ added in v1.5.0
func (t *Table) GetDistributionRate(allocate, request float64, resourceType TableType) DistributionRate
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) GetMetrics ¶ added in v1.4.0
func (*Table) GetNodeAddress ¶
func (t *Table) GetNodeAddress(addrs []v1.NodeAddress) string
func (*Table) GetOperate ¶
func (*Table) GetRenders ¶
func (*Table) GetTableOperation ¶
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.