@@ -12980,26 +12980,26 @@ templateUrl:"views/overview/_builds.html"
12980
12980
function a ( a , b , c , d , e , f , g , h ) {
12981
12981
var i = this ;
12982
12982
_ . extend ( i , f . ui ) ;
12983
- var j = a ( "canI" ) , k = a ( "deploymentIsInProgress" ) , l = a ( "isBinaryBuild" ) , m = function ( a ) {
12983
+ var j = a ( "canI" ) , k = a ( "deploymentIsInProgress" ) , l = a ( "isBinaryBuild" ) , m = a ( "enableTechPreviewFeature" ) , n = function ( a ) {
12984
12984
var b = _ . get ( a , "spec.triggers" ) ;
12985
12985
_ . isEmpty ( b ) || ( i . imageChangeTriggers = _ . filter ( b , function ( a ) {
12986
12986
return "ImageChange" === a . type && _ . get ( a , "imageChangeParams.automatic" ) ;
12987
12987
} ) ) ;
12988
- } , n = function ( a ) {
12989
- a && ! i . current && "DeploymentConfig" !== a . kind && "Deployment" !== a . kind && ( i . current = a ) ;
12990
12988
} , o = function ( a ) {
12991
- i . rgv = c . objectToResourceGroupVersion ( a ) , n ( a ) , m ( a ) ;
12989
+ a && ! i . current && "DeploymentConfig" !== a . kind && "Deployment" !== a . kind && ( i . current = a ) ;
12990
+ } , p = function ( a ) {
12991
+ i . rgv = c . objectToResourceGroupVersion ( a ) , o ( a ) , n ( a ) ;
12992
12992
} ;
12993
12993
i . $onChanges = function ( a ) {
12994
- a . apiObject && o ( a . apiObject . currentValue ) ;
12994
+ a . apiObject && p ( a . apiObject . currentValue ) ;
12995
12995
} ;
12996
- var p = [ ] , q = function ( a ) {
12996
+ var q = [ ] , r = function ( a ) {
12997
12997
if ( ! i . state . hpaByResource ) return null ;
12998
12998
var b = _ . get ( a , "kind" ) , c = _ . get ( a , "metadata.name" ) ;
12999
- return _ . get ( i . state . hpaByResource , [ b , c ] , p ) ;
12999
+ return _ . get ( i . state . hpaByResource , [ b , c ] , q ) ;
13000
13000
} ;
13001
13001
i . $doCheck = function ( ) {
13002
- i . notifications = f . getNotifications ( i . apiObject , i . state ) , i . hpa = q ( i . apiObject ) , i . current && _ . isEmpty ( i . hpa ) && ( i . hpa = q ( i . current ) ) ;
13002
+ i . notifications = f . getNotifications ( i . apiObject , i . state ) , i . hpa = r ( i . apiObject ) , i . current && _ . isEmpty ( i . hpa ) && ( i . hpa = r ( i . current ) ) ;
13003
13003
var a = _ . get ( i , "apiObject.metadata.uid" ) ;
13004
13004
a && ( i . services = _ . get ( i , [ "state" , "servicesByObjectUID" , a ] ) , i . buildConfigs = _ . get ( i , [ "state" , "buildConfigsByObjectUID" , a ] ) , i . bindings = _ . get ( i , [ "state" , "bindingsByApplicationUID" , a ] ) ) ;
13005
13005
var b , c = _ . get ( i , "apiObject.kind" ) ;
@@ -13015,16 +13015,28 @@ return !!_.isEmpty(i.hpa) && !i.isDeploymentInProgress();
13015
13015
} , i . isDeploymentInProgress = function ( ) {
13016
13016
return ! ( ! i . current || ! i . previous ) || k ( i . current ) ;
13017
13017
} , i . canIDoAny = function ( ) {
13018
- var a = _ . get ( i , "apiObject.kind" ) ;
13018
+ var a = _ . get ( i , "apiObject.kind" ) , b = _ . get ( i , "apiObject.metadata.uid" ) , c = _ . get ( i . state . deleteableBindingsByApplicationUID , b ) ;
13019
13019
switch ( a ) {
13020
13020
case "DeploymentConfig" :
13021
- return ! ! j ( "deploymentconfigs/instantiate" , "create" ) || ( ! ! j ( "deploymentconfigs" , "update" ) || ( ! ( ! i . current || ! j ( "deploymentconfigs/log" , "get" ) ) || ( i . showStartPipelineAction ( ) || i . showStartBuildAction ( ) ) ) ) ;
13021
+ return ! ! j ( "deploymentconfigs/instantiate" , "create" ) || ( ! ! j ( "deploymentconfigs" , "update" ) || ( ! ( ! i . current || ! j ( "deploymentconfigs/log" , "get" ) ) || ( ! ( ! m ( "pod_presets" ) || _ . isEmpty ( i . state . bindableServiceInstances ) || ! j ( {
13022
+ resource :"bindings" ,
13023
+ group :"servicecatalog.k8s.io"
13024
+ } , "create" ) ) || ( ! ( ! m ( "pod_presets" ) || _ . isEmpty ( c ) || ! j ( {
13025
+ resource :"bindings" ,
13026
+ group :"servicecatalog.k8s.io"
13027
+ } , "delete" ) ) || ( i . showStartPipelineAction ( ) || i . showStartBuildAction ( ) ) ) ) ) ) ;
13022
13028
13023
13029
case "Pod" :
13024
13030
return ! ! j ( "pods/log" , "get" ) || ! ! j ( "pods" , "update" ) ;
13025
13031
13026
13032
default :
13027
- return ! ( ! i . firstPod ( i . current ) || ! j ( "pods/log" , "get" ) ) || ! ! j ( i . rgv , "update" ) ;
13033
+ return ! ( ! i . firstPod ( i . current ) || ! j ( "pods/log" , "get" ) ) || ( ! ! j ( i . rgv , "update" ) || ( ! ( ! m ( "pod_presets" ) || _ . isEmpty ( i . state . bindableServiceInstances ) || ! j ( {
13034
+ resource :"bindings" ,
13035
+ group :"servicecatalog.k8s.io"
13036
+ } , "create" ) ) || ! ( ! m ( "pod_presets" ) || _ . isEmpty ( c ) || ! j ( {
13037
+ resource :"bindings" ,
13038
+ group :"servicecatalog.k8s.io"
13039
+ } , "delete" ) ) ) ) ;
13028
13040
}
13029
13041
} , i . showStartBuildAction = function ( ) {
13030
13042
if ( ! _ . isEmpty ( i . pipelines ) ) return ! 1 ;
@@ -13100,29 +13112,40 @@ hidePipelines:"<"
13100
13112
templateUrl :"views/overview/_list-row.html"
13101
13113
} ) ;
13102
13114
} ( ) , function ( ) {
13103
- function a ( a , b , c , d , e , f ) {
13104
- var g = this ;
13105
- _ . extend ( g , e . ui ) ;
13106
- var h = a ( "getErrorDetails" ) , i = a ( "serviceInstanceDisplayName" ) , j = function ( ) {
13107
- var a = g . apiObject . spec . serviceClassName ;
13108
- return _ . get ( g , [ "state" , "serviceClasses" , a , "description" ] ) ;
13109
- } ;
13110
- g . $doCheck = function ( ) {
13111
- g . notifications = e . getNotifications ( g . apiObject , g . state ) , g . displayName = i ( g . apiObject , g . serviceClasses ) , g . description = j ( ) ;
13112
- } , g . $onChanges = function ( a ) {
13113
- a . bindings && ( g . deleteableBindings = _ . reject ( g . bindings , "metadata.deletionTimestamp" ) ) ;
13114
- } , g . getSecretForBinding = function ( a ) {
13115
- return a && _ . get ( g , [ "state" , "secrets" , a . spec . secretName ] ) ;
13116
- } , g . isBindable = d . isServiceBindable ( g . apiObject , g . state . serviceClasses ) , g . closeOverlayPanel = function ( ) {
13117
- _ . set ( g , "overlay.panelVisible" , ! 1 ) ;
13118
- } , g . showOverlayPanel = function ( a , b ) {
13119
- _ . set ( g , "overlay.panelVisible" , ! 0 ) , _ . set ( g , "overlay.panelName" , a ) , _ . set ( g , "overlay.state" , b ) ;
13120
- } , g . deprovision = function ( ) {
13115
+ function a ( a , b , c , d , e , f , g ) {
13116
+ var h = this ;
13117
+ _ . extend ( h , e . ui ) ;
13118
+ var i = a ( "getErrorDetails" ) , j = a ( "serviceInstanceDisplayName" ) , k = function ( ) {
13119
+ var a = h . apiObject . spec . serviceClassName ;
13120
+ return _ . get ( h , [ "state" , "serviceClasses" , a , "description" ] ) ;
13121
+ } ;
13122
+ h . $doCheck = function ( ) {
13123
+ h . notifications = e . getNotifications ( h . apiObject , h . state ) , h . displayName = j ( h . apiObject , h . serviceClasses ) , h . description = k ( ) ;
13124
+ } , h . $onChanges = function ( a ) {
13125
+ a . bindings && ( h . deleteableBindings = _ . reject ( h . bindings , "metadata.deletionTimestamp" ) ) ;
13126
+ } , h . getSecretForBinding = function ( a ) {
13127
+ return a && _ . get ( h , [ "state" , "secrets" , a . spec . secretName ] ) ;
13128
+ } , h . isBindable = d . isServiceBindable ( h . apiObject , h . state . serviceClasses ) , h . actionsDropdownVisible = function ( ) {
13129
+ return ! ( ! h . isBindable || ! g . canI ( {
13130
+ resource :"bindings" ,
13131
+ group :"servicecatalog.k8s.io"
13132
+ } , "create" ) ) || ( ! ( _ . isEmpty ( h . deleteableBindings ) || ! g . canI ( {
13133
+ resource :"bindings" ,
13134
+ group :"servicecatalog.k8s.io"
13135
+ } , "delete" ) ) || ! ! g . canI ( {
13136
+ resource :"instances" ,
13137
+ group :"servicecatalog.k8s.io"
13138
+ } , "delete" ) ) ;
13139
+ } , h . closeOverlayPanel = function ( ) {
13140
+ _ . set ( h , "overlay.panelVisible" , ! 1 ) ;
13141
+ } , h . showOverlayPanel = function ( a , b ) {
13142
+ _ . set ( h , "overlay.panelVisible" , ! 0 ) , _ . set ( h , "overlay.panelName" , a ) , _ . set ( h , "overlay.state" , b ) ;
13143
+ } , h . deprovision = function ( ) {
13121
13144
var a = {
13122
13145
alerts :{
13123
13146
deprovision :{
13124
13147
type :"error" ,
13125
- message :"Service '" + g . apiObject . spec . serviceClassName + "' will be deleted and no longer available."
13148
+ message :"Service '" + h . apiObject . spec . serviceClassName + "' will be deleted and no longer available."
13126
13149
}
13127
13150
} ,
13128
13151
detailsMarkup :"Delete Service?" ,
@@ -13143,28 +13166,28 @@ return a;
13143
13166
f . hideNotification ( "deprovision-service-error" ) , c [ "delete" ] ( {
13144
13167
group :"servicecatalog.k8s.io" ,
13145
13168
resource :"instances"
13146
- } , g . apiObject . metadata . name , {
13147
- namespace :g . apiObject . metadata . namespace
13169
+ } , h . apiObject . metadata . name , {
13170
+ namespace :h . apiObject . metadata . namespace
13148
13171
} , {
13149
13172
propagationPolicy :null
13150
13173
} ) . then ( function ( ) {
13151
13174
f . addNotification ( {
13152
13175
type :"success" ,
13153
- message :"Successfully deleted " + g . apiObject . metadata . name + "."
13176
+ message :"Successfully deleted " + h . apiObject . metadata . name + "."
13154
13177
} ) ;
13155
13178
} , function ( a ) {
13156
13179
f . addNotification ( {
13157
13180
id :"deprovision-service-error" ,
13158
13181
type :"error" ,
13159
- message :"An error occurred while deleting " + g . apiObject . metadata . name + "." ,
13160
- details :h ( a )
13182
+ message :"An error occurred while deleting " + h . apiObject . metadata . name + "." ,
13183
+ details :i ( a )
13161
13184
} ) ;
13162
13185
} ) ;
13163
13186
} ) ;
13164
13187
} ;
13165
13188
}
13166
13189
angular . module ( "openshiftConsole" ) . component ( "serviceInstanceRow" , {
13167
- controller :[ "$filter" , "$uibModal" , "DataService" , "BindingService" , "ListRowUtils" , "NotificationsService" , a ] ,
13190
+ controller :[ "$filter" , "$uibModal" , "DataService" , "BindingService" , "ListRowUtils" , "NotificationsService" , "AuthorizationService" , a ] ,
13168
13191
controllerAs :"row" ,
13169
13192
bindings :{
13170
13193
apiObject :"<" ,
0 commit comments