export function getIssuesCount (query) {
const url = window.baseUrl + '/api/issues/search';
- const data = _.extend({}, query, { ps: 1, facetMode: 'debt' });
+ const data = _.extend({}, query, { ps: 1, facetMode: 'effort' });
return getJSON(url, data).then(r => {
return { issues: r.total, debt: r.debtTotal };
});
<label for="issues-page-mode-count">Issues</label>
</li>
<li>
- <input type="radio" name="issues-page-mode" value="debt" id="issues-page-mode-debt"
- {{#eq mode 'debt'}}checked{{/eq}}>
- <label for="issues-page-mode-debt">Effort</label>
+ <input type="radio" name="issues-page-mode" value="effort" id="issues-page-mode-effort"
+ {{#eq mode 'effort'}}checked{{/eq}}>
+ <label for="issues-page-mode-effort">Effort</label>
</li>
</ul>
</div>
<Measure label={getMetricName('new_effort')}>
<IssuesLink
component={this.props.component.key}
- params={{ resolved: 'false', types: 'CODE_SMELL', facetMode: 'debt', sinceLeakPeriod: 'true' }}>
+ params={{ resolved: 'false', types: 'CODE_SMELL', facetMode: 'effort', sinceLeakPeriod: 'true' }}>
<span
title={translateWithParameters('widget.as_calculated_on_x', formattedSnapshotDate)}
data-toggle="tooltip">
<Measure label={getMetricName('effort')}>
<IssuesLink
component={this.props.component.key}
- params={{ resolved: 'false', types: 'CODE_SMELL', facetMode: 'debt' }}>
+ params={{ resolved: 'false', types: 'CODE_SMELL', facetMode: 'effort' }}>
<span
title={translateWithParameters('widget.as_calculated_on_x', formattedSnapshotDate)}
data-toggle="tooltip">
import { formatMeasure } from '../measures';
module.exports = function (value, facetMode) {
- const formatter = facetMode === 'debt' ? 'SHORT_WORK_DUR' : 'SHORT_INT';
+ const formatter = facetMode === 'effort' ? 'SHORT_WORK_DUR' : 'SHORT_INT';
return formatMeasure(value, formatter);
};
const criterion = {};
criterion[property] = value;
const r = _.extend({}, query, criterion);
- if (mode === 'debt') {
- r.facetMode = 'debt';
+ if (mode === 'effort') {
+ r.facetMode = 'effort';
}
if (r.componentKey != null) {
return window.baseUrl + '/component_issues/index?id=' + encodeURIComponent(r.componentKey) +
module.exports = function (query, mode) {
const r = _.extend({}, query);
- if (mode === 'debt') {
- r.facetMode = 'debt';
+ if (mode === 'effort') {
+ r.facetMode = 'effort';
}
if (r.componentKey != null) {
return window.baseUrl + '/component_issues/index?id=' + encodeURIComponent(r.componentKey) +
import { formatMeasure } from '../measures';
module.exports = function (value, mode) {
- const formatter = mode === 'debt' ? 'SHORT_WORK_DUR' : 'SHORT_INT';
+ const formatter = mode === 'effort' ? 'SHORT_WORK_DUR' : 'SHORT_INT';
return formatMeasure(value, formatter);
};
const criterion = {};
criterion[property] = item.val;
const r = _.extend({}, query, criterion);
- if (mode === 'debt') {
- r.facetMode = 'debt';
+ if (mode === 'effort') {
+ r.facetMode = 'effort';
}
if (r.componentKey != null) {
return window.baseUrl + '/component_issues/index?id=' + encodeURIComponent(r.componentKey) +
createdAfter: createdAfter.format('YYYY-MM-DD'),
createdBefore: createdBefore.format('YYYY-MM-DD')
});
- if (mode === 'debt') {
- r.facetMode = 'debt';
+ if (mode === 'effort') {
+ r.facetMode = 'effort';
}
if (r.componentKey != null) {
return window.baseUrl + '/component_issues/index?id=' + encodeURIComponent(r.componentKey) +
items,
maxResultsReached: items.length >= FACET_LIMIT,
maxResults: items.length,
- total: facetMode === 'debt' ? r.debtTotal : r.total
+ total: facetMode === 'effort' ? r.debtTotal : r.total
});
}
});