aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/component-measures
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-03-31 13:54:46 +0200
committerGitHub <noreply@github.com>2017-03-31 13:54:46 +0200
commitfe716c6dc43d4d7acb437136b1c87902e8ff0bc4 (patch)
tree6b8a18d7a8f76de1fd34be3235d1639477b75d71 /server/sonar-web/src/main/js/apps/component-measures
parente660d605a27992d82d901b8fe0b8938da7afb270 (diff)
downloadsonarqube-fe716c6dc43d4d7acb437136b1c87902e8ff0bc4.tar.gz
sonarqube-fe716c6dc43d4d7acb437136b1c87902e8ff0bc4.zip
re-format js code (#1877)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/component-measures')
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js7
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js7
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/IconList.js7
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js7
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/IconTreemap.js3
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/BubbleChart.js9
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetails.js9
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js9
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/details/drilldown/MeasureDrilldown.js15
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/home/Home.js6
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/home/MeasureListValue.js3
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js3
12 files changed, 38 insertions, 47 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js b/server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js
index e2776c7538a..9ffdf57c2bd 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js
@@ -28,9 +28,10 @@ export default function IconBubbles() {
fillRule="evenodd"
clipRule="evenodd"
strokeLinejoin="round"
- strokeMiterlimit="1.414"
- >
- <path d="M352 256c52.984 0 96 43.016 96 96s-43.016 96-96 96-96-43.016-96-96 43.016-96 96-96zM128 96c70.645 0 128 57.355 128 128 0 70.645-57.355 128-128 128C57.355 352 0 294.645 0 224 0 153.355 57.355 96 128 96zM352 0c52.984 0 96 43.016 96 96s-43.016 96-96 96-96-43.016-96-96 43.016-96 96-96z" />
+ strokeMiterlimit="1.414">
+ <path
+ d="M352 256c52.984 0 96 43.016 96 96s-43.016 96-96 96-96-43.016-96-96 43.016-96 96-96zM128 96c70.645 0 128 57.355 128 128 0 70.645-57.355 128-128 128C57.355 352 0 294.645 0 224 0 153.355 57.355 96 128 96zM352 0c52.984 0 96 43.016 96 96s-43.016 96-96 96-96-43.016-96-96 43.016-96 96-96z"
+ />
</svg>
);
}
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js b/server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js
index ae09eda5adc..5173bf7c3c4 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js
@@ -28,9 +28,10 @@ export default function IconHistory() {
fillRule="evenodd"
clipRule="evenodd"
strokeLinejoin="round"
- strokeMiterlimit="1.414"
- >
- <path d="M512 384v32H0V32h32v352h480zM480 72v108.75q0 5.25-4.875 7.375t-8.875-1.875L436 156 277.75 314.25q-2.5 2.5-5.75 2.5t-5.75-2.5L208 256 104 360l-48-48 146.25-146.25q2.5-2.5 5.75-2.5t5.75 2.5L272 224l116-116-30.25-30.25q-4-4-1.875-8.875T363.25 64H472q3.5 0 5.75 2.25T480 72z" />
+ strokeMiterlimit="1.414">
+ <path
+ d="M512 384v32H0V32h32v352h480zM480 72v108.75q0 5.25-4.875 7.375t-8.875-1.875L436 156 277.75 314.25q-2.5 2.5-5.75 2.5t-5.75-2.5L208 256 104 360l-48-48 146.25-146.25q2.5-2.5 5.75-2.5t5.75 2.5L272 224l116-116-30.25-30.25q-4-4-1.875-8.875T363.25 64H472q3.5 0 5.75 2.25T480 72z"
+ />
</svg>
);
}
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/IconList.js b/server/sonar-web/src/main/js/apps/component-measures/components/IconList.js
index 973f0521938..56b40bca427 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/IconList.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/IconList.js
@@ -28,9 +28,10 @@ export default function ListIcon() {
fillRule="evenodd"
clipRule="evenodd"
strokeLinejoin="round"
- strokeMiterlimit="1.414"
- >
- <path d="M448 48c0-8.83-7.17-16-16-16H16C7.17 32 0 39.17 0 48v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16V48zM448 144c0-8.83-7.17-16-16-16H16c-8.83 0-16 7.17-16 16v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16v-32zM448 240c0-8.83-7.17-16-16-16H16c-8.83 0-16 7.17-16 16v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16v-32zM448 336.03c0-8.83-7.17-16-16-16H16c-8.83 0-16 7.17-16 16v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16v-32z" />
+ strokeMiterlimit="1.414">
+ <path
+ d="M448 48c0-8.83-7.17-16-16-16H16C7.17 32 0 39.17 0 48v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16V48zM448 144c0-8.83-7.17-16-16-16H16c-8.83 0-16 7.17-16 16v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16v-32zM448 240c0-8.83-7.17-16-16-16H16c-8.83 0-16 7.17-16 16v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16v-32zM448 336.03c0-8.83-7.17-16-16-16H16c-8.83 0-16 7.17-16 16v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16v-32z"
+ />
</svg>
);
}
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js b/server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js
index 3a3a1ca95ab..95342ee9d91 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js
@@ -28,9 +28,10 @@ export default function IconTree() {
fillRule="evenodd"
clipRule="evenodd"
strokeLinejoin="round"
- strokeMiterlimit="1.414"
- >
- <path d="M448 48c0-8.83-7.17-16-16-16H16C7.17 32 0 39.17 0 48v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16V48zM448 144c0-8.83-6.146-16-13.714-16H77.714C70.144 128 64 135.17 64 144v32c0 8.83 6.145 16 13.714 16h356.572c7.568 0 13.714-7.17 13.714-16v-32zM448 240c0-8.83-5.12-16-11.428-16H139.428C133.12 224 128 231.17 128 240v32c0 8.83 5.12 16 11.428 16h297.144c6.307 0 11.428-7.17 11.428-16v-32zM448 336.03c0-8.83-4.097-16-9.142-16H201.143c-5.046 0-9.143 7.17-9.143 16v32c0 8.83 4.097 16 9.143 16h237.715c5.045 0 9.142-7.17 9.142-16v-32z" />
+ strokeMiterlimit="1.414">
+ <path
+ d="M448 48c0-8.83-7.17-16-16-16H16C7.17 32 0 39.17 0 48v32c0 8.83 7.17 16 16 16h416c8.83 0 16-7.17 16-16V48zM448 144c0-8.83-6.146-16-13.714-16H77.714C70.144 128 64 135.17 64 144v32c0 8.83 6.145 16 13.714 16h356.572c7.568 0 13.714-7.17 13.714-16v-32zM448 240c0-8.83-5.12-16-11.428-16H139.428C133.12 224 128 231.17 128 240v32c0 8.83 5.12 16 11.428 16h297.144c6.307 0 11.428-7.17 11.428-16v-32zM448 336.03c0-8.83-4.097-16-9.142-16H201.143c-5.046 0-9.143 7.17-9.143 16v32c0 8.83 4.097 16 9.143 16h237.715c5.045 0 9.142-7.17 9.142-16v-32z"
+ />
</svg>
);
}
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/IconTreemap.js b/server/sonar-web/src/main/js/apps/component-measures/components/IconTreemap.js
index 9e7ee089dfd..aef8aabc7ff 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/IconTreemap.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/IconTreemap.js
@@ -27,8 +27,7 @@ export default function IconTreemap() {
fillRule="evenodd"
clipRule="evenodd"
strokeLinejoin="round"
- strokeMiterlimit="1.414"
- >
+ strokeMiterlimit="1.414">
<path d="M0 0h224v448H0zM256 0h192v256H256zM256 288h192v160H256z" />
</svg>
);
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/BubbleChart.js b/server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/BubbleChart.js
index dee878337fc..00340d6af08 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/BubbleChart.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/BubbleChart.js
@@ -106,11 +106,14 @@ export default class BubbleChart extends React.Component {
}
getTooltip(component) {
+ const x = formatMeasure(getMeasure(component, this.xMetric.key), this.xMetric.type);
+ const y = formatMeasure(getMeasure(component, this.yMetric.key), this.yMetric.type);
+ const size = formatMeasure(getMeasure(component, this.sizeMetric.key), this.sizeMetric.type);
const inner = [
component.name,
- `${this.xMetric.name}: ${formatMeasure(getMeasure(component, this.xMetric.key), this.xMetric.type)}`,
- `${this.yMetric.name}: ${formatMeasure(getMeasure(component, this.yMetric.key), this.yMetric.type)}`,
- `${this.sizeMetric.name}: ${formatMeasure(getMeasure(component, this.sizeMetric.key), this.sizeMetric.type)}`
+ `${this.xMetric.name}: ${x}`,
+ `${this.yMetric.name}: ${y}`,
+ `${this.sizeMetric.name}: ${size}`
].join('<br>');
return `<div class="text-left">${inner}</div>`;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetails.js b/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetails.js
index 41855bcc6db..46571e5077b 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetails.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetails.js
@@ -92,8 +92,7 @@ export default class MeasureDetails extends React.Component {
<IndexLink
to={{ pathname: '/component_measures', query: { id: component.key } }}
id="component-measures-back-to-all-measures"
- className="text-muted"
- >
+ className="text-muted">
{translate('component_measures.all_measures')}
</IndexLink>
{!!metric.domain &&
@@ -104,8 +103,7 @@ export default class MeasureDetails extends React.Component {
pathname: `/component_measures/domain/${metric.domain}`,
query: { id: component.key }
}}
- className="text-muted"
- >
+ className="text-muted">
{translateWithParameters('component_measures.domain_measures', metric.domain)}
</Link>
</span>}
@@ -124,8 +122,7 @@ export default class MeasureDetails extends React.Component {
metric={metric}
tab={tab}
leakPeriod={period}
- leakPeriodDate={periodDate}
- >
+ leakPeriodDate={periodDate}>
{children}
</MeasureDrilldown>}
</section>
diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js
index e3e7969da17..1ccdd7eed1b 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js
@@ -64,22 +64,19 @@ const ComponentCell = ({ component, isSelected, onClick }) => {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis'
- }}
- >
+ }}>
{component.refId == null || component.qualifier === 'DEV_PRJ'
? <a
id={'component-measures-component-link-' + component.key}
className={linkClassName}
href={getComponentUrl(component.key)}
- onClick={handleClick}
- >
+ onClick={handleClick}>
{inner}
</a>
: <a
id={'component-measures-component-link-' + component.key}
className={linkClassName}
- href={getComponentUrl(component.refKey || component.key)}
- >
+ href={getComponentUrl(component.refKey || component.key)}>
<span className="big-spacer-right">
<i className="icon-detach" />
</span>
diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/MeasureDrilldown.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/MeasureDrilldown.js
index f934eebd193..699bba21e71 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/MeasureDrilldown.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/MeasureDrilldown.js
@@ -43,8 +43,7 @@ export default class MeasureDrilldown extends React.Component {
to={{
pathname: `/component_measures/metric/${metric.key}/list`,
query: { id: component.key }
- }}
- >
+ }}>
<IconList />
{translate('component_measures.tab.list')}
</Link>
@@ -56,8 +55,7 @@ export default class MeasureDrilldown extends React.Component {
to={{
pathname: `/component_measures/metric/${metric.key}/tree`,
query: { id: component.key }
- }}
- >
+ }}>
<IconTree />
{translate('component_measures.tab.tree')}
</Link>
@@ -70,8 +68,7 @@ export default class MeasureDrilldown extends React.Component {
to={{
pathname: `/component_measures/metric/${metric.key}/bubbles`,
query: { id: component.key }
- }}
- >
+ }}>
<IconBubbles />
{translate('component_measures.tab.bubbles')}
</Link>
@@ -84,8 +81,7 @@ export default class MeasureDrilldown extends React.Component {
to={{
pathname: `/component_measures/metric/${metric.key}/treemap`,
query: { id: component.key }
- }}
- >
+ }}>
<IconTreemap />
{translate('component_measures.tab.treemap')}
</Link>
@@ -98,8 +94,7 @@ export default class MeasureDrilldown extends React.Component {
to={{
pathname: `/component_measures/metric/${metric.key}/history`,
query: { id: component.key }
- }}
- >
+ }}>
<IconHistory />
{translate('component_measures.tab.history')}
</Link>
diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/Home.js b/server/sonar-web/src/main/js/apps/component-measures/home/Home.js
index 9e895d390e3..14de2b1a12b 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/home/Home.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/home/Home.js
@@ -51,8 +51,7 @@ export default class Home extends React.Component {
<li>
<IndexLink
to={{ pathname: '/component_measures', query: { id: component.key } }}
- activeClassName="active"
- >
+ activeClassName="active">
{translate('all')}
</IndexLink>
</li>
@@ -63,8 +62,7 @@ export default class Home extends React.Component {
pathname: `/component_measures/domain/${domain.name}`,
query: { id: component.key }
}}
- activeClassName="active"
- >
+ activeClassName="active">
{getLocalizedMetricDomain(domain.name)}
</Link>
</li>
diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/MeasureListValue.js b/server/sonar-web/src/main/js/apps/component-measures/home/MeasureListValue.js
index 5b395201657..165980283b1 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/home/MeasureListValue.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/home/MeasureListValue.js
@@ -28,8 +28,7 @@ const MeasureListValue = ({ measure }) => {
return (
<div
id={`measure-${measure.metric.key}-leak`}
- className="domain-measures-value domain-measures-leak"
- >
+ className="domain-measures-value domain-measures-leak">
<Measure measure={measure} />
</div>
);
diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js b/server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js
index c46c27e5d3a..78bf2181269 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js
@@ -32,8 +32,7 @@ const MeasuresList = ({ measures, component, className = 'domain-measures' }) =>
to={{
pathname: `/component_measures/metric/${measure.metric.key}`,
query: { id: component.key }
- }}
- >
+ }}>
<div className="domain-measures-name">
<IssueTypeIcon query={measure.metric.key} className="little-spacer-right" />
<span id={`measure-${measure.metric.key}-name`}>