@@ -13884,69 +13884,70 @@ u(), d();
13884
13884
angular . module ( "openshiftConsole" ) . component ( "notificationDrawerWrapper" , {
13885
13885
templateUrl : "views/directives/notifications/notification-drawer-wrapper.html" ,
13886
13886
controller : [ "$filter" , "$interval" , "$location" , "$timeout" , "$routeParams" , "$rootScope" , "Constants" , "DataService" , "NotificationsService" , "EventsService" , function ( e , t , n , a , r , o , i , s , c , l ) {
13887
- var u , d , m = _ . get ( i , "DISABLE_GLOBAL_EVENT_WATCH" ) , p = e ( "isIE" ) ( ) || e ( "isEdge" ) ( ) , f = this , g = [ ] , h = { } , v = { } , y = [ ] , b = { } , C = function ( e ) {
13887
+ var u , d , m = _ . get ( i , "DISABLE_GLOBAL_EVENT_WATCH" ) , p = e ( "isIE" ) ( ) || e ( "isEdge" ) ( ) , f = this , g = [ ] , h = { } , v = [ ] , y = { } , b = function ( e ) {
13888
13888
return s . get ( "projects" , e , { } , {
13889
13889
errorNotification : ! 1
13890
13890
} ) . then ( function ( e ) {
13891
- return b [ e . metadata . name ] = e , e ;
13891
+ return y [ e . metadata . name ] = e , e ;
13892
13892
} ) ;
13893
- } , S = function ( t , n ) {
13893
+ } , C = function ( t , n ) {
13894
13894
n && ! t [ n ] && ( t [ n ] = {
13895
- heading : e ( "displayName" ) ( b [ n ] ) || n ,
13896
- project : b [ n ] ,
13895
+ heading : e ( "displayName" ) ( y [ n ] ) || n ,
13896
+ project : y [ n ] ,
13897
13897
notifications : [ ]
13898
13898
} ) ;
13899
- } , w = function ( ) {
13899
+ } , S = function ( ) {
13900
13900
d && s . unwatch ( d ) ;
13901
- } , k = function ( e , t ) {
13902
- w ( ) , e && ( d = s . watch ( "events" , {
13901
+ } , w = function ( e , t ) {
13902
+ S ( ) , e && ( d = s . watch ( "events" , {
13903
13903
namespace : e
13904
13904
} , _ . debounce ( t , 400 ) , {
13905
13905
skipDigest : ! 0
13906
13906
} ) ) ;
13907
- } , j = function ( ) {
13907
+ } , k = function ( ) {
13908
13908
u && u ( ) , u = null ;
13909
- } , P = function ( e ) {
13909
+ } , j = function ( e ) {
13910
13910
return _ . filter ( e , "unread" ) ;
13911
- } , R = function ( e ) {
13911
+ } , P = function ( e ) {
13912
13912
o . $applyAsync ( function ( ) {
13913
- e . totalUnread = P ( e . notifications ) . length , e . hasUnread = ! ! e . totalUnread , o . $emit ( "NotificationDrawerWrapper.count" , e . totalUnread ) ;
13913
+ e . totalUnread = j ( e . notifications ) . length , e . hasUnread = ! ! e . totalUnread , o . $emit ( "NotificationDrawerWrapper.count" , e . totalUnread ) ;
13914
13914
} ) ;
13915
- } , E = function ( ) {
13916
- _ . each ( y , R ) ;
13917
- } , T = function ( e ) {
13915
+ } , R = function ( ) {
13916
+ _ . each ( v , P ) ;
13917
+ } , E = function ( e ) {
13918
13918
return _ . orderBy ( e , [ "event.lastTimestamp" , "event.firstTimestamp" ] , [ "desc" , "desc" ] ) ;
13919
- } , I = function ( e ) {
13919
+ } , T = function ( e ) {
13920
13920
var t = _ . sortBy ( e , function ( e ) {
13921
13921
return e . heading ;
13922
13922
} ) ;
13923
13923
return _ . each ( t , function ( e ) {
13924
- e . notifications = T ( e . notifications ) , e . counts = R ( e ) ;
13924
+ e . notifications = E ( e . notifications ) , e . counts = P ( e ) ;
13925
13925
} ) , t ;
13926
- } , N = function ( e ) {
13926
+ } , I = function ( e ) {
13927
13927
var t = { } ;
13928
- return S ( t , r . project ) , _ . each ( e , function ( e ) {
13929
- l . isImportantEvent ( e ) && ! l . isCleared ( e ) && ( S ( t , e . metadata . namespace ) , t [ e . metadata . namespace ] . notifications . push ( {
13928
+ return C ( t , r . project ) , _ . each ( e , function ( e ) {
13929
+ l . isImportantEvent ( e ) && ! l . isCleared ( e ) && ( C ( t , e . metadata . namespace ) , t [ e . metadata . namespace ] . notifications . push ( {
13930
13930
unread : ! l . isRead ( e ) ,
13931
+ uid : e . metadata . uid ,
13931
13932
event : e ,
13932
13933
actions : null
13933
13934
} ) ) ;
13934
13935
} ) , t ;
13935
- } , D = function ( ) {
13936
+ } , N = function ( ) {
13936
13937
_ . each ( g , function ( e ) {
13937
13938
e ( ) ;
13938
13939
} ) , g = [ ] ;
13939
- } , $ = function ( e ) {
13940
+ } , D = function ( e ) {
13940
13941
e || ( f . drawerHidden = ! 0 ) ;
13941
- } , A = function ( ) {
13942
+ } , $ = function ( ) {
13942
13943
o . $evalAsync ( function ( ) {
13943
- E ( ) , f . notificationGroups = _ . filter ( y , function ( e ) {
13944
+ R ( ) , f . notificationGroups = _ . filter ( v , function ( e ) {
13944
13945
return e . project . metadata . name === r . project ;
13945
13946
} ) ;
13946
13947
} ) ;
13947
- } , B = function ( e ) {
13948
- h = e . by ( "metadata.name" ) , v = N ( h ) , y = I ( v ) , A ( ) ;
13949
- } , L = {
13948
+ } , A = function ( e ) {
13949
+ h = I ( e . by ( "metadata.uid" ) ) , v = T ( h ) , $ ( ) ;
13950
+ } , B = {
13950
13951
Normal : "pficon pficon-info" ,
13951
13952
Warning : "pficon pficon-warning-triangle-o"
13952
13953
} ;
@@ -13964,51 +13965,51 @@ f.drawerHidden = !0;
13964
13965
onMarkAllRead : function ( e ) {
13965
13966
_ . each ( e . notifications , function ( e ) {
13966
13967
e . unread = ! 1 , l . markRead ( e . event ) ;
13967
- } ) , A ( ) , o . $emit ( "NotificationDrawerWrapper.onMarkAllRead" ) ;
13968
+ } ) , $ ( ) , o . $emit ( "NotificationDrawerWrapper.onMarkAllRead" ) ;
13968
13969
} ,
13969
13970
onClearAll : function ( e ) {
13970
13971
_ . each ( e . notifications , function ( e ) {
13971
13972
l . markRead ( e . event ) , l . markCleared ( e . event ) ;
13972
- } ) , e . notifications = [ ] , A ( ) , o . $emit ( "NotificationDrawerWrapper.onMarkAllRead" ) ;
13973
+ } ) , e . notifications = [ ] , $ ( ) , o . $emit ( "NotificationDrawerWrapper.onMarkAllRead" ) ;
13973
13974
} ,
13974
- notificationGroups : y ,
13975
+ notificationGroups : v ,
13975
13976
headingInclude : "views/directives/notifications/header.html" ,
13976
13977
notificationBodyInclude : "views/directives/notifications/notification-body.html" ,
13977
13978
customScope : {
13978
13979
clear : function ( e , t , n ) {
13979
- l . markCleared ( e . event ) , n . notifications . splice ( t , 1 ) , E ( ) ;
13980
+ l . markCleared ( e . event ) , n . notifications . splice ( t , 1 ) , R ( ) ;
13980
13981
} ,
13981
13982
markRead : function ( e ) {
13982
- e . unread = ! 1 , l . markRead ( e . event ) , E ( ) ;
13983
+ e . unread = ! 1 , l . markRead ( e . event ) , R ( ) ;
13983
13984
} ,
13984
13985
getNotficationStatusIconClass : function ( e ) {
13985
- return L [ e . type ] || L . info ;
13986
+ return B [ e . type ] || B . info ;
13986
13987
} ,
13987
13988
getStatusForCount : function ( e ) {
13988
- return L [ e ] || L . info ;
13989
+ return B [ e ] || B . info ;
13989
13990
} ,
13990
13991
close : function ( ) {
13991
13992
f . drawerHidden = ! 0 ;
13992
13993
}
13993
13994
}
13994
13995
} ) ;
13995
- var U = function ( e , t ) {
13996
+ var L = function ( e , t ) {
13996
13997
return _ . get ( e , "params.project" ) !== _ . get ( t , "params.project" ) ;
13997
- } , O = function ( ) {
13998
- C ( r . project ) . then ( function ( ) {
13999
- k ( r . project , B ) , $ ( r . project ) , A ( ) ;
13998
+ } , U = function ( ) {
13999
+ b ( r . project ) . then ( function ( ) {
14000
+ w ( r . project , A ) , D ( r . project ) , $ ( ) ;
14000
14001
} ) ;
14001
- } , F = function ( ) {
14002
- r . project && O ( ) , g . push ( o . $on ( "$routeChangeSuccess" , function ( e , t , n ) {
14003
- U ( t , n ) && ( f . customScope . projectName = r . project , O ( ) ) ;
14002
+ } , O = function ( ) {
14003
+ r . project && U ( ) , g . push ( o . $on ( "$routeChangeSuccess" , function ( e , t , n ) {
14004
+ L ( t , n ) && ( f . customScope . projectName = r . project , U ( ) ) ;
14004
14005
} ) ) , g . push ( o . $on ( "NotificationDrawerWrapper.toggle" , function ( ) {
14005
14006
f . drawerHidden = ! f . drawerHidden ;
14006
14007
} ) ) ;
14007
14008
} ;
14008
14009
f . $onInit = function ( ) {
14009
- m || p || F ( ) ;
14010
+ m || p || O ( ) ;
14010
14011
} , f . $onDestroy = function ( ) {
14011
- j ( ) , w ( ) , D ( ) ;
14012
+ k ( ) , S ( ) , N ( ) ;
14012
14013
} ;
14013
14014
} ]
14014
14015
} ) ;
0 commit comments