]> source.dussan.org Git - sonarqube.git/commitdiff
normalize overview pages urls and titles
authorStas Vilchik <vilchiks@gmail.com>
Wed, 9 Dec 2015 08:50:19 +0000 (09:50 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 9 Dec 2015 15:29:49 +0000 (16:29 +0100)
16 files changed:
it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_it_coverage_on_project_overview.html
it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_overall_coverage_on_project_overview.html
it/it-tests/src/test/resources/projectOverview/ProjectOverviewTest/test_ut_coverage_on_project_overview.html
server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js
server/sonar-web/src/main/js/apps/overview/domains/size-domain.js [deleted file]
server/sonar-web/src/main/js/apps/overview/domains/structure-domain.js [new file with mode: 0644]
server/sonar-web/src/main/js/apps/overview/main/coverage.js
server/sonar-web/src/main/js/apps/overview/main/debt.js [new file with mode: 0644]
server/sonar-web/src/main/js/apps/overview/main/duplications.js
server/sonar-web/src/main/js/apps/overview/main/issues.js [deleted file]
server/sonar-web/src/main/js/apps/overview/main/main.js
server/sonar-web/src/main/js/apps/overview/main/size.js [deleted file]
server/sonar-web/src/main/js/apps/overview/main/structure.js [new file with mode: 0644]
server/sonar-web/src/main/js/apps/overview/overview.js
server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index db38e860191b8a1a54b65061ef91b06ddab98910..f5788966cbd8e9d4ef022074338079a3fb1901c0 100644 (file)
@@ -26,7 +26,7 @@
 </tr>
 <tr>
        <td>open</td>
-       <td>/sonar/overview/tests?id=project-for-overview-it-coverage</td>
+       <td>/sonar/overview/coverage?id=project-for-overview-it-coverage</td>
        <td></td>
 </tr>
 <tr>
index 9d5fd67fee23e0c7b5422c308e84cb0e7218f545..96b6bba216f1af650bb6d77592a1a4e3973d5f46 100644 (file)
@@ -26,7 +26,7 @@
 </tr>
 <tr>
        <td>open</td>
-       <td>/sonar/overview/tests?id=project-for-overview-overall-coverage</td>
+       <td>/sonar/overview/coverage?id=project-for-overview-overall-coverage</td>
        <td></td>
 </tr>
 <tr>
index fd88d0fc0aa37a16e3aca9015c79b81862498a67..1dd3c9ccd272104001ff903b972a374d9d1afedf 100644 (file)
@@ -26,7 +26,7 @@
 </tr>
 <tr>
        <td>open</td>
-       <td>/sonar/overview/tests?id=project-for-overview-ut-coverage</td>
+       <td>/sonar/overview/coverage?id=project-for-overview-ut-coverage</td>
        <td></td>
 </tr>
 <tr>
index 4ee8ce454762c47319f44b9e8f6920a564fbd02b..d87d3dc5e70b568f5fecc6ed31eb433beb304faa 100644 (file)
@@ -27,7 +27,7 @@ const KNOWN_METRICS = ['violations', 'sqale_index', 'sqale_rating', 'sqale_debt_
   'critical_violations', 'major_violations', 'minor_violations', 'info_violations', 'confirmed_issues'];
 
 
-export const IssuesMain = React.createClass({
+export const DebtMain = React.createClass({
   mixins: [TooltipsMixin],
 
   getInitialState() {
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
deleted file mode 100644 (file)
index 05a23ae..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-import React from 'react';
-
-import { LanguageDistribution } from './../components/language-distribution';
-import { ComplexityDistribution } from './../components/complexity-distribution';
-import { NclocDistribution } from '../components/ncloc-distribution';
-import { getMeasuresAndVariations } from '../../../api/measures';
-import { DetailedMeasure } from '../components/detailed-measure';
-import { DomainTimeline } from '../components/domain-timeline';
-import { getPeriodLabel, getPeriodDate } from './../helpers/periods';
-import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
-import { filterMetrics, filterMetricsForDomains } from '../helpers/metrics';
-import { DomainLeakTitle } from '../main/components';
-
-
-export const SizeMain = React.createClass({
-  mixins: [TooltipsMixin],
-
-  getInitialState() {
-    return {
-      ready: false,
-      leakPeriodLabel: getPeriodLabel(this.props.component.periods, this.props.leakPeriodIndex),
-      leakPeriodDate: getPeriodDate(this.props.component.periods, this.props.leakPeriodIndex)
-    };
-  },
-
-  componentDidMount() {
-    this.requestMeasures().then(r => {
-      let measures = this.getMeasuresValues(r, 'value');
-      let leak = this.getMeasuresValues(r, 'var' + this.props.leakPeriodIndex);
-      this.setState({ ready: true, measures, leak });
-    });
-  },
-
-  getMeasuresValues (measures, fieldKey) {
-    let values = {};
-    Object.keys(measures).forEach(measureKey => {
-      values[measureKey] = measures[measureKey][fieldKey];
-    });
-    return values;
-  },
-
-  getMetricsForDomain() {
-    return this.props.metrics
-        .filter(metric => ['Size', 'Complexity', 'Documentation'].indexOf(metric.domain) !== -1)
-        .map(metric => metric.key);
-  },
-
-  getMetricsForTimeline() {
-    return filterMetricsForDomains(this.props.metrics, ['Size', 'Complexity', 'Documentation']);
-  },
-
-  getAllMetricsForTimeline() {
-    return filterMetrics(this.props.metrics);
-  },
-
-  requestMeasures () {
-    return getMeasuresAndVariations(this.props.component.key, this.getMetricsForDomain());
-  },
-
-  renderLoading () {
-    return <div className="text-center">
-      <i className="spinner spinner-margin"/>
-    </div>;
-  },
-
-  renderLegend () {
-    return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>;
-  },
-
-  renderOtherMeasures(domain, hiddenMetrics) {
-    let metrics = filterMetricsForDomains(this.props.metrics, [domain])
-        .filter(metric => hiddenMetrics.indexOf(metric.key) === -1)
-        .map(metric => {
-          return <DetailedMeasure key={metric.key}
-                                  {...this.props}
-                                  {...this.state}
-                                  metric={metric.key}
-                                  type={metric.type}/>;
-        });
-    return <div>{metrics}</div>;
-  },
-
-  renderOtherSizeMeasures() {
-    return this.renderOtherMeasures('Size', ['ncloc']);
-  },
-
-  renderOtherComplexityMeasures() {
-    return this.renderOtherMeasures('Complexity',
-        ['complexity', 'function_complexity', 'file_complexity', 'class_complexity']);
-  },
-
-  renderOtherDocumentationMeasures() {
-    return this.renderOtherMeasures('Documentation', []);
-  },
-
-  renderLanguageDistribution() {
-    let distribution = this.state.measures['ncloc_language_distribution'];
-    if (distribution == null) {
-      return null;
-    }
-    return <LanguageDistribution lines={this.state.measures['ncloc']} distribution={distribution}/>;
-  },
-
-  renderComplexityDistribution(distribution, props) {
-    if (distribution == null) {
-      return null;
-    }
-    return <ComplexityDistribution distribution={distribution} {...props}/>;
-  },
-
-  renderComplexityCard() {
-    if (this.state.measures['complexity'] == null) {
-      return null;
-    }
-
-    return <div className="overview-detailed-layout-column">
-      <div className="overview-detailed-measures-list">
-        <DetailedMeasure {...this.props}
-                         {...this.state}
-                         metric="complexity"
-                         type="INT"/>
-        <DetailedMeasure {...this.props}
-                         {...this.state}
-                         metric="function_complexity"
-                         type="FLOAT">
-          {this.renderComplexityDistribution(this.state.measures['function_complexity_distribution'],
-              { of: 'function' })}
-        </DetailedMeasure>
-        <DetailedMeasure {...this.props}
-                         {...this.state}
-                         metric="file_complexity"
-                         type="FLOAT">
-          {this.renderComplexityDistribution(this.state.measures['file_complexity_distribution'],
-              { of: 'file' })}
-        </DetailedMeasure>
-        <DetailedMeasure {...this.props}
-                         {...this.state}
-                         metric="class_complexity"
-                         type="FLOAT"/>
-        {this.renderOtherComplexityMeasures()}
-      </div>
-    </div>;
-  },
-
-  render () {
-    if (!this.state.ready) {
-      return this.renderLoading();
-    }
-    return <div className="overview-detailed-page">
-      <div className="overview-card">
-        <div className="overview-card-header">
-          <div className="overview-title">{window.t('overview.domain.size')}</div>
-          {this.renderLegend()}
-        </div>
-
-        <div className="overview-detailed-layout-size">
-          <div className="overview-detailed-layout-column">
-            <div className="overview-detailed-measures-list">
-              <DetailedMeasure {...this.props}
-                               {...this.state}
-                               metric="ncloc"
-                               type="INT">
-                {this.renderLanguageDistribution()}
-              </DetailedMeasure>
-              {this.renderOtherSizeMeasures()}
-            </div>
-          </div>
-
-          {this.renderComplexityCard()}
-
-          <div className="overview-detailed-layout-column">
-            <div className="overview-detailed-measures-list">
-              {this.renderOtherDocumentationMeasures()}
-            </div>
-          </div>
-        </div>
-      </div>
-
-      <div className="overview-cards-list">
-        <div className="overview-card">
-          <DomainTimeline {...this.props} {...this.state}
-              initialMetric="ncloc"
-              metrics={this.getMetricsForTimeline()}
-              allMetrics={this.getAllMetricsForTimeline()}/>
-        </div>
-        <div className="overview-card">
-          <NclocDistribution {...this.props}/>
-        </div>
-      </div>
-    </div>;
-
-  }
-});
diff --git a/server/sonar-web/src/main/js/apps/overview/domains/structure-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/structure-domain.js
new file mode 100644 (file)
index 0000000..3c1563b
--- /dev/null
@@ -0,0 +1,193 @@
+import React from 'react';
+
+import { LanguageDistribution } from './../components/language-distribution';
+import { ComplexityDistribution } from './../components/complexity-distribution';
+import { NclocDistribution } from '../components/ncloc-distribution';
+import { getMeasuresAndVariations } from '../../../api/measures';
+import { DetailedMeasure } from '../components/detailed-measure';
+import { DomainTimeline } from '../components/domain-timeline';
+import { getPeriodLabel, getPeriodDate } from './../helpers/periods';
+import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
+import { filterMetrics, filterMetricsForDomains } from '../helpers/metrics';
+import { DomainLeakTitle } from '../main/components';
+
+
+export const StructureMain = React.createClass({
+  mixins: [TooltipsMixin],
+
+  getInitialState() {
+    return {
+      ready: false,
+      leakPeriodLabel: getPeriodLabel(this.props.component.periods, this.props.leakPeriodIndex),
+      leakPeriodDate: getPeriodDate(this.props.component.periods, this.props.leakPeriodIndex)
+    };
+  },
+
+  componentDidMount() {
+    this.requestMeasures().then(r => {
+      let measures = this.getMeasuresValues(r, 'value');
+      let leak = this.getMeasuresValues(r, 'var' + this.props.leakPeriodIndex);
+      this.setState({ ready: true, measures, leak });
+    });
+  },
+
+  getMeasuresValues (measures, fieldKey) {
+    let values = {};
+    Object.keys(measures).forEach(measureKey => {
+      values[measureKey] = measures[measureKey][fieldKey];
+    });
+    return values;
+  },
+
+  getMetricsForDomain() {
+    return this.props.metrics
+        .filter(metric => ['Size', 'Complexity', 'Documentation'].indexOf(metric.domain) !== -1)
+        .map(metric => metric.key);
+  },
+
+  getMetricsForTimeline() {
+    return filterMetricsForDomains(this.props.metrics, ['Size', 'Complexity', 'Documentation']);
+  },
+
+  getAllMetricsForTimeline() {
+    return filterMetrics(this.props.metrics);
+  },
+
+  requestMeasures () {
+    return getMeasuresAndVariations(this.props.component.key, this.getMetricsForDomain());
+  },
+
+  renderLoading () {
+    return <div className="text-center">
+      <i className="spinner spinner-margin"/>
+    </div>;
+  },
+
+  renderLegend () {
+    return <DomainLeakTitle inline={true} label={this.state.leakPeriodLabel} date={this.state.leakPeriodDate}/>;
+  },
+
+  renderOtherMeasures(domain, hiddenMetrics) {
+    let metrics = filterMetricsForDomains(this.props.metrics, [domain])
+        .filter(metric => hiddenMetrics.indexOf(metric.key) === -1)
+        .map(metric => {
+          return <DetailedMeasure key={metric.key}
+                                  {...this.props}
+                                  {...this.state}
+                                  metric={metric.key}
+                                  type={metric.type}/>;
+        });
+    return <div>{metrics}</div>;
+  },
+
+  renderOtherSizeMeasures() {
+    return this.renderOtherMeasures('Size', ['ncloc']);
+  },
+
+  renderOtherComplexityMeasures() {
+    return this.renderOtherMeasures('Complexity',
+        ['complexity', 'function_complexity', 'file_complexity', 'class_complexity']);
+  },
+
+  renderOtherDocumentationMeasures() {
+    return this.renderOtherMeasures('Documentation', []);
+  },
+
+  renderLanguageDistribution() {
+    let distribution = this.state.measures['ncloc_language_distribution'];
+    if (distribution == null) {
+      return null;
+    }
+    return <LanguageDistribution lines={this.state.measures['ncloc']} distribution={distribution}/>;
+  },
+
+  renderComplexityDistribution(distribution, props) {
+    if (distribution == null) {
+      return null;
+    }
+    return <ComplexityDistribution distribution={distribution} {...props}/>;
+  },
+
+  renderComplexityCard() {
+    if (this.state.measures['complexity'] == null) {
+      return null;
+    }
+
+    return <div className="overview-detailed-layout-column">
+      <div className="overview-detailed-measures-list">
+        <DetailedMeasure {...this.props}
+                         {...this.state}
+                         metric="complexity"
+                         type="INT"/>
+        <DetailedMeasure {...this.props}
+                         {...this.state}
+                         metric="function_complexity"
+                         type="FLOAT">
+          {this.renderComplexityDistribution(this.state.measures['function_complexity_distribution'],
+              { of: 'function' })}
+        </DetailedMeasure>
+        <DetailedMeasure {...this.props}
+                         {...this.state}
+                         metric="file_complexity"
+                         type="FLOAT">
+          {this.renderComplexityDistribution(this.state.measures['file_complexity_distribution'],
+              { of: 'file' })}
+        </DetailedMeasure>
+        <DetailedMeasure {...this.props}
+                         {...this.state}
+                         metric="class_complexity"
+                         type="FLOAT"/>
+        {this.renderOtherComplexityMeasures()}
+      </div>
+    </div>;
+  },
+
+  render () {
+    if (!this.state.ready) {
+      return this.renderLoading();
+    }
+    return <div className="overview-detailed-page">
+      <div className="overview-card">
+        <div className="overview-card-header">
+          <div className="overview-title">{window.t('overview.domain.structure')}</div>
+          {this.renderLegend()}
+        </div>
+
+        <div className="overview-detailed-layout-size">
+          <div className="overview-detailed-layout-column">
+            <div className="overview-detailed-measures-list">
+              <DetailedMeasure {...this.props}
+                               {...this.state}
+                               metric="ncloc"
+                               type="INT">
+                {this.renderLanguageDistribution()}
+              </DetailedMeasure>
+              {this.renderOtherSizeMeasures()}
+            </div>
+          </div>
+
+          {this.renderComplexityCard()}
+
+          <div className="overview-detailed-layout-column">
+            <div className="overview-detailed-measures-list">
+              {this.renderOtherDocumentationMeasures()}
+            </div>
+          </div>
+        </div>
+      </div>
+
+      <div className="overview-cards-list">
+        <div className="overview-card">
+          <DomainTimeline {...this.props} {...this.state}
+              initialMetric="ncloc"
+              metrics={this.getMetricsForTimeline()}
+              allMetrics={this.getAllMetricsForTimeline()}/>
+        </div>
+        <div className="overview-card">
+          <NclocDistribution {...this.props}/>
+        </div>
+      </div>
+    </div>;
+
+  }
+});
index 07aaff0c3834c98727c0de7d1d0f9aaaf834d9d5..7755cb28df722b432f7889e97aa91ad2f5dca5e2 100644 (file)
@@ -85,9 +85,11 @@ export const GeneralCoverage = React.createClass({
     ];
 
     return <Domain>
-      <DomainHeader component={this.props.component} title={window.t('overview.domain.coverage')} linkTo="/tests"/>
+      <DomainHeader component={this.props.component}
+                    title={window.t('overview.domain.coverage')}
+                    linkTo="/coverage"/>
 
-      <DomainPanel domain="coverage">
+      <DomainPanel>
         <DomainNutshell>
           <MeasuresList>
 
diff --git a/server/sonar-web/src/main/js/apps/overview/main/debt.js b/server/sonar-web/src/main/js/apps/overview/main/debt.js
new file mode 100644 (file)
index 0000000..490eadc
--- /dev/null
@@ -0,0 +1,98 @@
+import moment from 'moment';
+import React from 'react';
+
+import { Domain,
+         DomainHeader,
+         DomainPanel,
+         DomainNutshell,
+         DomainLeak,
+         MeasuresList,
+         Measure,
+         DomainMixin } from './components';
+import { Rating } from './../../../components/shared/rating';
+import { IssuesLink } from '../../../components/shared/issues-link';
+import { DrilldownLink } from '../../../components/shared/drilldown-link';
+import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
+import { Legend } from '../components/legend';
+import { getMetricName } from '../helpers/metrics';
+import { formatMeasure } from '../../../helpers/measures';
+
+
+export const GeneralDebt = React.createClass({
+  propTypes: {
+    leakPeriodLabel: React.PropTypes.string,
+    leakPeriodDate: React.PropTypes.object
+  },
+
+  mixins: [TooltipsMixin, DomainMixin],
+
+  renderLeak () {
+    if (!this.hasLeakPeriod()) {
+      return null;
+    }
+
+    let createdAfter = moment(this.props.leakPeriodDate).format('YYYY-MM-DDTHH:mm:ssZZ');
+
+    return <DomainLeak>
+      <Legend leakPeriodLabel={this.props.leakPeriodLabel} leakPeriodDate={this.props.leakPeriodDate}/>
+
+      <MeasuresList>
+        <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>;
+  },
+
+  render () {
+    return <Domain>
+      <DomainHeader component={this.props.component}
+                    title={window.t('overview.domain.debt')}
+                    linkTo="/debt"/>
+
+      <DomainPanel>
+        <DomainNutshell>
+          <MeasuresList>
+
+            <Measure composite={true}>
+              <div className="display-inline-block text-middle big-spacer-right">
+                <div className="overview-domain-measure-value">
+                  <DrilldownLink component={this.props.component.key} metric="sqale_rating">
+                    <Rating value={this.props.measures['sqale_rating']}/>
+                  </DrilldownLink>
+                </div>
+              </div>
+              <div className="display-inline-block text-middle">
+                <div className="overview-domain-measure-value">
+                  <IssuesLink component={this.props.component.key}
+                              params={{ resolved: 'false', facetMode: 'debt' }}>
+                    {formatMeasure(this.props.measures.debt, 'SHORT_WORK_DUR')}
+                  </IssuesLink>
+                </div>
+                <div className="overview-domain-measure-label">{getMetricName('debt')}</div>
+              </div>
+            </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', true)}
+        </DomainNutshell>
+        {this.renderLeak()}
+      </DomainPanel>
+    </Domain>;
+  }
+});
index 64cafcf8932a1b3e9547ee16c9f125a56d897f8a..6240df804175f6e38402bfca77657132f565bd9e 100644 (file)
@@ -57,10 +57,11 @@ export const GeneralDuplications = React.createClass({
     ];
 
     return <Domain>
-      <DomainHeader component={this.props.component} title={window.t('overview.domain.duplications')}
+      <DomainHeader component={this.props.component}
+                    title={window.t('overview.domain.duplications')}
                     linkTo="/duplications"/>
 
-      <DomainPanel domain="duplications">
+      <DomainPanel>
         <DomainNutshell>
           <MeasuresList>
 
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
deleted file mode 100644 (file)
index 86a1455..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-import moment from 'moment';
-import React from 'react';
-
-import { Domain,
-         DomainHeader,
-         DomainPanel,
-         DomainNutshell,
-         DomainLeak,
-         MeasuresList,
-         Measure,
-         DomainMixin } from './components';
-import { Rating } from './../../../components/shared/rating';
-import { IssuesLink } from '../../../components/shared/issues-link';
-import { DrilldownLink } from '../../../components/shared/drilldown-link';
-import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
-import { Legend } from '../components/legend';
-import { getMetricName } from '../helpers/metrics';
-import { formatMeasure } from '../../../helpers/measures';
-
-
-export const GeneralIssues = React.createClass({
-  propTypes: {
-    leakPeriodLabel: React.PropTypes.string,
-    leakPeriodDate: React.PropTypes.object
-  },
-
-  mixins: [TooltipsMixin, DomainMixin],
-
-  renderLeak () {
-    if (!this.hasLeakPeriod()) {
-      return null;
-    }
-
-    let createdAfter = moment(this.props.leakPeriodDate).format('YYYY-MM-DDTHH:mm:ssZZ');
-
-    return <DomainLeak>
-      <Legend leakPeriodLabel={this.props.leakPeriodLabel} leakPeriodDate={this.props.leakPeriodDate}/>
-
-      <MeasuresList>
-        <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>;
-  },
-
-  render () {
-    return <Domain>
-      <DomainHeader component={this.props.component} title={window.t('overview.domain.debt')} linkTo="/issues"/>
-
-      <DomainPanel domain="issues">
-        <DomainNutshell>
-          <MeasuresList>
-
-            <Measure composite={true}>
-              <div className="display-inline-block text-middle big-spacer-right">
-                <div className="overview-domain-measure-value">
-                  <DrilldownLink component={this.props.component.key} metric="sqale_rating">
-                    <Rating value={this.props.measures['sqale_rating']}/>
-                  </DrilldownLink>
-                </div>
-              </div>
-              <div className="display-inline-block text-middle">
-                <div className="overview-domain-measure-value">
-                  <IssuesLink component={this.props.component.key}
-                              params={{ resolved: 'false', facetMode: 'debt' }}>
-                    {formatMeasure(this.props.measures.debt, 'SHORT_WORK_DUR')}
-                  </IssuesLink>
-                </div>
-                <div className="overview-domain-measure-label">{getMetricName('debt')}</div>
-              </div>
-            </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', true)}
-        </DomainNutshell>
-        {this.renderLeak()}
-      </DomainPanel>
-    </Domain>;
-  }
-});
index 39e17057257636e0631c6f1f2be2df2c525026fd..81eabb769f462e14b4674ef34c43165ef2268003 100644 (file)
@@ -2,10 +2,10 @@ import _ from 'underscore';
 import moment from 'moment';
 import React from 'react';
 
-import { GeneralIssues } from './issues';
+import { GeneralDebt } from './debt';
 import { GeneralCoverage } from './coverage';
 import { GeneralDuplications } from './duplications';
-import { GeneralSize } from './size';
+import { GeneralStructure } from './structure';
 import { CoverageSelectionMixin } from '../components/coverage-selection-mixin';
 import { getPeriodLabel, getPeriodDate } from './../helpers/periods';
 import { getMeasuresAndVariations } from '../../../api/measures';
@@ -146,11 +146,11 @@ export default React.createClass({
     let props = _.extend({}, this.props, this.state);
 
     return <div className="overview-domains-list">
-      <GeneralIssues {...props} history={this.state.history['sqale_index']}/>
+      <GeneralDebt {...props} history={this.state.history['sqale_index']}/>
       <GeneralCoverage {...props} coverageMetricPrefix={this.state.coverageMetricPrefix}
                                   history={this.state.history[coverageMetric]}/>
       <GeneralDuplications {...props} history={this.state.history['duplicated_lines_density']}/>
-      <GeneralSize {...props} history={this.state.history['ncloc']}/>
+      <GeneralStructure {...props} history={this.state.history['ncloc']}/>
     </div>;
   }
 });
diff --git a/server/sonar-web/src/main/js/apps/overview/main/size.js b/server/sonar-web/src/main/js/apps/overview/main/size.js
deleted file mode 100644 (file)
index d1138a8..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-import React from 'react';
-
-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 { getMetricName } from '../helpers/metrics';
-import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures';
-import { LanguageDistribution } from '../components/language-distribution';
-
-
-export const GeneralSize = React.createClass({
-  propTypes: {
-    leakPeriodLabel: React.PropTypes.string,
-    leakPeriodDate: React.PropTypes.object
-  },
-
-  mixins: [TooltipsMixin, DomainMixin],
-
-  renderLeak () {
-    if (!this.hasLeakPeriod()) {
-      return null;
-    }
-    let measure = this.props.leak['ncloc'];
-    let formatted = measure != null ? formatMeasureVariation(measure, 'SHORT_INT') : '—';
-    return <DomainLeak>
-      <MeasuresList>
-        <Measure label={getMetricName('ncloc')}>{formatted}</Measure>
-      </MeasuresList>
-      {this.renderTimeline('after')}
-    </DomainLeak>;
-  },
-
-  renderLanguageDistribution() {
-    if (!this.props.measures['ncloc'] || !this.props.measures['ncloc_language_distribution']) {
-      return null;
-    }
-    return <Measure composite={true}>
-      <div style={{ width: 200 }}>
-        <LanguageDistribution lines={this.props.measures['ncloc']}
-                              distribution={this.props.measures['ncloc_language_distribution']}/>
-      </div>
-    </Measure>;
-  },
-
-  render () {
-    return <Domain>
-      <DomainHeader component={this.props.component} title={window.t('overview.domain.size')} linkTo="/size"/>
-
-      <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>
-          </MeasuresList>
-          {this.renderTimeline('before')}
-        </DomainNutshell>
-        {this.renderLeak()}
-      </DomainPanel>
-    </Domain>;
-  }
-});
diff --git a/server/sonar-web/src/main/js/apps/overview/main/structure.js b/server/sonar-web/src/main/js/apps/overview/main/structure.js
new file mode 100644 (file)
index 0000000..a823614
--- /dev/null
@@ -0,0 +1,74 @@
+import React from 'react';
+
+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 { getMetricName } from '../helpers/metrics';
+import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures';
+import { LanguageDistribution } from '../components/language-distribution';
+
+
+export const GeneralStructure = React.createClass({
+  propTypes: {
+    leakPeriodLabel: React.PropTypes.string,
+    leakPeriodDate: React.PropTypes.object
+  },
+
+  mixins: [TooltipsMixin, DomainMixin],
+
+  renderLeak () {
+    if (!this.hasLeakPeriod()) {
+      return null;
+    }
+    let measure = this.props.leak['ncloc'];
+    let formatted = measure != null ? formatMeasureVariation(measure, 'SHORT_INT') : '—';
+    return <DomainLeak>
+      <MeasuresList>
+        <Measure label={getMetricName('ncloc')}>{formatted}</Measure>
+      </MeasuresList>
+      {this.renderTimeline('after')}
+    </DomainLeak>;
+  },
+
+  renderLanguageDistribution() {
+    if (!this.props.measures['ncloc'] || !this.props.measures['ncloc_language_distribution']) {
+      return null;
+    }
+    return <Measure composite={true}>
+      <div style={{ width: 200 }}>
+        <LanguageDistribution lines={this.props.measures['ncloc']}
+                              distribution={this.props.measures['ncloc_language_distribution']}/>
+      </div>
+    </Measure>;
+  },
+
+  render () {
+    return <Domain>
+      <DomainHeader component={this.props.component}
+                    title={window.t('overview.domain.structure')}
+                    linkTo="/structure"/>
+
+      <DomainPanel>
+        <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>
+          </MeasuresList>
+          {this.renderTimeline('before')}
+        </DomainNutshell>
+        {this.renderLeak()}
+      </DomainPanel>
+    </Domain>;
+  }
+});
index 8301fd6add4b61a37d715f4ac421f9e79916a0a6..706f8b68d2e4e3c1e2976b510cea109f920a60ff 100644 (file)
@@ -3,10 +3,10 @@ import React from 'react';
 import Gate from './gate/gate';
 import GeneralMain from './main/main';
 import Meta from './meta';
-import { SizeMain } from './domains/size-domain';
+import { StructureMain } from './domains/structure-domain';
 import { DuplicationsMain } from './domains/duplications-domain';
 import { CoverageMain } from './domains/coverage-domain';
-import { IssuesMain } from './domains/debt-domain';
+import { DebtMain } from './domains/debt-domain';
 
 import { getMetrics } from '../../api/metrics';
 import { RouterMixin } from '../../components/router/router';
@@ -45,7 +45,7 @@ export const Overview = React.createClass({
 
   renderSize () {
     return <div className="overview">
-      <SizeMain {...this.props} {...this.state}/>
+      <StructureMain {...this.props} {...this.state}/>
     </div>;
   },
 
@@ -63,7 +63,7 @@ export const Overview = React.createClass({
 
   renderIssues () {
     return <div className="overview">
-      <IssuesMain {...this.props} {...this.state}/>
+      <DebtMain {...this.props} {...this.state}/>
     </div>;
   },
 
@@ -74,13 +74,13 @@ export const Overview = React.createClass({
     switch (this.state.route) {
       case '':
         return this.renderMain();
-      case '/size':
+      case '/structure':
         return this.renderSize();
       case '/duplications':
         return this.renderDuplications();
-      case '/tests':
+      case '/coverage':
         return this.renderTests();
-      case '/issues':
+      case '/debt':
         return this.renderIssues();
       default:
         throw new Error('Unknown route: ' + this.state.route);
index bffbb2ba09420cacda0affc0dfbca4edc2d853e1..b55e44cc2b398cd1edd733ae98ace6714d8ed9c1 100644 (file)
@@ -14,10 +14,10 @@ import {
 
 const FIXED_DASHBOARDS = [
   { link: '', name: 'overview.page' },
-  { link: '/issues', name: 'overview.domain.debt' },
-  { link: '/tests', name: 'overview.domain.coverage' },
+  { link: '/debt', name: 'overview.domain.debt' },
+  { link: '/coverage', name: 'overview.domain.coverage' },
   { link: '/duplications', name: 'overview.domain.duplications' },
-  { link: '/size', name: 'overview.domain.size' }
+  { link: '/structure', name: 'overview.domain.structure' }
 ];
 
 const SETTINGS_URLS = [
index 033d44b6fd465b881290fc80940963c5f9e03b21..01d363155956cef6d34fa0420155af7d6b1143bc 100644 (file)
@@ -3146,7 +3146,7 @@ overview.gate.view.errors=The view failed the quality gate on the following cond
 overview.domain.debt=Technical Debt
 overview.domain.coverage=Coverage
 overview.domain.duplications=Duplications
-overview.domain.size=Size
+overview.domain.structure=Structure
 
 overview.chart.files=Files
 overview.chart.files.limit_message=Only {0} files are displayed.