@@ -350,11 +350,14 @@ angular.module("openshiftConsole")
350
350
DataService . create ( APIService . kindToResource ( resource . kind ) , null , resource , { namespace : $scope . input . selectedProject . metadata . name } ) . then (
351
351
// create resource success
352
352
function ( ) {
353
- var kind = humanizeKind ( resource . kind ) ;
354
- NotificationsService . addNotification ( {
355
- type : "success" ,
356
- message : _ . capitalize ( kind ) + " " + resource . metadata . name + " was successfully created."
357
- } ) ;
353
+ if ( ! $scope . isDialog ) {
354
+ var kind = humanizeKind ( resource . kind ) ;
355
+ NotificationsService . addNotification ( {
356
+ type : "success" ,
357
+ message : _ . capitalize ( kind ) + " " + resource . metadata . name + " was successfully created."
358
+ } ) ;
359
+ }
360
+
358
361
redirect ( ) ;
359
362
} ,
360
363
// create resource failure
@@ -371,11 +374,14 @@ angular.module("openshiftConsole")
371
374
DataService . update ( APIService . kindToResource ( resource . kind ) , resource . metadata . name , resource , { namespace : $scope . input . selectedProject . metadata . name } ) . then (
372
375
// update resource success
373
376
function ( ) {
374
- var kind = humanizeKind ( resource . kind ) ;
375
- NotificationsService . addNotification ( {
376
- type : "success" ,
377
- message : _ . capitalize ( kind ) + " " + resource . metadata . name + " was successfully updated."
378
- } ) ;
377
+ if ( ! $scope . isDialog ) {
378
+ var kind = humanizeKind ( resource . kind ) ;
379
+ NotificationsService . addNotification ( {
380
+ type : "success" ,
381
+ message : _ . capitalize ( kind ) + " " + resource . metadata . name + " was successfully updated."
382
+ } ) ;
383
+ }
384
+
379
385
redirect ( ) ;
380
386
} ,
381
387
// update resource failure
0 commit comments