diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2020-01-03 13:44:12 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2020-01-08 20:46:11 +0100 |
commit | 279deef3e8534bba914245ccf10610a459073640 (patch) | |
tree | 22cfcf63ecee905641dfd3bc76043c0cfb2843f1 /server/sonar-web/src/main/js/apps/maintenance | |
parent | 3365182508367bfcc080452d7cf932f9cfbf8c1b (diff) | |
download | sonarqube-279deef3e8534bba914245ccf10610a459073640.tar.gz sonarqube-279deef3e8534bba914245ccf10610a459073640.zip |
SONAR-12429 Fix 404 when opening embedded documentation in new tab
Cherry-pick of SC-1304
Diffstat (limited to 'server/sonar-web/src/main/js/apps/maintenance')
-rw-r--r-- | server/sonar-web/src/main/js/apps/maintenance/components/App.tsx | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap | 48 |
2 files changed, 26 insertions, 26 deletions
diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx index ea72c28fd20..1f776921f25 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Helmet from 'react-helmet'; +import { Helmet } from 'react-helmet-async'; import { FormattedMessage } from 'react-intl'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import { translate } from 'sonar-ui-common/helpers/l10n'; @@ -133,7 +133,7 @@ export default class App extends React.PureComponent<Props, State> { return ( <> - <Helmet defaultTitle={translate('maintenance.page')} /> + <Helmet defaultTitle={translate('maintenance.page')} defer={false} /> <div className="page-wrapper-simple" id="bd"> <div className={classNames('page-simple', { diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap index e0606efd1df..1c9dbb2b24e 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap @@ -2,9 +2,9 @@ exports[`Maintenance Page should render DB_MIGRATION_NEEDED status 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -63,9 +63,9 @@ exports[`Maintenance Page should render DB_MIGRATION_NEEDED status 1`] = ` exports[`Maintenance Page should render DB_MIGRATION_RUNNING status 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -124,9 +124,9 @@ exports[`Maintenance Page should render DB_MIGRATION_RUNNING status 1`] = ` exports[`Maintenance Page should render DOWN status 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -165,9 +165,9 @@ exports[`Maintenance Page should render DOWN status 1`] = ` exports[`Maintenance Page should render OFFLINE status 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -206,9 +206,9 @@ exports[`Maintenance Page should render OFFLINE status 1`] = ` exports[`Maintenance Page should render STARTING status 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -240,9 +240,9 @@ exports[`Maintenance Page should render STARTING status 1`] = ` exports[`Maintenance Page should render UP status 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -281,9 +281,9 @@ exports[`Maintenance Page should render UP status 1`] = ` exports[`Setup Page should render MIGRATION_FAILED state 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -311,9 +311,9 @@ exports[`Setup Page should render MIGRATION_FAILED state 1`] = ` exports[`Setup Page should render MIGRATION_SUCCEEDED state 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -345,9 +345,9 @@ exports[`Setup Page should render MIGRATION_SUCCEEDED state 1`] = ` exports[`Setup Page should render NO_MIGRATION state 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -379,9 +379,9 @@ exports[`Setup Page should render NO_MIGRATION state 1`] = ` exports[`Setup Page should render NOT_SUPPORTED state 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -407,9 +407,9 @@ exports[`Setup Page should render NOT_SUPPORTED state 1`] = ` exports[`Setup Page should start migration 1`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div @@ -457,9 +457,9 @@ exports[`Setup Page should start migration 1`] = ` exports[`Setup Page should start migration 2`] = ` <Fragment> - <HelmetWrapper + <Helmet defaultTitle="maintenance.page" - defer={true} + defer={false} encodeSpecialCharacters={true} /> <div |