aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/maintenance
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2020-01-03 13:44:12 +0100
committerSonarTech <sonartech@sonarsource.com>2020-01-08 20:46:11 +0100
commit279deef3e8534bba914245ccf10610a459073640 (patch)
tree22cfcf63ecee905641dfd3bc76043c0cfb2843f1 /server/sonar-web/src/main/js/apps/maintenance
parent3365182508367bfcc080452d7cf932f9cfbf8c1b (diff)
downloadsonarqube-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.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap48
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