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