aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-10-28 09:45:18 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-10-28 09:45:18 +0200
commitca8082ba03d4149d4111eae7b9955cc83782707e (patch)
treec7321df51fd36a47b6a299737352f517030d667f /server/sonar-web/src/main
parenta9e5ebc17c46cd526871bd7f0bc1079087cf362e (diff)
downloadsonarqube-ca8082ba03d4149d4111eae7b9955cc83782707e.tar.gz
sonarqube-ca8082ba03d4149d4111eae7b9955cc83782707e.zip
SONAR-8291 improve positioning of parameter badges
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/Params.js113
1 files changed, 57 insertions, 56 deletions
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 87762c45ba0..7c1fb97086e 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
@@ -27,69 +27,70 @@ export default function Params ({ params }) {
<div className="web-api-params">
<table>
<tbody>
- {params.map(param => (
- <tr key={param.key}>
- <td style={{ width: 180 }}>
- <code>{param.key}</code>
- {param.internal && (
- <span className="spacer-left">
- <InternalBadge/>
- </span>
- )}
+ {params.map(param => (
+ <tr key={param.key}>
+ <td style={{ width: 180 }}>
+ <code>{param.key}</code>
- <div className="note little-spacer-top">
- {param.required ? 'required' : 'optional'}
- </div>
+ {param.internal && (
+ <div className="little-spacer-top">
+ <InternalBadge/>
+ </div>
+ )}
- {param.since && (
- <div className="note little-spacer-top">
- since {param.since}
- </div>
- )}
+ {param.deprecatedSince && (
+ <div className="little-spacer-top">
+ <DeprecatedBadge since={param.deprecatedSince}/>
+ </div>
+ )}
- {param.deprecatedSince && (
- <div className="little-spacer-top">
- <DeprecatedBadge since={param.deprecatedSince}/>
- </div>
- )}
- </td>
+ <div className="note little-spacer-top">
+ {param.required ? 'required' : 'optional'}
+ </div>
- <td>
- <div
- className="markdown"
- dangerouslySetInnerHTML={{ __html: param.description }}/>
- </td>
+ {param.since && (
+ <div className="note little-spacer-top">
+ since {param.since}
+ </div>
+ )}
+ </td>
- <td style={{ width: 250 }}>
- {param.possibleValues && (
- <div>
- <h4>Possible values</h4>
- <ul className="list-styled">
- {param.possibleValues.map(value => (
- <li key={value} className="little-spacer-top">
- <code>{value}</code>
- </li>
- ))}
- </ul>
- </div>
- )}
+ <td>
+ <div
+ className="markdown"
+ dangerouslySetInnerHTML={{ __html: param.description }}/>
+ </td>
- {param.defaultValue && (
- <div className="little-spacer-top">
- <h4>Default value</h4>
- <code>{param.defaultValue}</code>
- </div>
- )}
+ <td style={{ width: 250 }}>
+ {param.possibleValues && (
+ <div>
+ <h4>Possible values</h4>
+ <ul className="list-styled">
+ {param.possibleValues.map(value => (
+ <li key={value} className="little-spacer-top">
+ <code>{value}</code>
+ </li>
+ ))}
+ </ul>
+ </div>
+ )}
- {param.exampleValue && (
- <div className="little-spacer-top">
- <h4>Example value</h4>
- <code>{param.exampleValue}</code>
- </div>
- )}
- </td>
- </tr>
- ))}
+ {param.defaultValue && (
+ <div className="little-spacer-top">
+ <h4>Default value</h4>
+ <code>{param.defaultValue}</code>
+ </div>
+ )}
+
+ {param.exampleValue && (
+ <div className="little-spacer-top">
+ <h4>Example value</h4>
+ <code>{param.exampleValue}</code>
+ </div>
+ )}
+ </td>
+ </tr>
+ ))}
</tbody>
</table>
</div>