aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/api/metrics.js1
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/search.js3
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/coverage-measures.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/legend.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/domains/coverage-domain.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js3
-rw-r--r--server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js4
-rw-r--r--server/sonar-web/src/main/js/apps/overview/domains/size-domain.js4
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/issues.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/main.js8
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js2
-rw-r--r--server/sonar-web/src/main/js/apps/system/item-log-level.js2
-rw-r--r--server/sonar-web/src/main/js/apps/users/tokens-view.js4
-rw-r--r--server/sonar-web/src/main/js/components/charts/treemap.js2
-rw-r--r--server/sonar-web/src/main/js/components/common/modals.js4
-rw-r--r--server/sonar-web/src/main/js/components/mixins/resize-mixin.js1
-rw-r--r--server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js1
-rw-r--r--server/sonar-web/src/main/js/helpers/path.js3
-rw-r--r--server/sonar-web/src/main/js/main/nav/app.js2
-rw-r--r--server/sonar-web/src/main/js/widgets/old/bubble-chart.js2
-rw-r--r--server/sonar-web/src/main/js/widgets/old/pie-chart.js2
21 files changed, 21 insertions, 33 deletions
diff --git a/server/sonar-web/src/main/js/api/metrics.js b/server/sonar-web/src/main/js/api/metrics.js
index 66bf7482c00..9bb7cfb67ca 100644
--- a/server/sonar-web/src/main/js/api/metrics.js
+++ b/server/sonar-web/src/main/js/api/metrics.js
@@ -1,4 +1,3 @@
-import _ from 'underscore';
import { getJSON } from '../helpers/request.js';
export function getMetrics () {
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/search.js b/server/sonar-web/src/main/js/apps/background-tasks/search.js
index 5d122b614ab..a1624f02aae 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/search.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/search.js
@@ -1,9 +1,8 @@
import $ from 'jquery';
-import _ from 'underscore';
import moment from 'moment';
import React from 'react';
import RadioToggle from '../../components/shared/radio-toggle';
-import {STATUSES, CURRENTS, DATE, DATE_FORMAT, DEBOUNCE_DELAY} from './constants';
+import { STATUSES, CURRENTS, DATE, DATE_FORMAT } from './constants';
export default React.createClass({
componentDidUpdate() {
diff --git a/server/sonar-web/src/main/js/apps/overview/components/coverage-measures.js b/server/sonar-web/src/main/js/apps/overview/components/coverage-measures.js
index 48bab238633..3fdf521a872 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/coverage-measures.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/coverage-measures.js
@@ -3,7 +3,7 @@ import React from 'react';
import { DetailedMeasure } from './detailed-measure';
import { DonutChart } from '../../../components/charts/donut-chart';
import { DrilldownLink } from '../../../components/shared/drilldown-link';
-import { formatMeasure, formatMeasureVariation, localizeMetric } from '../../../helpers/measures';
+import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures';
export const CoverageMeasures = React.createClass({
diff --git a/server/sonar-web/src/main/js/apps/overview/components/legend.js b/server/sonar-web/src/main/js/apps/overview/components/legend.js
index 4e4de8f5882..d738f6df3b4 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/legend.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/legend.js
@@ -1,5 +1,4 @@
import React from 'react';
-import moment from 'moment';
import { DomainLeakTitle } from '../main/components';
diff --git a/server/sonar-web/src/main/js/apps/overview/domains/coverage-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/coverage-domain.js
index f9aabc06ec6..5edafc83856 100644
--- a/server/sonar-web/src/main/js/apps/overview/domains/coverage-domain.js
+++ b/server/sonar-web/src/main/js/apps/overview/domains/coverage-domain.js
@@ -82,7 +82,7 @@ export const CoverageMain = React.createClass({
},
renderLegend () {
- return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>
+ return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>;
},
render () {
diff --git a/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js
index cb539bc9cb4..179520a106f 100644
--- a/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js
+++ b/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js
@@ -15,7 +15,6 @@ import { AddedRemovedMeasure, AddedRemovedDebt, OnNewCodeMeasure, SeverityMeasur
import { IssuesTags } from './../components/issues-tags';
import Assignees from './../components/issues-assignees';
import { getFacet, extractAssignees } from '../../../api/issues';
-import StatusHelper from '../../../components/shared/status-helper';
import { Rating } from '../../../components/shared/rating';
import { DrilldownLink } from '../../../components/shared/drilldown-link';
import { DomainLeakTitle } from '../main/components';
@@ -102,7 +101,7 @@ export const IssuesMain = React.createClass({
},
renderLegend () {
- return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>
+ return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>;
},
renderOtherMeasures() {
diff --git a/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js
index 709fa1b8f86..321595b779d 100644
--- a/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js
+++ b/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js
@@ -11,7 +11,7 @@ import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
import { filterMetrics, filterMetricsForDomains } from '../helpers/metrics';
import { DomainLeakTitle } from '../main/components';
import { CHART_COLORS_RANGE_PERCENT } from '../../../helpers/constants';
-import { formatMeasure, formatMeasureVariation, localizeMetric } from '../../../helpers/measures';
+import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures';
import { DonutChart } from '../../../components/charts/donut-chart';
import { DrilldownLink } from '../../../components/shared/drilldown-link';
import { getMetricName } from '../helpers/metrics';
@@ -77,7 +77,7 @@ export const DuplicationsMain = React.createClass({
},
renderLegend () {
- return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>
+ return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>;
},
renderMeasures() {
diff --git a/server/sonar-web/src/main/js/apps/overview/domains/size-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/size-domain.js
index 18f0f4caddf..26f4af61cb1 100644
--- a/server/sonar-web/src/main/js/apps/overview/domains/size-domain.js
+++ b/server/sonar-web/src/main/js/apps/overview/domains/size-domain.js
@@ -64,7 +64,7 @@ export const SizeMain = React.createClass({
},
renderLegend () {
- return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>
+ return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>;
},
renderOtherMeasures(domain, hiddenMetrics) {
@@ -102,7 +102,7 @@ export const SizeMain = React.createClass({
if (distribution == null) {
return null;
}
- return <ComplexityDistribution distribution={distribution} {...props}/>
+ return <ComplexityDistribution distribution={distribution} {...props}/>;
},
renderComplexityCard() {
diff --git a/server/sonar-web/src/main/js/apps/overview/main/issues.js b/server/sonar-web/src/main/js/apps/overview/main/issues.js
index 67b37bd6049..f92e7ce12a9 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/issues.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/issues.js
@@ -5,7 +5,6 @@ import { Domain, DomainHeader, DomainPanel, DomainNutshell, DomainLeak, Measures
import { Rating } from './../../../components/shared/rating';
import { IssuesLink } from '../../../components/shared/issues-link';
import { DrilldownLink } from '../../../components/shared/drilldown-link';
-import SeverityIcon from '../../../components/shared/severity-icon';
import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
import { Legend } from '../components/legend';
import { getMetricName } from '../helpers/metrics';
diff --git a/server/sonar-web/src/main/js/apps/overview/main/main.js b/server/sonar-web/src/main/js/apps/overview/main/main.js
index 71c45428052..3d458a74c55 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/main.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/main.js
@@ -9,9 +9,8 @@ import { GeneralSize } from './size';
import { CoverageSelectionMixin } from '../components/coverage-selection-mixin';
import { getPeriodLabel, getPeriodDate } from './../helpers/periods';
import { getMeasuresAndVariations } from '../../../api/measures';
-import { getFacet, getIssuesCount } from '../../../api/issues';
+import { getIssuesCount } from '../../../api/issues';
import { getTimeMachineData } from '../../../api/time-machine';
-import { SEVERITIES } from '../../../helpers/constants';
const METRICS_LIST = [
@@ -36,11 +35,6 @@ const HISTORY_METRICS_LIST = [
];
-function getFacetValue (facet, key) {
- return _.findWhere(facet, { val: key }).count;
-}
-
-
export default React.createClass({
mixins: [CoverageSelectionMixin],
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js b/server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js
index 3d121fe50e3..ef1fd1a9fca 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js
@@ -8,7 +8,7 @@ const rootQualifiersToOptions = (qualifiers) => {
return {
value: q,
label: window.t('qualifiers', q)
- }
+ };
});
};
diff --git a/server/sonar-web/src/main/js/apps/system/item-log-level.js b/server/sonar-web/src/main/js/apps/system/item-log-level.js
index 2ca73615e1b..641a6a870c5 100644
--- a/server/sonar-web/src/main/js/apps/system/item-log-level.js
+++ b/server/sonar-web/src/main/js/apps/system/item-log-level.js
@@ -29,6 +29,6 @@ export default React.createClass({
onChange={this.onChange}
value={this.state.level}>{options}</select>
{warning}
- </div>
+ </div>;
}
});
diff --git a/server/sonar-web/src/main/js/apps/users/tokens-view.js b/server/sonar-web/src/main/js/apps/users/tokens-view.js
index fccd64a2876..f3277b1fea0 100644
--- a/server/sonar-web/src/main/js/apps/users/tokens-view.js
+++ b/server/sonar-web/src/main/js/apps/users/tokens-view.js
@@ -29,7 +29,7 @@ export default Modal.extend({
return getTokens(this.model.id).then(tokens => {
this.tokens = tokens;
this.render();
- })
+ });
},
onGenerateTokenFormSubmit (e) {
@@ -86,5 +86,3 @@ export default Modal.extend({
}
});
-
-
diff --git a/server/sonar-web/src/main/js/components/charts/treemap.js b/server/sonar-web/src/main/js/components/charts/treemap.js
index fe036d3fb9d..f06eda570d0 100644
--- a/server/sonar-web/src/main/js/components/charts/treemap.js
+++ b/server/sonar-web/src/main/js/components/charts/treemap.js
@@ -98,7 +98,7 @@ export const Treemap = React.createClass({
{window.t('no_data')}
</div>
<TreemapBreadcrumbs {...this.props}/>
- </div>
+ </div>;
},
render () {
diff --git a/server/sonar-web/src/main/js/components/common/modals.js b/server/sonar-web/src/main/js/components/common/modals.js
index 931ca8e4604..8117b096937 100644
--- a/server/sonar-web/src/main/js/components/common/modals.js
+++ b/server/sonar-web/src/main/js/components/common/modals.js
@@ -26,7 +26,7 @@ export default Marionette.ItemView.extend({
return false;
});
this.show();
- if (!!this.options.large) {
+ if (this.options.large) {
this.$el.addClass('modal-large');
}
},
@@ -70,5 +70,3 @@ export default Marionette.ItemView.extend({
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/components/mixins/resize-mixin.js b/server/sonar-web/src/main/js/components/mixins/resize-mixin.js
index ebd7360fe07..da3db656361 100644
--- a/server/sonar-web/src/main/js/components/mixins/resize-mixin.js
+++ b/server/sonar-web/src/main/js/components/mixins/resize-mixin.js
@@ -1,4 +1,3 @@
-import React from 'react';
import ReactDOM from 'react-dom';
export const ResizeMixin = {
diff --git a/server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js b/server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js
index 03e9168c2da..3f16dded639 100644
--- a/server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js
+++ b/server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js
@@ -1,5 +1,4 @@
import $ from 'jquery';
-import React from 'react';
import ReactDOM from 'react-dom';
export const TooltipsMixin = {
diff --git a/server/sonar-web/src/main/js/helpers/path.js b/server/sonar-web/src/main/js/helpers/path.js
index ea389d48cb8..1468b8a885c 100644
--- a/server/sonar-web/src/main/js/helpers/path.js
+++ b/server/sonar-web/src/main/js/helpers/path.js
@@ -1,3 +1,6 @@
+import _ from 'underscore';
+
+
export function collapsePath (path, limit = 30) {
if (typeof path !== 'string') {
return '';
diff --git a/server/sonar-web/src/main/js/main/nav/app.js b/server/sonar-web/src/main/js/main/nav/app.js
index 424294553bf..16d2a04c780 100644
--- a/server/sonar-web/src/main/js/main/nav/app.js
+++ b/server/sonar-web/src/main/js/main/nav/app.js
@@ -1,3 +1,4 @@
+import _ from 'underscore';
import React from 'react';
import ReactDOM from 'react-dom';
@@ -8,6 +9,7 @@ import { getGlobalNavigation, getComponentNavigation, getSettingsNavigation } fr
import '../../components/workspace/main';
import '../../helpers/handlebars-helpers';
+
export default class App {
start () {
let options = window.sonarqube;
diff --git a/server/sonar-web/src/main/js/widgets/old/bubble-chart.js b/server/sonar-web/src/main/js/widgets/old/bubble-chart.js
index c3d0e2eef73..21890bc3980 100644
--- a/server/sonar-web/src/main/js/widgets/old/bubble-chart.js
+++ b/server/sonar-web/src/main/js/widgets/old/bubble-chart.js
@@ -122,7 +122,7 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.sizeMetric = this.metricsPriority()[2];
this.getSizeMetric = function(d) {
- return !!d.measures[widget.sizeMetric] ? d.measures[widget.sizeMetric].val : 0;
+ return d.measures[widget.sizeMetric] ? d.measures[widget.sizeMetric].val : 0;
};
};
diff --git a/server/sonar-web/src/main/js/widgets/old/pie-chart.js b/server/sonar-web/src/main/js/widgets/old/pie-chart.js
index f3d81e7f639..929eb6a08ba 100644
--- a/server/sonar-web/src/main/js/widgets/old/pie-chart.js
+++ b/server/sonar-web/src/main/js/widgets/old/pie-chart.js
@@ -231,7 +231,7 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
var metrics = widget.metricsPriority().map(function(m) {
return {
name: widget.metrics()[m].name,
- value: (!!d.measures[m] ? d.measures[m].fval : '–')
+ value: (d.measures[m] ? d.measures[m].fval : '–')
};
});
metrics.unshift({