@@ -4376,24 +4376,28 @@ _.set(c, [ "routeWarningsByService", a.metadata.name, b.metadata.name ], d);
4376
4376
} , ia = function ( a ) {
4377
4377
var b = H ( _ . get ( a , "spec.output.to" ) , a . metadata . namespace ) ;
4378
4378
c . recentBuildsByOutputImage [ b ] = c . recentBuildsByOutputImage [ b ] || [ ] , c . recentBuildsByOutputImage [ b ] . push ( a ) ;
4379
- } , ja = a ( "buildConfigForBuild" ) , ka = function ( a ) {
4379
+ } , ja = a ( "buildConfigForBuild" ) , ka = a ( "isIncompleteBuild" ) , la = function ( a ) {
4380
4380
if ( z ) {
4381
4381
var b = ja ( a ) , d = z [ b ] ;
4382
4382
if ( d ) {
4383
4383
var f = e . usesDeploymentConfigs ( d ) ;
4384
4384
_ . each ( f , function ( b ) {
4385
- c . recentPipelinesByDC [ b ] = c . recentPipelinesByDC [ b ] || [ ] , c . recentPipelinesByDC [ b ] . push ( a ) ;
4385
+ c . recentPipelinesByDC [ b ] = c . recentPipelinesByDC [ b ] || [ ] , c . recentPipelinesByDC [ b ] . push ( a ) , ka ( a ) && ( c . incompletePipelinesByDC [ b ] = c . incompletePipelinesByDC [ b ] || [ ] , c . incompletePipelinesByDC [ b ] . push ( a ) ) ;
4386
4386
} ) ;
4387
4387
}
4388
4388
}
4389
- } , la = function ( ) {
4390
- A && ( c . recentPipelinesByDC = { } , c . recentBuildsByOutputImage = { } , _ . each ( e . interestingBuilds ( A ) , function ( a ) {
4391
- return E ( a ) ? void ka ( a ) :void ia ( a ) ;
4392
- } ) ) ;
4393
4389
} , ma = function ( ) {
4390
+ A && ( c . recentPipelinesByDC = { } , c . incompletePipelinesByDC = { } , c . recentBuildsByOutputImage = { } , _ . each ( e . interestingBuilds ( A ) , function ( a ) {
4391
+ return E ( a ) ? void la ( a ) :void ia ( a ) ;
4392
+ } ) , c . pipelinesForDC = { } , _ . each ( z , function ( a ) {
4393
+ _ . each ( e . usesDeploymentConfigs ( a ) , function ( b ) {
4394
+ c . pipelinesForDC [ b ] = c . pipelinesForDC [ b ] || [ ] , c . pipelinesForDC [ b ] . push ( a ) ;
4395
+ } ) ;
4396
+ } ) ) ;
4397
+ } , na = function ( ) {
4394
4398
var a = _ . isEmpty ( r ) && _ . isEmpty ( t ) && _ . isEmpty ( c . monopodsByService ) && _ . isEmpty ( u ) && _ . isEmpty ( w ) && _ . isEmpty ( x ) , b = r && y && u && w && x ;
4395
4399
c . renderOptions . showGetStarted = b && a , c . renderOptions . showLoading = ! b && a ;
4396
- } , na = function ( ) {
4400
+ } , oa = function ( ) {
4397
4401
var a = d . isAlertPermanentlyHidden ( "overview-quota-limit-reached" , c . projectName ) ;
4398
4402
if ( ! a && p . isAnyQuotaExceeded ( c . quotas , c . clusterQuotas ) ) {
4399
4403
if ( c . alerts . quotaExceeded ) return ;
@@ -4432,11 +4436,11 @@ var b = _.get(c, [ a, "" ], {});
4432
4436
return ! _ . isEmpty ( b ) ;
4433
4437
} ) ;
4434
4438
} ;
4435
- var oa = [ ] ;
4439
+ var pa = [ ] ;
4436
4440
c . getHPA = function ( a ) {
4437
4441
if ( ! B ) return null ;
4438
4442
var b = _ . get ( a , "kind" ) , c = _ . get ( a , "metadata.name" ) ;
4439
- return _ . get ( C , [ b , c ] , oa ) ;
4443
+ return _ . get ( C , [ b , c ] , pa ) ;
4440
4444
} , window . OPENSHIFT_CONSTANTS . DISABLE_OVERVIEW_METRICS || ( o . isAvailable ( ! 0 ) . then ( function ( a ) {
4441
4445
c . showMetrics = a ;
4442
4446
} ) , c . $on ( "metrics-connection-failed" , function ( a , b ) {
@@ -4457,64 +4461,64 @@ return d.permanentlyHideAlert("metrics-connection-failed"), !0;
4457
4461
} ]
4458
4462
} ) ;
4459
4463
} ) ) ;
4460
- var pa = a ( "isIE" ) ( ) || a ( "isEdge" ) ( ) ;
4464
+ var qa = a ( "isIE" ) ( ) || a ( "isEdge" ) ( ) ;
4461
4465
k . get ( b . project ) . then ( _ . spread ( function ( a , b ) {
4462
4466
c . project = a , c . projectContext = b , D . push ( f . watch ( "pods" , b , function ( a ) {
4463
- y = a . by ( "metadata.name" ) , aa ( ) , ma ( ) , i . log ( "pods" , y ) ;
4467
+ y = a . by ( "metadata.name" ) , aa ( ) , na ( ) , i . log ( "pods" , y ) ;
4464
4468
} ) ) , D . push ( f . watch ( "services" , b , function ( a ) {
4465
- c . services = r = a . by ( "metadata.name" ) , ga ( ) , aa ( ) , P ( ) , U ( ) , T ( ) , V ( ) , Y ( ) , ha ( ) , ma ( ) , i . log ( "services (subscribe)" , r ) ;
4469
+ c . services = r = a . by ( "metadata.name" ) , ga ( ) , aa ( ) , P ( ) , U ( ) , T ( ) , V ( ) , Y ( ) , ha ( ) , na ( ) , i . log ( "services (subscribe)" , r ) ;
4466
4470
} , {
4467
- poll :pa ,
4471
+ poll :qa ,
4468
4472
pollInterval :6e4
4469
4473
} ) ) , D . push ( f . watch ( "builds" , b , function ( a ) {
4470
- A = a . by ( "metadata.name" ) , la ( ) , ma ( ) , i . log ( "builds (subscribe)" , A ) ;
4474
+ A = a . by ( "metadata.name" ) , ma ( ) , na ( ) , i . log ( "builds (subscribe)" , A ) ;
4471
4475
} ) ) , D . push ( f . watch ( "buildConfigs" , b , function ( a ) {
4472
- z = a . by ( "metadata.name" ) , la ( ) , i . log ( "builds (subscribe)" , A ) ;
4476
+ z = a . by ( "metadata.name" ) , ma ( ) , i . log ( "builds (subscribe)" , A ) ;
4473
4477
} , {
4474
- poll :pa ,
4478
+ poll :qa ,
4475
4479
pollInterval :6e4
4476
4480
} ) ) , D . push ( f . watch ( "routes" , b , function ( a ) {
4477
4481
q = a . by ( "metadata.name" ) , O ( ) , ga ( ) , ha ( ) , i . log ( "routes (subscribe)" , c . routesByService ) ;
4478
4482
} , {
4479
- poll :pa ,
4483
+ poll :qa ,
4480
4484
pollInterval :6e4
4481
4485
} ) ) , D . push ( f . watch ( "replicationcontrollers" , b , function ( a ) {
4482
- c . replicationControllersByName = u = a . by ( "metadata.name" ) , U ( ) , T ( ) , aa ( ) , la ( ) , ma ( ) , i . log ( "replicationcontrollers (subscribe)" , u ) ;
4486
+ c . replicationControllersByName = u = a . by ( "metadata.name" ) , U ( ) , T ( ) , aa ( ) , ma ( ) , na ( ) , i . log ( "replicationcontrollers (subscribe)" , u ) ;
4483
4487
} ) ) , D . push ( f . watch ( "deploymentconfigs" , b , function ( a ) {
4484
- t = a . by ( "metadata.name" ) , P ( ) , T ( ) , ma ( ) , i . log ( "deploymentconfigs (subscribe)" , t ) ;
4488
+ t = a . by ( "metadata.name" ) , P ( ) , T ( ) , na ( ) , i . log ( "deploymentconfigs (subscribe)" , t ) ;
4485
4489
} ) ) , D . push ( f . watch ( {
4486
4490
group :"extensions" ,
4487
4491
resource :"replicasets"
4488
4492
} , b , function ( a ) {
4489
- w = a . by ( "metadata.name" ) , aa ( ) , V ( ) , X ( ) , ma ( ) , i . log ( "replicasets (subscribe)" , w ) ;
4493
+ w = a . by ( "metadata.name" ) , aa ( ) , V ( ) , X ( ) , na ( ) , i . log ( "replicasets (subscribe)" , w ) ;
4490
4494
} ) ) , D . push ( f . watch ( {
4491
4495
group :"apps" ,
4492
4496
resource :"petsets"
4493
4497
} , b , function ( a ) {
4494
- x = a . by ( "metadata.name" ) , aa ( ) , Y ( ) , ma ( ) , i . log ( "petsets (subscribe)" , x ) ;
4498
+ x = a . by ( "metadata.name" ) , aa ( ) , Y ( ) , na ( ) , i . log ( "petsets (subscribe)" , x ) ;
4495
4499
} , {
4496
- poll :pa ,
4500
+ poll :qa ,
4497
4501
pollInterval :6e4
4498
4502
} ) ) , D . push ( f . watch ( {
4499
4503
group :"extensions" ,
4500
4504
resource :"deployments"
4501
4505
} , b , function ( a ) {
4502
- s = a . by ( "metadata.name" ) , Q ( ) , X ( ) , ma ( ) , i . log ( "deployments (subscribe)" , s ) ;
4506
+ s = a . by ( "metadata.name" ) , Q ( ) , X ( ) , na ( ) , i . log ( "deployments (subscribe)" , s ) ;
4503
4507
} ) ) , D . push ( f . watch ( {
4504
4508
group :"extensions" ,
4505
4509
resource :"horizontalpodautoscalers"
4506
4510
} , b , function ( a ) {
4507
4511
B = a . by ( "metadata.name" ) , Z ( ) ;
4508
4512
} , {
4509
- poll :pa ,
4513
+ poll :qa ,
4510
4514
pollInterval :6e4
4511
4515
} ) ) , D . push ( f . watch ( "resourcequotas" , b , function ( a ) {
4512
- c . quotas = a . by ( "metadata.name" ) , na ( ) ;
4516
+ c . quotas = a . by ( "metadata.name" ) , oa ( ) ;
4513
4517
} , {
4514
4518
poll :! 0 ,
4515
4519
pollInterval :6e4
4516
4520
} ) ) , D . push ( f . watch ( "appliedclusterresourcequotas" , b , function ( a ) {
4517
- c . clusterQuotas = a . by ( "metadata.name" ) , na ( ) ;
4521
+ c . clusterQuotas = a . by ( "metadata.name" ) , oa ( ) ;
4518
4522
} , {
4519
4523
poll :! 0 ,
4520
4524
pollInterval :6e4
@@ -12536,72 +12540,82 @@ restrict:"E",
12536
12540
scope :! 0 ,
12537
12541
templateUrl :"views/overview/_set.html"
12538
12542
} ;
12539
- } ) , angular . module ( "openshiftConsole" ) . directive ( "overviewDeploymentConfig" , [ "$filter" , "$uibModal" , "DeploymentsService" , "Navigate" , function ( a , b , c , d ) {
12543
+ } ) , angular . module ( "openshiftConsole" ) . directive ( "overviewDeploymentConfig" , [ "$filter" , "$uibModal" , "BuildsService" , " DeploymentsService", "Navigate" , function ( a , b , c , d , e ) {
12540
12544
return {
12541
12545
restrict :"E" ,
12542
12546
scope :! 0 ,
12543
12547
templateUrl :"views/overview/_dc.html" ,
12544
- link :function ( e ) {
12545
- var f = a ( "orderObjectsByDate" ) , g = a ( "deploymentIsInProgress" ) ;
12546
- e . $watch ( "scalableReplicationControllerByDC" , function ( ) {
12547
- var a = _ . get ( e , "deploymentConfig.metadata.name" ) ;
12548
- e . activeReplicationController = _ . get ( e , [ "scalableReplicationControllerByDC" , a ] ) ;
12549
- } ) , e . $watch ( "visibleRCByDC" , function ( a ) {
12550
- var b = _ . get ( e , "deploymentConfig.metadata.name" ) , c = _ . get ( a , [ b ] , [ ] ) ;
12551
- e . orderedReplicationControllers = f ( c , ! 0 ) , e . inProgressDeployment = _ . find ( e . orderedReplicationControllers , g ) ;
12552
- } ) , e . $watch ( "deploymentConfig" , function ( a ) {
12548
+ link :function ( f ) {
12549
+ var g = a ( "orderObjectsByDate" ) , h = a ( "deploymentIsInProgress" ) ;
12550
+ f . $watch ( "scalableReplicationControllerByDC" , function ( ) {
12551
+ var a = _ . get ( f , "deploymentConfig.metadata.name" ) ;
12552
+ f . activeReplicationController = _ . get ( f , [ "scalableReplicationControllerByDC" , a ] ) ;
12553
+ } ) , f . $watch ( "visibleRCByDC" , function ( a ) {
12554
+ var b = _ . get ( f , "deploymentConfig.metadata.name" ) , c = _ . get ( a , [ b ] , [ ] ) ;
12555
+ f . orderedReplicationControllers = g ( c , ! 0 ) , f . inProgressDeployment = _ . find ( f . orderedReplicationControllers , h ) ;
12556
+ } ) , f . $watch ( "deploymentConfig" , function ( a ) {
12553
12557
var b = _ . get ( a , "spec.triggers" , [ ] ) ;
12554
- e . imageChangeTriggers = _ . filter ( b , function ( a ) {
12558
+ f . imageChangeTriggers = _ . filter ( b , function ( a ) {
12555
12559
return "ImageChange" === a . type && _ . get ( a , "imageChangeParams.automatic" ) ;
12556
12560
} ) ;
12557
- } ) , e . urlForImageChangeTrigger = function ( b ) {
12558
- var c = a ( "stripTag" ) ( _ . get ( b , "imageChangeParams.from.name" ) ) , f = _ . get ( b , "imageChangeParams.from.namespace" , e . deploymentConfig . metadata . namespace ) ;
12559
- return d . resourceURL ( c , "ImageStream" , f ) ;
12560
- } , e . startDeployment = function ( ) {
12561
- c . startLatestDeployment ( e . deploymentConfig , {
12562
- namespace :e . deploymentConfig . metadata . namespace
12563
- } , e ) ;
12561
+ } ) , f . urlForImageChangeTrigger = function ( b ) {
12562
+ var c = a ( "stripTag" ) ( _ . get ( b , "imageChangeParams.from.name" ) ) , d = _ . get ( b , "imageChangeParams.from.namespace" , f . deploymentConfig . metadata . namespace ) ;
12563
+ return e . resourceURL ( c , "ImageStream" , d ) ;
12564
+ } , f . startPipeline = function ( b ) {
12565
+ c . startBuild ( b . metadata . name , {
12566
+ namespace :b . metadata . namespace
12567
+ } ) . then ( _ . noop , function ( b ) {
12568
+ f . alerts [ "start-pipeline" ] = {
12569
+ type :"error" ,
12570
+ message :"An error occurred while starting the pipeline." ,
12571
+ details :a ( "getErrorDetails" ) ( b )
12564
12572
} ;
12565
- var h ;
12566
- e . $watch ( "deploymentConfig.spec.paused" , function ( ) {
12567
- h = ! 1 ;
12568
- } ) , e . resumeDeployment = function ( ) {
12569
- h || ( h = ! 0 , c . setPaused ( e . deploymentConfig , ! 1 , {
12570
- namespace :e . deploymentConfig . metadata . namespace
12573
+ } ) ;
12574
+ } , f . startDeployment = function ( ) {
12575
+ d . startLatestDeployment ( f . deploymentConfig , {
12576
+ namespace :f . deploymentConfig . metadata . namespace
12577
+ } , f ) ;
12578
+ } ;
12579
+ var i ;
12580
+ f . $watch ( "deploymentConfig.spec.paused" , function ( ) {
12581
+ i = ! 1 ;
12582
+ } ) , f . resumeDeployment = function ( ) {
12583
+ i || ( i = ! 0 , d . setPaused ( f . deploymentConfig , ! 1 , {
12584
+ namespace :f . deploymentConfig . metadata . namespace
12571
12585
} ) . then ( _ . noop , function ( b ) {
12572
- h = ! 1 , e . alerts [ "resume-deployment" ] = {
12586
+ i = ! 1 , f . alerts [ "resume-deployment" ] = {
12573
12587
type :"error" ,
12574
12588
message :"An error occurred resuming the deployment." ,
12575
12589
details :a ( "getErrorDetails" ) ( b )
12576
12590
} ;
12577
12591
} ) ) ;
12578
- } , e . cancelDeployment = function ( ) {
12579
- var a = e . inProgressDeployment ;
12592
+ } , f . cancelDeployment = function ( ) {
12593
+ var a = f . inProgressDeployment ;
12580
12594
if ( a ) {
12581
- var d = a . metadata . name , f = _ . get ( e , "deploymentConfig.status.latestVersion" ) , h = b . open ( {
12595
+ var c = a . metadata . name , e = _ . get ( f , "deploymentConfig.status.latestVersion" ) , g = b . open ( {
12582
12596
animation :! 0 ,
12583
12597
templateUrl :"views/modals/confirm.html" ,
12584
12598
controller :"ConfirmModalController" ,
12585
12599
resolve :{
12586
12600
modalConfig :function ( ) {
12587
12601
return {
12588
- message :"Cancel deployment " + d + "?" ,
12589
- details :f ? "This will attempt to stop the in-progress deployment and rollback to the previous deployment, #" + f + ". It may take some time to complete." :"This will attempt to stop the in-progress deployment and may take some time to complete." ,
12602
+ message :"Cancel deployment " + c + "?" ,
12603
+ details :e ? "This will attempt to stop the in-progress deployment and rollback to the previous deployment, #" + e + ". It may take some time to complete." :"This will attempt to stop the in-progress deployment and may take some time to complete." ,
12590
12604
okButtonText :"Yes, cancel" ,
12591
12605
okButtonClass :"btn-danger" ,
12592
12606
cancelButtonText :"No, don't cancel"
12593
12607
} ;
12594
12608
}
12595
12609
}
12596
12610
} ) ;
12597
- h . result . then ( function ( ) {
12598
- var a = _ . get ( e , [ "replicationControllersByName" , d ] ) ;
12599
- return a ? g ( a ) ? void c . cancelRunningDeployment ( a , e . projectContext , e ) :void ( e . alerts [ "cancel-deployment" ] = {
12611
+ g . result . then ( function ( ) {
12612
+ var a = _ . get ( f , [ "replicationControllersByName" , c ] ) ;
12613
+ return a ? h ( a ) ? void d . cancelRunningDeployment ( a , f . projectContext , f ) :void ( f . alerts [ "cancel-deployment" ] = {
12600
12614
type :"error" ,
12601
- message :"Deployment " + d + " is no longer in progress."
12602
- } ) :void ( e . alerts [ "cancel-deployment" ] = {
12615
+ message :"Deployment " + c + " is no longer in progress."
12616
+ } ) :void ( f . alerts [ "cancel-deployment" ] = {
12603
12617
type :"error" ,
12604
- message :"Deployment " + d + " no longer exists."
12618
+ message :"Deployment " + c + " no longer exists."
12605
12619
} ) ;
12606
12620
} ) ;
12607
12621
}
0 commit comments