aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/component-measures
diff options
context:
space:
mode:
authorphilippe-perrin-sonarsource <philippe.perrin@sonarsource.com>2019-07-18 17:17:58 +0200
committerSonarTech <sonartech@sonarsource.com>2019-07-19 20:21:16 +0200
commit46fea6a78e91056d85dc46ca8ab050829b9e1015 (patch)
tree5423291f04df49b7dbac69943806dc44a9095896 /server/sonar-web/src/main/js/apps/component-measures
parent1f0b0d4b14918e93290409c7a277e3ab1b79def6 (diff)
downloadsonarqube-46fea6a78e91056d85dc46ca8ab050829b9e1015.tar.gz
sonarqube-46fea6a78e91056d85dc46ca8ab050829b9e1015.zip
Sort import in sonar-web
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/App.tsx64
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumb.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumbs.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx10
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx22
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx12
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverviewContainer.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx14
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumb-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumbs-test.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureContent-test.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureHeader-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx10
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsListRow.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx14
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx14
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/ComponentList-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/MeasureCell-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/routes.ts2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainFacet.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/sidebar/FacetMeasureValue.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/DomainFacet-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/FacetMeasureValue-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/Sidebar-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/utils.ts6
33 files changed, 120 insertions, 120 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
index 8063add6faf..c4a1ca98825 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
@@ -17,55 +17,55 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import * as key from 'keymaster';
import { keyBy } from 'lodash';
+import * as React from 'react';
+import Helmet from 'react-helmet';
import { connect } from 'react-redux';
import { withRouter, WithRouterProps } from 'react-router';
-import Helmet from 'react-helmet';
+import {
+ getLocalizedMetricDomain,
+ translate,
+ translateWithParameters
+} from 'sonar-ui-common/helpers/l10n';
import {
addSideBarClass,
addWhitePageClass,
removeSideBarClass,
removeWhitePageClass
} from 'sonar-ui-common/helpers/pages';
+import { getMeasuresAndMeta } from '../../../api/measures';
+import { getAllMetrics } from '../../../api/metrics';
+import Suggestions from '../../../app/components/embed-docs-modal/Suggestions';
+import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';
+import { enhanceMeasure } from '../../../components/measure/utils';
+import '../../../components/search-navigator.css';
import {
- getLocalizedMetricDomain,
- translateWithParameters,
- translate
-} from 'sonar-ui-common/helpers/l10n';
-import MeasureContent from './MeasureContent';
-import MeasuresEmpty from './MeasuresEmpty';
-import MeasureOverviewContainer from './MeasureOverviewContainer';
+ getBranchLikeQuery,
+ isPullRequest,
+ isSameBranchLike,
+ isShortLivingBranch
+} from '../../../helpers/branches';
+import { getLeakPeriod } from '../../../helpers/periods';
+import { fetchBranchStatus } from '../../../store/rootActions';
import Sidebar from '../sidebar/Sidebar';
-import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';
+import '../style.css';
import {
- isProjectOverview,
- hasBubbleChart,
- parseQuery,
- serializeQuery,
- Query,
- hasFullMeasures,
getMeasuresPageMetricKeys,
groupByDomains,
- sortMeasures,
+ hasBubbleChart,
+ hasFullMeasures,
+ hasTree,
hasTreemap,
- hasTree
+ isProjectOverview,
+ parseQuery,
+ Query,
+ serializeQuery,
+ sortMeasures
} from '../utils';
-import {
- isSameBranchLike,
- getBranchLikeQuery,
- isShortLivingBranch,
- isPullRequest
-} from '../../../helpers/branches';
-import Suggestions from '../../../app/components/embed-docs-modal/Suggestions';
-import '../../../components/search-navigator.css';
-import '../style.css';
-import { getAllMetrics } from '../../../api/metrics';
-import { getMeasuresAndMeta } from '../../../api/measures';
-import { enhanceMeasure } from '../../../components/measure/utils';
-import { getLeakPeriod } from '../../../helpers/periods';
-import { fetchBranchStatus } from '../../../store/rootActions';
+import MeasureContent from './MeasureContent';
+import MeasureOverviewContainer from './MeasureOverviewContainer';
+import MeasuresEmpty from './MeasuresEmpty';
interface Props extends WithRouterProps {
branchLike?: T.BranchLike;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumb.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumb.tsx
index d5362273356..869051c03dd 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumb.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumb.tsx
@@ -18,8 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { collapsePath, limitComponentName } from 'sonar-ui-common/helpers/path';
import Tooltip from 'sonar-ui-common/components/controls/Tooltip';
+import { collapsePath, limitComponentName } from 'sonar-ui-common/helpers/path';
interface Props {
canBrowse: boolean;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumbs.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumbs.tsx
index e7202a2a15c..f6878654a74 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumbs.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumbs.tsx
@@ -17,11 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import * as key from 'keymaster';
-import Breadcrumb from './Breadcrumb';
+import * as React from 'react';
import { getBreadcrumbs } from '../../../api/components';
import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches';
+import Breadcrumb from './Breadcrumb';
interface Props {
backToFirst: boolean;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx
index dcf5f5d089d..d5dcd6bdb7f 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx
@@ -17,16 +17,16 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import * as classNames from 'classnames';
import * as differenceInDays from 'date-fns/difference_in_days';
-import { injectIntl, InjectedIntlProps } from 'react-intl';
-import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
+import * as React from 'react';
+import { InjectedIntlProps, injectIntl } from 'react-intl';
import Tooltip from 'sonar-ui-common/components/controls/Tooltip';
-import DateFromNow from '../../../components/intl/DateFromNow';
+import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import DateFormatter, { longFormatterOption } from '../../../components/intl/DateFormatter';
+import DateFromNow from '../../../components/intl/DateFromNow';
import DateTimeFormatter, { formatterOption } from '../../../components/intl/DateTimeFormatter';
-import { getPeriodLabel, getPeriodDate } from '../../../helpers/periods';
+import { getPeriodDate, getPeriodLabel } from '../../../helpers/periods';
interface Props {
className?: string;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx
index 8d79d1b875e..6957a37935b 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx
@@ -22,21 +22,21 @@ import { InjectedRouter } from 'react-router';
import PageActions from 'sonar-ui-common/components/ui/PageActions';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { RequestData } from 'sonar-ui-common/helpers/request';
-import Breadcrumbs from './Breadcrumbs';
-import MeasureContentHeader from './MeasureContentHeader';
-import MeasureHeader from './MeasureHeader';
-import MeasureViewSelect from './MeasureViewSelect';
-import { complementary } from '../config/complementary';
+import { getComponentTree } from '../../../api/components';
+import { getMeasures } from '../../../api/measures';
import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';
import SourceViewer from '../../../components/SourceViewer/SourceViewer';
+import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches';
+import { getPeriodValue, isDiffMetric } from '../../../helpers/measures';
+import { getProjectUrl } from '../../../helpers/urls';
+import { complementary } from '../config/complementary';
import FilesView from '../drilldown/FilesView';
import TreeMapView from '../drilldown/TreeMapView';
-import { Query, View, isFileType, enhanceComponent, isViewType } from '../utils';
-import { getComponentTree } from '../../../api/components';
-import { isSameBranchLike, getBranchLikeQuery } from '../../../helpers/branches';
-import { isDiffMetric, getPeriodValue } from '../../../helpers/measures';
-import { getProjectUrl } from '../../../helpers/urls';
-import { getMeasures } from '../../../api/measures';
+import { enhanceComponent, isFileType, isViewType, Query, View } from '../utils';
+import Breadcrumbs from './Breadcrumbs';
+import MeasureContentHeader from './MeasureContentHeader';
+import MeasureHeader from './MeasureHeader';
+import MeasureViewSelect from './MeasureViewSelect';
interface Props {
branchLike?: T.BranchLike;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx
index 931f45bc374..328e5f7c213 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx
@@ -18,17 +18,17 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { Link } from 'react-router';
+import Tooltip from 'sonar-ui-common/components/controls/Tooltip';
import HistoryIcon from 'sonar-ui-common/components/icons/HistoryIcon';
import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon';
-import { Link } from 'react-router';
import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n';
-import Tooltip from 'sonar-ui-common/components/controls/Tooltip';
-import LeakPeriodLegend from './LeakPeriodLegend';
import LanguageDistributionContainer from '../../../components/charts/LanguageDistributionContainer';
import Measure from '../../../components/measure/Measure';
-import { getMeasureHistoryUrl } from '../../../helpers/urls';
import { isDiffMetric } from '../../../helpers/measures';
+import { getMeasureHistoryUrl } from '../../../helpers/urls';
import { hasFullMeasures } from '../utils';
+import LeakPeriodLegend from './LeakPeriodLegend';
interface Props {
branchLike?: T.BranchLike;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx
index 1aa1f9e0d35..6e2d3ff6132 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx
@@ -20,15 +20,15 @@
import * as React from 'react';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
import PageActions from 'sonar-ui-common/components/ui/PageActions';
-import Breadcrumbs from './Breadcrumbs';
-import LeakPeriodLegend from './LeakPeriodLegend';
-import MeasureContentHeader from './MeasureContentHeader';
+import { getComponentLeaves } from '../../../api/components';
import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';
-import BubbleChart from '../drilldown/BubbleChart';
import SourceViewer from '../../../components/SourceViewer/SourceViewer';
-import { getComponentLeaves } from '../../../api/components';
-import { enhanceComponent, getBubbleMetrics, isFileType, hasFullMeasures } from '../utils';
import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches';
+import BubbleChart from '../drilldown/BubbleChart';
+import { enhanceComponent, getBubbleMetrics, hasFullMeasures, isFileType } from '../utils';
+import Breadcrumbs from './Breadcrumbs';
+import LeakPeriodLegend from './LeakPeriodLegend';
+import MeasureContentHeader from './MeasureContentHeader';
interface Props {
branchLike?: T.BranchLike;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverviewContainer.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverviewContainer.tsx
index 647f9f838c0..335367d9235 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverviewContainer.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverviewContainer.tsx
@@ -19,11 +19,11 @@
*/
import * as React from 'react';
import { InjectedRouter } from 'react-router';
-import MeasureOverview from './MeasureOverview';
import { getComponentShow } from '../../../api/components';
+import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches';
import { getProjectUrl } from '../../../helpers/urls';
import { isViewType, Query } from '../utils';
-import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches';
+import MeasureOverview from './MeasureOverview';
interface Props {
branchLike?: T.BranchLike;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx
index e95e4a75b48..949d7453716 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx
@@ -18,11 +18,11 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import TreemapIcon from 'sonar-ui-common/components/icons/TreemapIcon';
+import Select from 'sonar-ui-common/components/controls/Select';
import ListIcon from 'sonar-ui-common/components/icons/ListIcon';
import TreeIcon from 'sonar-ui-common/components/icons/TreeIcon';
+import TreemapIcon from 'sonar-ui-common/components/icons/TreemapIcon';
import { translate } from 'sonar-ui-common/helpers/l10n';
-import Select from 'sonar-ui-common/components/controls/Select';
import { hasList, hasTree, hasTreemap, View } from '../utils';
interface Props {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx
index 1fef9c3cd94..817f237ff98 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx
@@ -17,19 +17,19 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils';
-import { App } from '../App';
import { getMeasuresAndMeta } from '../../../../api/measures';
import {
- mockPullRequest,
- mockMainBranch,
- mockRouter,
- mockLocation,
mockComponent,
- mockIssue
+ mockIssue,
+ mockLocation,
+ mockMainBranch,
+ mockPullRequest,
+ mockRouter
} from '../../../../helpers/testMocks';
+import { App } from '../App';
jest.mock('../../../../api/metrics', () => ({
getAllMetrics: jest.fn().mockResolvedValue([
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumb-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumb-test.tsx
index d735584c4f4..3e1527a9460 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumb-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumb-test.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import Breadcrumb from '../Breadcrumb';
it('should show the last element without clickable link', () => {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumbs-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumbs-test.tsx
index 7830825357a..3d907df00ad 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumbs-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumbs-test.tsx
@@ -17,11 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { mount } from 'enzyme';
+import * as React from 'react';
import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils';
-import Breadcrumbs from '../Breadcrumbs';
import { getBreadcrumbs } from '../../../../api/components';
+import Breadcrumbs from '../Breadcrumbs';
jest.mock('../../../../api/components', () => ({
getBreadcrumbs: jest
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx
index b71cc7bb23b..3d1603640c6 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx
@@ -17,9 +17,9 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import * as differenceInDays from 'date-fns/difference_in_days';
import { shallow } from 'enzyme';
+import * as React from 'react';
import { InjectedIntlProps } from 'react-intl';
import { LeakPeriodLegend } from '../LeakPeriodLegend';
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureContent-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureContent-test.tsx
index fce8e72cec1..4f039020ded 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureContent-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureContent-test.tsx
@@ -17,12 +17,12 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils';
-import MeasureContent from '../MeasureContent';
import { getComponentTree } from '../../../../api/components';
import { mockComponentMeasure, mockRouter } from '../../../../helpers/testMocks';
+import MeasureContent from '../MeasureContent';
jest.mock('../../../../api/components', () => {
const { mockComponentMeasure } = require.requireActual('../../../../helpers/testMocks');
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureHeader-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureHeader-test.tsx
index 4fdc255b5a3..6be137a7735 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureHeader-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureHeader-test.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import MeasureHeader from '../MeasureHeader';
const METRIC = {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx
index d74cdea20b6..b5628b5ea9a 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureViewSelect-test.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import MeasureViewSelect from '../MeasureViewSelect';
it('should display correctly with treemap option', () => {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx
index 3a521540f77..18ed38e20cd 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx
@@ -18,7 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { isDefined } from 'sonar-ui-common/helpers/types';
+import OriginalBubbleChart from 'sonar-ui-common/components/charts/BubbleChart';
+import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip';
import {
getLocalizedMetricDomain,
getLocalizedMetricName,
@@ -26,13 +27,12 @@ import {
translateWithParameters
} from 'sonar-ui-common/helpers/l10n';
import { formatMeasure } from 'sonar-ui-common/helpers/measures';
-import OriginalBubbleChart from 'sonar-ui-common/components/charts/BubbleChart';
-import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip';
-import EmptyResult from './EmptyResult';
+import { isDefined } from 'sonar-ui-common/helpers/types';
import ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend';
+import { RATING_COLORS } from '../../../helpers/constants';
import { isDiffMetric } from '../../../helpers/measures';
import { getBubbleMetrics, getBubbleYDomain, isProjectOverview } from '../utils';
-import { RATING_COLORS } from '../../../helpers/constants';
+import EmptyResult from './EmptyResult';
const HEIGHT = 500;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx
index c69b6b89f6c..6e29e3a9095 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx
@@ -22,8 +22,8 @@ import { Link } from 'react-router';
import LinkIcon from 'sonar-ui-common/components/icons/LinkIcon';
import LongLivingBranchIcon from 'sonar-ui-common/components/icons/LongLivingBranchIcon';
import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon';
-import { splitPath } from 'sonar-ui-common/helpers/path';
import { translate } from 'sonar-ui-common/helpers/l10n';
+import { splitPath } from 'sonar-ui-common/helpers/path';
import { getPathUrlAsString } from 'sonar-ui-common/helpers/urls';
import {
getBranchLikeUrl,
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx
index 36f9d9445c6..cba704176e3 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx
@@ -19,10 +19,10 @@
*/
import * as React from 'react';
import { getLocalizedMetricName } from 'sonar-ui-common/helpers/l10n';
-import ComponentsListRow from './ComponentsListRow';
-import EmptyResult from './EmptyResult';
import { complementary } from '../config/complementary';
import { View } from '../utils';
+import ComponentsListRow from './ComponentsListRow';
+import EmptyResult from './EmptyResult';
interface Props {
branchLike?: T.BranchLike;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsListRow.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsListRow.tsx
index eba1ed5536a..54ebdbb3864 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsListRow.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsListRow.tsx
@@ -17,11 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import * as classNames from 'classnames';
+import * as React from 'react';
+import { View } from '../utils';
import ComponentCell from './ComponentCell';
import MeasureCell from './MeasureCell';
-import { View } from '../utils';
interface Props {
branchLike?: T.BranchLike;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx
index 2093f618380..d04308c887e 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx
@@ -17,18 +17,18 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import * as key from 'keymaster';
import { throttle } from 'lodash';
-import { scrollToElement } from 'sonar-ui-common/helpers/scrolling';
-import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
-import { formatMeasure } from 'sonar-ui-common/helpers/measures';
+import * as React from 'react';
import { Button } from 'sonar-ui-common/components/controls/buttons';
-import { Alert } from 'sonar-ui-common/components/ui/Alert';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
-import ComponentsList from './ComponentsList';
+import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
+import { formatMeasure } from 'sonar-ui-common/helpers/measures';
+import { scrollToElement } from 'sonar-ui-common/helpers/scrolling';
+import { isDiffMetric, isPeriodBestValue } from '../../../helpers/measures';
import { View } from '../utils';
-import { isPeriodBestValue, isDiffMetric } from '../../../helpers/measures';
+import ComponentsList from './ComponentsList';
interface Props {
branchLike?: T.BranchLike;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx
index d99a04eaa18..51e8a668c0e 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx
@@ -17,23 +17,23 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { scaleLinear, scaleOrdinal } from 'd3-scale';
import * as React from 'react';
-import { formatMeasure } from 'sonar-ui-common/helpers/measures';
-import { isDefined } from 'sonar-ui-common/helpers/types';
-import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon';
import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
-import { scaleLinear, scaleOrdinal } from 'd3-scale';
import ColorGradientLegend from 'sonar-ui-common/components/charts/ColorGradientLegend';
import TreeMap, { TreeMapItem } from 'sonar-ui-common/components/charts/TreeMap';
+import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon';
import {
+ getLocalizedMetricName,
translate,
- translateWithParameters,
- getLocalizedMetricName
+ translateWithParameters
} from 'sonar-ui-common/helpers/l10n';
-import EmptyResult from './EmptyResult';
+import { formatMeasure } from 'sonar-ui-common/helpers/measures';
+import { isDefined } from 'sonar-ui-common/helpers/types';
import { colors } from '../../../app/theme';
import ColorBoxLegend from '../../../components/charts/ColorBoxLegend';
import { isDiffMetric } from '../../../helpers/measures';
+import EmptyResult from './EmptyResult';
interface Props {
branchLike?: T.BranchLike;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/ComponentList-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/ComponentList-test.tsx
index 6139ea9bee4..ea82507c635 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/ComponentList-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/ComponentList-test.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import ComponentsList from '../ComponentsList';
const COMPONENTS = [
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx
index ae2682cefc9..05f1200bf93 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/FilesView-test.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import FilesView from '../FilesView';
const COMPONENTS = [
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/MeasureCell-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/MeasureCell-test.tsx
index 0cfdb1812f7..2490d4881a1 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/MeasureCell-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/MeasureCell-test.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import MeasureCell from '../MeasureCell';
describe('should correctly take the value', () => {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/routes.ts b/server/sonar-web/src/main/js/apps/component-measures/routes.ts
index 3ef44ca291b..be867e09208 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/routes.ts
+++ b/server/sonar-web/src/main/js/apps/component-measures/routes.ts
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { RouterState, RedirectFunction } from 'react-router';
+import { RedirectFunction, RouterState } from 'react-router';
import { lazyLoad } from 'sonar-ui-common/components/lazyLoad';
const routes = [
diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainFacet.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainFacet.tsx
index 00945acdf36..132bf84e911 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainFacet.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainFacet.tsx
@@ -23,10 +23,9 @@ import {
getLocalizedCategoryMetricName,
getLocalizedMetricDomain,
getLocalizedMetricName,
- translate,
- hasMessage
+ hasMessage,
+ translate
} from 'sonar-ui-common/helpers/l10n';
-import FacetMeasureValue from './FacetMeasureValue';
import FacetBox from '../../../components/facet/FacetBox';
import FacetHeader from '../../../components/facet/FacetHeader';
import FacetItem from '../../../components/facet/FacetItem';
@@ -38,6 +37,7 @@ import {
hasFacetStat,
sortMeasures
} from '../utils';
+import FacetMeasureValue from './FacetMeasureValue';
interface Props {
domain: { name: string; measures: T.MeasureEnhanced[] };
diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/FacetMeasureValue.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/FacetMeasureValue.tsx
index 1d370f3dd72..619637f7acc 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/FacetMeasureValue.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/FacetMeasureValue.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import * as classNames from 'classnames';
+import * as React from 'react';
import Measure from '../../../components/measure/Measure';
import { isDiffMetric } from '../../../helpers/measures';
diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx
index 8a2f8e7e581..2cc577c4680 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx
@@ -19,10 +19,10 @@
*/
import * as React from 'react';
import { translate } from 'sonar-ui-common/helpers/l10n';
-import ProjectOverviewFacet from './ProjectOverviewFacet';
-import DomainFacet from './DomainFacet';
import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';
import { groupByDomains, KNOWN_DOMAINS, PROJECT_OVERVEW, Query } from '../utils';
+import DomainFacet from './DomainFacet';
+import ProjectOverviewFacet from './ProjectOverviewFacet';
interface Props {
measures: T.MeasureEnhanced[];
diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/DomainFacet-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/DomainFacet-test.tsx
index 914d0dfa059..e7f3f973e3d 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/DomainFacet-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/DomainFacet-test.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import DomainFacet from '../DomainFacet';
it('should display facet item list', () => {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/FacetMeasureValue-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/FacetMeasureValue-test.tsx
index 48fdd522edb..d3ccf962b7a 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/FacetMeasureValue-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/FacetMeasureValue-test.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import FacetMeasureValue from '../FacetMeasureValue';
const MEASURE = {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/Sidebar-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/Sidebar-test.tsx
index d9c82af64f0..3d7c331d5d8 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/Sidebar-test.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/Sidebar-test.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import Sidebar from '../Sidebar';
it('should display two facets', () => {
diff --git a/server/sonar-web/src/main/js/apps/component-measures/utils.ts b/server/sonar-web/src/main/js/apps/component-measures/utils.ts
index afeae11b6eb..1195b0a9681 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/utils.ts
+++ b/server/sonar-web/src/main/js/apps/component-measures/utils.ts
@@ -18,10 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { groupBy, memoize, sortBy, toPairs } from 'lodash';
-import { cleanQuery, parseAsString, serializeString } from 'sonar-ui-common/helpers/query';
import { getLocalizedMetricName } from 'sonar-ui-common/helpers/l10n';
-import { domains } from './config/domains';
-import { bubbles } from './config/bubbles';
+import { cleanQuery, parseAsString, serializeString } from 'sonar-ui-common/helpers/query';
import { enhanceMeasure } from '../../components/measure/utils';
import {
isLongLivingBranch,
@@ -30,6 +28,8 @@ import {
isShortLivingBranch
} from '../../helpers/branches';
import { getDisplayMetrics, isDiffMetric } from '../../helpers/measures';
+import { bubbles } from './config/bubbles';
+import { domains } from './config/domains';
export type View = 'list' | 'tree' | 'treemap';