import { Domain, DomainHeader, DomainPanel, DomainNutshell, DomainLeak, MeasuresList, Measure, DomainMixin } from './components';
import { DrilldownLink } from '../../../components/shared/drilldown-link';
import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
+import { DonutChart } from '../../../components/charts/donut-chart';
import { getMetricName } from '../helpers/metrics';
import { formatMeasure } from '../../../helpers/measures';
return null;
}
+ let donutData = [
+ { value: this.props.measures[coverageMetric], fill: '#85bb43' },
+ { value: 100 - this.props.measures[coverageMetric], fill: '#d4333f' }
+ ];
+
return <Domain>
<DomainHeader component={this.props.component} title={window.t('overview.domain.coverage')} linkTo="/tests"/>
<DomainPanel domain="coverage">
<DomainNutshell>
<MeasuresList>
+ <Measure composite={true}>
+ <DonutChart width="48" height="48" thickness="6" data={donutData}/>
+ </Measure>
<Measure label={getMetricName('coverage')}>
<DrilldownLink component={this.props.component.key} metric={coverageMetric}>
<span className="js-overview-main-coverage">
import { Domain, DomainHeader, DomainPanel, DomainNutshell, DomainLeak, MeasuresList, Measure, DomainMixin } from './components';
import { DrilldownLink } from '../../../components/shared/drilldown-link';
import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
+import { DonutChart } from '../../../components/charts/donut-chart';
import { getMetricName } from '../helpers/metrics';
import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures';
},
render () {
+ let donutData = [
+ { value: this.props.measures['duplicated_lines_density'], fill: '#f3ca8e' },
+ { value: 100 - this.props.measures['duplicated_lines_density'], fill: '#e6e6e6' }
+ ];
+
return <Domain>
<DomainHeader component={this.props.component} title={window.t('overview.domain.duplications')}
linkTo="/duplications"/>
<DomainPanel domain="duplications">
<DomainNutshell>
<MeasuresList>
+ <Measure composite={true}>
+ <DonutChart width="48" height="48" thickness="6" data={donutData}/>
+ </Measure>
<Measure label={getMetricName('duplications')}>
<DrilldownLink component={this.props.component.key} metric="duplicated_lines_density">
{formatMeasure(this.props.measures['duplicated_lines_density'], 'PERCENT')}
return <DomainLeak>
<MeasuresList>
- <Measure label={getMetricName('new_issues')}>
- <IssuesLink component={this.props.component.key}
- params={{ resolved: 'false', createdAfter: createdAfter }}>
- {formatMeasure(this.props.leak.issues, 'SHORT_INT')}
- </IssuesLink>
- </Measure>
<Measure label={getMetricName('new_debt')}>
<IssuesLink component={this.props.component.key}
params={{ resolved: 'false', createdAfter: createdAfter, facetMode: 'debt' }}>
{formatMeasure(this.props.leak.debt, 'SHORT_WORK_DUR')}
</IssuesLink>
</Measure>
+ <Measure label={getMetricName('new_issues')}>
+ <IssuesLink component={this.props.component.key}
+ params={{ resolved: 'false', createdAfter: createdAfter }}>
+ {formatMeasure(this.props.leak.issues, 'SHORT_INT')}
+ </IssuesLink>
+ </Measure>
</MeasuresList>
{this.renderTimeline('after')}
</DomainLeak>;
<Rating value={this.props.measures['sqale_rating']}/>
</DrilldownLink>
</Measure>
- <Measure label={getMetricName('issues')}>
- <IssuesLink component={this.props.component.key} params={{ resolved: 'false' }}>
- {formatMeasure(this.props.measures.issues, 'SHORT_INT')}
- </IssuesLink>
- </Measure>
<Measure label={getMetricName('debt')}>
<IssuesLink component={this.props.component.key} params={{ resolved: 'false', facetMode: 'debt' }}>
{formatMeasure(this.props.measures.debt, 'SHORT_WORK_DUR')}
</IssuesLink>
</Measure>
+ <Measure label={getMetricName('issues')}>
+ <IssuesLink component={this.props.component.key} params={{ resolved: 'false' }}>
+ {formatMeasure(this.props.measures.issues, 'SHORT_INT')}
+ </IssuesLink>
+ </Measure>
</MeasuresList>
{this.renderTimeline('before')}
</DomainNutshell>
<DomainPanel domain="size">
<DomainNutshell>
<MeasuresList>
+ {this.renderLanguageDistribution()}
<Measure label={getMetricName('ncloc')}>
<DrilldownLink component={this.props.component.key} metric="ncloc">
{formatMeasure(this.props.measures['ncloc'], 'SHORT_INT')}
</DrilldownLink>
</Measure>
- {this.renderLanguageDistribution()}
</MeasuresList>
{this.renderTimeline('before')}
</DomainNutshell>