Merge pull request #1169 from wansir/openpitrix
fix: deployed instances counting error
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user