未验证 提交 e119fd8a 编写于 作者: K KubeSphere CI Bot 提交者: GitHub

Merge pull request #2114 from huanggze/op

monitor: fix platform-level statistics
...@@ -142,7 +142,7 @@ func (mo monitoringOperator) GetKubeSphereStats() Metrics { ...@@ -142,7 +142,7 @@ func (mo monitoringOperator) GetKubeSphereStats() Metrics {
}) })
} }
wkList, err := mo.ks.Tenant().V1alpha1().Workspaces().Lister().List(labels.Everything()) wkList, err := mo.ks.Tenant().V1alpha2().WorkspaceTemplates().Lister().List(labels.Everything())
if err != nil { if err != nil {
res.Results = append(res.Results, monitoring.Metric{ res.Results = append(res.Results, monitoring.Metric{
MetricName: KubeSphereWorkspaceCount, MetricName: KubeSphereWorkspaceCount,
...@@ -182,7 +182,13 @@ func (mo monitoringOperator) GetKubeSphereStats() Metrics { ...@@ -182,7 +182,13 @@ func (mo monitoringOperator) GetKubeSphereStats() Metrics {
}) })
} }
tmpls, err := mo.op.ListApps(&params.Conditions{}, "", false, 0, 0) cond := &params.Conditions{
Match: map[string]string{
openpitrix.Status: openpitrix.StatusActive,
openpitrix.RepoId: openpitrix.BuiltinRepoId,
},
}
tmpls, err := mo.op.ListApps(cond, "", false, 0, 0)
if err != nil { if err != nil {
res.Results = append(res.Results, monitoring.Metric{ res.Results = append(res.Results, monitoring.Metric{
MetricName: KubeSphereAppTmplCount, MetricName: KubeSphereAppTmplCount,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册