@@ -5362,19 +5362,19 @@ a.deploymentConfigs = b.select(a.unfilteredDeploymentConfigs), a.replicationCont
5362
5362
d . unwatchAll ( n ) ;
5363
5363
} ) ;
5364
5364
} ) ) ;
5365
- } ] ) , angular . module ( "openshiftConsole" ) . controller ( "DeploymentController" , [ "$scope" , "$filter" , "$routeParams" , "DataService" , "DeploymentsService" , "EnvironmentService" , "HPAService" , "ImageStreamResolver" , "ModalsService " , "Navigate " , "OwnerReferencesService " , "Logger " , "ProjectsService" , "StorageService" , function ( a , b , c , d , e , f , g , h , i , j , k , l , m , n ) {
5366
- var o = { } ;
5367
- a . projectName = c . project , a . name = c . deployment , a . forms = { } , a . alerts = { } , a . imagesByDockerReference = { } , a . breadcrumbs = [ {
5365
+ } ] ) , angular . module ( "openshiftConsole" ) . controller ( "DeploymentController" , [ "$scope" , "$filter" , "$routeParams" , "DataService" , "DeploymentsService" , "EnvironmentService" , "HPAService" , "ImageStreamResolver" , "LabelFilter " , "Logger " , "ModalsService " , "Navigate " , "OwnerReferencesService" , " ProjectsService", "StorageService" , function ( a , b , c , d , e , f , g , h , i , j , k , l , m , n , o ) {
5366
+ var p = { } ;
5367
+ a . projectName = c . project , a . name = c . deployment , a . replicaSetsForDeployment = { } , a . unfilteredReplicaSetsForDeployment = { } , a . labelSuggestions = { } , a . emptyMessage = "Loading..." , a . forms = { } , a . alerts = { } , a . imagesByDockerReference = { } , a . breadcrumbs = [ {
5368
5368
title :"Deployments" ,
5369
5369
link :"project/" + c . project + "/browse/deployments"
5370
5370
} , {
5371
5371
title :c . deployment
5372
- } ] , a . healthCheckURL = j . healthCheckURL ( c . project , "Deployment" , c . deployment , "extensions" ) ;
5373
- var p = ! 1 , q = function ( b , c ) {
5374
- if ( ! p ) {
5372
+ } ] , a . healthCheckURL = l . healthCheckURL ( c . project , "Deployment" , c . deployment , "extensions" ) ;
5373
+ var q = ! 1 , r = function ( b , c ) {
5374
+ if ( ! q ) {
5375
5375
if ( ! a . forms . deploymentEnvVars || a . forms . deploymentEnvVars . $pristine ) return void ( a . updatedDeployment = f . copyAndNormalize ( b ) ) ;
5376
5376
if ( f . isEnvironmentEqual ( b , c ) ) return void ( a . updatedDeployment = f . mergeEdits ( a . updatedDeployment , b ) ) ;
5377
- p = ! 0 , a . alerts [ "env-conflict" ] = {
5377
+ q = ! 0 , a . alerts [ "env-conflict" ] = {
5378
5378
type :"warning" ,
5379
5379
message :"The environment variables for the deployment have been updated in the background. Saving your changes may create a conflict or cause loss of data." ,
5380
5380
links :[ {
@@ -5385,31 +5385,37 @@ return a.clearEnvVarUpdates(), !0;
5385
5385
} ]
5386
5386
} ;
5387
5387
}
5388
- } , r = b ( "orderByDisplayName" ) , s = b ( "getErrorDetails" ) , t = function ( b , c ) {
5388
+ } , s = b ( "orderByDisplayName" ) , t = b ( "getErrorDetails" ) , u = function ( b , c ) {
5389
5389
a . alerts [ "from-value-objects" ] = {
5390
5390
type :"error" ,
5391
5391
message :b ,
5392
5392
details :c
5393
5393
} ;
5394
- } , u = [ ] ;
5395
- m . get ( c . project ) . then ( _ . spread ( function ( j , m ) {
5396
- a . project = j , a . projectContext = m ;
5397
- var v , w = { } , x = function ( ) {
5398
- g . getHPAWarnings ( a . deployment , a . autoscalers , w , j ) . then ( function ( b ) {
5394
+ } , v = [ ] ;
5395
+ n . get ( c . project ) . then ( _ . spread ( function ( l , n ) {
5396
+ function w ( ) {
5397
+ i . getLabelSelector ( ) . isEmpty ( ) || ! _ . isEmpty ( a . replicaSetsForDeployment ) || _ . isEmpty ( a . unfilteredReplicaSetsForDeployment ) ? delete a . alerts [ "filter-hiding-all" ] :a . alerts [ "filter-hiding-all" ] = {
5398
+ type :"warning" ,
5399
+ details :"The active filters are hiding all rollout history."
5400
+ } ;
5401
+ }
5402
+ a . project = l , a . projectContext = n ;
5403
+ var x , y = { } , z = function ( ) {
5404
+ g . getHPAWarnings ( a . deployment , a . autoscalers , y , l ) . then ( function ( b ) {
5399
5405
a . hpaWarnings = b ;
5400
5406
} ) ;
5401
5407
} ;
5402
5408
d . get ( {
5403
5409
group :"extensions" ,
5404
5410
resource :"deployments"
5405
- } , c . deployment , m , {
5411
+ } , c . deployment , n , {
5406
5412
errorNotification :! 1
5407
5413
} ) . then ( function ( g ) {
5408
- a . loaded = ! 0 , a . deployment = g , x ( ) , a . saveEnvVars = function ( ) {
5409
- f . compact ( a . updatedDeployment ) , v = d . update ( {
5414
+ a . loaded = ! 0 , a . deployment = g , z ( ) , a . saveEnvVars = function ( ) {
5415
+ f . compact ( a . updatedDeployment ) , x = d . update ( {
5410
5416
group :"extensions" ,
5411
5417
resource :"deployments"
5412
- } , c . deployment , a . updatedDeployment , m ) , v . then ( function ( ) {
5418
+ } , c . deployment , a . updatedDeployment , n ) , x . then ( function ( ) {
5413
5419
a . alerts . saveEnvSuccess = {
5414
5420
type :"success" ,
5415
5421
message :c . deployment + " was updated."
@@ -5421,63 +5427,68 @@ message:c.deployment + " was not updated.",
5421
5427
details :b ( "getErrorDetails" ) ( d )
5422
5428
} ;
5423
5429
} ) [ "finally" ] ( function ( ) {
5424
- v = null ;
5430
+ x = null ;
5425
5431
} ) ;
5426
5432
} , a . clearEnvVarUpdates = function ( ) {
5427
- a . updatedDeployment = f . copyAndNormalize ( a . deployment ) , a . forms . deploymentEnvVars . $setPristine ( ) , p = ! 1 ;
5428
- } , u . push ( d . watchObject ( {
5433
+ a . updatedDeployment = f . copyAndNormalize ( a . deployment ) , a . forms . deploymentEnvVars . $setPristine ( ) , q = ! 1 ;
5434
+ } , v . push ( d . watchObject ( {
5429
5435
group :"extensions" ,
5430
5436
resource :"deployments"
5431
- } , c . deployment , m , function ( b , c ) {
5437
+ } , c . deployment , n , function ( b , c ) {
5432
5438
"DELETED" === c && ( a . alerts . deleted = {
5433
5439
type :"warning" ,
5434
5440
message :"This deployment has been deleted."
5435
5441
} ) ;
5436
5442
var d = a . deployment ;
5437
- a . deployment = b , a . updatingPausedState = ! 1 , x ( ) , q ( b , d ) , v ? v [ "finally" ] ( function ( ) {
5438
- q ( b , d ) ;
5439
- } ) :q ( b , d ) , h . fetchReferencedImageStreamImages ( [ b . spec . template ] , a . imagesByDockerReference , o , m ) ;
5440
- } ) ) , u . push ( d . watch ( {
5443
+ a . deployment = b , a . updatingPausedState = ! 1 , z ( ) , r ( b , d ) , x ? x [ "finally" ] ( function ( ) {
5444
+ r ( b , d ) ;
5445
+ } ) :r ( b , d ) , h . fetchReferencedImageStreamImages ( [ b . spec . template ] , a . imagesByDockerReference , p , n ) ;
5446
+ } ) ) , v . push ( d . watch ( {
5441
5447
group :"extensions" ,
5442
5448
resource :"replicasets"
5443
- } , m , function ( b ) {
5449
+ } , n , function ( b ) {
5450
+ a . emptyMessage = "No deployments to show" ;
5444
5451
var c = b . by ( "metadata.name" ) ;
5445
- c = k . filterForController ( c , g ) , a . inProgressDeployment = _ . chain ( c ) . filter ( "status.replicas" ) . size ( ) > 1 , a . replicaSetsForDeployment = e . sortByRevision ( c ) ;
5452
+ c = m . filterForController ( c , g ) , a . inProgressDeployment = _ . chain ( c ) . filter ( "status.replicas" ) . size ( ) > 1 , a . unfilteredReplicaSetsForDeployment = e . sortByRevision ( c ) , a . replicaSetsForDeployment = i . getLabelSelector ( ) . select ( a . unfilteredReplicaSetsForDeployment ) , w ( ) , i . addLabelSuggestionsFromResources ( a . unfilteredReplicaSetsForDeployment , a . labelSuggestions ) , i . setLabelSuggestions ( a . labelSuggestions ) ;
5446
5453
} ) ) ;
5447
5454
} , function ( c ) {
5448
5455
a . loaded = ! 0 , a . alerts . load = {
5449
5456
type :"error" ,
5450
5457
message :404 === c . status ? "This deployment can not be found, it may have been deleted." :"The deployment details could not be loaded." ,
5451
5458
details :b ( "getErrorDetails" ) ( c )
5452
5459
} ;
5453
- } ) , d . list ( "limitranges" , m ) . then ( function ( a ) {
5454
- w = a . by ( "metadata.name" ) , x ( ) ;
5460
+ } ) , d . list ( "limitranges" , n ) . then ( function ( a ) {
5461
+ y = a . by ( "metadata.name" ) , z ( ) ;
5455
5462
} ) ;
5456
- var y = [ ] , z = [ ] ;
5457
- a . valueFromObjects = [ ] , d . list ( "configmaps" , m , null , {
5463
+ var A = [ ] , B = [ ] ;
5464
+ a . valueFromObjects = [ ] , d . list ( "configmaps" , n , null , {
5458
5465
errorNotification :! 1
5459
5466
} ) . then ( function ( b ) {
5460
- y = r ( b . by ( "metadata.name" ) ) , a . valueFromObjects = y . concat ( z ) ;
5467
+ A = s ( b . by ( "metadata.name" ) ) , a . valueFromObjects = A . concat ( B ) ;
5461
5468
} , function ( a ) {
5462
- 403 !== a . code && t ( "Could not load config maps" , s ( a ) ) ;
5463
- } ) , d . list ( "secrets" , m , null , {
5469
+ 403 !== a . code && u ( "Could not load config maps" , t ( a ) ) ;
5470
+ } ) , d . list ( "secrets" , n , null , {
5464
5471
errorNotification :! 1
5465
5472
} ) . then ( function ( b ) {
5466
- z = r ( b . by ( "metadata.name" ) ) , a . valueFromObjects = z . concat ( y ) ;
5473
+ B = s ( b . by ( "metadata.name" ) ) , a . valueFromObjects = B . concat ( A ) ;
5467
5474
} , function ( a ) {
5468
- 403 !== a . code && t ( "Could not load secrets" , s ( a ) ) ;
5469
- } ) , u . push ( d . watch ( "imagestreams" , m , function ( b ) {
5475
+ 403 !== a . code && u ( "Could not load secrets" , t ( a ) ) ;
5476
+ } ) , v . push ( d . watch ( "imagestreams" , n , function ( b ) {
5470
5477
var c = b . by ( "metadata.name" ) ;
5471
- h . buildDockerRefMapForImageStreams ( c , o ) , a . deployment && h . fetchReferencedImageStreamImages ( [ a . deployment . spec . template ] , a . imagesByDockerReference , o , m ) , l . log ( "imagestreams (subscribe)" , a . imageStreams ) ;
5472
- } ) ) , u . push ( d . watch ( {
5478
+ h . buildDockerRefMapForImageStreams ( c , p ) , a . deployment && h . fetchReferencedImageStreamImages ( [ a . deployment . spec . template ] , a . imagesByDockerReference , p , n ) , j . log ( "imagestreams (subscribe)" , a . imageStreams ) ;
5479
+ } ) ) , v . push ( d . watch ( {
5473
5480
group :"autoscaling" ,
5474
5481
resource :"horizontalpodautoscalers" ,
5475
5482
version :"v1"
5476
- } , m , function ( b ) {
5477
- a . autoscalers = g . filterHPA ( b . by ( "metadata.name" ) , "Deployment" , c . deployment ) , x ( ) ;
5478
- } ) ) , u . push ( d . watch ( "builds" , m , function ( b ) {
5479
- a . builds = b . by ( "metadata.name" ) , l . log ( "builds (subscribe)" , a . builds ) ;
5480
- } ) ) , a . scale = function ( c ) {
5483
+ } , n , function ( b ) {
5484
+ a . autoscalers = g . filterHPA ( b . by ( "metadata.name" ) , "Deployment" , c . deployment ) , z ( ) ;
5485
+ } ) ) , v . push ( d . watch ( "builds" , n , function ( b ) {
5486
+ a . builds = b . by ( "metadata.name" ) , j . log ( "builds (subscribe)" , a . builds ) ;
5487
+ } ) ) , i . onActiveFiltersChanged ( function ( b ) {
5488
+ a . $evalAsync ( function ( ) {
5489
+ a . replicaSetsForDeployment = b . select ( a . unfilteredReplicaSetsForDeployment ) , w ( ) ;
5490
+ } ) ;
5491
+ } ) , a . scale = function ( c ) {
5481
5492
var d = function ( c ) {
5482
5493
a . alerts = a . alerts || { } , a . alerts . scale = {
5483
5494
type :"error" ,
@@ -5487,7 +5498,7 @@ details:b("getErrorDetails")(c)
5487
5498
} ;
5488
5499
e . scale ( a . deployment , c ) . then ( _ . noop , d ) ;
5489
5500
} , a . setPaused = function ( c ) {
5490
- a . updatingPausedState = ! 0 , e . setPaused ( a . deployment , c , m ) . then ( _ . noop , function ( d ) {
5501
+ a . updatingPausedState = ! 0 , e . setPaused ( a . deployment , c , n ) . then ( _ . noop , function ( d ) {
5491
5502
a . updatingPausedState = ! 1 , a . alerts = a . alerts || { } , a . alerts . scale = {
5492
5503
type :"error" ,
5493
5504
message :"An error occurred " + ( c ? "pausing" :"resuming" ) + " the deployment." ,
@@ -5497,18 +5508,18 @@ details:b("getErrorDetails")(d)
5497
5508
} , a . removeVolume = function ( b ) {
5498
5509
var c ;
5499
5510
c = _ . get ( a , "deployment.spec.paused" ) ? "This will remove the volume from the deployment." :"This will remove the volume from the deployment and start a new rollout." , b . persistentVolumeClaim ? c += " It will not delete the persistent volume claim." :b . secret ? c += " It will not delete the secret." :b . configMap && ( c += " It will not delete the config map." ) ;
5500
- var d = i . confirm ( {
5511
+ var d = k . confirm ( {
5501
5512
message :"Remove volume " + b . name + "?" ,
5502
5513
details :c ,
5503
5514
okButtonText :"Remove" ,
5504
5515
okButtonClass :"btn-danger" ,
5505
5516
cancelButtonText :"Cancel"
5506
5517
} ) , e = function ( ) {
5507
- n . removeVolume ( a . deployment , b , m ) ;
5518
+ o . removeVolume ( a . deployment , b , n ) ;
5508
5519
} ;
5509
5520
d . then ( e ) ;
5510
5521
} , a . $on ( "$destroy" , function ( ) {
5511
- d . unwatchAll ( u ) ;
5522
+ d . unwatchAll ( v ) ;
5512
5523
} ) ;
5513
5524
} ) ) ;
5514
5525
} ] ) , angular . module ( "openshiftConsole" ) . controller ( "DeploymentConfigController" , [ "$scope" , "$filter" , "$routeParams" , "BreadcrumbsService" , "DataService" , "DeploymentsService" , "EnvironmentService" , "HPAService" , "ImageStreamResolver" , "ModalsService" , "Navigate" , "NotificationsService" , "Logger" , "ProjectsService" , "StorageService" , "LabelFilter" , "labelNameFilter" , function ( a , b , c , d , e , f , g , h , i , j , k , l , m , n , o , p , q ) {
0 commit comments