From 61108899225c2180d5d463b20f1e38dc0c18dff4 Mon Sep 17 00:00:00 2001 From: hongming Date: Thu, 24 Oct 2019 14:13:46 +0800 Subject: [PATCH] fix: deployed instances counting error Signed-off-by: hongming --- pkg/apiserver/openpitrix/apps.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/apiserver/openpitrix/apps.go b/pkg/apiserver/openpitrix/apps.go index 8a7fb3d3d..1603b15d4 100644 --- a/pkg/apiserver/openpitrix/apps.go +++ b/pkg/apiserver/openpitrix/apps.go @@ -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(¶ms.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(¶ms.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))