diff options
Diffstat (limited to 'server')
3 files changed, 11 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Action.js b/server/sonar-web/src/main/js/apps/web-api/components/Action.js index ad1d6912038..2c3cc0dcfa2 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Action.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/Action.js @@ -28,6 +28,10 @@ import InternalBadge from './InternalBadge'; import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin'; export default class Action extends React.Component { + static propTypes = { + showInternal: React.PropTypes.bool + }; + state = { showParams: false, showResponse: false @@ -111,7 +115,7 @@ export default class Action extends React.Component { </ul> )} - {showParams && action.params && <Params params={action.params}/>} + {showParams && action.params && <Params params={action.params} showInternal={this.props.showInternal}/>} {showResponse && action.hasResponseExample && <ResponseExample domain={domain} action={action}/>} </div> diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Domain.js b/server/sonar-web/src/main/js/apps/web-api/components/Domain.js index df212f6df13..6fd54950711 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Domain.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/Domain.js @@ -58,7 +58,8 @@ export default function Domain ({ domain, showInternal, showOnlyDeprecated, sear key={getActionKey(domain.path, action.key)} action={action} domain={domain} - location={location}/> + location={location} + showInternal={showInternal}/> ))} </div> </div> diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Params.js b/server/sonar-web/src/main/js/apps/web-api/components/Params.js index 7c1fb97086e..68649ad2a8b 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Params.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/Params.js @@ -22,12 +22,14 @@ import React from 'react'; import InternalBadge from './InternalBadge'; import DeprecatedBadge from './DeprecatedBadge'; -export default function Params ({ params }) { +export default function Params ({ params, showInternal }) { + const displayedParameters = showInternal ? params : params.filter(p => !p.internal); + return ( <div className="web-api-params"> <table> <tbody> - {params.map(param => ( + {displayedParameters.map(param => ( <tr key={param.key}> <td style={{ width: 180 }}> <code>{param.key}</code> |