aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2018-12-14 16:25:25 +0100
committersonartech <sonartech@sonarsource.com>2018-12-20 11:41:51 +0100
commit66e365f711bccb43faeeef6e14fa3aaf167f4136 (patch)
treea32421a2dea17b3bcafe0be62d93d9ebf8a2bf5e /server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx
parent44ab47b5ed95185667169704dd614cd5f8e39c57 (diff)
downloadsonarqube-66e365f711bccb43faeeef6e14fa3aaf167f4136.tar.gz
sonarqube-66e365f711bccb43faeeef6e14fa3aaf167f4136.zip
SONARCLOUD-272 Update user notifications settings page
Diffstat (limited to 'server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx55
1 files changed, 30 insertions, 25 deletions
diff --git a/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx
index 5ca04b775f8..3e330e5e696 100644
--- a/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx
+++ b/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx
@@ -19,7 +19,9 @@
*/
import * as React from 'react';
import NotificationsList from './NotificationsList';
+import SonarCloudNotifications from './SonarCloudNotifications';
import { translate } from '../../../helpers/l10n';
+import { isSonarCloud } from '../../../helpers/system';
interface Props {
addNotification: (n: T.Notification) => void;
@@ -31,33 +33,36 @@ interface Props {
export default function GlobalNotifications(props: Props) {
return (
- <section className="boxed-group">
- <h2>{translate('my_profile.overall_notifications.title')}</h2>
+ <>
+ <section className="boxed-group">
+ <h2>{translate('my_profile.overall_notifications.title')}</h2>
- <div className="boxed-group-inner">
- <table className="form">
- <thead>
- <tr>
- <th />
- {props.channels.map(channel => (
- <th className="text-center" key={channel}>
- <h4>{translate('notification.channel', channel)}</h4>
- </th>
- ))}
- </tr>
- </thead>
+ <div className="boxed-group-inner">
+ <table className="form">
+ <thead>
+ <tr>
+ <th />
+ {props.channels.map(channel => (
+ <th className="text-center" key={channel}>
+ <h4>{translate('notification.channel', channel)}</h4>
+ </th>
+ ))}
+ </tr>
+ </thead>
- <NotificationsList
- channels={props.channels}
- checkboxId={getCheckboxId}
- notifications={props.notifications}
- onAdd={props.addNotification}
- onRemove={props.removeNotification}
- types={props.types}
- />
- </table>
- </div>
- </section>
+ <NotificationsList
+ channels={props.channels}
+ checkboxId={getCheckboxId}
+ notifications={props.notifications}
+ onAdd={props.addNotification}
+ onRemove={props.removeNotification}
+ types={props.types}
+ />
+ </table>
+ </div>
+ </section>
+ {isSonarCloud() && <SonarCloudNotifications />}
+ </>
);
}