Versions in this module Expand all Collapse all v1 v1.5.0 Jan 6, 2022 Changes in this version + const Mem v1.4.0 Nov 16, 2021 Changes in this version + const CPU + const Cluster + const Day + const G + const Lang + const Memory + const MilliCore + const Month + const Owner + const Project + const Week + func GetHeader(ctx context.Context, key string) string + type DailyClusterQuota struct + CpuRequest int64 + CpuTotal int64 + Index int64 + MemRequest int64 + MemTotal int64 + type DailyProjectQuota struct + CpuQuota int64 + CpuRequest int64 + Index int64 + MemQuota int64 + MemRequest int64 + type GaugeData struct + Name string + Split []float64 + Title string + Value []float64 + type Histogram struct + Name string + Series []HistogramSerie + XAxis XAxis + YAxis YAxis + type HistogramSerie struct + Data []float64 + Name string + Type string + type PieData struct + Series []PieSerie + type PieSerie struct + Data []SerieData + Name string + Type string + type Quota struct + type ReportTable struct + func NewReportTable(opts ...ReportTableOption) *ReportTable + func (rt *ReportTable) GetResourceOverviewReport(ctx context.Context, orgID int64, clusterNames []string, ...) (*apistructs.ResourceOverviewReportData, error) + type ReportTableOption func(table *ReportTable) + func ReportTableWithBundle(bdl *bundle.Bundle) ReportTableOption + func ReportTableWithCMP(cmp interface{ ... }) ReportTableOption + func ReportTableWithTrans(trans i18n.Translator) ReportTableOption + type Resource struct + Bdl *bundle.Bundle + Ctx context.Context + DB *dbclient.DBClient + I18N i18n.Translator + Server cmp_interface.Provider + func New(ctx context.Context, i18n i18n.Translator, mServer cmp_interface.Provider) *Resource + func (r *Resource) FilterCluster(clusters []apistructs.ClusterInfo, clusterNames []string) []string + func (r *Resource) GetClusterPie(ctx context.Context, resourceType string, ...) (clusterPie *PieData, err error) + func (r *Resource) GetClusterTrend(ctx context.Context, ordId int64, userId string, ...) (td *Histogram, err error) + func (r *Resource) GetGauge(ctx context.Context, ordId string, userID string, ...) (data map[string]*GaugeData, err error) + func (r *Resource) GetPie(ctx context.Context, ordId, userId string, request *apistructs.ClassRequest) (data map[string]*PieData, err error) + func (r *Resource) GetPrincipalPie(ctx context.Context, resType string, ...) (principalPie *PieData, err error) + func (r *Resource) GetProjectPie(ctx context.Context, resType string, ...) (projectPie *PieData, err error) + func (r *Resource) GetProjectTrend(ctx context.Context, ordId, userId string, request *apistructs.TrendRequest) (td *Histogram, err error) + func (r *Resource) GetQuotaResource(ctx context.Context, ordId string, userID string, clusterNames []string) (resp *apistructs.ResourceResp, err error) + func (r *Resource) I18n(lang i18n.LanguageCodes, key string, args ...interface{}) string + func (r *Resource) Init(ctx servicehub.Context) error + func (r *Resource) PieSort(series []SerieData) + type SerieData struct + Name string + Value float64 + type Series struct + Data []float64 + Name string + Type string + type XAxis struct + Data []string + Type string + type YAxis struct + Name string + Type string