diff options
author | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-02-07 13:11:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 13:11:07 +0100 |
commit | c54e107bb8305de177d8c805d0368eaf7df3bc37 (patch) | |
tree | fb994bad6f25ac5c563c0097502e20b0460f287e /server/sonar-web/src/main/js/store/notifications/duck.js | |
parent | 929dcab3e90bc534193441f97cf6006d9495e448 (diff) | |
download | sonarqube-c54e107bb8305de177d8c805d0368eaf7df3bc37.tar.gz sonarqube-c54e107bb8305de177d8c805d0368eaf7df3bc37.zip |
SONAR-8669 Display organizations on the "Notifications" page (#1633)
Diffstat (limited to 'server/sonar-web/src/main/js/store/notifications/duck.js')
-rw-r--r-- | server/sonar-web/src/main/js/store/notifications/duck.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/store/notifications/duck.js b/server/sonar-web/src/main/js/store/notifications/duck.js index b53948850f9..e5e6a8d4520 100644 --- a/server/sonar-web/src/main/js/store/notifications/duck.js +++ b/server/sonar-web/src/main/js/store/notifications/duck.js @@ -25,8 +25,9 @@ import uniqWith from 'lodash/uniqWith'; export type Notification = { channel: string, type: string, - project: string | null, - projectName: string | null + project?: string, + projectName?: string, + organization?: string }; export type NotificationsState = Array<Notification>; @@ -147,7 +148,11 @@ export const getGlobal = (state: State): NotificationsState => ( export const getProjects = (state: State): Array<string> => ( uniqBy( - state.notifications.filter(n => n.project).map(n => ({ key: n.project, name: n.projectName })), + state.notifications.filter(n => n.project).map(n => ({ + key: n.project, + name: n.projectName, + organization: n.organization + })), project => project.key ) ); |