aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2018-06-12 15:55:25 +0200
committerSonarTech <sonartech@sonarsource.com>2018-06-21 20:21:28 +0200
commit4805c1068177a5f9975357f1f3263a6fa8c09f78 (patch)
tree09b935198783f210100374f788f2a92637c2ce9f /server/sonar-web/src/main/js
parent1d0b5d8c3ea9654bc5c83200d79dc998993b7f3f (diff)
downloadsonarqube-4805c1068177a5f9975357f1f3263a6fa8c09f78.tar.gz
sonarqube-4805c1068177a5f9975357f1f3263a6fa8c09f78.zip
SONARCLOUD-65 Add pricing doc suggestion when on billing page
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/app/components/extensions/Extension.js6
-rw-r--r--server/sonar-web/src/main/js/app/utils/exposeLibraries.ts2
2 files changed, 8 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/app/components/extensions/Extension.js b/server/sonar-web/src/main/js/app/components/extensions/Extension.js
index e1a0ab878e8..db2d7080033 100644
--- a/server/sonar-web/src/main/js/app/components/extensions/Extension.js
+++ b/server/sonar-web/src/main/js/app/components/extensions/Extension.js
@@ -20,6 +20,7 @@
// @flow
import React from 'react';
import Helmet from 'react-helmet';
+import * as PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { injectIntl } from 'react-intl';
@@ -49,6 +50,10 @@ class Extension extends React.PureComponent {
/*:: props: Props; */
/*:: stop: ?Function; */
+ static contextTypes = {
+ suggestions: PropTypes.object.isRequired
+ };
+
componentDidMount() {
this.startExtension();
}
@@ -79,6 +84,7 @@ class Extension extends React.PureComponent {
intl: this.props.intl,
location: this.props.location,
router: this.props.router,
+ suggestions: this.context.suggestions,
...this.props.options
});
};
diff --git a/server/sonar-web/src/main/js/app/utils/exposeLibraries.ts b/server/sonar-web/src/main/js/app/utils/exposeLibraries.ts
index 2716c21be7d..fc7e79a9be3 100644
--- a/server/sonar-web/src/main/js/app/utils/exposeLibraries.ts
+++ b/server/sonar-web/src/main/js/app/utils/exposeLibraries.ts
@@ -21,6 +21,7 @@ import * as ReactRedux from 'react-redux';
import * as ReactRouter from 'react-router';
import throwGlobalError from './throwGlobalError';
import addGlobalSuccessMessage from './addGlobalSuccessMessage';
+import Suggestions from '../components/embed-docs-modal/Suggestions';
import * as measures from '../../helpers/measures';
import * as request from '../../helpers/request';
import DateFromNow from '../../components/intl/DateFromNow';
@@ -94,6 +95,7 @@ const exposeLibraries = () => {
Select,
SelectList,
SubmitButton,
+ Suggestions,
Tooltip
};
};