Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertToMap(obj interface{}) (map[string]interface{}, error)
- func GetInt64Len(a int64) int
- func GetPercent(a, b float64) float64
- func GetPodStatus() string
- func ResetNumberBase(a, b float64) (float64, float64)
- func SortByDistribution(data []interface{}, sortColumn string, order bool)
- func SortByName(data []interface{}, sortColumn string, order bool)
- func SortByString(data []interface{}, sortColumn string, order bool)
- func Transfer(a, b interface{}) error
- type ChartDataItem
- type OrderEnum
- type SteveStatusEnum
- type UsageStatusEnum
- type WorkflowEnum
Constants ¶
View Source
const ( Default = "Default" NodeStatusReady int = iota NodeStatusError NodeStatusFreeze )
Variables ¶
View Source
var ( ResourceNormal UsageStatusEnum = "normal" ResourceSuccess UsageStatusEnum = "Success" ResourceError UsageStatusEnum = "error" ResourceWarning UsageStatusEnum = "warning" ResourceDanger UsageStatusEnum = "danger" Asc OrderEnum = "ascend" Desc OrderEnum = "descend" ResourcesTypes = []apistructs.K8SResType{apistructs.K8SDeployment, apistructs.K8SStatefulSet, apistructs.K8SDaemonSet} ColorMap = map[string]string{ "green": "#6CB38B", "purple": "#975FA0", "orange": "#F7A76B", "red": "#DE5757", "brown": "#A98C72", "steelblue": "#4E6097", "yellow": "#F7C36B", "lightgreen": "#8DB36C", "darkcyan": "#498E9E", "darksalmon": "#DE6F57", "darkslategray": "#2F4F4F", "maroon": "#800000", "darkseagreen": "#8FBC8F", "darkslateblue": "#483D8B", "darkgoldenrod": "#B8860B", "teal": "#008080", "primary": "#6a549e", } // cmp bashboard table CMPDashboardChangePageNoOperationKey cptype.OperationKey = "changePageNo" CMPDashboardChangePageSizeOperationKey cptype.OperationKey = "changePageSize" CMPDashboardSortByColumnOperationKey cptype.OperationKey = "changeSort" // cmp bashboard clusterFilter CMPDashboardFilterOperationKey cptype.OperationKey = "filter" // Freeze Button CMPDashboardDeleteNode cptype.OperationKey = "delete" CMPDashboardUnfreezeNode cptype.OperationKey = "unfreeze" CMPDashboardFreezeNode cptype.OperationKey = "freeze" )
View Source
var ( PodNotFoundErr = errors.New("pod not found") OperationsEmptyErr = errors.New("operation is empty") ResourceEmptyErr = errors.New("node resource is empty") ProtocolComponentEmptyErr = errors.New("component is nil or property empty") BundleEmptyErr = errors.New("bundle is empty") NothingToBeDoneErr = errors.New("nothing to be done") TypeNotAvailableErr = errors.New("type not available") ResourceNotFoundErr = errors.New("resource type not available") //util error PtrRequiredErr = errors.New("ptr is required") )
Functions ¶
func ConvertToMap ¶
ConvertToMap transfer any struct to map
func GetInt64Len ¶
func GetPercent ¶
func GetPodStatus ¶
func GetPodStatus() string
func SortByDistribution ¶
SortByDistribution sort by percent
func SortByName ¶
SortByNode sort by node struct
func SortByString ¶
SortByString sort by string value
Types ¶
type ChartDataItem ¶
type SteveStatusEnum ¶
type SteveStatusEnum string
type UsageStatusEnum ¶
type UsageStatusEnum string
type WorkflowEnum ¶
type WorkflowEnum string
Click to show internal directories.
Click to hide internal directories.