aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/store/notifications/duck.js
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-02-07 13:11:07 +0100
committerGitHub <noreply@github.com>2017-02-07 13:11:07 +0100
commitc54e107bb8305de177d8c805d0368eaf7df3bc37 (patch)
treefb994bad6f25ac5c563c0097502e20b0460f287e /server/sonar-web/src/main/js/store/notifications/duck.js
parent929dcab3e90bc534193441f97cf6006d9495e448 (diff)
downloadsonarqube-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.js11
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
)
);