fix: deployed instances counting error
Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
@@ -287,7 +287,8 @@ func ListApps(req *restful.Request, resp *restful.Response) {
|
|||||||
if statistics {
|
if statistics {
|
||||||
for _, item := range result.Items {
|
for _, item := range result.Items {
|
||||||
if app, ok := item.(*openpitrix.App); ok {
|
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 {
|
if err != nil {
|
||||||
klog.Errorln(err)
|
klog.Errorln(err)
|
||||||
resp.WriteHeaderAndEntity(http.StatusInternalServerError, errors.Wrap(err))
|
resp.WriteHeaderAndEntity(http.StatusInternalServerError, errors.Wrap(err))
|
||||||
|
|||||||
Reference in New Issue
Block a user