box-sizing: border-box;
}
+.code-components-rating-cell {
+ width: 110px;
+}
+
.code-name-cell {
max-width: 0;
}
.code-components-header {
position: sticky;
- top: 95px;
+ top: 105px;
background-color: rgba(255, 255, 255, 0.9);
+ z-index: 1;
+}
+
+table > thead > tr.code-components-header > th {
+ vertical-align: middle;
}
</td>
{metrics.map(metric => (
- <td className="thin nowrap text-right" key={metric.key}>
- <div className="code-components-cell">
+ <td
+ className={classNames('thin', {
+ 'text-center': metric.type === 'RATING',
+ 'nowrap text-right': metric.type !== 'RATING'
+ })}
+ key={metric.key}>
+ <div
+ className={classNames({
+ 'code-components-rating-cell': metric.type === 'RATING',
+ 'code-components-cell': metric.type !== 'RATING'
+ })}>
<ComponentMeasure component={component} metric={metric} />
</div>
</td>
component.measures.find(measure => measure.metric === finalMetricKey);
if (!measure) {
- return <span />;
+ return measure === false ? <span /> : <span>—</span>;
}
const value = isDiffMetric(metric.key) ? getLeakValue(measure) : measure.value;
columns = [
translate('metric_domain.Releasability'),
translate('metric_domain.Reliability'),
- translate('metric_domain.Security'),
+ translate('portfolio.metric_domain.vulnerabilities'),
+ translate('portfolio.metric_domain.security_hotspots'),
translate('metric_domain.Maintainability'),
translate('metric', 'ncloc', 'name')
];
{baseComponent &&
columns.map((column, index) => (
<th
- className={classNames('thin', 'nowrap', 'text-right', {
- 'code-components-cell': index > 0
+ className={classNames('thin', {
+ 'code-components-cell': !isPortfolio && index > 0,
+ nowrap: !isPortfolio,
+ 'text-center': isPortfolio && index < columns.length - 1,
+ 'text-right': !isPortfolio || index === columns.length - 1
})}
key={column}>
{column}
/>
<th />
<th
- className="thin nowrap text-right"
+ className="thin text-center"
key="metric_domain.Releasability"
>
metric_domain.Releasability
</th>
<th
- className="thin nowrap text-right code-components-cell"
+ className="thin text-center"
key="metric_domain.Reliability"
>
metric_domain.Reliability
</th>
<th
- className="thin nowrap text-right code-components-cell"
- key="metric_domain.Security"
+ className="thin text-center"
+ key="portfolio.metric_domain.vulnerabilities"
+ >
+ portfolio.metric_domain.vulnerabilities
+ </th>
+ <th
+ className="thin text-center"
+ key="portfolio.metric_domain.security_hotspots"
>
- metric_domain.Security
+ portfolio.metric_domain.security_hotspots
</th>
<th
- className="thin nowrap text-right code-components-cell"
+ className="thin text-center"
key="metric_domain.Maintainability"
>
metric_domain.Maintainability
</th>
<th
- className="thin nowrap text-right code-components-cell"
+ className="thin text-right"
key="metric.ncloc.name"
>
metric.ncloc.name
metric.foo.name
</th>
<th
- className="thin nowrap text-right code-components-cell"
+ className="thin code-components-cell nowrap text-right"
key="metric.bar.name"
>
metric.bar.name
'releasability_rating',
'reliability_rating',
'security_rating',
+ 'security_review_rating',
'sqale_rating',
'ncloc'
];