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

Merge pull request #1169 from wansir/openpitrix

fix: deployed instances counting error
......@@ -287,7 +287,8 @@ func ListApps(req *restful.Request, resp *restful.Response) {
if statistics {
for _, item := range result.Items {
if app, ok := item.(*openpitrix.App); ok {
statisticsResult, err := openpitrix.ListApplications(&params.Conditions{Match: map[string]string{"app_id": app.AppId, "status": "active|used|enabled|stopped"}}, 0, 0, "", false)
status := "active|used|enabled|stopped|pending|creating|upgrading|updating|rollbacking|stopping|starting|recovering|resizing|scaling|deleting"
statisticsResult, err := openpitrix.ListApplications(&params.Conditions{Match: map[string]string{"app_id": app.AppId, "status": status}}, 0, 0, "", false)
if err != nil {
klog.Errorln(err)
resp.WriteHeaderAndEntity(http.StatusInternalServerError, errors.Wrap(err))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册