diff options
author | Ambroise C <ambroise.christea@sonarsource.com> | 2023-08-17 16:49:38 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-08-24 20:03:07 +0000 |
commit | 6e78f9f43cd0d72b6cc88db41ce02926b7f42fc5 (patch) | |
tree | e177da2b9b5a22f9294f66a8904c5905c0d6065f /server/sonar-web/src/main/js/app | |
parent | 4ff1eb4203f6cab97eccc7f81674cc829b9aa899 (diff) | |
download | sonarqube-6e78f9f43cd0d72b6cc88db41ce02926b7f42fc5.tar.gz sonarqube-6e78f9f43cd0d72b6cc88db41ce02926b7f42fc5.zip |
SONAR-20171 Add banner to notify about automatic project's NCD update
Diffstat (limited to 'server/sonar-web/src/main/js/app')
3 files changed, 6 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/app/components/App.tsx b/server/sonar-web/src/main/js/app/components/App.tsx index 374b3cd9e35..46aa47ac7a7 100644 --- a/server/sonar-web/src/main/js/app/components/App.tsx +++ b/server/sonar-web/src/main/js/app/components/App.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Outlet } from 'react-router-dom'; -import GlobalNCDAutoUpdateMessage from '../../components/new-code-definition/GlobalNCDAutoUpdateMessage'; +import NCDAutoUpdateMessage from '../../components/new-code-definition/NCDAutoUpdateMessage'; import { AppState } from '../../types/appstate'; import { GlobalSettingKeys } from '../../types/settings'; import KeyboardShortcutsModal from './KeyboardShortcutsModal'; @@ -90,7 +90,7 @@ export class App extends React.PureComponent<Props> { render() { return ( <> - <GlobalNCDAutoUpdateMessage /> + <NCDAutoUpdateMessage /> <PageTracker>{this.renderPreconnectLink()}</PageTracker> <Outlet /> <KeyboardShortcutsModal /> diff --git a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/App-test.tsx.snap index 50ce642e3cd..88271399b3b 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/App-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/App-test.tsx.snap @@ -2,7 +2,7 @@ exports[`should render correctly: default 1`] = ` <Fragment> - <withCurrentUserContext(GlobalNCDAutoUpdateMessage) /> + <withCurrentUserContext(NCDAutoUpdateMessage) /> <withRouter(withAppStateContext(PageTracker)) /> <Outlet /> <KeyboardShortcutsModal /> @@ -11,7 +11,7 @@ exports[`should render correctly: default 1`] = ` exports[`should render correctly: with gravatar 1`] = ` <Fragment> - <withCurrentUserContext(GlobalNCDAutoUpdateMessage) /> + <withCurrentUserContext(NCDAutoUpdateMessage) /> <withRouter(withAppStateContext(PageTracker))> <link href="http://example.com" diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx index 4984e5305ac..cf8019d236a 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx @@ -20,6 +20,7 @@ import { TopBar } from 'design-system'; import * as React from 'react'; import ScreenPositionHelper from '../../../../components/common/ScreenPositionHelper'; +import NCDAutoUpdateMessage from '../../../../components/new-code-definition/NCDAutoUpdateMessage'; import { translate } from '../../../../helpers/l10n'; import { ProjectAlmBindingConfigurationErrors, @@ -87,6 +88,7 @@ export default function ComponentNav(props: ComponentNavProps) { </div> <Menu component={component} isInProgress={isInProgress} isPending={isPending} /> </TopBar> + <NCDAutoUpdateMessage component={component} /> {prDecoNotifComponent} </> )} |