diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-11-01 14:13:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-01 14:13:39 +0100 |
commit | 5da7c8f3f1ffc2975e1fdeef86d414230fe490d0 (patch) | |
tree | 392d154f5ad56c2e84d455085204077cefbca3aa /server/sonar-web/src/main/js/apps/code | |
parent | f52dd8d40f02f8112dd9fe791681f412b200903b (diff) | |
download | sonarqube-5da7c8f3f1ffc2975e1fdeef86d414230fe490d0.tar.gz sonarqube-5da7c8f3f1ffc2975e1fdeef86d414230fe490d0.zip |
SONAR-8326 Drop all code related to IT/overall coverage on web side (#1348)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/code')
4 files changed, 7 insertions, 19 deletions
diff --git a/server/sonar-web/src/main/js/apps/code/components/App.js b/server/sonar-web/src/main/js/apps/code/components/App.js index 86563c2875f..7dc6b7158b3 100644 --- a/server/sonar-web/src/main/js/apps/code/components/App.js +++ b/server/sonar-web/src/main/js/apps/code/components/App.js @@ -27,7 +27,6 @@ import Search from './Search'; import ListFooter from '../../../components/controls/ListFooter'; import { retrieveComponentChildren, retrieveComponent, loadMoreChildren, parseError } from '../utils'; import { addComponent, addComponentBreadcrumbs } from '../bucket'; -import { selectCoverageMetric } from '../../../helpers/measures'; import '../code.css'; @@ -70,8 +69,6 @@ export default class App extends React.Component { const isView = component.qualifier === 'VW' || component.qualifier === 'SVW'; retrieveComponentChildren(component.key, isView).then(r => { addComponent(r.baseComponent); - const prefix = selectCoverageMetric(r.baseComponent.measures); - this.coverageMetric = `${prefix}coverage`; this.handleUpdate(); }).catch(e => { if (this.mounted) { @@ -192,8 +189,7 @@ export default class App extends React.Component { <Components rootComponent={component} baseComponent={baseComponent} - components={components} - coverageMetric={this.coverageMetric}/> + components={components}/> </div> )} diff --git a/server/sonar-web/src/main/js/apps/code/components/Component.js b/server/sonar-web/src/main/js/apps/code/components/Component.js index 11b975c81c2..14386f2b2f5 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Component.js +++ b/server/sonar-web/src/main/js/apps/code/components/Component.js @@ -66,7 +66,7 @@ export default class Component extends React.Component { } render () { - const { component, rootComponent, selected, previous, coverageMetric, canBrowse } = this.props; + const { component, rootComponent, selected, previous, canBrowse } = this.props; const isView = ['VW', 'SVW'].includes(rootComponent.qualifier); let componentAction = null; @@ -93,7 +93,7 @@ export default class Component extends React.Component { { metric: 'bugs', type: 'SHORT_INT' }, { metric: 'vulnerabilities', type: 'SHORT_INT' }, { metric: 'code_smells', type: 'SHORT_INT' }, - { metric: coverageMetric, type: 'PERCENT' }, + { metric: 'coverage', type: 'PERCENT' }, { metric: 'duplicated_lines_density', type: 'PERCENT' } ]; diff --git a/server/sonar-web/src/main/js/apps/code/components/Components.js b/server/sonar-web/src/main/js/apps/code/components/Components.js index dc5a3da84e8..902ccccd345 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Components.js +++ b/server/sonar-web/src/main/js/apps/code/components/Components.js @@ -23,7 +23,7 @@ import Component from './Component'; import ComponentsEmpty from './ComponentsEmpty'; import ComponentsHeader from './ComponentsHeader'; -const Components = ({ rootComponent, baseComponent, components, selected, coverageMetric }) => ( +const Components = ({ rootComponent, baseComponent, components, selected }) => ( <table className="data zebra"> <ComponentsHeader baseComponent={baseComponent} rootComponent={rootComponent}/> {baseComponent && ( @@ -31,8 +31,7 @@ const Components = ({ rootComponent, baseComponent, components, selected, covera <Component key={baseComponent.key} rootComponent={rootComponent} - component={baseComponent} - coverageMetric={coverageMetric}/> + component={baseComponent}/> <tr className="blank"> <td colSpan="8"> </td> </tr> @@ -47,7 +46,6 @@ const Components = ({ rootComponent, baseComponent, components, selected, covera component={component} selected={component === selected} previous={index > 0 ? list[index - 1] : null} - coverageMetric={coverageMetric} canBrowse={true}/> )) ) : ( diff --git a/server/sonar-web/src/main/js/apps/code/utils.js b/server/sonar-web/src/main/js/apps/code/utils.js index 80788455d4f..72c1f58425d 100644 --- a/server/sonar-web/src/main/js/apps/code/utils.js +++ b/server/sonar-web/src/main/js/apps/code/utils.js @@ -35,17 +35,11 @@ const METRICS = [ 'code_smells', 'bugs', 'vulnerabilities', + 'coverage', 'duplicated_lines_density', 'alert_status' ]; -const METRICS_WITH_COVERAGE = [ - ...METRICS, - 'coverage', - 'it_coverage', - 'overall_coverage' -]; - const VIEW_METRICS = [ 'releasability_rating', 'alert_status', @@ -117,7 +111,7 @@ function storeChildrenBreadcrumbs (parentComponentKey, children) { } function getMetrics (isView) { - return isView ? VIEW_METRICS : METRICS_WITH_COVERAGE; + return isView ? VIEW_METRICS : METRICS; } /** |