@@ -6940,47 +6940,53 @@ details:b("getErrorDetails")(c)
6940
6940
} , a . $on ( "$destroy" , function ( ) {
6941
6941
h . unwatchAll ( q ) ;
6942
6942
} ) ;
6943
- } ] ) , angular . module ( "openshiftConsole" ) . controller ( "EditConfigMapController" , [ "$filter" , "$routeParams" , "$scope" , "$window" , "DataService" , "BreadcrumbsService" , "Navigate" , "ProjectsService" , function ( a , b , c , d , e , f , g , h ) {
6944
- var i = [ ] ;
6945
- c . alerts = { } , c . forms = { } , c . projectName = b . project , c . breadcrumbs = f . getBreadcrumbs ( {
6943
+ } ] ) , angular . module ( "openshiftConsole" ) . controller ( "EditConfigMapController" , [ "$filter" , "$routeParams" , "$scope" , "$window" , "DataService" , "BreadcrumbsService" , "Navigate" , "NotificationsService" , " ProjectsService", function ( a , b , c , d , e , f , g , h , i ) {
6944
+ var j = [ ] ;
6945
+ c . forms = { } , c . projectName = b . project , c . breadcrumbs = f . getBreadcrumbs ( {
6946
6946
name :b . configMap ,
6947
6947
kind :"ConfigMap" ,
6948
6948
namespace :b . project ,
6949
6949
includeProject :! 0 ,
6950
6950
subpage :"Edit Config Map"
6951
6951
} ) ;
6952
- var j = function ( a ) {
6952
+ var k = function ( a ) {
6953
6953
return _ . get ( a , "metadata.resourceVersion" ) ;
6954
+ } , l = function ( ) {
6955
+ h . hideNotification ( "edit-config-map-error" ) ;
6956
+ } , m = function ( ) {
6957
+ d . history . back ( ) ;
6954
6958
} ;
6955
- h . get ( b . project ) . then ( _ . spread ( function ( g , h ) {
6956
- e . get ( "configmaps" , b . configMap , h ) . then ( function ( a ) {
6959
+ c . cancel = function ( ) {
6960
+ l ( ) , m ( ) ;
6961
+ } , i . get ( b . project ) . then ( _ . spread ( function ( d , i ) {
6962
+ e . get ( "configmaps" , b . configMap , i ) . then ( function ( a ) {
6957
6963
c . loaded = ! 0 , c . breadcrumbs = f . getBreadcrumbs ( {
6958
6964
name :b . configMap ,
6959
6965
object :a ,
6960
6966
includeProject :! 0 ,
6961
- project :g ,
6967
+ project :d ,
6962
6968
subpage :"Edit Config Map"
6963
- } ) , c . configMap = a , i . push ( e . watchObject ( "configmaps" , b . configMap , h , function ( a , b ) {
6964
- c . resourceChanged = j ( a ) !== j ( c . configMap ) , c . resourceDeleted = "DELETED" === b ;
6969
+ } ) , c . configMap = a , j . push ( e . watchObject ( "configmaps" , b . configMap , i , function ( a , b ) {
6970
+ c . resourceChanged = k ( a ) !== k ( c . configMap ) , c . resourceDeleted = "DELETED" === b ;
6965
6971
} ) ) ;
6966
- } , function ( b ) {
6967
- c . loaded = ! 0 , c . alerts . load = {
6968
- type :"error" ,
6969
- message :"The config map details could not be loaded." ,
6970
- details :a ( "getErrorDetails" ) ( b )
6971
- } ;
6972
+ } , function ( c ) {
6973
+ g . toErrorPage ( "Could not load config map " + b . configMap + ". " + a ( "getErrorDetails" ) ( c ) ) ;
6972
6974
} ) , c . updateConfigMap = function ( ) {
6973
- c . forms . editConfigMapForm . $valid && ( c . disableInputs = ! 0 , e . update ( "configmaps" , c . configMap . metadata . name , c . configMap , h ) . then ( function ( ) {
6974
- d . history . back ( ) ;
6975
+ c . forms . editConfigMapForm . $valid && ( l ( ) , c . disableInputs = ! 0 , e . update ( "configmaps" , c . configMap . metadata . name , c . configMap , i ) . then ( function ( ) {
6976
+ h . addNotification ( {
6977
+ type :"success" ,
6978
+ message :"Config map " + c . configMap . metadata . name + " successfully updated."
6979
+ } ) , m ( ) ;
6975
6980
} , function ( b ) {
6976
- c . disableInputs = ! 1 , c . alerts [ "create-config-map" ] = {
6981
+ c . disableInputs = ! 1 , h . addNotification ( {
6982
+ id :"edit-config-map-error" ,
6977
6983
type :"error" ,
6978
6984
message :"An error occurred updating the config map." ,
6979
6985
details :a ( "getErrorDetails" ) ( b )
6980
- } ;
6986
+ } ) ;
6981
6987
} ) ) ;
6982
6988
} , c . $on ( "$destroy" , function ( ) {
6983
- e . unwatchAll ( i ) ;
6989
+ e . unwatchAll ( j ) ;
6984
6990
} ) ;
6985
6991
} ) ) ;
6986
6992
} ] ) , angular . module ( "openshiftConsole" ) . controller ( "EditDeploymentConfigController" , [ "$scope" , "$filter" , "$location" , "$routeParams" , "$uibModal" , "$window" , "AuthorizationService" , "BreadcrumbsService" , "DataService" , "EnvironmentService" , "Navigate" , "NotificationsService" , "ProjectsService" , "SecretsService" , "keyValueEditorUtils" , function ( a , b , c , d , e , f , g , h , i , j , k , l , m , n , o ) {
0 commit comments