@@ -695,8 +695,24 @@ webpackJsonp([ 0, 1 ], [ function(e, t) {
695
695
this . logger = a ;
696
696
}
697
697
return e . prototype . getCatalogItems = function ( e ) {
698
- var t = this , r = this . $q . defer ( ) , n = { } , a = 0 , s = 0 , o = [ ] , c = this . apiService . getPreferredVersion ( "clusterserviceclasses" ) ;
699
- this . apiService . apiInfo ( c ) && ( ++ a , this . dataService . list ( c , { } ) . then ( function ( e ) {
698
+ var t = this , r = this . $q . defer ( ) , n = { } , a = 0 , s = 0 , o = [ ] , c = function ( ) {
699
+ if ( e ) {
700
+ ++ a ;
701
+ var i = t . apiService . getPreferredVersion ( "templates" ) ;
702
+ t . dataService . list ( i , {
703
+ namespace : "openshift"
704
+ } , null , {
705
+ partialObjectMetadataList : ! 0
706
+ } ) . then ( function ( e ) {
707
+ n . templates = e . by ( "metadata.name" ) ;
708
+ } , function ( ) {
709
+ o . push ( "templates" ) ;
710
+ } ) . finally ( function ( ) {
711
+ t . returnCatalogItems ( r , n , ++ s , a , o ) ;
712
+ } ) ;
713
+ }
714
+ } , l = this . apiService . getPreferredVersion ( "clusterserviceclasses" ) ;
715
+ this . apiService . apiInfo ( l ) ? ( ++ a , this . dataService . list ( l , { } ) . then ( function ( e ) {
700
716
n . serviceClasses = i . reject ( e . by ( "metadata.name" ) , {
701
717
status : {
702
718
removedFromBrokerCatalog : ! 0
@@ -705,33 +721,22 @@ webpackJsonp([ 0, 1 ], [ function(e, t) {
705
721
} , function ( ) {
706
722
o . push ( "service classes" ) ;
707
723
} ) . finally ( function ( ) {
708
- t . returnCatalogItems ( r , n , ++ s , a , o ) ;
709
- } ) ) , ++ a ;
710
- var l = this . apiService . getPreferredVersion ( "imagestreams" ) ;
711
- if ( this . dataService . list ( l , {
724
+ i . some ( n . serviceClasses , {
725
+ spec : {
726
+ clusterServiceBrokerName : "template-service-broker"
727
+ }
728
+ } ) || c ( ) , t . returnCatalogItems ( r , n , ++ s , a , o ) ;
729
+ } ) ) : c ( ) , ++ a ;
730
+ var d = this . apiService . getPreferredVersion ( "imagestreams" ) ;
731
+ return this . dataService . list ( d , {
712
732
namespace : "openshift"
713
733
} ) . then ( function ( e ) {
714
734
n . imageStreams = e . by ( "metadata.name" ) ;
715
735
} , function ( ) {
716
736
o . push ( "builder images" ) ;
717
737
} ) . finally ( function ( ) {
718
738
t . returnCatalogItems ( r , n , ++ s , a , o ) ;
719
- } ) , e ) {
720
- ++ a ;
721
- var d = this . apiService . getPreferredVersion ( "templates" ) ;
722
- this . dataService . list ( d , {
723
- namespace : "openshift"
724
- } , null , {
725
- partialObjectMetadataList : ! 0
726
- } ) . then ( function ( e ) {
727
- n . templates = e . by ( "metadata.name" ) ;
728
- } , function ( ) {
729
- o . push ( "templates" ) ;
730
- } ) . finally ( function ( ) {
731
- t . returnCatalogItems ( r , n , ++ s , a , o ) ;
732
- } ) ;
733
- }
734
- return r . promise ;
739
+ } ) , r . promise ;
735
740
} , e . prototype . getServicePlansForServiceClass = function ( e ) {
736
741
var t = this . apiService . getPreferredVersion ( "clusterserviceplans" ) , r = i . isString ( e ) ? e : i . get ( e , "metadata.name" ) ;
737
742
if ( r && this . apiService . apiInfo ( t ) ) {
0 commit comments