@@ -42,7 +42,7 @@ import (
4242type HelmAppService interface {
4343 ListHelmApplications (ctx context.Context , clusterIds []int , w http.ResponseWriter , token string , helmAuth func (token string , object string ) bool )
4444 GetApplicationDetail (ctx context.Context , app * AppIdentifier ) (* AppDetail , error )
45- GetApplicationStatus (ctx context.Context , app * AppIdentifier ) (string , error )
45+ GetApplicationAndReleaseStatus (ctx context.Context , app * AppIdentifier ) (* AppStatus , error )
4646 GetApplicationDetailWithFilter (ctx context.Context , app * AppIdentifier , resourceTreeFilter * ResourceTreeFilter ) (* AppDetail , error )
4747 HibernateApplication (ctx context.Context , app * AppIdentifier , hibernateRequest * openapi.HibernateRequest ) ([]* openapi.HibernateStatus , error )
4848 UnHibernateApplication (ctx context.Context , app * AppIdentifier , hibernateRequest * openapi.HibernateRequest ) ([]* openapi.HibernateStatus , error )
@@ -287,8 +287,8 @@ func (impl *HelmAppServiceImpl) GetApplicationDetail(ctx context.Context, app *A
287287 return impl .getApplicationDetail (ctx , app , nil )
288288}
289289
290- func (impl * HelmAppServiceImpl ) GetApplicationStatus (ctx context.Context , app * AppIdentifier ) (string , error ) {
291- return impl .getApplicationStatus (ctx , app )
290+ func (impl * HelmAppServiceImpl ) GetApplicationAndReleaseStatus (ctx context.Context , app * AppIdentifier ) (* AppStatus , error ) {
291+ return impl .getApplicationAndReleaseStatus (ctx , app )
292292}
293293
294294func (impl * HelmAppServiceImpl ) GetApplicationDetailWithFilter (ctx context.Context , app * AppIdentifier , resourceTreeFilter * ResourceTreeFilter ) (* AppDetail , error ) {
@@ -331,12 +331,11 @@ func (impl *HelmAppServiceImpl) getApplicationDetail(ctx context.Context, app *A
331331 return appdetail , err
332332}
333333
334- func (impl * HelmAppServiceImpl ) getApplicationStatus (ctx context.Context , app * AppIdentifier ) (string , error ) {
335- applicationStatus := ""
334+ func (impl * HelmAppServiceImpl ) getApplicationAndReleaseStatus (ctx context.Context , app * AppIdentifier ) (* AppStatus , error ) {
336335 config , err := impl .GetClusterConf (app .ClusterId )
337336 if err != nil {
338337 impl .logger .Errorw ("error in fetching cluster detail" , "err" , err )
339- return applicationStatus , err
338+ return nil , err
340339 }
341340 req := & AppDetailRequest {
342341 ClusterConfig : config ,
@@ -346,10 +345,9 @@ func (impl *HelmAppServiceImpl) getApplicationStatus(ctx context.Context, app *A
346345 appStatus , err := impl .helmAppClient .GetAppStatus (ctx , req )
347346 if err != nil {
348347 impl .logger .Errorw ("error in fetching app status" , "err" , err )
349- return applicationStatus , err
348+ return nil , err
350349 }
351- applicationStatus = appStatus .ApplicationStatus
352- return applicationStatus , err
350+ return appStatus , err
353351}
354352
355353func (impl * HelmAppServiceImpl ) GetDeploymentHistory (ctx context.Context , app * AppIdentifier ) (* HelmAppDeploymentHistory , error ) {
0 commit comments