Merge pull request #1169 from wansir/openpitrix

fix: deployed instances counting error
This commit is contained in:
KubeSphere CI Bot
2019-10-24 20:51:54 +08:00
committed by GitHub

View File

@@ -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))