@@ -13861,69 +13861,70 @@ u(), d();
13861
13861
angular . module ( "openshiftConsole" ) . component ( "notificationDrawerWrapper" , {
13862
13862
templateUrl : "views/directives/notifications/notification-drawer-wrapper.html" ,
13863
13863
controller : [ "$filter" , "$interval" , "$location" , "$timeout" , "$routeParams" , "$rootScope" , "Constants" , "DataService" , "NotificationsService" , "EventsService" , function ( e , t , n , a , r , o , i , s , c , l ) {
13864
- var u , d , m = _ . get ( i , "DISABLE_GLOBAL_EVENT_WATCH" ) , p = e ( "isIE" ) ( ) || e ( "isEdge" ) ( ) , g = this , f = [ ] , h = { } , v = { } , y = [ ] , b = { } , C = function ( e ) {
13864
+ var u , d , m = _ . get ( i , "DISABLE_GLOBAL_EVENT_WATCH" ) , p = e ( "isIE" ) ( ) || e ( "isEdge" ) ( ) , g = this , f = [ ] , h = { } , v = [ ] , y = { } , b = function ( e ) {
13865
13865
return s . get ( "projects" , e , { } , {
13866
13866
errorNotification : ! 1
13867
13867
} ) . then ( function ( e ) {
13868
- return b [ e . metadata . name ] = e , e ;
13868
+ return y [ e . metadata . name ] = e , e ;
13869
13869
} ) ;
13870
- } , S = function ( t , n ) {
13870
+ } , C = function ( t , n ) {
13871
13871
n && ! t [ n ] && ( t [ n ] = {
13872
- heading : e ( "displayName" ) ( b [ n ] ) || n ,
13873
- project : b [ n ] ,
13872
+ heading : e ( "displayName" ) ( y [ n ] ) || n ,
13873
+ project : y [ n ] ,
13874
13874
notifications : [ ]
13875
13875
} ) ;
13876
- } , w = function ( ) {
13876
+ } , S = function ( ) {
13877
13877
d && s . unwatch ( d ) ;
13878
- } , k = function ( e , t ) {
13879
- w ( ) , e && ( d = s . watch ( "events" , {
13878
+ } , w = function ( e , t ) {
13879
+ S ( ) , e && ( d = s . watch ( "events" , {
13880
13880
namespace : e
13881
13881
} , _ . debounce ( t , 400 ) , {
13882
13882
skipDigest : ! 0
13883
13883
} ) ) ;
13884
- } , j = function ( ) {
13884
+ } , k = function ( ) {
13885
13885
u && u ( ) , u = null ;
13886
- } , P = function ( e ) {
13886
+ } , j = function ( e ) {
13887
13887
return _ . filter ( e , "unread" ) ;
13888
- } , R = function ( e ) {
13888
+ } , P = function ( e ) {
13889
13889
o . $applyAsync ( function ( ) {
13890
- e . totalUnread = P ( e . notifications ) . length , e . hasUnread = ! ! e . totalUnread , o . $emit ( "NotificationDrawerWrapper.count" , e . totalUnread ) ;
13890
+ e . totalUnread = j ( e . notifications ) . length , e . hasUnread = ! ! e . totalUnread , o . $emit ( "NotificationDrawerWrapper.count" , e . totalUnread ) ;
13891
13891
} ) ;
13892
- } , E = function ( ) {
13893
- _ . each ( y , R ) ;
13894
- } , T = function ( e ) {
13892
+ } , R = function ( ) {
13893
+ _ . each ( v , P ) ;
13894
+ } , E = function ( e ) {
13895
13895
return _ . orderBy ( e , [ "event.lastTimestamp" , "event.firstTimestamp" ] , [ "desc" , "desc" ] ) ;
13896
- } , I = function ( e ) {
13896
+ } , T = function ( e ) {
13897
13897
var t = _ . sortBy ( e , function ( e ) {
13898
13898
return e . heading ;
13899
13899
} ) ;
13900
13900
return _ . each ( t , function ( e ) {
13901
- e . notifications = T ( e . notifications ) , e . counts = R ( e ) ;
13901
+ e . notifications = E ( e . notifications ) , e . counts = P ( e ) ;
13902
13902
} ) , t ;
13903
- } , N = function ( e ) {
13903
+ } , I = function ( e ) {
13904
13904
var t = { } ;
13905
- return S ( t , r . project ) , _ . each ( e , function ( e ) {
13906
- l . isImportantEvent ( e ) && ! l . isCleared ( e ) && ( S ( t , e . metadata . namespace ) , t [ e . metadata . namespace ] . notifications . push ( {
13905
+ return C ( t , r . project ) , _ . each ( e , function ( e ) {
13906
+ l . isImportantEvent ( e ) && ! l . isCleared ( e ) && ( C ( t , e . metadata . namespace ) , t [ e . metadata . namespace ] . notifications . push ( {
13907
13907
unread : ! l . isRead ( e ) ,
13908
+ uid : e . metadata . uid ,
13908
13909
event : e ,
13909
13910
actions : null
13910
13911
} ) ) ;
13911
13912
} ) , t ;
13912
- } , D = function ( ) {
13913
+ } , N = function ( ) {
13913
13914
_ . each ( f , function ( e ) {
13914
13915
e ( ) ;
13915
13916
} ) , f = [ ] ;
13916
- } , $ = function ( e ) {
13917
+ } , D = function ( e ) {
13917
13918
e || ( g . drawerHidden = ! 0 ) ;
13918
- } , A = function ( ) {
13919
+ } , $ = function ( ) {
13919
13920
o . $evalAsync ( function ( ) {
13920
- E ( ) , g . notificationGroups = _ . filter ( y , function ( e ) {
13921
+ R ( ) , g . notificationGroups = _ . filter ( v , function ( e ) {
13921
13922
return e . project . metadata . name === r . project ;
13922
13923
} ) ;
13923
13924
} ) ;
13924
- } , B = function ( e ) {
13925
- h = e . by ( "metadata.name" ) , v = N ( h ) , y = I ( v ) , A ( ) ;
13926
- } , L = {
13925
+ } , A = function ( e ) {
13926
+ h = I ( e . by ( "metadata.uid" ) ) , v = T ( h ) , $ ( ) ;
13927
+ } , B = {
13927
13928
Normal : "pficon pficon-info" ,
13928
13929
Warning : "pficon pficon-warning-triangle-o"
13929
13930
} ;
@@ -13941,51 +13942,51 @@ g.drawerHidden = !0;
13941
13942
onMarkAllRead : function ( e ) {
13942
13943
_ . each ( e . notifications , function ( e ) {
13943
13944
e . unread = ! 1 , l . markRead ( e . event ) ;
13944
- } ) , A ( ) , o . $emit ( "NotificationDrawerWrapper.onMarkAllRead" ) ;
13945
+ } ) , $ ( ) , o . $emit ( "NotificationDrawerWrapper.onMarkAllRead" ) ;
13945
13946
} ,
13946
13947
onClearAll : function ( e ) {
13947
13948
_ . each ( e . notifications , function ( e ) {
13948
13949
l . markRead ( e . event ) , l . markCleared ( e . event ) ;
13949
- } ) , e . notifications = [ ] , A ( ) , o . $emit ( "NotificationDrawerWrapper.onMarkAllRead" ) ;
13950
+ } ) , e . notifications = [ ] , $ ( ) , o . $emit ( "NotificationDrawerWrapper.onMarkAllRead" ) ;
13950
13951
} ,
13951
- notificationGroups : y ,
13952
+ notificationGroups : v ,
13952
13953
headingInclude : "views/directives/notifications/header.html" ,
13953
13954
notificationBodyInclude : "views/directives/notifications/notification-body.html" ,
13954
13955
customScope : {
13955
13956
clear : function ( e , t , n ) {
13956
- l . markCleared ( e . event ) , n . notifications . splice ( t , 1 ) , E ( ) ;
13957
+ l . markCleared ( e . event ) , n . notifications . splice ( t , 1 ) , R ( ) ;
13957
13958
} ,
13958
13959
markRead : function ( e ) {
13959
- e . unread = ! 1 , l . markRead ( e . event ) , E ( ) ;
13960
+ e . unread = ! 1 , l . markRead ( e . event ) , R ( ) ;
13960
13961
} ,
13961
13962
getNotficationStatusIconClass : function ( e ) {
13962
- return L [ e . type ] || L . info ;
13963
+ return B [ e . type ] || B . info ;
13963
13964
} ,
13964
13965
getStatusForCount : function ( e ) {
13965
- return L [ e ] || L . info ;
13966
+ return B [ e ] || B . info ;
13966
13967
} ,
13967
13968
close : function ( ) {
13968
13969
g . drawerHidden = ! 0 ;
13969
13970
}
13970
13971
}
13971
13972
} ) ;
13972
- var U = function ( e , t ) {
13973
+ var L = function ( e , t ) {
13973
13974
return _ . get ( e , "params.project" ) !== _ . get ( t , "params.project" ) ;
13974
- } , O = function ( ) {
13975
- C ( r . project ) . then ( function ( ) {
13976
- k ( r . project , B ) , $ ( r . project ) , A ( ) ;
13975
+ } , U = function ( ) {
13976
+ b ( r . project ) . then ( function ( ) {
13977
+ w ( r . project , A ) , D ( r . project ) , $ ( ) ;
13977
13978
} ) ;
13978
- } , x = function ( ) {
13979
- r . project && O ( ) , f . push ( o . $on ( "$routeChangeSuccess" , function ( e , t , n ) {
13980
- U ( t , n ) && ( g . customScope . projectName = r . project , O ( ) ) ;
13979
+ } , O = function ( ) {
13980
+ r . project && U ( ) , f . push ( o . $on ( "$routeChangeSuccess" , function ( e , t , n ) {
13981
+ L ( t , n ) && ( g . customScope . projectName = r . project , U ( ) ) ;
13981
13982
} ) ) , f . push ( o . $on ( "NotificationDrawerWrapper.toggle" , function ( ) {
13982
13983
g . drawerHidden = ! g . drawerHidden ;
13983
13984
} ) ) ;
13984
13985
} ;
13985
13986
g . $onInit = function ( ) {
13986
- m || p || x ( ) ;
13987
+ m || p || O ( ) ;
13987
13988
} , g . $onDestroy = function ( ) {
13988
- j ( ) , w ( ) , D ( ) ;
13989
+ k ( ) , S ( ) , N ( ) ;
13989
13990
} ;
13990
13991
} ]
13991
13992
} ) ;
0 commit comments