@@ -37,6 +37,7 @@ const DEFAULT_CLUSTER_ID = 1
3737type HelmAppService interface {
3838 ListHelmApplications (clusterIds []int , w http.ResponseWriter , token string , helmAuth func (token string , object string ) bool )
3939 GetApplicationDetail (ctx context.Context , app * AppIdentifier ) (* AppDetail , error )
40+ GetApplicationDetailWithFilter (ctx context.Context , app * AppIdentifier , resourceTreeFilter * ResourceTreeFilter ) (* AppDetail , error )
4041 HibernateApplication (ctx context.Context , app * AppIdentifier , hibernateRequest * openapi.HibernateRequest ) ([]* openapi.HibernateStatus , error )
4142 UnHibernateApplication (ctx context.Context , app * AppIdentifier , hibernateRequest * openapi.HibernateRequest ) ([]* openapi.HibernateStatus , error )
4243 DecodeAppId (appId string ) (* AppIdentifier , error )
@@ -233,15 +234,24 @@ func (impl *HelmAppServiceImpl) GetClusterConf(clusterId int) (*ClusterConfig, e
233234}
234235
235236func (impl * HelmAppServiceImpl ) GetApplicationDetail (ctx context.Context , app * AppIdentifier ) (* AppDetail , error ) {
237+ return impl .getApplicationDetail (ctx , app , nil )
238+ }
239+
240+ func (impl * HelmAppServiceImpl ) GetApplicationDetailWithFilter (ctx context.Context , app * AppIdentifier , resourceTreeFilter * ResourceTreeFilter ) (* AppDetail , error ) {
241+ return impl .getApplicationDetail (ctx , app , resourceTreeFilter )
242+ }
243+
244+ func (impl * HelmAppServiceImpl ) getApplicationDetail (ctx context.Context , app * AppIdentifier , resourceTreeFilter * ResourceTreeFilter ) (* AppDetail , error ) {
236245 config , err := impl .GetClusterConf (app .ClusterId )
237246 if err != nil {
238247 impl .logger .Errorw ("error in fetching cluster detail" , "err" , err )
239248 return nil , err
240249 }
241250 req := & AppDetailRequest {
242- ClusterConfig : config ,
243- Namespace : app .Namespace ,
244- ReleaseName : app .ReleaseName ,
251+ ClusterConfig : config ,
252+ Namespace : app .Namespace ,
253+ ReleaseName : app .ReleaseName ,
254+ ResourceTreeFilter : resourceTreeFilter ,
245255 }
246256 appdetail , err := impl .helmAppClient .GetAppDetail (ctx , req )
247257 if err != nil {
@@ -265,7 +275,6 @@ func (impl *HelmAppServiceImpl) GetApplicationDetail(ctx context.Context, app *A
265275 }
266276 }
267277 return appdetail , err
268-
269278}
270279
271280func (impl * HelmAppServiceImpl ) GetDeploymentHistory (ctx context.Context , app * AppIdentifier ) (* HelmAppDeploymentHistory , error ) {
0 commit comments