aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-01-07 12:13:42 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-01-07 14:15:57 +0100
commiteb872c65237fab7f854f617ec9f7a51c8cc82977 (patch)
treec9b86dda23139f84511bfa48a6d1ab182c571976
parent550f2520347d3a366195c69b84ce3427a31ea8b1 (diff)
downloadsonarqube-eb872c65237fab7f854f617ec9f7a51c8cc82977.tar.gz
sonarqube-eb872c65237fab7f854f617ec9f7a51c8cc82977.zip
SONAR-7149 do not display measures when searching
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Components.js13
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js50
2 files changed, 52 insertions, 11 deletions
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 e86d1bf4b8b..4752e06b749 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
@@ -21,22 +21,13 @@ import React from 'react';
import Component from './Component';
import ComponentsEmpty from './ComponentsEmpty';
+import ComponentsHeader from './ComponentsHeader';
import { translate } from '../../../helpers/l10n';
const Components = ({ baseComponent, components, coverageMetric, onBrowse }) => (
<table className="data zebra">
- <thead>
- <tr>
- <th className="thin nowrap">&nbsp;</th>
- <th>&nbsp;</th>
- <th className="thin nowrap text-right">{translate('metric.ncloc.name')}</th>
- <th className="thin nowrap text-right">{translate('metric.sqale_index.short_name')}</th>
- <th className="thin nowrap text-right">{translate('metric.violations.name')}</th>
- <th className="thin nowrap text-right">{translate('metric.coverage.name')}</th>
- <th className="thin nowrap text-right">{translate('metric.duplicated_lines_density.short_name')}</th>
- </tr>
- </thead>
+ <ComponentsHeader baseComponent={baseComponent}/>
{baseComponent && (
<tbody>
<Component
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js
new file mode 100644
index 00000000000..0ccf05ea6c7
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js
@@ -0,0 +1,50 @@
+/*
+ * SonarQube :: Web
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+import React from 'react';
+
+import { translate } from '../../../helpers/l10n';
+
+
+const ComponentsHeader = ({ baseComponent }) => (
+ <thead>
+ <tr>
+ <th className="thin nowrap">&nbsp;</th>
+ <th>&nbsp;</th>
+ <th className="thin nowrap text-right">
+ {baseComponent && translate('metric.ncloc.name')}
+ </th>
+ <th className="thin nowrap text-right">
+ {baseComponent && translate('metric.sqale_index.short_name')}
+ </th>
+ <th className="thin nowrap text-right">
+ {baseComponent && translate('metric.violations.name')
+ }</th>
+ <th className="thin nowrap text-right">
+ {baseComponent && translate('metric.coverage.name')}
+ </th>
+ <th className="thin nowrap text-right">
+ {baseComponent && translate('metric.duplicated_lines_density.short_name')}
+ </th>
+ </tr>
+ </thead>
+);
+
+
+export default ComponentsHeader;