@@ -4648,7 +4648,7 @@ var b = a.spec.scaleRef.name, c = a.spec.scaleRef.kind;
4648
4648
b && c && ( _ . has ( C , [ c , b ] ) || _ . set ( C , [ c , b ] , [ ] ) , C [ c ] [ b ] . push ( a ) ) ;
4649
4649
} ) ;
4650
4650
} , $ = function ( a ) {
4651
- return "Succeeded" !== a . status . phase && "Terminated " !== a . status . phase && ( ! G ( a , "openshift.io/deployer-pod-for.name" ) && ( ! F ( a , "openshift.io/build.name" ) && "slave" !== G ( a , "jenkins" ) ) ) ;
4651
+ return "Succeeded" !== a . status . phase && "Failed " !== a . status . phase && ( ! G ( a , "openshift.io/deployer-pod-for.name" ) && ( ! F ( a , "openshift.io/build.name" ) && "slave" !== G ( a , "jenkins" ) ) ) ;
4652
4652
} , aa = function ( ) {
4653
4653
if ( y && u && w && x ) {
4654
4654
var a = _ . toArray ( u ) . concat ( _ . toArray ( w ) ) . concat ( _ . toArray ( x ) ) ;
@@ -12288,7 +12288,7 @@ msg:"@"
12288
12288
} ,
12289
12289
templateUrl :"views/directives/_ellipsis-pulser.html"
12290
12290
} ;
12291
- } ] ) , angular . module ( "openshiftConsole" ) . directive ( "podDonut" , [ "$timeout" , "hashSizeFilter" , " isPullingImageFilter", "isTerminatingFilter" , "podWarningsFilter" , "numContainersReadyFilter" , "Logger" , "ChartsService" , function ( a , b , c , d , e , f , g , h ) {
12291
+ } ] ) , angular . module ( "openshiftConsole" ) . directive ( "podDonut" , [ "$timeout" , "isPullingImageFilter" , "isTerminatingFilter" , "podWarningsFilter" , "numContainersReadyFilter" , "Logger" , "ChartsService" , function ( a , b , c , d , e , f , g ) {
12292
12292
return {
12293
12293
restrict :"E" ,
12294
12294
scope :{
@@ -12297,39 +12297,43 @@ desired:"=?",
12297
12297
idled :"=?"
12298
12298
} ,
12299
12299
templateUrl :"views/directives/pod-donut.html" ,
12300
- link :function ( a , g ) {
12301
- function i ( ) {
12302
- var c , d = b ( a . pods ) ;
12303
- c = angular . isNumber ( a . desired ) && a . desired !== d ? "scaling to " + a . desired + "..." :1 === d ? "pod" :"pods" , a . idled ? h . updateDonutCenterText ( g [ 0 ] , "Idle" ) :h . updateDonutCenterText ( g [ 0 ] , d , c ) ;
12300
+ link :function ( a , f ) {
12301
+ function h ( ) {
12302
+ var b , c = _ . reject ( a . pods , {
12303
+ status :{
12304
+ phase :"Failed"
12304
12305
}
12305
- function j ( c ) {
12306
- var d = {
12306
+ } ) , d = _ . size ( c ) ;
12307
+ b = angular . isNumber ( a . desired ) && a . desired !== d ? "scaling to " + a . desired + "..." :1 === d ? "pod" :"pods" , a . idled ? g . updateDonutCenterText ( f [ 0 ] , "Idle" ) :g . updateDonutCenterText ( f [ 0 ] , d , b ) ;
12308
+ }
12309
+ function i ( b ) {
12310
+ var c = {
12307
12311
columns :[ ]
12308
12312
} ;
12309
- angular . forEach ( p , function ( a ) {
12310
- d . columns . push ( [ a , c [ a ] || 0 ] ) ;
12311
- } ) , 0 === b ( c ) ? d . columns . push ( [ "Empty" , 1 ] ) :d . unload = "Empty" , n ? n . load ( d ) :( o . data . columns = d . columns , n = c3 . generate ( o ) ) , a . podStatusData = d . columns ;
12313
+ angular . forEach ( o , function ( a ) {
12314
+ c . columns . push ( [ a , b [ a ] || 0 ] ) ;
12315
+ } ) , _ . isEmpty ( b ) ? c . columns . push ( [ "Empty" , 1 ] ) :c . unload = "Empty" , m ? m . load ( c ) :( n . data . columns = c . columns , m = c3 . generate ( n ) ) , a . podStatusData = c . columns ;
12312
12316
}
12313
- function k ( a ) {
12314
- var b = f ( a ) , c = a . spec . containers . length ;
12317
+ function j ( a ) {
12318
+ var b = e ( a ) , c = a . spec . containers . length ;
12315
12319
return b === c ;
12316
12320
}
12317
- function l ( a ) {
12318
- if ( d ( a ) ) return "Terminating" ;
12319
- var b = e ( a ) ;
12320
- return _ . some ( b , {
12321
+ function k ( a ) {
12322
+ if ( c ( a ) ) return "Terminating" ;
12323
+ var e = d ( a ) ;
12324
+ return _ . some ( e , {
12321
12325
severity :"error"
12322
- } ) ? "Failed " :_ . isEmpty ( b ) ? c ( a ) ? "Pulling" :"Running" !== a . status . phase || k ( a ) ? _ . get ( a , "status.phase" , "Unknown" ) :"Not Ready" :"Warning" ;
12326
+ } ) ? "Error " :_ . isEmpty ( e ) ? b ( a ) ? "Pulling" :"Running" !== a . status . phase || j ( a ) ? _ . get ( a , "status.phase" , "Unknown" ) :"Not Ready" :"Warning" ;
12323
12327
}
12324
- function m ( ) {
12328
+ function l ( ) {
12325
12329
var b = { } ;
12326
12330
return angular . forEach ( a . pods , function ( a ) {
12327
- var c = l ( a ) ;
12331
+ var c = k ( a ) ;
12328
12332
b [ c ] = ( b [ c ] || 0 ) + 1 ;
12329
12333
} ) , b ;
12330
12334
}
12331
- var n , o , p = [ "Running" , "Not Ready" , "Warning" , "Failed " , "Pulling" , "Pending" , "Succeeded" , "Terminating" , "Unknown" ] ;
12332
- a . chartId = _ . uniqueId ( "pods-donut-chart-" ) , o = {
12335
+ var m , n , o = [ "Running" , "Not Ready" , "Warning" , "Error " , "Pulling" , "Pending" , "Succeeded" , "Terminating" , "Unknown" ] ;
12336
+ a . chartId = _ . uniqueId ( "pods-donut-chart-" ) , n = {
12333
12337
type :"donut" ,
12334
12338
bindto :"#" + a . chartId ,
12335
12339
donut :{
@@ -12346,11 +12350,11 @@ width:150
12346
12350
legend :{
12347
12351
show :! 1
12348
12352
} ,
12349
- onrendered :i ,
12353
+ onrendered :h ,
12350
12354
tooltip :{
12351
12355
format :{
12352
12356
value :function ( a , b , c ) {
12353
- if ( a ) return "Empty" === c ? "No pods exist" : a ;
12357
+ if ( a && "Empty" !== c ) return a ;
12354
12358
}
12355
12359
}
12356
12360
} ,
@@ -12359,14 +12363,14 @@ duration:350
12359
12363
} ,
12360
12364
data :{
12361
12365
type :"donut" ,
12362
- groups :[ p ] ,
12366
+ groups :[ o ] ,
12363
12367
order :null ,
12364
12368
colors :{
12365
12369
Empty :"#ffffff" ,
12366
12370
Running :"#00b9e4" ,
12367
12371
"Not Ready" :"#beedf9" ,
12368
12372
Warning :"#f39d3c" ,
12369
- Failed :"#d9534f" ,
12373
+ Error :"#d9534f" ,
12370
12374
Pulling :"#d1d1d1" ,
12371
12375
Pending :"#ededed" ,
12372
12376
Succeeded :"#3f9c35" ,
@@ -12378,11 +12382,11 @@ enabled:!1
12378
12382
}
12379
12383
}
12380
12384
} ;
12381
- var q = _ . debounce ( j , 350 , {
12385
+ var p = _ . debounce ( i , 350 , {
12382
12386
maxWait :500
12383
12387
} ) ;
12384
- a . $watch ( m , q , ! 0 ) , a . $watchGroup ( [ "desired" , "idled" ] , i ) , a . $on ( "destroy" , function ( ) {
12385
- n && ( n = n . destroy ( ) ) ;
12388
+ a . $watch ( l , p , ! 0 ) , a . $watchGroup ( [ "desired" , "idled" ] , h ) , a . $on ( "destroy" , function ( ) {
12389
+ m && ( m = m . destroy ( ) ) ;
12386
12390
} ) ;
12387
12391
}
12388
12392
} ;
0 commit comments