@@ -2022,7 +2022,7 @@ c.image && (b[c.dockerImageReference] = a.metadata.name + "@" + c.image);
2022
2022
} ] ) , angular . module ( "openshiftConsole" ) . factory ( "BaseHref" , [ "$document" , function ( a ) {
2023
2023
return a . find ( "base" ) . attr ( "href" ) || "/" ;
2024
2024
} ] ) , angular . module ( "openshiftConsole" ) . factory ( "BuildsService" , [ "DataService" , "$filter" , function ( a , b ) {
2025
- var c = b ( "annotation" ) , d = b ( "buildConfigForBuild" ) , e = function ( b , c ) {
2025
+ var c = b ( "annotation" ) , d = b ( "buildConfigForBuild" ) , e = b ( "isIncompleteBuild" ) , f = b ( "isNewerResource" ) , g = function ( b , c ) {
2026
2026
var d = {
2027
2027
kind :"BuildRequest" ,
2028
2028
apiVersion :"v1" ,
@@ -2031,10 +2031,10 @@ name:b
2031
2031
}
2032
2032
} ;
2033
2033
return a . create ( "buildconfigs/instantiate" , b , d , c ) ;
2034
- } , f = function ( b , c , d ) {
2034
+ } , h = function ( b , c , d ) {
2035
2035
var e = angular . copy ( b ) ;
2036
2036
return e . status . cancelled = ! 0 , a . update ( "builds" , e . metadata . name , e , d ) ;
2037
- } , g = function ( b , c ) {
2037
+ } , i = function ( b , c ) {
2038
2038
var d = {
2039
2039
kind :"BuildRequest" ,
2040
2040
apiVersion :"v1" ,
@@ -2043,11 +2043,11 @@ name:b
2043
2043
}
2044
2044
} ;
2045
2045
return a . create ( "builds/clone" , b , d , c ) ;
2046
- } , h = function ( a ) {
2047
- return "true" === c ( a , "openshift.io/build-config.paused" ) ;
2048
- } , i = function ( a ) {
2049
- return ! ! a && ( ! a . metadata . deletionTimestamp && ! h ( a ) ) ;
2050
2046
} , j = function ( a ) {
2047
+ return "true" === c ( a , "openshift.io/build-config.paused" ) ;
2048
+ } , k = function ( a ) {
2049
+ return ! ! a && ( ! a . metadata . deletionTimestamp && ! j ( a ) ) ;
2050
+ } , l = function ( a ) {
2051
2051
var b = c ( a , "pipeline.alpha.openshift.io/uses" ) ;
2052
2052
if ( ! b ) return [ ] ;
2053
2053
try {
@@ -2059,42 +2059,69 @@ var e = [];
2059
2059
return _ . each ( b , function ( b ) {
2060
2060
b . name && ( b . namespace && b . namespace !== _ . get ( a , "metadata.namespace" ) || "DeploymentConfig" === b . kind && e . push ( b . name ) ) ;
2061
2061
} ) , e ;
2062
- } , k = function ( a , b ) {
2062
+ } , m = function ( a , b ) {
2063
2063
return _ . pick ( b , function ( b ) {
2064
2064
var d = c ( b , "buildConfig" ) ;
2065
2065
return ! d || d === a ;
2066
2066
} ) ;
2067
- } , l = b ( "isNewerResource" ) , m = function ( a , b ) {
2067
+ } , n = function ( a , b ) {
2068
2068
var c = { } ;
2069
2069
return _ . each ( a , function ( a ) {
2070
2070
var e = d ( a ) || "" ;
2071
- b && ! b ( a ) || l ( a , c [ e ] ) && ( c [ e ] = a ) ;
2071
+ b && ! b ( a ) || f ( a , c [ e ] ) && ( c [ e ] = a ) ;
2072
2072
} ) , c ;
2073
- } , n = function ( a ) {
2073
+ } , o = function ( a ) {
2074
2074
var b = c ( a , "buildNumber" ) || parseInt ( a . metadata . name . match ( / ( \d + ) $ / ) , 10 ) ;
2075
2075
return isNaN ( b ) ? null :b ;
2076
- } , o = function ( a ) {
2077
- return a . status . startTimestamp || a . metadata . creationTimestamp ;
2078
2076
} , p = function ( a ) {
2079
- return _ . round ( a / 1e3 / 1e3 ) ;
2077
+ return a . status . startTimestamp || a . metadata . creationTimestamp ;
2080
2078
} , q = function ( a ) {
2079
+ return _ . round ( a / 1e3 / 1e3 ) ;
2080
+ } , r = function ( a ) {
2081
2081
var b = _ . get ( a , "status.duration" ) ;
2082
- if ( b ) return p ( b ) ;
2083
- var c = o ( a ) , d = a . status . completionTimestamp ;
2082
+ if ( b ) return q ( b ) ;
2083
+ var c = p ( a ) , d = a . status . completionTimestamp ;
2084
2084
return c && d ? moment ( d ) . diff ( moment ( c ) ) :0 ;
2085
+ } , s = function ( a ) {
2086
+ return _ . map ( a , function ( a ) {
2087
+ return e ( a ) ;
2088
+ } ) ;
2089
+ } , t = function ( a ) {
2090
+ return _ . map ( a , function ( a ) {
2091
+ return ! e ( a ) ;
2092
+ } ) ;
2093
+ } , u = function ( a ) {
2094
+ return _ . reduce ( a , function ( a , c ) {
2095
+ if ( e ( c ) ) return a ;
2096
+ var d = b ( "annotation" ) ( c , "buildConfig" ) ;
2097
+ return f ( c , a [ d ] ) && ( a [ d ] = c ) , a ;
2098
+ } , { } ) ;
2099
+ } , v = function ( a ) {
2100
+ var c = { } , d = _ . filter ( a , function ( a ) {
2101
+ if ( e ( a ) ) return ! 0 ;
2102
+ var d = b ( "annotation" ) ( a , "buildConfig" ) ;
2103
+ f ( a , c [ d ] ) && ( c [ d ] = a ) ;
2104
+ } ) ;
2105
+ return d . concat ( _ . map ( c , function ( a ) {
2106
+ return a ;
2107
+ } ) ) ;
2085
2108
} ;
2086
2109
return {
2087
- startBuild :e ,
2088
- cancelBuild :f ,
2089
- cloneBuild :g ,
2090
- isPaused :h ,
2091
- canBuild :i ,
2092
- usesDeploymentConfigs :j ,
2093
- validatedBuildsForBuildConfig :k ,
2094
- latestBuildByConfig :m ,
2095
- getBuildNumber :n ,
2096
- getStartTimestsamp :o ,
2097
- getDuration :q
2110
+ startBuild :g ,
2111
+ cancelBuild :h ,
2112
+ cloneBuild :i ,
2113
+ isPaused :j ,
2114
+ canBuild :k ,
2115
+ usesDeploymentConfigs :l ,
2116
+ validatedBuildsForBuildConfig :m ,
2117
+ latestBuildByConfig :n ,
2118
+ getBuildNumber :o ,
2119
+ getStartTimestsamp :p ,
2120
+ getDuration :r ,
2121
+ incompleteBuilds :s ,
2122
+ completeBuilds :t ,
2123
+ lastCompleteByBuildConfig :u ,
2124
+ interestingBuilds :v
2098
2125
} ;
2099
2126
} ] ) , angular . module ( "openshiftConsole" ) . factory ( "DeploymentsService" , [ "DataService" , "$filter" , "LabelFilter" , function ( a , b , c ) {
2100
2127
function d ( ) { }
@@ -3209,11 +3236,11 @@ c.recentPipelinesByDC[b] = c.recentPipelinesByDC[b] || [], c.recentPipelinesByDC
3209
3236
} ) ;
3210
3237
}
3211
3238
}
3212
- } , Z = a ( "isRecentBuild" ) , $ = function ( ) {
3213
- u && ( c . recentPipelinesByDC = { } , c . recentBuildsByOutputImage = { } , _ . each ( u , function ( a ) {
3214
- if ( Z ( a ) ) return z ( a ) ? void Y ( a ) :void W ( a ) ;
3239
+ } , Z = function ( ) {
3240
+ u && ( c . recentPipelinesByDC = { } , c . recentBuildsByOutputImage = { } , _ . each ( e . interestingBuilds ( u ) , function ( a ) {
3241
+ return z ( a ) ? void Y ( a ) :void W ( a ) ;
3215
3242
} ) ) ;
3216
- } , aa = function ( ) {
3243
+ } , $ = function ( ) {
3217
3244
var a = _ . isEmpty ( p ) && _ . isEmpty ( s ) && _ . isEmpty ( r ) && _ . isEmpty ( q ) , b = p && s && r && q ;
3218
3245
c . renderOptions . showGetStarted = b && a , c . renderOptions . showLoading = ! b && a ;
3219
3246
} ;
@@ -3228,19 +3255,19 @@ return g.isScalable(a, q, c.hpaByDC, c.hpaByRC, c.scalableDeploymentByConfig);
3228
3255
c . showMetrics = a ;
3229
3256
} ) , j . get ( b . project ) . then ( _ . spread ( function ( a , b ) {
3230
3257
c . project = a , y . push ( f . watch ( "pods" , b , function ( a ) {
3231
- s = a . by ( "metadata.name" ) , O ( ) , aa ( ) , h . log ( "pods" , s ) ;
3258
+ s = a . by ( "metadata.name" ) , O ( ) , $ ( ) , h . log ( "pods" , s ) ;
3232
3259
} ) ) , y . push ( f . watch ( "services" , b , function ( a ) {
3233
- c . services = p = a . by ( "metadata.name" ) , U ( ) , O ( ) , I ( ) , L ( ) , V ( ) , aa ( ) , h . log ( "services (list)" , p ) ;
3260
+ c . services = p = a . by ( "metadata.name" ) , U ( ) , O ( ) , I ( ) , L ( ) , V ( ) , $ ( ) , h . log ( "services (list)" , p ) ;
3234
3261
} ) ) , y . push ( f . watch ( "builds" , b , function ( a ) {
3235
- u = a . by ( "metadata.name" ) , $ ( ) , aa ( ) , h . log ( "builds (list)" , u ) ;
3262
+ u = a . by ( "metadata.name" ) , Z ( ) , $ ( ) , h . log ( "builds (list)" , u ) ;
3236
3263
} ) ) , y . push ( f . watch ( "buildConfigs" , b , function ( a ) {
3237
- t = a . by ( "metadata.name" ) , $ ( ) , h . log ( "builds (list)" , u ) ;
3264
+ t = a . by ( "metadata.name" ) , Z ( ) , h . log ( "builds (list)" , u ) ;
3238
3265
} ) ) , y . push ( f . watch ( "routes" , b , function ( a ) {
3239
3266
o = a . by ( "metadata.name" ) , H ( ) , U ( ) , V ( ) , h . log ( "routes (subscribe)" , c . routesByService ) ;
3240
3267
} ) ) , y . push ( f . watch ( "replicationcontrollers" , b , function ( a ) {
3241
- r = a . by ( "metadata.name" ) , L ( ) , O ( ) , $ ( ) , aa ( ) , h . log ( "replicationcontrollers (subscribe)" , r ) ;
3268
+ r = a . by ( "metadata.name" ) , L ( ) , O ( ) , Z ( ) , $ ( ) , h . log ( "replicationcontrollers (subscribe)" , r ) ;
3242
3269
} ) ) , y . push ( f . watch ( "deploymentconfigs" , b , function ( a ) {
3243
- q = a . by ( "metadata.name" ) , I ( ) , L ( ) , aa ( ) , h . log ( "deploymentconfigs (subscribe)" , c . deploymentConfigs ) ;
3270
+ q = a . by ( "metadata.name" ) , I ( ) , L ( ) , $ ( ) , h . log ( "deploymentconfigs (subscribe)" , c . deploymentConfigs ) ;
3244
3271
} ) ) , y . push ( f . watch ( {
3245
3272
group :"extensions" ,
3246
3273
resource :"horizontalpodautoscalers"
0 commit comments