File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
plugins/data-manager/frontend/public/javascripts Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change 455455 } ,
456456 deleteEvents : function ( context , events ) {
457457 countlyDataManager . service . deleteEvents ( events ) . then ( function ( res ) {
458- countlyDataManager . service . deleteEventsMeta ( events ) . then ( function ( res2 ) {
459- if ( res === 'Error' || res2 === 'Error' ) {
460- CountlyHelpers . notify ( { message : CV . i18n ( 'data-manager.error.event-delete' ) , sticky : false , type : 'error' } ) ;
461- return 'Error' ;
462- }
463- context . dispatch ( 'loadEventsData' ) ;
464- context . dispatch ( 'loadSegmentsMap' ) ;
465- CountlyHelpers . notify ( { message : CV . i18n ( 'data-manager.success.event-delete' ) , sticky : false , type : 'success' } ) ;
466- } ) ;
467- } ) . catch ( function ( ) {
468- CountlyHelpers . notify ( { message : CV . i18n ( 'data-manager.error.event-delete' ) , sticky : false , type : 'error' } ) ;
458+ if ( res === 'Error' ) {
459+ CountlyHelpers . notify ( { message : CV . i18n ( 'data-manager.error.event-delete' ) , sticky : false , type : 'error' } ) ;
460+ return 'Error' ;
461+ }
462+ context . dispatch ( 'loadEventsData' ) ;
463+ context . dispatch ( 'loadSegmentsMap' ) ;
464+ CountlyHelpers . notify ( { message : CV . i18n ( 'data-manager.success.event-delete' ) , sticky : false , type : 'success' } ) ;
465+ } ) . catch ( function ( e ) {
466+ if ( e . status === 504 ) {
467+ CountlyHelpers . notify ( { message : CV . i18n ( 'data-manager.error.event-delete-timeout' ) , sticky : false , type : 'warning' } ) ;
468+ }
469+ else {
470+ CountlyHelpers . notify ( { message : CV . i18n ( 'data-manager.error.event-delete' ) , sticky : false , type : 'error' } ) ;
471+ }
469472 } ) ;
470473 } ,
471474 loadCategories : function ( context ) {
You can’t perform that action at this time.
0 commit comments