aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-04-30 17:48:01 +0200
committerSonarTech <sonartech@sonarsource.com>2018-05-03 20:20:51 +0200
commit093c4b17921519b435fe868672774dd3aa0d544c (patch)
treee4043105f6a97a96302ebb7e009aa9fd3195d562 /server/sonar-web/src/main
parent023441a00e30133e63502195bdf8d0ded3ec52e5 (diff)
downloadsonarqube-093c4b17921519b435fe868672774dd3aa0d544c.tar.gz
sonarqube-093c4b17921519b435fe868672774dd3aa0d544c.zip
SONAR-10609 add web api link
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx5
-rw-r--r--server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/__snapshots__/EmbedDocsPopup-test.tsx.snap10
2 files changed, 15 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx
index 9a886fb4508..1c2ba28fa9d 100644
--- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx
+++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx
@@ -155,6 +155,11 @@ export default class EmbedDocsPopup extends React.PureComponent<Props> {
<DetachIcon className="spacer-left" fill={theme.gray80} size={12} />
</Link>
</li>
+ <li>
+ <Link onClick={this.props.onClose} to="/web_api">
+ {translate('api_documentation.page')}
+ </Link>
+ </li>
{this.context.onSonarCloud && this.renderSonarCloudLinks()}
{!this.context.onSonarCloud && this.renderSonarQubeLinks()}
</ul>
diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/__snapshots__/EmbedDocsPopup-test.tsx.snap b/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/__snapshots__/EmbedDocsPopup-test.tsx.snap
index 082ef152ac5..ba950f69c47 100644
--- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/__snapshots__/EmbedDocsPopup-test.tsx.snap
+++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/__snapshots__/EmbedDocsPopup-test.tsx.snap
@@ -69,6 +69,16 @@ exports[`should display suggestion links 1`] = `
/>
</Link>
</li>
+ <li>
+ <Link
+ onClick={[MockFunction]}
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to="/web_api"
+ >
+ api_documentation.page
+ </Link>
+ </li>
<React.Fragment>
<li>
<a