aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/portfolio
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/portfolio
parent1f0b0d4b14918e93290409c7a277e3ab1b79def6 (diff)
downloadsonarqube-46fea6a78e91056d85dc46ca8ab050829b9e1015.tar.gz
sonarqube-46fea6a78e91056d85dc46ca8ab050829b9e1015.zip
Sort import in sonar-web
Diffstat (limited to 'server/sonar-web/src/main/js/apps/portfolio')
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/__tests__/utils-test.ts2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/App.tsx14
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/MetricBox.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/RatingFreshness.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/Report.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/Subscription.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/App-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Effort-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/HistoryButtonLink-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MainRating-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MeasuresButtonLink-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MetricBox-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/RatingFreshness-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Report-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Subscription-test.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/WorstProjects-test.tsx2
18 files changed, 33 insertions, 33 deletions
diff --git a/server/sonar-web/src/main/js/apps/portfolio/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/portfolio/__tests__/utils-test.ts
index 92131e99c0b..9d15b782c5d 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/__tests__/utils-test.ts
+++ b/server/sonar-web/src/main/js/apps/portfolio/__tests__/utils-test.ts
@@ -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 { convertMeasures } from '../utils';
import { mockMeasure } from '../../../helpers/testMocks';
+import { convertMeasures } from '../utils';
describe('convertMeasures', () => {
it('should correctly transform a list of metrics to a dictionary', () => {
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx
index 73426f3b3f5..410b0c0d4d6 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx
@@ -20,18 +20,18 @@
import * as React from 'react';
import { connect } from 'react-redux';
import { translate } from 'sonar-ui-common/helpers/l10n';
-import MeasuresButtonLink from './MeasuresButtonLink';
-import MetricBox from './MetricBox';
-import Report from './Report';
-import WorstProjects from './WorstProjects';
-import { SubComponent } from '../types';
-import { PORTFOLIO_METRICS, SUB_COMPONENTS_METRICS, convertMeasures } from '../utils';
-import Measure from '../../../components/measure/Measure';
import { getChildren } from '../../../api/components';
import { getMeasures } from '../../../api/measures';
+import Measure from '../../../components/measure/Measure';
import { fetchMetrics } from '../../../store/rootActions';
import { getMetrics, Store } from '../../../store/rootReducer';
import '../styles.css';
+import { SubComponent } from '../types';
+import { convertMeasures, PORTFOLIO_METRICS, SUB_COMPONENTS_METRICS } from '../utils';
+import MeasuresButtonLink from './MeasuresButtonLink';
+import MetricBox from './MetricBox';
+import Report from './Report';
+import WorstProjects from './WorstProjects';
interface OwnProps {
component: T.Component;
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx
index 3d8c1c7d40f..ca124326abd 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx
@@ -18,10 +18,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Link } from 'react-router';
import { FormattedMessage } from 'react-intl';
-import { translate } from 'sonar-ui-common/helpers/l10n';
+import { Link } from 'react-router';
import Rating from 'sonar-ui-common/components/ui/Rating';
+import { translate } from 'sonar-ui-common/helpers/l10n';
import Measure from '../../../components/measure/Measure';
import { getComponentDrilldownUrl } from '../../../helpers/urls';
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/MetricBox.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/MetricBox.tsx
index 18dec3f03f9..d5e68e72099 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/MetricBox.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/MetricBox.tsx
@@ -19,17 +19,17 @@
*/
import * as React from 'react';
import { Link } from 'react-router';
-import { translate } from 'sonar-ui-common/helpers/l10n';
import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip';
import Level from 'sonar-ui-common/components/ui/Level';
+import { translate } from 'sonar-ui-common/helpers/l10n';
+import Measure from '../../../components/measure/Measure';
+import { getComponentDrilldownUrl } from '../../../helpers/urls';
+import { METRICS_PER_TYPE } from '../utils';
import Effort from './Effort';
import HistoryButtonLink from './HistoryButtonLink';
import MainRating from './MainRating';
import MeasuresButtonLink from './MeasuresButtonLink';
import RatingFreshness from './RatingFreshness';
-import { METRICS_PER_TYPE } from '../utils';
-import Measure from '../../../components/measure/Measure';
-import { getComponentDrilldownUrl } from '../../../helpers/urls';
interface Props {
component: string;
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/RatingFreshness.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/RatingFreshness.tsx
index 885e021ee0d..76b71a48038 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/RatingFreshness.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/RatingFreshness.tsx
@@ -19,8 +19,8 @@
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { translate } from 'sonar-ui-common/helpers/l10n';
import Rating from 'sonar-ui-common/components/ui/Rating';
+import { translate } from 'sonar-ui-common/helpers/l10n';
import DateFromNow from '../../../components/intl/DateFromNow';
interface Props {
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/Report.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/Report.tsx
index 17241cf1686..6a57d387aa4 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/Report.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/Report.tsx
@@ -18,12 +18,12 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon';
-import { translate } from 'sonar-ui-common/helpers/l10n';
import { Button } from 'sonar-ui-common/components/controls/buttons';
import Dropdown from 'sonar-ui-common/components/controls/Dropdown';
+import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon';
+import { translate } from 'sonar-ui-common/helpers/l10n';
+import { getReportStatus, getReportUrl, ReportStatus } from '../../../api/report';
import Subscription from './Subscription';
-import { getReportStatus, ReportStatus, getReportUrl } from '../../../api/report';
interface Props {
component: { key: string; name: string };
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/Subscription.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/Subscription.tsx
index 57187bd899f..2f3084500c5 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/Subscription.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/Subscription.tsx
@@ -20,9 +20,9 @@
import * as React from 'react';
import { connect } from 'react-redux';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
+import { ReportStatus, subscribe, unsubscribe } from '../../../api/report';
import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage';
import throwGlobalError from '../../../app/utils/throwGlobalError';
-import { ReportStatus, subscribe, unsubscribe } from '../../../api/report';
import { isLoggedIn } from '../../../helpers/users';
import { getCurrentUser, Store } from '../../../store/rootReducer';
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx
index f110b2325be..f5b0b194685 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.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 { max } from 'lodash';
import * as React from 'react';
-import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon';
import { Link } from 'react-router';
-import { max } from 'lodash';
+import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { formatMeasure } from 'sonar-ui-common/helpers/measures';
-import { SubComponent } from '../types';
import { colors } from '../../../app/theme';
import Measure from '../../../components/measure/Measure';
import { getProjectUrl } from '../../../helpers/urls';
+import { SubComponent } from '../types';
interface Props {
component: string;
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/App-test.tsx
index 43647e64921..73a929adb0a 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/App-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/App-test.tsx
@@ -26,8 +26,8 @@ jest.mock('../../../../api/components', () => ({
getChildren: jest.fn(() => Promise.resolve({ components: [], paging: { total: 0 } }))
}));
+import { mount, shallow } from 'enzyme';
import * as React from 'react';
-import { shallow, mount } from 'enzyme';
import { App } from '../App';
const getMeasures = require('../../../../api/measures').getMeasures as jest.Mock<any>;
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Effort-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Effort-test.tsx
index ea66662f3ef..a8a50e46238 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Effort-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Effort-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 Effort from '../Effort';
it('renders', () => {
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/HistoryButtonLink-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/HistoryButtonLink-test.tsx
index b59d8e9276c..e4806c8f868 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/HistoryButtonLink-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/HistoryButtonLink-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 HistoryButtonLink from '../HistoryButtonLink';
it('renders', () => {
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MainRating-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MainRating-test.tsx
index 469e4eee805..71928aab6ee 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MainRating-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MainRating-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 MainRating from '../MainRating';
it('renders', () => {
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MeasuresButtonLink-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MeasuresButtonLink-test.tsx
index 41aaba68219..26e61fe1481 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MeasuresButtonLink-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MeasuresButtonLink-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 MeasuresButtonLink from '../MeasuresButtonLink';
it('renders', () => {
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MetricBox-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MetricBox-test.tsx
index ada57c03b2c..d72d7680e54 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MetricBox-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/MetricBox-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 MetricBox from '../MetricBox';
it('should render correctly', () => {
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/RatingFreshness-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/RatingFreshness-test.tsx
index 8ebef7a507b..fa476b1a76c 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/RatingFreshness-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/RatingFreshness-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 RatingFreshness from '../RatingFreshness';
it('renders', () => {
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Report-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Report-test.tsx
index aacf682ded2..b46a645d8a2 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Report-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Report-test.tsx
@@ -24,8 +24,8 @@ jest.mock('../../../../api/report', () => {
return report;
});
-import * as React from 'react';
import { mount, shallow } from 'enzyme';
+import * as React from 'react';
import Report from '../Report';
const getReportStatus = require('../../../../api/report').getReportStatus as jest.Mock<any>;
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Subscription-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Subscription-test.tsx
index a5ba436d470..3b5fc2e27c2 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Subscription-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/Subscription-test.tsx
@@ -25,11 +25,11 @@ jest.mock('../../../../api/report', () => {
return report;
});
+import { mount, shallow } from 'enzyme';
import * as React from 'react';
-import { shallow, mount } from 'enzyme';
-import { Subscription } from '../Subscription';
import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils';
import { ReportStatus } from '../../../../api/report';
+import { Subscription } from '../Subscription';
const subscribe = require('../../../../api/report').subscribe as jest.Mock<any>;
const unsubscribe = require('../../../../api/report').unsubscribe as jest.Mock<any>;
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/WorstProjects-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/WorstProjects-test.tsx
index e6f50d6406c..68b28aa19f4 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/WorstProjects-test.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/WorstProjects-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 WorstProjects from '../WorstProjects';
it('renders', () => {