diff options
author | philippe-perrin-sonarsource <philippe.perrin@sonarsource.com> | 2019-07-18 17:17:58 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-07-19 20:21:16 +0200 |
commit | 46fea6a78e91056d85dc46ca8ab050829b9e1015 (patch) | |
tree | 5423291f04df49b7dbac69943806dc44a9095896 /server/sonar-web/src/main/js | |
parent | 1f0b0d4b14918e93290409c7a277e3ab1b79def6 (diff) | |
download | sonarqube-46fea6a78e91056d85dc46ca8ab050829b9e1015.tar.gz sonarqube-46fea6a78e91056d85dc46ca8ab050829b9e1015.zip |
Sort import in sonar-web
Diffstat (limited to 'server/sonar-web/src/main/js')
1446 files changed, 3513 insertions, 3514 deletions
diff --git a/server/sonar-web/src/main/js/api/alm-integration.ts b/server/sonar-web/src/main/js/api/alm-integration.ts index 67896751d0a..870242207d7 100644 --- a/server/sonar-web/src/main/js/api/alm-integration.ts +++ b/server/sonar-web/src/main/js/api/alm-integration.ts @@ -20,8 +20,8 @@ import { getCorsJSON, getJSON, - postJSON, post, + postJSON, requestTryAndRepeatUntil } from 'sonar-ui-common/helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; diff --git a/server/sonar-web/src/main/js/api/components.ts b/server/sonar-web/src/main/js/api/components.ts index 3ede3247833..66d352d7221 100644 --- a/server/sonar-web/src/main/js/api/components.ts +++ b/server/sonar-web/src/main/js/api/components.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 { getJSON, postJSON, post, RequestData } from 'sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, RequestData } from 'sonar-ui-common/helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; export interface BaseSearchProjectsParameters { diff --git a/server/sonar-web/src/main/js/api/favorites.ts b/server/sonar-web/src/main/js/api/favorites.ts index 082a2c72332..28dc8958727 100644 --- a/server/sonar-web/src/main/js/api/favorites.ts +++ b/server/sonar-web/src/main/js/api/favorites.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 { post, getJSON } from 'sonar-ui-common/helpers/request'; +import { getJSON, post } from 'sonar-ui-common/helpers/request'; export function getFavorites(): Promise<any> { return getJSON('/api/favorites/search'); diff --git a/server/sonar-web/src/main/js/api/issues.ts b/server/sonar-web/src/main/js/api/issues.ts index c8ce98cf84d..658d110d8da 100644 --- a/server/sonar-web/src/main/js/api/issues.ts +++ b/server/sonar-web/src/main/js/api/issues.ts @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { getJSON, post, postJSON, RequestData } from 'sonar-ui-common/helpers/request'; -import { RawIssue } from '../helpers/issues'; import throwGlobalError from '../app/utils/throwGlobalError'; import getCoverageStatus from '../components/SourceViewer/helpers/getCoverageStatus'; +import { RawIssue } from '../helpers/issues'; export interface IssueResponse { components?: Array<{ key: string; name: string }>; diff --git a/server/sonar-web/src/main/js/api/measures.ts b/server/sonar-web/src/main/js/api/measures.ts index 923429bd62e..455fa131a8e 100644 --- a/server/sonar-web/src/main/js/api/measures.ts +++ b/server/sonar-web/src/main/js/api/measures.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 { getJSON, RequestData, postJSON, post } from 'sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, RequestData } from 'sonar-ui-common/helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; export function getMeasures( diff --git a/server/sonar-web/src/main/js/api/permissions.ts b/server/sonar-web/src/main/js/api/permissions.ts index 61022eec2cf..3a8cfe0eb30 100644 --- a/server/sonar-web/src/main/js/api/permissions.ts +++ b/server/sonar-web/src/main/js/api/permissions.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { getJSON, post, postJSON, RequestData } from 'sonar-ui-common/helpers/request'; -import { BaseSearchProjectsParameters } from './components'; import throwGlobalError from '../app/utils/throwGlobalError'; +import { BaseSearchProjectsParameters } from './components'; const PAGE_SIZE = 100; diff --git a/server/sonar-web/src/main/js/api/plugins.ts b/server/sonar-web/src/main/js/api/plugins.ts index 23d778a24e5..04300ff8bae 100644 --- a/server/sonar-web/src/main/js/api/plugins.ts +++ b/server/sonar-web/src/main/js/api/plugins.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { findLastIndex } from 'lodash'; -import { isDefined } from 'sonar-ui-common/helpers/types'; import { getJSON, post } from 'sonar-ui-common/helpers/request'; +import { isDefined } from 'sonar-ui-common/helpers/types'; import throwGlobalError from '../app/utils/throwGlobalError'; export interface Plugin { diff --git a/server/sonar-web/src/main/js/api/projectActivity.ts b/server/sonar-web/src/main/js/api/projectActivity.ts index 1bf61801bbc..05d4cd3626c 100644 --- a/server/sonar-web/src/main/js/api/projectActivity.ts +++ b/server/sonar-web/src/main/js/api/projectActivity.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 { getJSON, postJSON, post, RequestData } from 'sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, RequestData } from 'sonar-ui-common/helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; export function getProjectActivity( diff --git a/server/sonar-web/src/main/js/api/quality-profiles.ts b/server/sonar-web/src/main/js/api/quality-profiles.ts index 150276ecb21..ce6ae007fab 100644 --- a/server/sonar-web/src/main/js/api/quality-profiles.ts +++ b/server/sonar-web/src/main/js/api/quality-profiles.ts @@ -20,12 +20,12 @@ import { map } from 'lodash'; import { csvEscape } from 'sonar-ui-common/helpers/csv'; import { - request, checkStatus, - parseJSON, getJSON, + parseJSON, post, postJSON, + request, RequestData } from 'sonar-ui-common/helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; diff --git a/server/sonar-web/src/main/js/api/rules.ts b/server/sonar-web/src/main/js/api/rules.ts index f012ccc5b84..7311da171a2 100644 --- a/server/sonar-web/src/main/js/api/rules.ts +++ b/server/sonar-web/src/main/js/api/rules.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 { post, getJSON, postJSON } from 'sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from 'sonar-ui-common/helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; export interface GetRulesAppResponse { diff --git a/server/sonar-web/src/main/js/api/settings.ts b/server/sonar-web/src/main/js/api/settings.ts index bc21a900501..f6426a81593 100644 --- a/server/sonar-web/src/main/js/api/settings.ts +++ b/server/sonar-web/src/main/js/api/settings.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { omitBy } from 'lodash'; -import { getJSON, RequestData, post, postJSON } from 'sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, RequestData } from 'sonar-ui-common/helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; import { isCategoryDefinition } from '../apps/settings/utils'; diff --git a/server/sonar-web/src/main/js/api/user-tokens.ts b/server/sonar-web/src/main/js/api/user-tokens.ts index b03dc7df457..00417d1b174 100644 --- a/server/sonar-web/src/main/js/api/user-tokens.ts +++ b/server/sonar-web/src/main/js/api/user-tokens.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 { getJSON, postJSON, post } from 'sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from 'sonar-ui-common/helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; /** List tokens for given user login */ diff --git a/server/sonar-web/src/main/js/app/components/AdminContainer.tsx b/server/sonar-web/src/main/js/app/components/AdminContainer.tsx index 701043dc7e3..e529fb06b02 100644 --- a/server/sonar-web/src/main/js/app/components/AdminContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/AdminContainer.tsx @@ -21,14 +21,14 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import AdminContext, { defaultPendingPlugins, defaultSystemStatus } from './AdminContext'; -import SettingsNav from './nav/settings/SettingsNav'; -import { getAppState, Store } from '../../store/rootReducer'; import { getSettingsNavigation } from '../../api/nav'; -import { setAdminPages } from '../../store/appState'; -import { PluginPendingResult, getPendingPlugins } from '../../api/plugins'; -import handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization'; +import { getPendingPlugins, PluginPendingResult } from '../../api/plugins'; import { getSystemStatus, waitSystemUPStatus } from '../../api/system'; +import handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization'; +import { setAdminPages } from '../../store/appState'; +import { getAppState, Store } from '../../store/rootReducer'; +import AdminContext, { defaultPendingPlugins, defaultSystemStatus } from './AdminContext'; +import SettingsNav from './nav/settings/SettingsNav'; interface Props { appState: Pick<T.AppState, 'adminPages' | 'canAdmin' | 'organizationsEnabled'>; diff --git a/server/sonar-web/src/main/js/app/components/App.tsx b/server/sonar-web/src/main/js/app/components/App.tsx index 3c3a3febc73..01724e4bb25 100644 --- a/server/sonar-web/src/main/js/app/components/App.tsx +++ b/server/sonar-web/src/main/js/app/components/App.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; -import { fetchLanguages } from '../../store/rootActions'; import { fetchMyOrganizations } from '../../apps/account/organizations/actions'; import { isSonarCloud } from '../../helpers/system'; -import { getCurrentUser, getAppState, getGlobalSettingValue, Store } from '../../store/rootReducer'; import { isLoggedIn } from '../../helpers/users'; +import { fetchLanguages } from '../../store/rootActions'; +import { getAppState, getCurrentUser, getGlobalSettingValue, Store } from '../../store/rootReducer'; const PageTracker = lazyLoad(() => import('./PageTracker')); diff --git a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx index cf324a50259..2da42841fea 100644 --- a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx @@ -17,32 +17,32 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { differenceBy } from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; -import { differenceBy } from 'lodash'; -import { ComponentContext } from './ComponentContext'; -import ComponentContainerNotFound from './ComponentContainerNotFound'; -import ComponentNav from './nav/component/ComponentNav'; import { getBranches, getPullRequests } from '../../api/branches'; -import { getTasksForComponent, getAnalysisStatus } from '../../api/ce'; +import { getAnalysisStatus, getTasksForComponent } from '../../api/ce'; import { getComponentData } from '../../api/components'; import { getComponentNavigation } from '../../api/nav'; -import { - fetchOrganization, - requireAuthorization, - registerBranchStatus -} from '../../store/rootActions'; import { STATUSES } from '../../apps/background-tasks/constants'; +import { Location, Router, withRouter } from '../../components/hoc/withRouter'; import { - isPullRequest, + getBranchLikeQuery, isBranch, - isMainBranch, isLongLivingBranch, - isShortLivingBranch, - getBranchLikeQuery + isMainBranch, + isPullRequest, + isShortLivingBranch } from '../../helpers/branches'; import { isSonarCloud } from '../../helpers/system'; -import { withRouter, Router, Location } from '../../components/hoc/withRouter'; +import { + fetchOrganization, + registerBranchStatus, + requireAuthorization +} from '../../store/rootActions'; +import ComponentContainerNotFound from './ComponentContainerNotFound'; +import { ComponentContext } from './ComponentContext'; +import ComponentNav from './nav/component/ComponentNav'; interface Props { children: React.ReactElement; diff --git a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx index 51d7dc41985..f323cb0df56 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import GlobalNav from './nav/global/GlobalNav'; -import StartupModal from './StartupModal'; -import GlobalFooterContainer from './GlobalFooterContainer'; -import GlobalMessagesContainer from './GlobalMessagesContainer'; -import SuggestionsProvider from './embed-docs-modal/SuggestionsProvider'; +import Workspace from '../../components/workspace/Workspace'; import A11yProvider from './a11y/A11yProvider'; import A11ySkipLinks from './a11y/A11ySkipLinks'; -import Workspace from '../../components/workspace/Workspace'; +import SuggestionsProvider from './embed-docs-modal/SuggestionsProvider'; +import GlobalFooterContainer from './GlobalFooterContainer'; +import GlobalMessagesContainer from './GlobalMessagesContainer'; +import GlobalNav from './nav/global/GlobalNav'; +import StartupModal from './StartupModal'; export interface Props { children: React.ReactNode; diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx index f4eab307286..48a6b09c2a5 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import GlobalFooterSonarCloud from './GlobalFooterSonarCloud'; -import GlobalFooterBranding from './GlobalFooterBranding'; -import InstanceMessage from '../../components/common/InstanceMessage'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { EDITIONS } from '../../apps/marketplace/utils'; +import InstanceMessage from '../../components/common/InstanceMessage'; import { isSonarCloud } from '../../helpers/system'; +import GlobalFooterBranding from './GlobalFooterBranding'; +import GlobalFooterSonarCloud from './GlobalFooterSonarCloud'; interface Props { hideLoggedInInfo?: boolean; diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooterContainer.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooterContainer.tsx index c1ac373f625..5655cf12c96 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooterContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalFooterContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import GlobalFooter from './GlobalFooter'; import { getAppState, Store } from '../../store/rootReducer'; +import GlobalFooter from './GlobalFooter'; interface StateProps { productionDatabase: boolean; diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooterSonarCloud.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooterSonarCloud.tsx index 98b9fe73096..d604de379d3 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooterSonarCloud.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalFooterSonarCloud.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 getYear from 'date-fns/get_year'; +import * as React from 'react'; import { Link } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/GlobalMessagesContainer.tsx b/server/sonar-web/src/main/js/app/components/GlobalMessagesContainer.tsx index 0c8c209569c..582c97fe46f 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalMessagesContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalMessagesContainer.tsx @@ -19,8 +19,8 @@ */ import { connect } from 'react-redux'; import GlobalMessages from 'sonar-ui-common/components/controls/GlobalMessages'; -import { getGlobalMessages, Store } from '../../store/rootReducer'; import { closeGlobalMessage } from '../../store/globalMessages'; +import { getGlobalMessages, Store } from '../../store/rootReducer'; const mapStateToProps = (state: Store) => ({ messages: getGlobalMessages(state) diff --git a/server/sonar-web/src/main/js/app/components/Landing.tsx b/server/sonar-web/src/main/js/app/components/Landing.tsx index 52eae3bcf37..940d0741337 100644 --- a/server/sonar-web/src/main/js/app/components/Landing.tsx +++ b/server/sonar-web/src/main/js/app/components/Landing.tsx @@ -17,13 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { Location } from 'history'; import * as React from 'react'; -import { withRouter, WithRouterProps } from 'react-router'; import { connect } from 'react-redux'; -import { Location } from 'history'; -import { getCurrentUser, Store } from '../../store/rootReducer'; +import { withRouter, WithRouterProps } from 'react-router'; import { getHomePageUrl } from '../../helpers/urls'; import { isLoggedIn } from '../../helpers/users'; +import { getCurrentUser, Store } from '../../store/rootReducer'; interface StateProps { currentUser: T.CurrentUser | undefined; diff --git a/server/sonar-web/src/main/js/app/components/PageTracker.tsx b/server/sonar-web/src/main/js/app/components/PageTracker.tsx index 0ce7f93111b..d87df236edb 100644 --- a/server/sonar-web/src/main/js/app/components/PageTracker.tsx +++ b/server/sonar-web/src/main/js/app/components/PageTracker.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { connect } from 'react-redux'; import Helmet from 'react-helmet'; +import { connect } from 'react-redux'; import { Location, withRouter } from '../../components/hoc/withRouter'; import { gtm } from '../../helpers/analytics'; import { installScript } from '../../helpers/extensions'; import { getWebAnalyticsPageHandlerFromCache } from '../../helpers/extensionsHandler'; import { getInstance } from '../../helpers/system'; -import { getGlobalSettingValue, Store, getAppState } from '../../store/rootReducer'; +import { getAppState, getGlobalSettingValue, Store } from '../../store/rootReducer'; interface Props { location: Location; diff --git a/server/sonar-web/src/main/js/app/components/ProjectAdminContainer.tsx b/server/sonar-web/src/main/js/app/components/ProjectAdminContainer.tsx index c8bdcf5659c..57c6f32d6bb 100644 --- a/server/sonar-web/src/main/js/app/components/ProjectAdminContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/ProjectAdminContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import A11ySkipTarget from './a11y/A11ySkipTarget'; import handleRequiredAuthorization from '../utils/handleRequiredAuthorization'; +import A11ySkipTarget from './a11y/A11ySkipTarget'; interface Props { children: JSX.Element; diff --git a/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx b/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx index e567dde3e3d..59e645d328a 100644 --- a/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import NavBar from 'sonar-ui-common/components/ui/NavBar'; -import GlobalFooterContainer from './GlobalFooterContainer'; import { rawSizes } from '../theme'; +import GlobalFooterContainer from './GlobalFooterContainer'; interface Props { children?: React.ReactNode; diff --git a/server/sonar-web/src/main/js/app/components/StartupModal.tsx b/server/sonar-web/src/main/js/app/components/StartupModal.tsx index a39a2053a5a..d9e79694507 100644 --- a/server/sonar-web/src/main/js/app/components/StartupModal.tsx +++ b/server/sonar-web/src/main/js/app/components/StartupModal.tsx @@ -17,20 +17,20 @@ * 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 * as React from 'react'; import { connect } from 'react-redux'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; import { parseDate, toShortNotSoISOString } from 'sonar-ui-common/helpers/dates'; -import { save, get } from 'sonar-ui-common/helpers/storage'; import { hasMessage } from 'sonar-ui-common/helpers/l10n'; -import { OnboardingContext } from './OnboardingContext'; -import { getCurrentUser, getAppState, Store } from '../../store/rootReducer'; -import { skipOnboarding } from '../../store/users'; +import { get, save } from 'sonar-ui-common/helpers/storage'; import { showLicense } from '../../api/marketplace'; +import { Location, Router, withRouter } from '../../components/hoc/withRouter'; import { isSonarCloud } from '../../helpers/system'; import { isLoggedIn } from '../../helpers/users'; -import { withRouter, Router, Location } from '../../components/hoc/withRouter'; +import { getAppState, getCurrentUser, Store } from '../../store/rootReducer'; +import { skipOnboarding } from '../../store/users'; +import { OnboardingContext } from './OnboardingContext'; const OnboardingModal = lazyLoad(() => import('../../apps/tutorials/onboarding/OnboardingModal')); const LicensePromptModal = lazyLoad( diff --git a/server/sonar-web/src/main/js/app/components/__tests__/AccountDeleted-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/AccountDeleted-test.tsx index 911ce7ae432..608b22dcf2f 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/AccountDeleted-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/AccountDeleted-test.tsx @@ -18,8 +18,8 @@ * 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 AccountDeleted from '../AccountDeleted'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx index 86c9ca15349..94a3802418a 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx @@ -17,10 +17,10 @@ * 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 { AdminContainer } from '../AdminContainer'; +import * as React from 'react'; import { mockLocation } from '../../../helpers/testMocks'; +import { AdminContainer } from '../AdminContainer'; it('should render correctly', () => { const wrapper = shallowRender(); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx index af44a3ed847..0af5a54b7a3 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx @@ -17,10 +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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { ComponentContainer } from '../ComponentContainer'; import { getBranches, getPullRequests } from '../../../api/branches'; import { getTasksForComponent } from '../../../api/ce'; import { getComponentData } from '../../../api/components'; @@ -28,14 +27,15 @@ import { getComponentNavigation } from '../../../api/nav'; import { STATUSES } from '../../../apps/background-tasks/constants'; import { isSonarCloud } from '../../../helpers/system'; import { - mockLocation, - mockRouter, mockComponent, - mockPullRequest, + mockLocation, mockLongLivingBranch, - mockShortLivingBranch, - mockMainBranch + mockMainBranch, + mockPullRequest, + mockRouter, + mockShortLivingBranch } from '../../../helpers/testMocks'; +import { ComponentContainer } from '../ComponentContainer'; jest.mock('../../../api/branches', () => { const { mockMainBranch, mockPullRequest } = require.requireActual('../../../helpers/testMocks'); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx index ff7aba0434b..0dda72faab5 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalContainer-test.tsx @@ -17,10 +17,10 @@ * 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 GlobalContainer, { Props } from '../GlobalContainer'; +import * as React from 'react'; import { mockLocation } from '../../../helpers/testMocks'; +import GlobalContainer, { Props } from '../GlobalContainer'; jest.mock('../embed-docs-modal/SuggestionsProvider', () => { class SuggestionsProvider extends React.Component { diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx index 2a56779b46b..e3b0a95237a 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-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 { shallow } from 'enzyme'; -import GlobalFooter from '../GlobalFooter'; +import * as React from 'react'; import { EditionKey } from '../../../apps/marketplace/utils'; import { isSonarCloud } from '../../../helpers/system'; +import GlobalFooter from '../GlobalFooter'; jest.mock('../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterSonarCloud-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterSonarCloud-test.tsx index 686c31cc385..7a2f049438b 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterSonarCloud-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooterSonarCloud-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 GlobalFooterSonarCloud from '../GlobalFooterSonarCloud'; jest.mock('date-fns/get_year', () => jest.fn(() => '20XX')); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx index 36d40db9a93..8f40cf98220 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import { PageTracker } from '../PageTracker'; +import * as React from 'react'; import { gtm } from '../../../helpers/analytics'; -import { mockLocation } from '../../../helpers/testMocks'; import { installScript } from '../../../helpers/extensions'; import { getWebAnalyticsPageHandlerFromCache } from '../../../helpers/extensionsHandler'; +import { mockLocation } from '../../../helpers/testMocks'; +import { PageTracker } from '../PageTracker'; jest.mock('../../../helpers/extensions', () => ({ installScript: jest.fn().mockResolvedValue({}) diff --git a/server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-test.tsx index 74ef1c3d5c3..de466845f8d 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-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, shallow } from 'enzyme'; -import ProjectAdminContainer from '../ProjectAdminContainer'; +import * as React from 'react'; import handleRequiredAuthorization from '../../../app/utils/handleRequiredAuthorization'; import { mockComponent } from '../../../helpers/testMocks'; +import ProjectAdminContainer from '../ProjectAdminContainer'; jest.mock('../../utils/handleRequiredAuthorization', () => { return { default: jest.fn() }; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx index 638dc91f0d4..f47630a194b 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx @@ -17,17 +17,17 @@ * 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, ShallowWrapper } from 'enzyme'; +import * as React from 'react'; import { toShortNotSoISOString } from 'sonar-ui-common/helpers/dates'; import { hasMessage } from 'sonar-ui-common/helpers/l10n'; -import { save, get } from 'sonar-ui-common/helpers/storage'; +import { get, save } from 'sonar-ui-common/helpers/storage'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { StartupModal, ModalKey } from '../StartupModal'; import { showLicense } from '../../../api/marketplace'; import { EditionKey } from '../../../apps/marketplace/utils'; import { mockOrganization, mockRouter } from '../../../helpers/testMocks'; +import { ModalKey, StartupModal } from '../StartupModal'; jest.mock('../../../api/marketplace', () => ({ showLicense: jest.fn().mockResolvedValue(undefined) diff --git a/server/sonar-web/src/main/js/app/components/a11y/A11yProvider.tsx b/server/sonar-web/src/main/js/app/components/a11y/A11yProvider.tsx index 3f9dc7f13a8..8fd625ccd11 100644 --- a/server/sonar-web/src/main/js/app/components/a11y/A11yProvider.tsx +++ b/server/sonar-web/src/main/js/app/components/a11y/A11yProvider.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { A11yContext } from './A11yContext'; interface State { diff --git a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11yProvider-test.tsx b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11yProvider-test.tsx index 45bee7d508b..e545ad19f93 100644 --- a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11yProvider-test.tsx +++ b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11yProvider-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { A11yContextShape } from '../A11yContext'; import A11yProvider from '../A11yProvider'; diff --git a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipLinks-test.tsx b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipLinks-test.tsx index 77d8c37f35e..4ddc712961e 100644 --- a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipLinks-test.tsx +++ b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipLinks-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 A11ySkipLinks from '../A11ySkipLinks'; jest.mock('../A11yContext', () => ({ diff --git a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx index eb8bf725f06..62e331aa688 100644 --- a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-test.tsx +++ b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11ySkipTarget-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 { mount } from 'enzyme'; +import * as React from 'react'; import { A11ySkipTargetInner } from '../A11ySkipTarget'; it('should render correctly, and (un)register the link when (un)mounted', () => { diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx index 97bd37fff33..9fe7943f4bf 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; +import { isSonarCloud } from '../../../helpers/system'; import ProductNewsMenuItem from './ProductNewsMenuItem'; import { SuggestionsContext } from './SuggestionsContext'; -import { isSonarCloud } from '../../../helpers/system'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx index 2b894d58996..22371f64bc5 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HelpIcon from 'sonar-ui-common/components/icons/HelpIcon'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Toggler from 'sonar-ui-common/components/controls/Toggler'; +import HelpIcon from 'sonar-ui-common/components/icons/HelpIcon'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; +import { translate } from 'sonar-ui-common/helpers/l10n'; const EmbedDocsPopup = lazyLoad(() => import('./EmbedDocsPopup')); diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/ProductNewsMenuItem.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/ProductNewsMenuItem.tsx index 2fd2e729b66..06460f27d91 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/ProductNewsMenuItem.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/ProductNewsMenuItem.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ChevronRightIcon from 'sonar-ui-common/components/icons/ChevronRightIcon'; import { connect } from 'react-redux'; +import ChevronRightIcon from 'sonar-ui-common/components/icons/ChevronRightIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { fetchPrismicRefs, fetchPrismicNews, PrismicNews } from '../../../api/news'; -import { getGlobalSettingValue, Store } from '../../../store/rootReducer'; +import { fetchPrismicNews, fetchPrismicRefs, PrismicNews } from '../../../api/news'; import DateFormatter from '../../../components/intl/DateFormatter'; import PlaceholderBar from '../../../components/ui/PlaceholderBar'; +import { getGlobalSettingValue, Store } from '../../../store/rootReducer'; interface OwnProps { tag?: string; diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/SuggestionsProvider.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/SuggestionsProvider.tsx index 4e119d95eac..df3f929818b 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/SuggestionsProvider.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/SuggestionsProvider.tsx @@ -17,10 +17,10 @@ * 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 suggestionsJson from 'Docs/EmbedDocsSuggestions.json'; -import { SuggestionsContext } from './SuggestionsContext'; +import * as React from 'react'; import { isSonarCloud } from '../../../helpers/system'; +import { SuggestionsContext } from './SuggestionsContext'; type SuggestionsJson = T.Dict<T.SuggestionLink[]>; diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/EmbedDocsPopup-test.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/EmbedDocsPopup-test.tsx index ecb7c352532..2778b1f9f0a 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/EmbedDocsPopup-test.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/EmbedDocsPopup-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 EmbedDocsPopup from '../EmbedDocsPopup'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/ProductNewsMenuItem-test.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/ProductNewsMenuItem-test.tsx index 32c2ae9ec41..b7a279a084c 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/ProductNewsMenuItem-test.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/ProductNewsMenuItem-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import { fetchPrismicNews, fetchPrismicRefs } from '../../../../api/news'; import { ProductNewsMenuItem } from '../ProductNewsMenuItem'; -import { fetchPrismicRefs, fetchPrismicNews } from '../../../../api/news'; jest.mock('../../../../api/news', () => ({ fetchPrismicRefs: jest.fn().mockResolvedValue({ id: 'master', ref: 'master-ref' }), diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/SuggestionsProvider-test.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/SuggestionsProvider-test.tsx index 3a1b3e888da..0ffd5f6c396 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/SuggestionsProvider-test.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/__tests__/SuggestionsProvider-test.tsx @@ -17,10 +17,10 @@ * 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 SuggestionsProvider from '../SuggestionsProvider'; +import * as React from 'react'; import { isSonarCloud } from '../../../../helpers/system'; +import SuggestionsProvider from '../SuggestionsProvider'; jest.mock( 'Docs/EmbedDocsSuggestions.json', diff --git a/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx b/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx index da994657b3d..adf72a16a13 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx @@ -19,15 +19,15 @@ */ import * as React from 'react'; import Helmet from 'react-helmet'; -import { injectIntl, InjectedIntlProps } from 'react-intl'; +import { InjectedIntlProps, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import getStore from '../../utils/getStore'; import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; import { getExtensionStart } from '../../../helpers/extensions'; import { addGlobalErrorMessage } from '../../../store/globalMessages'; -import { Store, getCurrentUser } from '../../../store/rootReducer'; +import { getCurrentUser, Store } from '../../../store/rootReducer'; import * as theme from '../../theme'; +import getStore from '../../utils/getStore'; interface Props extends InjectedIntlProps { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/app/components/extensions/GlobalAdminPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/GlobalAdminPageExtension.tsx index af43456958c..2174014ede8 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/GlobalAdminPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/GlobalAdminPageExtension.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import Extension from './Extension'; -import NotFound from '../NotFound'; import { getAppState, Store } from '../../../store/rootReducer'; +import NotFound from '../NotFound'; +import Extension from './Extension'; interface Props { adminPages: T.Extension[] | undefined; diff --git a/server/sonar-web/src/main/js/app/components/extensions/GlobalPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/GlobalPageExtension.tsx index c334878e99d..d21b7426946 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/GlobalPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/GlobalPageExtension.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import Extension from './Extension'; -import NotFound from '../NotFound'; import { getAppState, Store } from '../../../store/rootReducer'; +import NotFound from '../NotFound'; +import Extension from './Extension'; interface Props { globalPages: T.Extension[] | undefined; diff --git a/server/sonar-web/src/main/js/app/components/extensions/OrganizationPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/OrganizationPageExtension.tsx index 9f37e30173d..ec75dc3128e 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/OrganizationPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/OrganizationPageExtension.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import Extension from './Extension'; -import NotFound from '../NotFound'; -import { getOrganizationByKey, Store } from '../../../store/rootReducer'; import { fetchOrganization } from '../../../store/rootActions'; +import { getOrganizationByKey, Store } from '../../../store/rootReducer'; +import NotFound from '../NotFound'; +import Extension from './Extension'; interface StateToProps { organization?: T.Organization; diff --git a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx index 96a5fedfd07..cc7a1a588da 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.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 { Location } from 'history'; import * as React from 'react'; import { connect } from 'react-redux'; -import { Location } from 'history'; -import Extension from './Extension'; -import NotFound from '../NotFound'; import { addGlobalErrorMessage } from '../../../store/globalMessages'; +import NotFound from '../NotFound'; +import Extension from './Extension'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/app/components/extensions/ProjectPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/ProjectPageExtension.tsx index 91bf6562f51..72a55bc08b6 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/ProjectPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/ProjectPageExtension.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Extension from './Extension'; import NotFound from '../NotFound'; +import Extension from './Extension'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx index cdf5d4b0c9b..9b83c73084c 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-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 { Extension } from '../Extension'; -import { mockCurrentUser, mockLocation, mockRouter } from '../../../../helpers/testMocks'; import { getExtensionStart } from '../../../../helpers/extensions'; +import { mockCurrentUser, mockLocation, mockRouter } from '../../../../helpers/testMocks'; +import { Extension } from '../Extension'; jest.mock('../../../../helpers/extensions', () => ({ getExtensionStart: jest.fn().mockResolvedValue(jest.fn()) diff --git a/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts b/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts index 288a9ca2001..b4901d5a201 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts +++ b/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts @@ -17,65 +17,69 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { FormattedMessage } from 'react-intl'; import * as ReactRedux from 'react-redux'; import * as ReactRouter from 'react-router'; -import { FormattedMessage } from 'react-intl'; +import ActionsDropdown, { + ActionsDropdownItem +} from 'sonar-ui-common/components/controls/ActionsDropdown'; +import { + Button, + EditButton, + ResetButtonLink, + SubmitButton +} from 'sonar-ui-common/components/controls/buttons'; +import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; +import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; +import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; +import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import Modal from 'sonar-ui-common/components/controls/Modal'; +import RadioToggle from 'sonar-ui-common/components/controls/RadioToggle'; +import ReloadButton from 'sonar-ui-common/components/controls/ReloadButton'; +import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import SearchSelect from 'sonar-ui-common/components/controls/SearchSelect'; +import Select from 'sonar-ui-common/components/controls/Select'; +import SelectList from 'sonar-ui-common/components/controls/SelectList'; +import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import AlertErrorIcon from 'sonar-ui-common/components/icons/AlertErrorIcon'; import AlertSuccessIcon from 'sonar-ui-common/components/icons/AlertSuccessIcon'; import AlertWarnIcon from 'sonar-ui-common/components/icons/AlertWarnIcon'; import CheckIcon from 'sonar-ui-common/components/icons/CheckIcon'; import ClearIcon from 'sonar-ui-common/components/icons/ClearIcon'; -import SecurityHotspotIcon from 'sonar-ui-common/components/icons/SecurityHotspotIcon'; -import VulnerabilityIcon from 'sonar-ui-common/components/icons/VulnerabilityIcon'; +import DetachIcon from 'sonar-ui-common/components/icons/DetachIcon'; import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; -import PlusCircleIcon from 'sonar-ui-common/components/icons/PlusCircleIcon'; import HelpIcon from 'sonar-ui-common/components/icons/HelpIcon'; import LockIcon from 'sonar-ui-common/components/icons/LockIcon'; -import DetachIcon from 'sonar-ui-common/components/icons/DetachIcon'; -import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import LongLivingBranchIcon from 'sonar-ui-common/components/icons/LongLivingBranchIcon'; +import PlusCircleIcon from 'sonar-ui-common/components/icons/PlusCircleIcon'; import PullRequestIcon from 'sonar-ui-common/components/icons/PullRequestIcon'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import * as request from 'sonar-ui-common/helpers/request'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import { - EditButton, - Button, - SubmitButton, - ResetButtonLink -} from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import Modal from 'sonar-ui-common/components/controls/Modal'; -import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; -import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; +import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; +import SecurityHotspotIcon from 'sonar-ui-common/components/icons/SecurityHotspotIcon'; +import VulnerabilityIcon from 'sonar-ui-common/components/icons/VulnerabilityIcon'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; -import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; -import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import DuplicationsRating from 'sonar-ui-common/components/ui/DuplicationsRating'; import Level from 'sonar-ui-common/components/ui/Level'; -import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; import Rating from 'sonar-ui-common/components/ui/Rating'; -import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; -import ActionsDropdown, { - ActionsDropdownItem -} from 'sonar-ui-common/components/controls/ActionsDropdown'; -import RadioToggle from 'sonar-ui-common/components/controls/RadioToggle'; -import ReloadButton from 'sonar-ui-common/components/controls/ReloadButton'; -import Select from 'sonar-ui-common/components/controls/Select'; -import SelectList from 'sonar-ui-common/components/controls/SelectList'; -import SearchSelect from 'sonar-ui-common/components/controls/SearchSelect'; -import throwGlobalError from '../../utils/throwGlobalError'; -import addGlobalSuccessMessage from '../../utils/addGlobalSuccessMessage'; -import Suggestions from '../embed-docs-modal/Suggestions'; -import * as measures from '../../../helpers/measures'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; +import * as request from 'sonar-ui-common/helpers/request'; +import NotFound from '../../../app/components/NotFound'; +import Favorite from '../../../components/controls/Favorite'; +import HomePageSelect from '../../../components/controls/HomePageSelect'; +import BranchIcon from '../../../components/icons-components/BranchIcon'; +import DateFormatter from '../../../components/intl/DateFormatter'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; +import CoverageRating from '../../../components/ui/CoverageRating'; import { getBranchLikeQuery, isBranch, isLongLivingBranch, isPullRequest } from '../../../helpers/branches'; -import { getComponentIssuesUrl, getRulesUrl } from '../../../helpers/urls'; +import * as measures from '../../../helpers/measures'; import { getStandards, renderCWECategory, @@ -83,15 +87,11 @@ import { renderSansTop25Category, renderSonarSourceSecurityCategory } from '../../../helpers/security-standard'; -import DateFromNow from '../../../components/intl/DateFromNow'; -import DateFormatter from '../../../components/intl/DateFormatter'; -import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; -import Favorite from '../../../components/controls/Favorite'; -import HomePageSelect from '../../../components/controls/HomePageSelect'; -import BranchIcon from '../../../components/icons-components/BranchIcon'; -import CoverageRating from '../../../components/ui/CoverageRating'; -import NotFound from '../../../app/components/NotFound'; +import { getComponentIssuesUrl, getRulesUrl } from '../../../helpers/urls'; +import addGlobalSuccessMessage from '../../utils/addGlobalSuccessMessage'; +import throwGlobalError from '../../utils/throwGlobalError'; import A11ySkipTarget from '../a11y/A11ySkipTarget'; +import Suggestions from '../embed-docs-modal/Suggestions'; const exposeLibraries = () => { const global = window as any; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx index 936977d2ff2..80214202fc7 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import ContextNavBar from 'sonar-ui-common/components/ui/ContextNavBar'; -import ComponentNavHeader from './ComponentNavHeader'; -import ComponentNavMeta from './ComponentNavMeta'; -import ComponentNavMenu from './ComponentNavMenu'; -import ComponentNavBgTaskNotif from './ComponentNavBgTaskNotif'; -import RecentHistory from '../../RecentHistory'; -import { rawSizes } from '../../../theme'; import { STATUSES } from '../../../../apps/background-tasks/constants'; +import { rawSizes } from '../../../theme'; +import RecentHistory from '../../RecentHistory'; import './ComponentNav.css'; +import ComponentNavBgTaskNotif from './ComponentNavBgTaskNotif'; +import ComponentNavHeader from './ComponentNavHeader'; +import ComponentNavMenu from './ComponentNavMenu'; +import ComponentNavMeta from './ComponentNavMeta'; interface Props { branchLikes: T.BranchLike[]; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx index 63f4f7d8293..12d977245e1 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx @@ -18,13 +18,13 @@ * 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 { hasMessage, translate } from 'sonar-ui-common/helpers/l10n'; +import { Link } from 'react-router'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import ComponentNavLicenseNotif from './ComponentNavLicenseNotif'; +import { hasMessage, translate } from 'sonar-ui-common/helpers/l10n'; import { STATUSES } from '../../../../apps/background-tasks/constants'; import { getComponentBackgroundTaskUrl } from '../../../../helpers/urls'; +import ComponentNavLicenseNotif from './ComponentNavLicenseNotif'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx index 46e4cf570e4..f6abb60a0ad 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx @@ -18,26 +18,26 @@ * 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 PlusCircleIcon from 'sonar-ui-common/components/icons/PlusCircleIcon'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import Toggler from 'sonar-ui-common/components/controls/Toggler'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; -import ComponentNavBranchesMenu from './ComponentNavBranchesMenu'; -import BranchIcon from '../../../../components/icons-components/BranchIcon'; +import Toggler from 'sonar-ui-common/components/controls/Toggler'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; +import PlusCircleIcon from 'sonar-ui-common/components/icons/PlusCircleIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import DocTooltip from '../../../../components/docs/DocTooltip'; -import { colors } from '../../../theme'; +import { withAppState } from '../../../../components/hoc/withAppState'; +import BranchIcon from '../../../../components/icons-components/BranchIcon'; import { - isShortLivingBranch, - isSameBranchLike, getBranchLikeDisplayName, - isPullRequest + isPullRequest, + isSameBranchLike, + isShortLivingBranch } from '../../../../helpers/branches'; import { isSonarCloud } from '../../../../helpers/system'; import { getPortfolioAdminUrl } from '../../../../helpers/urls'; -import { withAppState } from '../../../../components/hoc/withAppState'; +import { colors } from '../../../theme'; +import ComponentNavBranchesMenu from './ComponentNavBranchesMenu'; interface Props { appState: Pick<T.AppState, 'branchesEnabled'>; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenu.tsx index b5fee98b100..72da26274fa 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenu.tsx @@ -19,23 +19,23 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; -import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; -import ComponentNavBranchesMenuItem from './ComponentNavBranchesMenuItem'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; +import { Router, withRouter } from '../../../../components/hoc/withRouter'; import { - sortBranchesAsTree, - isLongLivingBranch, - isShortLivingBranch, - isSameBranchLike, getBranchLikeKey, + isBranch, + isLongLivingBranch, isPullRequest, - isBranch + isSameBranchLike, + isShortLivingBranch, + sortBranchesAsTree } from '../../../../helpers/branches'; import { getBranchLikeUrl } from '../../../../helpers/urls'; -import { withRouter, Router } from '../../../../components/hoc/withRouter'; +import ComponentNavBranchesMenuItem from './ComponentNavBranchesMenuItem'; interface Props { branchLikes: T.BranchLike[]; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenuItem.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenuItem.tsx index 021cbfce88a..3a0987ed042 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenuItem.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenuItem.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 classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; -import * as classNames from 'classnames'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import BranchIcon from '../../../../components/icons-components/BranchIcon'; import BranchStatus from '../../../../components/common/BranchStatus'; +import BranchIcon from '../../../../components/icons-components/BranchIcon'; import { - isShortLivingBranch, getBranchLikeDisplayName, getBranchLikeKey, isMainBranch, - isPullRequest + isPullRequest, + isShortLivingBranch } from '../../../../helpers/branches'; import { getBranchLikeUrl } from '../../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavHeader.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavHeader.tsx index 0cec4d3a348..457bb69ea70 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavHeader.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavHeader.tsx @@ -18,19 +18,19 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import { connect } from 'react-redux'; import { Link } from 'react-router'; +import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import ComponentNavBranch from './ComponentNavBranch'; -import { getOrganizationByKey, Store } from '../../../../store/rootReducer'; import OrganizationAvatar from '../../../../components/common/OrganizationAvatar'; import OrganizationHelmet from '../../../../components/common/OrganizationHelmet'; import OrganizationLink from '../../../../components/ui/OrganizationLink'; import { sanitizeAlmId } from '../../../../helpers/almIntegrations'; -import { getProjectUrl } from '../../../../helpers/urls'; -import { isSonarCloud } from '../../../../helpers/system'; import { isMainBranch } from '../../../../helpers/branches'; +import { isSonarCloud } from '../../../../helpers/system'; +import { getProjectUrl } from '../../../../helpers/urls'; +import { getOrganizationByKey, Store } from '../../../../store/rootReducer'; +import ComponentNavBranch from './ComponentNavBranch'; interface StateProps { organization?: T.Organization; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx index 95c6bcce7c4..c2726b01327 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { isValidLicense } from '../../../../api/marketplace'; import { withAppState } from '../../../../components/hoc/withAppState'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx index 7e43462d14a..a1c17cb4098 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.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 classNames from 'classnames'; import * as React from 'react'; +import { Link } from 'react-router'; +import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import NavBarTabs from 'sonar-ui-common/components/ui/NavBarTabs'; -import { Link } from 'react-router'; -import * as classNames from 'classnames'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import { withAppState } from '../../../../components/hoc/withAppState'; import { - isShortLivingBranch, - isPullRequest, + getBranchLikeQuery, isMainBranch, - getBranchLikeQuery + isPullRequest, + isShortLivingBranch } from '../../../../helpers/branches'; import { isSonarCloud } from '../../../../helpers/system'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx index ba9d0af996d..47b574cb50f 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx @@ -18,23 +18,23 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import DetachIcon from 'sonar-ui-common/components/icons/DetachIcon'; import { connect } from 'react-redux'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import ComponentNavWarnings from './ComponentNavWarnings'; +import DetachIcon from 'sonar-ui-common/components/icons/DetachIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import BranchStatus from '../../../../components/common/BranchStatus'; -import DateTimeFormatter from '../../../../components/intl/DateTimeFormatter'; import Favorite from '../../../../components/controls/Favorite'; import HomePageSelect from '../../../../components/controls/HomePageSelect'; +import DateTimeFormatter from '../../../../components/intl/DateTimeFormatter'; import { - isShortLivingBranch, isLongLivingBranch, isMainBranch, - isPullRequest + isPullRequest, + isShortLivingBranch } from '../../../../helpers/branches'; import { isLoggedIn } from '../../../../helpers/users'; import { getCurrentUser, Store } from '../../../../store/rootReducer'; +import ComponentNavWarnings from './ComponentNavWarnings'; export interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx index 39439a91b58..0538a14ef24 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import WarningIcon from 'sonar-ui-common/components/icons/WarningIcon'; import { FormattedMessage } from 'react-intl'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import WarningIcon from 'sonar-ui-common/components/icons/WarningIcon'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; const AnalysisWarningsModal = lazyLoad(() => import('../../../../components/common/AnalysisWarningsModal') diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx index c5bc951d3b9..fbc8dada059 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-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 ComponentNav from '../ComponentNav'; const component = { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBgTaskNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBgTaskNotif-test.tsx index 08f7dc6c76e..638df2a9cbf 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBgTaskNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBgTaskNotif-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 ComponentNavBgTaskNotif from '../ComponentNavBgTaskNotif'; jest.mock('sonar-ui-common/helpers/l10n', () => ({ diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranch-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranch-test.tsx index 6e37c64541d..b7761bf3141 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranch-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranch-test.tsx @@ -17,17 +17,17 @@ * 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 { click } from 'sonar-ui-common/helpers/testUtils'; -import { ComponentNavBranch } from '../ComponentNavBranch'; import { isSonarCloud } from '../../../../../helpers/system'; import { - mockPullRequest, - mockShortLivingBranch, + mockLongLivingBranch, mockMainBranch, - mockLongLivingBranch + mockPullRequest, + mockShortLivingBranch } from '../../../../../helpers/testMocks'; +import { ComponentNavBranch } from '../ComponentNavBranch'; jest.mock('../../../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranchesMenu-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranchesMenu-test.tsx index 28e9e979c57..54be1a41132 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranchesMenu-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranchesMenu-test.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 { shallow } from 'enzyme'; +import * as React from 'react'; import { elementKeydown } from 'sonar-ui-common/helpers/testUtils'; -import { ComponentNavBranchesMenu } from '../ComponentNavBranchesMenu'; import { - mockPullRequest, - mockShortLivingBranch, mockLongLivingBranch, - mockMainBranch + mockMainBranch, + mockPullRequest, + mockShortLivingBranch } from '../../../../../helpers/testMocks'; +import { ComponentNavBranchesMenu } from '../ComponentNavBranchesMenu'; const component = { key: 'component' } as T.Component; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranchesMenuItem-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranchesMenuItem-test.tsx index 0de990f31f7..33f62432701 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranchesMenuItem-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBranchesMenuItem-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 ComponentNavBranchesMenuItem, { Props } from '../ComponentNavBranchesMenuItem'; const component = { key: 'component' } as T.Component; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavHeader-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavHeader-test.tsx index 2c621ac6bac..acd86faf934 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavHeader-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavHeader-test.tsx @@ -17,10 +17,10 @@ * 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 { ComponentNavHeader } from '../ComponentNavHeader'; +import * as React from 'react'; import { isSonarCloud } from '../../../../../helpers/system'; +import { ComponentNavHeader } from '../ComponentNavHeader'; jest.mock('../../../../../helpers/system', () => ({ isSonarCloud: jest.fn().mockReturnValue(false) diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavLicenseNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavLicenseNotif-test.tsx index 9e6590bf91a..0096483ae8c 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavLicenseNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavLicenseNotif-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { ComponentNavLicenseNotif } from '../ComponentNavLicenseNotif'; import { isValidLicense } from '../../../../../api/marketplace'; +import { ComponentNavLicenseNotif } from '../ComponentNavLicenseNotif'; jest.mock('sonar-ui-common/helpers/l10n', () => ({ ...jest.requireActual('sonar-ui-common/helpers/l10n'), diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavMenu-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavMenu-test.tsx index 7d09bef1ad9..732501693d2 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavMenu-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavMenu-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 { ComponentNavMenu } from '../ComponentNavMenu'; const mainBranch: T.MainBranch = { isMain: true, name: 'master' }; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavMeta-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavMeta-test.tsx index acc42d006cf..858d8ea1134 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavMeta-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavMeta-test.tsx @@ -17,17 +17,17 @@ * 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 { ComponentNavMeta, getCurrentPage, Props } from '../ComponentNavMeta'; +import * as React from 'react'; import { - mockShortLivingBranch, mockComponent, + mockCurrentUser, + mockLoggedInUser, mockLongLivingBranch, mockPullRequest, - mockCurrentUser, - mockLoggedInUser + mockShortLivingBranch } from '../../../../../helpers/testMocks'; +import { ComponentNavMeta, getCurrentPage, Props } from '../ComponentNavMeta'; describe('#ComponentNavMeta', () => { it('renders status of short-living branch', () => { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavWarnings-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavWarnings-test.tsx index 708b7666bff..de98cd58b13 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavWarnings-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavWarnings-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 ComponentNavWarnings from '../ComponentNavWarnings'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx index 343687c1c9a..05f043e52a4 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx @@ -19,33 +19,33 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; +import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; import NavBar from 'sonar-ui-common/components/ui/NavBar'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; -import GlobalNavBranding, { SonarCloudNavBranding } from './GlobalNavBranding'; -import GlobalNavMenu from './GlobalNavMenu'; -import GlobalNavExplore from './GlobalNavExplore'; -import GlobalNavUserContainer from './GlobalNavUserContainer'; -import Search from '../../search/Search'; -import EmbedDocsPopupHelper from '../../embed-docs-modal/EmbedDocsPopupHelper'; -import { rawSizes } from '../../../theme'; import { - fetchPrismicRefs, fetchPrismicFeatureNews, + fetchPrismicRefs, PrismicFeatureNews } from '../../../../api/news'; +import { isSonarCloud } from '../../../../helpers/system'; +import { isLoggedIn } from '../../../../helpers/users'; import { + getAppState, getCurrentUser, getCurrentUserSetting, - getAppState, getGlobalSettingValue, Store } from '../../../../store/rootReducer'; -import { isSonarCloud } from '../../../../helpers/system'; -import { isLoggedIn } from '../../../../helpers/users'; -import { OnboardingContext } from '../../OnboardingContext'; import { setCurrentUserSetting } from '../../../../store/users'; +import { rawSizes } from '../../../theme'; +import EmbedDocsPopupHelper from '../../embed-docs-modal/EmbedDocsPopupHelper'; +import { OnboardingContext } from '../../OnboardingContext'; +import Search from '../../search/Search'; import './GlobalNav.css'; +import GlobalNavBranding, { SonarCloudNavBranding } from './GlobalNavBranding'; +import GlobalNavExplore from './GlobalNavExplore'; +import GlobalNavMenu from './GlobalNavMenu'; +import GlobalNavUserContainer from './GlobalNavUserContainer'; const GlobalNavPlus = lazyLoad(() => import('./GlobalNavPlus'), 'GlobalNavPlus'); const NotificationsSidebar = lazyLoad( diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.tsx index b17ccdbe76c..1f1e62e4953 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Link } from 'react-router'; import { connect } from 'react-redux'; +import { Link } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import { getGlobalSettingValue, Store } from '../../../../store/rootReducer'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx index 7595b890b7d..653b454ccc3 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.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 React from 'react'; import { Link } from 'react-router'; +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 Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import { isMySet } from '../../../../apps/issues/utils'; import { isSonarCloud } from '../../../../helpers/system'; -import { isLoggedIn } from '../../../../helpers/users'; import { getQualityGatesUrl } from '../../../../helpers/urls'; +import { isLoggedIn } from '../../../../helpers/users'; interface Props { appState: Pick<T.AppState, 'canAdmin' | 'globalPages' | 'organizationsEnabled' | 'qualifiers'>; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavPlus.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavPlus.tsx index 6db1ba0603e..42ae09900f5 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavPlus.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavPlus.tsx @@ -18,17 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import PlusIcon from 'sonar-ui-common/components/icons/PlusIcon'; import { Link, withRouter, WithRouterProps } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; -import CreateFormShim from '../../../../apps/portfolio/components/CreateFormShim'; -import { OnboardingContextShape } from '../../OnboardingContext'; +import PlusIcon from 'sonar-ui-common/components/icons/PlusIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getComponentNavigation } from '../../../../api/nav'; +import CreateFormShim from '../../../../apps/portfolio/components/CreateFormShim'; import { getExtensionStart } from '../../../../helpers/extensions'; import { isSonarCloud } from '../../../../helpers/system'; import { getPortfolioAdminUrl, getPortfolioUrl } from '../../../../helpers/urls'; import { hasGlobalPermission } from '../../../../helpers/users'; +import { OnboardingContextShape } from '../../OnboardingContext'; interface Props { appState: Pick<T.AppState, 'qualifiers'>; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx index 4cff2ebea7e..ecbcec67027 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx @@ -17,17 +17,17 @@ * 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 { sortBy } from 'lodash'; +import * as React from 'react'; import { Link } from 'react-router'; +import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; -import { rawSizes } from '../../../theme'; +import { Router, withRouter } from '../../../../components/hoc/withRouter'; import Avatar from '../../../../components/ui/Avatar'; import OrganizationListItem from '../../../../components/ui/OrganizationListItem'; import { isLoggedIn } from '../../../../helpers/users'; -import { withRouter, Router } from '../../../../components/hoc/withRouter'; +import { rawSizes } from '../../../theme'; interface Props { appState: { organizationsEnabled?: boolean }; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserContainer.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserContainer.tsx index 701abdf4dd4..c9894479a0d 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import GlobalNavUser from './GlobalNavUser'; import { getMyOrganizations, Store } from '../../../../store/rootReducer'; +import GlobalNavUser from './GlobalNavUser'; interface StateProps { organizations: T.Organization[]; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNav-test.tsx b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNav-test.tsx index 5e26c9b94f5..07d750c3dbe 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNav-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNav-test.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 { shallow } from 'enzyme'; -import { waitAndUpdate, click } from 'sonar-ui-common/helpers/testUtils'; -import { GlobalNav } from '../GlobalNav'; -import { isSonarCloud } from '../../../../../helpers/system'; +import * as React from 'react'; +import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { - fetchPrismicRefs, fetchPrismicFeatureNews, + fetchPrismicRefs, PrismicFeatureNews } from '../../../../../api/news'; +import { isSonarCloud } from '../../../../../helpers/system'; +import { GlobalNav } from '../GlobalNav'; jest.mock('../../../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavMenu-test.tsx b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavMenu-test.tsx index ce61bc5408e..34e089c8692 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavMenu-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavMenu-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 GlobalNavMenu from '../GlobalNavMenu'; it('should work with extensions', () => { diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavPlus-test.tsx b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavPlus-test.tsx index 83c47c47563..53b3c725284 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavPlus-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavPlus-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, ShallowWrapper } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; -import { GlobalNavPlus } from '../GlobalNavPlus'; import { isSonarCloud } from '../../../../../helpers/system'; import { mockRouter } from '../../../../../helpers/testMocks'; +import { GlobalNavPlus } from '../GlobalNavPlus'; jest.mock('../../../../../helpers/system', () => ({ isSonarCloud: jest.fn() diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavUser-test.tsx b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavUser-test.tsx index 27f0c9ea00a..8d620ea805a 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavUser-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavUser-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 { GlobalNavUser } from '../GlobalNavUser'; const currentUser = { avatar: 'abcd1234', isLoggedIn: true, name: 'foo', email: 'foo@bar.baz' }; diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/PendingPluginsActionNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/PendingPluginsActionNotif.tsx index 8b3250b0d1b..31b30db330c 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/PendingPluginsActionNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/PendingPluginsActionNotif.tsx @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { cancelPendingPlugins, PluginPendingResult } from '../../../../api/plugins'; import InstanceMessage from '../../../../components/common/InstanceMessage'; import RestartButton from '../../../../components/common/RestartButton'; -import { cancelPendingPlugins, PluginPendingResult } from '../../../../api/plugins'; interface Props { fetchSystemStatus: () => void; diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx index c3cfdfe81e2..df7bc14d113 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.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 classNames from 'classnames'; +import * as React from 'react'; import { IndexLink, Link } from 'react-router'; +import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import ContextNavBar from 'sonar-ui-common/components/ui/ContextNavBar'; import NavBarTabs from 'sonar-ui-common/components/ui/NavBarTabs'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; +import { PluginPendingResult } from '../../../../api/plugins'; +import { rawSizes } from '../../../theme'; import PendingPluginsActionNotif from './PendingPluginsActionNotif'; import SystemRestartNotif from './SystemRestartNotif'; -import { rawSizes } from '../../../theme'; -import { PluginPendingResult } from '../../../../api/plugins'; interface Props { extensions: T.Extension[]; diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SystemRestartNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SystemRestartNotif.tsx index cef5c5f9906..b0a51888005 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SystemRestartNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SystemRestartNotif.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getInstance } from '../../../../helpers/system'; export default function SystemRestartNotif() { diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx index d8a2390813e..205a9cb70ca 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; import PendingPluginsActionNotif from '../PendingPluginsActionNotif'; diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-test.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-test.tsx index d9f539d1ea0..aea08cad898 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-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 SettingsNav from '../SettingsNav'; it('should work with extensions', () => { diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SystemRestartNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SystemRestartNotif-test.tsx index eed4b5ff554..374358db62b 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SystemRestartNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SystemRestartNotif-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 SystemRestartNotif from '../SystemRestartNotif'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/app/components/notifications/NavLatestNotification.tsx b/server/sonar-web/src/main/js/app/components/notifications/NavLatestNotification.tsx index a78b8f5a9bb..df1cb34c902 100644 --- a/server/sonar-web/src/main/js/app/components/notifications/NavLatestNotification.tsx +++ b/server/sonar-web/src/main/js/app/components/notifications/NavLatestNotification.tsx @@ -17,10 +17,10 @@ * 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 differenceInSeconds from 'date-fns/difference_in_seconds'; -import NotificationIcon from 'sonar-ui-common/components/icons/NotificationIcon'; +import * as React from 'react'; import ClearIcon from 'sonar-ui-common/components/icons/ClearIcon'; +import NotificationIcon from 'sonar-ui-common/components/icons/NotificationIcon'; import { parseDate } from 'sonar-ui-common/helpers/dates'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { PrismicFeatureNews } from '../../../api/news'; diff --git a/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx b/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx index 93418181434..6df2e39ae6a 100644 --- a/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx +++ b/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx @@ -17,15 +17,15 @@ * 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 differenceInSeconds from 'date-fns/difference_in_seconds'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { ClearButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import DateFormatter from '../../../components/intl/DateFormatter'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { PrismicFeatureNews } from '../../../api/news'; +import DateFormatter from '../../../components/intl/DateFormatter'; export interface Props { fetchMoreFeatureNews: () => void; diff --git a/server/sonar-web/src/main/js/app/components/notifications/__tests__/NavLatestNotification-test.tsx b/server/sonar-web/src/main/js/app/components/notifications/__tests__/NavLatestNotification-test.tsx index 591a7ac15b7..bd2898cfc35 100644 --- a/server/sonar-web/src/main/js/app/components/notifications/__tests__/NavLatestNotification-test.tsx +++ b/server/sonar-web/src/main/js/app/components/notifications/__tests__/NavLatestNotification-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import NavLatestNotification from '../NavLatestNotification'; import { PrismicFeatureNews } from '../../../../api/news'; +import NavLatestNotification from '../NavLatestNotification'; it('should render correctly if there are new features, and the user has not opted out', () => { const wrapper = shallowRender(); diff --git a/server/sonar-web/src/main/js/app/components/notifications/__tests__/NotificationsSidebar-test.tsx b/server/sonar-web/src/main/js/app/components/notifications/__tests__/NotificationsSidebar-test.tsx index 77f0d35997b..7bbfab01fba 100644 --- a/server/sonar-web/src/main/js/app/components/notifications/__tests__/NotificationsSidebar-test.tsx +++ b/server/sonar-web/src/main/js/app/components/notifications/__tests__/NotificationsSidebar-test.tsx @@ -17,14 +17,14 @@ * 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 { parseDate } from 'sonar-ui-common/helpers/dates'; import NotificationsSidebar, { - Props, + Feature, isUnread, Notification, - Feature + Props } from '../NotificationsSidebar'; const news: Props['news'] = [ diff --git a/server/sonar-web/src/main/js/app/components/search/Search.tsx b/server/sonar-web/src/main/js/app/components/search/Search.tsx index 028241d51e9..2eee6ddcc40 100644 --- a/server/sonar-web/src/main/js/app/components/search/Search.tsx +++ b/server/sonar-web/src/main/js/app/components/search/Search.tsx @@ -17,24 +17,24 @@ * 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 ClockIcon from 'sonar-ui-common/components/icons/ClockIcon'; import * as key from 'keymaster'; import { debounce, keyBy, uniqBy } from 'lodash'; +import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { withRouter, WithRouterProps } from 'react-router'; -import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import OutsideClickHandler from 'sonar-ui-common/components/controls/OutsideClickHandler'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; -import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; -import { sortQualifiers, More, Results, ComponentResult } from './utils'; -import RecentHistory from '../RecentHistory'; +import ClockIcon from 'sonar-ui-common/components/icons/ClockIcon'; +import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; import { getSuggestions } from '../../../api/components'; -import { getProjectUrl, getCodeUrl } from '../../../helpers/urls'; +import { getCodeUrl, getProjectUrl } from '../../../helpers/urls'; +import RecentHistory from '../RecentHistory'; import './Search.css'; +import { ComponentResult, More, Results, sortQualifiers } from './utils'; const SearchResults = lazyLoad(() => import('./SearchResults')); const SearchResult = lazyLoad(() => import('./SearchResult')); diff --git a/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx b/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx index 9821523e093..f8046fe428b 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx +++ b/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx @@ -18,13 +18,13 @@ * 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 ClockIcon from 'sonar-ui-common/components/icons/ClockIcon'; import FavoriteIcon from 'sonar-ui-common/components/icons/FavoriteIcon'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; -import { Link } from 'react-router'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { getCodeUrl, getProjectUrl } from '../../../helpers/urls'; import { ComponentResult } from './utils'; -import { getProjectUrl, getCodeUrl } from '../../../helpers/urls'; interface Props { appState: Pick<T.AppState, 'organizationsEnabled'>; diff --git a/server/sonar-web/src/main/js/app/components/search/SearchResults.tsx b/server/sonar-web/src/main/js/app/components/search/SearchResults.tsx index f56bcfb5718..f72e02d317a 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchResults.tsx +++ b/server/sonar-web/src/main/js/app/components/search/SearchResults.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import SearchShowMore from './SearchShowMore'; -import { sortQualifiers, More, ComponentResult, Results } from './utils'; +import { ComponentResult, More, Results, sortQualifiers } from './utils'; export interface Props { allowMore: boolean; diff --git a/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx b/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx index 964da6f4f45..600e66bbb97 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx +++ b/server/sonar-web/src/main/js/app/components/search/SearchShowMore.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 classNames from 'classnames'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import * as classNames from 'classnames'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { allowMore: boolean; diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/Search-test.tsx b/server/sonar-web/src/main/js/app/components/search/__tests__/Search-test.tsx index 7e3aecaffeb..a378bde9fe4 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/Search-test.tsx +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/Search-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, ShallowWrapper } from 'enzyme'; +import * as React from 'react'; import { elementKeydown } from 'sonar-ui-common/helpers/testUtils'; import { Search } from '../Search'; diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResult-test.tsx b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResult-test.tsx index 6a2e303577b..53802846801 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResult-test.tsx +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResult-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 SearchResult from '../SearchResult'; jest.useFakeTimers(); diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResults-test.tsx b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResults-test.tsx index 3085a67a166..565dea71dd9 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResults-test.tsx +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResults-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 SearchResults, { Props } from '../SearchResults'; it('renders different components and dividers between them', () => { diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchShowMore-test.tsx b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchShowMore-test.tsx index 469f82c967e..397d8a9d59c 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchShowMore-test.tsx +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchShowMore-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 { click } from 'sonar-ui-common/helpers/testUtils'; import SearchShowMore from '../SearchShowMore'; diff --git a/server/sonar-web/src/main/js/app/index.ts b/server/sonar-web/src/main/js/app/index.ts index 36085143fe0..804f41067c1 100644 --- a/server/sonar-web/src/main/js/app/index.ts +++ b/server/sonar-web/src/main/js/app/index.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 { installGlobal, DEFAULT_LANGUAGE, requestMessages } from 'sonar-ui-common/helpers/l10n'; -import { request, parseJSON } from 'sonar-ui-common/helpers/request'; +import { DEFAULT_LANGUAGE, installGlobal, requestMessages } from 'sonar-ui-common/helpers/l10n'; +import { parseJSON, request } from 'sonar-ui-common/helpers/request'; import { installExtensionsHandler, installWebAnalyticsHandler } from '../helpers/extensionsHandler'; import { getSystemStatus } from '../helpers/system'; import './styles/sonar.css'; diff --git a/server/sonar-web/src/main/js/app/utils/__tests__/throwGlobalError-test.ts b/server/sonar-web/src/main/js/app/utils/__tests__/throwGlobalError-test.ts index 5f00a890a05..8d29b4bcad9 100644 --- a/server/sonar-web/src/main/js/app/utils/__tests__/throwGlobalError-test.ts +++ b/server/sonar-web/src/main/js/app/utils/__tests__/throwGlobalError-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 throwGlobalError from '../throwGlobalError'; import getStore from '../getStore'; +import throwGlobalError from '../throwGlobalError'; it('should put the error message in the store', async () => { const response: any = { json: jest.fn().mockResolvedValue({ errors: [{ msg: 'error 1' }] }) }; diff --git a/server/sonar-web/src/main/js/app/utils/addGlobalSuccessMessage.ts b/server/sonar-web/src/main/js/app/utils/addGlobalSuccessMessage.ts index f9ca5dd0a86..5d791710a51 100644 --- a/server/sonar-web/src/main/js/app/utils/addGlobalSuccessMessage.ts +++ b/server/sonar-web/src/main/js/app/utils/addGlobalSuccessMessage.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 getStore from './getStore'; import * as globalMessages from '../../store/globalMessages'; +import getStore from './getStore'; export default function addGlobalSuccessMessage(message: string): void { const store = getStore(); diff --git a/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts b/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts index b0a9b8191a5..3276ec67e3e 100644 --- a/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts +++ b/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import getHistory from 'sonar-ui-common/helpers/getHistory'; -import getStore from './getStore'; import { requireAuthorization } from '../../store/appState'; +import getStore from './getStore'; export default function handleRequiredAuthorization() { const store = getStore(); diff --git a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx index 6560bb4bef2..8581a91d544 100644 --- a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx +++ b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx @@ -18,20 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable react/jsx-sort-props */ +import { Location } from 'history'; import * as React from 'react'; import { render } from 'react-dom'; -import { IndexRoute, Redirect, Route, RouteConfig, RouteProps, Router } from 'react-router'; -import { Provider } from 'react-redux'; import { IntlProvider } from 'react-intl'; -import { Location } from 'history'; +import { Provider } from 'react-redux'; +import { IndexRoute, Redirect, Route, RouteConfig, RouteProps, Router } from 'react-router'; +import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; import ThemeContext from 'sonar-ui-common/components/ThemeContext'; import getHistory from 'sonar-ui-common/helpers/getHistory'; -import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; -import getStore from './getStore'; -import MigrationContainer from '../components/MigrationContainer'; -import * as theme from '../theme'; -import App from '../components/App'; -import GlobalContainer from '../components/GlobalContainer'; import aboutRoutes from '../../apps/about/routes'; import accountRoutes from '../../apps/account/routes'; import backgroundTasksRoutes from '../../apps/background-tasks/routes'; @@ -39,18 +34,20 @@ import codeRoutes from '../../apps/code/routes'; import codingRulesRoutes from '../../apps/coding-rules/routes'; import componentMeasuresRoutes from '../../apps/component-measures/routes'; import customMeasuresRoutes from '../../apps/custom-measures/routes'; -import groupsRoutes from '../../apps/groups/routes'; -import Issues from '../../apps/issues/components/AppContainer'; +import customMetricsRoutes from '../../apps/custom-metrics/routes'; +import documentationRoutes from '../../apps/documentation/routes'; import Explore from '../../apps/explore/Explore'; import ExploreIssues from '../../apps/explore/ExploreIssues'; import ExploreProjects from '../../apps/explore/ExploreProjects'; +import groupsRoutes from '../../apps/groups/routes'; +import Issues from '../../apps/issues/components/AppContainer'; import IssuesPageSelector from '../../apps/issues/IssuesPageSelector'; +import { maintenanceRoutes, setupRoutes } from '../../apps/maintenance/routes'; import marketplaceRoutes from '../../apps/marketplace/routes'; -import customMetricsRoutes from '../../apps/custom-metrics/routes'; -import overviewRoutes from '../../apps/overview/routes'; -import onboardingRoutes from '../../apps/tutorials/routes'; import organizationsRoutes from '../../apps/organizations/routes'; +import overviewRoutes from '../../apps/overview/routes'; import permissionTemplatesRoutes from '../../apps/permission-templates/routes'; +import { globalPermissionsRoutes, projectPermissionsRoutes } from '../../apps/permissions/routes'; import portfolioRoutes from '../../apps/portfolio/routes'; import projectActivityRoutes from '../../apps/projectActivity/routes'; import projectBranchesRoutes from '../../apps/projectBranches/routes'; @@ -63,13 +60,16 @@ import qualityProfilesRoutes from '../../apps/quality-profiles/routes'; import sessionsRoutes from '../../apps/sessions/routes'; import settingsRoutes from '../../apps/settings/routes'; import systemRoutes from '../../apps/system/routes'; +import onboardingRoutes from '../../apps/tutorials/routes'; import usersRoutes from '../../apps/users/routes'; import webAPIRoutes from '../../apps/web-api/routes'; -import documentationRoutes from '../../apps/documentation/routes'; import webhooksRoutes from '../../apps/webhooks/routes'; -import { maintenanceRoutes, setupRoutes } from '../../apps/maintenance/routes'; -import { globalPermissionsRoutes, projectPermissionsRoutes } from '../../apps/permissions/routes'; import { isSonarCloud } from '../../helpers/system'; +import App from '../components/App'; +import GlobalContainer from '../components/GlobalContainer'; +import MigrationContainer from '../components/MigrationContainer'; +import * as theme from '../theme'; +import getStore from './getStore'; function handleUpdate(this: { state: { location: Location } }) { const { action } = this.state.location; diff --git a/server/sonar-web/src/main/js/app/utils/throwGlobalError.ts b/server/sonar-web/src/main/js/app/utils/throwGlobalError.ts index 4499bb0e347..63338038456 100644 --- a/server/sonar-web/src/main/js/app/utils/throwGlobalError.ts +++ b/server/sonar-web/src/main/js/app/utils/throwGlobalError.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { parseError } from 'sonar-ui-common/helpers/request'; -import getStore from './getStore'; import { addGlobalErrorMessage } from '../../store/globalMessages'; +import getStore from './getStore'; export default function throwGlobalError(error: { response: Response }): Promise<Response> { const store = getStore(); diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx index 7d077596d69..b29f0a2edb2 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx @@ -17,34 +17,34 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { Location } from 'history'; +import { keyBy } from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; -import { keyBy } from 'lodash'; import { Link } from 'react-router'; -import { Location } from 'history'; -import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import AboutProjects from './AboutProjects'; -import AboutLanguages from './AboutLanguages'; -import AboutCleanCode from './AboutCleanCode'; -import AboutQualityModel from './AboutQualityModel'; -import AboutQualityGates from './AboutQualityGates'; -import AboutLeakPeriod from './AboutLeakPeriod'; -import AboutStandards from './AboutStandards'; -import AboutScanners from './AboutScanners'; -import EntryIssueTypes from './EntryIssueTypes'; -import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; -import GlobalContainer from '../../../app/components/GlobalContainer'; +import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; import { searchProjects } from '../../../api/components'; import { getFacet } from '../../../api/issues'; -import { fetchAboutPageSettings } from '../actions'; +import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; +import GlobalContainer from '../../../app/components/GlobalContainer'; import { getAppState, getCurrentUser, getGlobalSettingValue, Store } from '../../../store/rootReducer'; +import { fetchAboutPageSettings } from '../actions'; import '../styles.css'; +import AboutCleanCode from './AboutCleanCode'; +import AboutLanguages from './AboutLanguages'; +import AboutLeakPeriod from './AboutLeakPeriod'; +import AboutProjects from './AboutProjects'; +import AboutQualityGates from './AboutQualityGates'; +import AboutQualityModel from './AboutQualityModel'; +import AboutScanners from './AboutScanners'; +import AboutStandards from './AboutStandards'; +import EntryIssueTypes from './EntryIssueTypes'; interface Props { appState: Pick<T.AppState, 'defaultOrganization' | 'organizationsEnabled'>; diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.tsx index a5f69dc8af3..6a8d0a66eb6 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import TagsIcon from 'sonar-ui-common/components/icons/TagsIcon'; import { Link } from 'react-router'; +import TagsIcon from 'sonar-ui-common/components/icons/TagsIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ReadMore from './ReadMore'; import { getRulesUrl } from '../../../helpers/urls'; +import ReadMore from './ReadMore'; const link = 'https://redirect.sonarsource.com/doc/rules.html'; diff --git a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx index 322b8a14301..14c3cb63137 100644 --- a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Link } from 'react-router'; import BugIcon from 'sonar-ui-common/components/icons/BugIcon'; import CodeSmellIcon from 'sonar-ui-common/components/icons/CodeSmellIcon'; import SecurityHotspotIcon from 'sonar-ui-common/components/icons/SecurityHotspotIcon'; import VulnerabilityIcon from 'sonar-ui-common/components/icons/VulnerabilityIcon'; -import { Link } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { getIssuesUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx b/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx index 77a896ca802..638bf992096 100644 --- a/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx @@ -17,14 +17,14 @@ * 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 { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { AboutApp } from '../AboutApp'; import { searchProjects } from '../../../../api/components'; import { getFacet } from '../../../../api/issues'; -import { mockLocation, mockAppState, mockCurrentUser } from '../../../../helpers/testMocks'; +import { mockAppState, mockCurrentUser, mockLocation } from '../../../../helpers/testMocks'; +import { AboutApp } from '../AboutApp'; jest.mock('sonar-ui-common/helpers/pages', () => ({ addWhitePageClass: jest.fn(), diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/AsAService.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/AsAService.tsx index 9e9b347ca9d..60f9d2956cb 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/AsAService.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/AsAService.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; +import { isLoggedIn } from '../../../helpers/users'; import SQPageContainer from './components/SQPageContainer'; import SQStartUsing from './components/SQStartUsing'; import SQTopNav from './components/SQTopNav'; -import { isLoggedIn } from '../../../helpers/users'; import './style.css'; export default function AsAService() { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/AzureDevOps.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/AzureDevOps.tsx index 47aaa007f5d..7cf1b68be27 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/AzureDevOps.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/AzureDevOps.tsx @@ -21,8 +21,8 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { Link } from 'react-router'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import SQPageContainer from './components/SQPageContainer'; import { isLoggedIn } from '../../../helpers/users'; +import SQPageContainer from './components/SQPageContainer'; import './style.css'; const LANGUAGES = [ diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx index 3b647b1fd9d..258ea4d994d 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; +import { isLoggedIn } from '../../../helpers/users'; import SQPageContainer from './components/SQPageContainer'; import SQStartUsing from './components/SQStartUsing'; import SQTopNav from './components/SQTopNav'; -import { isLoggedIn } from '../../../helpers/users'; import './style.css'; export default function BranchAnalysis() { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/Contact.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/Contact.tsx index fe6d1c20b3d..cbec92c79b1 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/Contact.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/Contact.tsx @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { Location } from 'history'; import * as React from 'react'; import { Helmet } from 'react-helmet'; import { Link } from 'react-router'; -import { Location } from 'history'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import Select from 'sonar-ui-common/components/controls/Select'; -import SQPageContainer from './components/SQPageContainer'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; import { isLoggedIn } from '../../../helpers/users'; +import SQPageContainer from './components/SQPageContainer'; import './style.css'; const CATEGORIES = [ diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/Home.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/Home.tsx index c1aeb7c27ba..16302a119c7 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/Home.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/Home.tsx @@ -22,15 +22,15 @@ import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import { FixedNavBar, TopNavBar } from './components/NavBars'; +import { getGlobalSettingValue, Store } from '../../../store/rootReducer'; import FeaturedProjects from './components/FeaturedProjects'; import Footer from './components/Footer'; import { Languages } from './components/Languages'; import LoginButtons from './components/LoginButtons'; +import { FixedNavBar, TopNavBar } from './components/NavBars'; import Statistics from './components/Statistics'; -import { requestHomepageData, HomepageData, FeaturedProject } from './utils'; -import { getGlobalSettingValue, Store } from '../../../store/rootReducer'; import './new_style.css'; +import { FeaturedProject, HomepageData, requestHomepageData } from './utils'; interface Props { homePageDataUrl?: string; diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/Pricing.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/Pricing.tsx index caf1dbdef45..da011809634 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/Pricing.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/Pricing.tsx @@ -23,7 +23,7 @@ import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import Footer from './components/Footer'; -import { TopNavBar, FixedNavBar } from './components/NavBars'; +import { FixedNavBar, TopNavBar } from './components/NavBars'; import './new_style.css'; export default class Pricing extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/SQHome.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/SQHome.tsx index 500d2c478d8..8357fe41ef6 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/SQHome.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/SQHome.tsx @@ -18,16 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Link } from 'react-router'; import Helmet from 'react-helmet'; +import { Link } from 'react-router'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; +import { isLoggedIn } from '../../../helpers/users'; import LoginButtons from './components/LoginButtons'; import Pricing from './components/Pricing'; import SQPageContainer from './components/SQPageContainer'; import StartUsing from './components/StartUsing'; -import { LANGUAGES } from './utils'; -import { isLoggedIn } from '../../../helpers/users'; import './style.css'; +import { LANGUAGES } from './utils'; const NB_LANGUAGE_PER_ROW = 8; diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarLintIntegration.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarLintIntegration.tsx index 83b07d31705..69944fd3fcb 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarLintIntegration.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarLintIntegration.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; +import { isLoggedIn } from '../../../helpers/users'; import SQPageContainer from './components/SQPageContainer'; import SQStartUsing from './components/SQStartUsing'; import SQTopNav from './components/SQTopNav'; -import { isLoggedIn } from '../../../helpers/users'; import './style.css'; export default function SonarLintIntegration() { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/BranchAnalysis-test.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/BranchAnalysis-test.tsx index 9d325efacd9..1b8e58d1a08 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/BranchAnalysis-test.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/BranchAnalysis-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import BranchAnalysis from '../BranchAnalysis'; diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/Home-test.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/Home-test.tsx index c43e784f9bd..1ef78cc5bfe 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/Home-test.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/Home-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import Home from '../Home'; import { mockStore } from '../../../../helpers/testMocks'; +import Home from '../Home'; import { requestHomepageData } from '../utils'; jest.mock('../utils', () => { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/FeaturedProjects.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/FeaturedProjects.tsx index cdeb2225206..0d48186ae51 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/FeaturedProjects.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/FeaturedProjects.tsx @@ -17,20 +17,20 @@ * 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 CountUp from 'react-countup'; import { throttle } from 'lodash'; +import * as React from 'react'; +import CountUp from 'react-countup'; import DuplicationsRating from 'sonar-ui-common/components/ui/DuplicationsRating'; import Rating from 'sonar-ui-common/components/ui/Rating'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { getBaseUrl, getPathUrlAsString } from 'sonar-ui-common/helpers/urls'; -import { FeaturedProject } from '../utils'; -import CoverageRating from '../../../../components/ui/CoverageRating'; import OrganizationAvatar from '../../../../components/common/OrganizationAvatar'; -import ProjectCardLanguagesContainer from '../../../projects/components/ProjectCardLanguagesContainer'; -import { getMetricName } from '../../../overview/utils'; +import CoverageRating from '../../../../components/ui/CoverageRating'; import { getProjectUrl } from '../../../../helpers/urls'; +import { getMetricName } from '../../../overview/utils'; +import ProjectCardLanguagesContainer from '../../../projects/components/ProjectCardLanguagesContainer'; +import { FeaturedProject } from '../utils'; import './FeaturedProjects.css'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/Languages.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/Languages.tsx index ca612e21751..5547c3a5fbe 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/Languages.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/Languages.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import SCChevronDownIcon from './SCChevronDownIcon'; import { LANGUAGES } from '../utils'; +import SCChevronDownIcon from './SCChevronDownIcon'; interface State { height?: number; diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/NavBars.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/NavBars.tsx index fa8bf5b42cd..72edb553e83 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/NavBars.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/NavBars.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 { throttle } from 'lodash'; +import * as React from 'react'; import NavBar from 'sonar-ui-common/components/ui/NavBar'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import './NavBars.css'; diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/SQPageContainer.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/SQPageContainer.tsx index 8a7da1fcc7d..deaa3a37d8b 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/SQPageContainer.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/SQPageContainer.tsx @@ -21,9 +21,9 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { withRouter, WithRouterProps } from 'react-router'; import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; -import Footer from './Footer'; import GlobalContainer from '../../../../app/components/GlobalContainer'; import { getCurrentUser, getMyOrganizations, Store } from '../../../../store/rootReducer'; +import Footer from './Footer'; interface StateProps { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/StartUsing.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/StartUsing.tsx index 640d1f8accd..31bf70dbba2 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/StartUsing.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/StartUsing.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ChevronRightIcon from 'sonar-ui-common/components/icons/ChevronRightIcon'; import { Link } from 'react-router'; +import ChevronRightIcon from 'sonar-ui-common/components/icons/ChevronRightIcon'; export default function StartUsing() { return ( diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/Statistics.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/Statistics.tsx index b811b96feb2..233b599649d 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/Statistics.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/Statistics.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 { throttle } from 'lodash'; +import * as React from 'react'; import CountUp from 'react-countup'; -import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; +import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import './Statistics.css'; interface Statistic { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/FeaturedProjects-test.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/FeaturedProjects-test.tsx index 5b16d9f91e1..b6c9eea3391 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/FeaturedProjects-test.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/FeaturedProjects-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 { click } from 'sonar-ui-common/helpers/testUtils'; import FeaturedProjects, { ProjectCard, ProjectIssues } from '../FeaturedProjects'; diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/Footer-test.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/Footer-test.tsx index e0c2ebcd6af..3798036095c 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/Footer-test.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/Footer-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 Footer from '../Footer'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/LoginButtons-test.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/LoginButtons-test.tsx index b8f071d8360..68eab1746e9 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/LoginButtons-test.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/LoginButtons-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 LoginButtons from '../LoginButtons'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/Statistics-test.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/Statistics-test.tsx index 52626e30552..d851e4124c0 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/Statistics-test.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/components/__tests__/Statistics-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, ShallowWrapper } from 'enzyme'; +import * as React from 'react'; import Statistics, { StatisticCard } from '../Statistics'; const STATISTICS = { icon: 'stat-icon', text: 'my stat', value: 26666 }; diff --git a/server/sonar-web/src/main/js/apps/account/components/Account.tsx b/server/sonar-web/src/main/js/apps/account/components/Account.tsx index fddb4315da3..5ead9fdef86 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Account.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/Account.tsx @@ -18,16 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { connect } from 'react-redux'; import Helmet from 'react-helmet'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import { connect } from 'react-redux'; import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; -import Nav from './Nav'; -import UserCard from './UserCard'; -import { getCurrentUser, areThereCustomOrganizations, Store } from '../../../store/rootReducer'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import { areThereCustomOrganizations, getCurrentUser, Store } from '../../../store/rootReducer'; import '../account.css'; +import Nav from './Nav'; +import UserCard from './UserCard'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/account/components/Nav.tsx b/server/sonar-web/src/main/js/apps/account/components/Nav.tsx index 8df08c901fd..42821b3ee6b 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Nav.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/Nav.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Link, IndexLink } from 'react-router'; +import { IndexLink, Link } from 'react-router'; import NavBarTabs from 'sonar-ui-common/components/ui/NavBarTabs'; import { translate } from 'sonar-ui-common/helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/account/components/Password.tsx b/server/sonar-web/src/main/js/apps/account/components/Password.tsx index dbaa7cbd582..42bfb22fa5f 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Password.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/Password.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { changePassword } from '../../../api/users'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/account/components/Security.tsx b/server/sonar-web/src/main/js/apps/account/components/Security.tsx index 95fd1aff8ab..37a35c840ef 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Security.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/Security.tsx @@ -21,9 +21,9 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getCurrentUser, Store } from '../../../store/rootReducer'; import Password from './Password'; import Tokens from './Tokens'; -import { getCurrentUser, Store } from '../../../store/rootReducer'; interface Props { user: T.LoggedInUser; diff --git a/server/sonar-web/src/main/js/apps/account/components/__tests__/Account-test.tsx b/server/sonar-web/src/main/js/apps/account/components/__tests__/Account-test.tsx index 1df5387f94d..930ac04dbc6 100644 --- a/server/sonar-web/src/main/js/apps/account/components/__tests__/Account-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/__tests__/Account-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 { shallow } from 'enzyme'; +import * as React from 'react'; import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; -import { Account } from '../Account'; import { mockCurrentUser } from '../../../../helpers/testMocks'; +import { Account } from '../Account'; jest.mock('sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ default: jest.fn() diff --git a/server/sonar-web/src/main/js/apps/account/components/__tests__/Password-test.tsx b/server/sonar-web/src/main/js/apps/account/components/__tests__/Password-test.tsx index efe80d9f4b8..2a86fc8754a 100644 --- a/server/sonar-web/src/main/js/apps/account/components/__tests__/Password-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/__tests__/Password-test.tsx @@ -17,10 +17,10 @@ * 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 Password from '../Password'; +import * as React from 'react'; import { mockLoggedInUser } from '../../../../helpers/testMocks'; +import Password from '../Password'; it('renders correctly', () => { expect(shallow(<Password user={mockLoggedInUser()} />)).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/account/components/__tests__/Tokens-test.tsx b/server/sonar-web/src/main/js/apps/account/components/__tests__/Tokens-test.tsx index 1a33faedf15..af6a5baf7b2 100644 --- a/server/sonar-web/src/main/js/apps/account/components/__tests__/Tokens-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/__tests__/Tokens-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 Tokens from '../Tokens'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx index 81189d46004..ddae53b7323 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { isSonarCloud } from '../../../helpers/system'; import NotificationsList from './NotificationsList'; import SonarCloudNotifications from './SonarCloudNotifications'; -import { isSonarCloud } from '../../../helpers/system'; interface Props { addNotification: (n: T.Notification) => void; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx index ad807f8d948..f903ee91942 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx @@ -17,17 +17,17 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { groupBy, partition, uniq, uniqBy, uniqWith } from 'lodash'; import * as React from 'react'; import Helmet from 'react-helmet'; -import { groupBy, partition, uniq, uniqBy, uniqWith } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as api from '../../../api/notifications'; +import { withAppState } from '../../../components/hoc/withAppState'; import GlobalNotifications from './GlobalNotifications'; import Projects from './Projects'; import { NotificationProject } from './types'; -import * as api from '../../../api/notifications'; -import { withAppState } from '../../../components/hoc/withAppState'; export interface Props { appState: Pick<T.AppState, 'organizationsEnabled'>; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/NotificationsContainer.tsx b/server/sonar-web/src/main/js/apps/account/notifications/NotificationsContainer.tsx index 4f14905d174..1d50e89dde2 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/NotificationsContainer.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/NotificationsContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import Notifications, { Props } from './Notifications'; import { fetchOrganizations } from '../../../store/rootActions'; +import Notifications, { Props } from './Notifications'; const mapDispatchToProps = { fetchOrganizations } as Pick<Props, 'fetchOrganizations'>; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.tsx b/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.tsx index a0a47476da5..a05d45e56c5 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, hasMessage } from 'sonar-ui-common/helpers/l10n'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; +import { hasMessage, translate } from 'sonar-ui-common/helpers/l10n'; interface Props { onAdd: (n: T.Notification) => void; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.tsx index 807f970eab1..16d6b5e9ea8 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import { Link } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import NotificationsList from './NotificationsList'; -import { NotificationProject } from './types'; import Organization from '../../../components/shared/Organization'; import { getProjectUrl } from '../../../helpers/urls'; +import NotificationsList from './NotificationsList'; +import { NotificationProject } from './types'; interface Props { addNotification: (n: T.Notification) => void; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx b/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx index 12b074b97d5..663ad924912 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx @@ -17,14 +17,14 @@ * 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 { differenceWith } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { AsyncSelect } from 'sonar-ui-common/components/controls/Select'; -import ProjectNotifications from './ProjectNotifications'; -import { NotificationProject } from './types'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getSuggestions } from '../../../api/components'; import Organization from '../../../components/shared/Organization'; +import ProjectNotifications from './ProjectNotifications'; +import { NotificationProject } from './types'; export interface Props { addNotification: (n: T.Notification) => void; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/SonarCloudNotifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/SonarCloudNotifications.tsx index c930000fc46..3a821eb9b0b 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/SonarCloudNotifications.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/SonarCloudNotifications.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getCurrentUserSetting, Store } from '../../../store/rootReducer'; import { setCurrentUserSetting } from '../../../store/users'; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/GlobalNotifications-test.tsx b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/GlobalNotifications-test.tsx index 681d59b5bbb..6e9a8f1447c 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/GlobalNotifications-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/GlobalNotifications-test.tsx @@ -17,10 +17,10 @@ * 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 GlobalNotifications from '../GlobalNotifications'; +import * as React from 'react'; import { isSonarCloud } from '../../../../helpers/system'; +import GlobalNotifications from '../GlobalNotifications'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Notifications-test.tsx b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Notifications-test.tsx index 7760dbbff44..7ef6a87d1e2 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Notifications-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Notifications-test.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import { Notifications } from '../Notifications'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import { Notifications } from '../Notifications'; jest.mock('../../../../api/notifications', () => ({ addNotification: jest.fn(() => Promise.resolve()), diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.tsx b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.tsx index c46b98c8459..7a8bb342633 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.tsx @@ -17,10 +17,10 @@ * 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 { hasMessage } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; +import { hasMessage } from 'sonar-ui-common/helpers/l10n'; import NotificationsList from '../NotificationsList'; jest.mock('sonar-ui-common/helpers/l10n', () => ({ diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectNotifications-test.tsx b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectNotifications-test.tsx index b8fdab6efb2..936160c18f6 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectNotifications-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectNotifications-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 ProjectNotifications from '../ProjectNotifications'; const channels = ['channel1', 'channel2']; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.tsx index 02beef99dcd..e0234bd92d9 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-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 Projects, { Props } from '../Projects'; jest.mock('../../../../api/components', () => ({ diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/SonarCloudNotifications-test.tsx b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/SonarCloudNotifications-test.tsx index 33aac3aca6f..6d7061d7b40 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/SonarCloudNotifications-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/SonarCloudNotifications-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 { SonarCloudNotifications } from '../SonarCloudNotifications'; it('should match snapshot', () => { diff --git a/server/sonar-web/src/main/js/apps/account/organizations/OrganizationsList.tsx b/server/sonar-web/src/main/js/apps/account/organizations/OrganizationsList.tsx index 9d1d0ef29b3..f2ec4ce3455 100644 --- a/server/sonar-web/src/main/js/apps/account/organizations/OrganizationsList.tsx +++ b/server/sonar-web/src/main/js/apps/account/organizations/OrganizationsList.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import OrganizationCard from './OrganizationCard'; diff --git a/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.tsx b/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.tsx index 695da58d85f..1000ef6981d 100644 --- a/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.tsx +++ b/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.tsx @@ -22,14 +22,14 @@ import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import OrganizationsList from './OrganizationsList'; -import { fetchIfAnyoneCanCreateOrganizations } from './actions'; import { getAppState, - getMyOrganizations, getGlobalSettingValue, + getMyOrganizations, Store } from '../../../store/rootReducer'; +import { fetchIfAnyoneCanCreateOrganizations } from './actions'; +import OrganizationsList from './OrganizationsList'; interface StateProps { anyoneCanCreate: boolean; diff --git a/server/sonar-web/src/main/js/apps/account/organizations/actions.ts b/server/sonar-web/src/main/js/apps/account/organizations/actions.ts index 45bf1b81362..6902bfdeaa3 100644 --- a/server/sonar-web/src/main/js/apps/account/organizations/actions.ts +++ b/server/sonar-web/src/main/js/apps/account/organizations/actions.ts @@ -19,8 +19,8 @@ */ import { Dispatch } from 'redux'; import { getOrganizations } from '../../../api/organizations'; -import { receiveMyOrganizations } from '../../../store/organizations'; import { getValues } from '../../../api/settings'; +import { receiveMyOrganizations } from '../../../store/organizations'; import { receiveValues } from '../../settings/store/values'; export const fetchMyOrganizations = () => (dispatch: Dispatch) => { diff --git a/server/sonar-web/src/main/js/apps/account/profile/Profile.tsx b/server/sonar-web/src/main/js/apps/account/profile/Profile.tsx index 941371b710e..4b55078de41 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/Profile.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/Profile.tsx @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import UserExternalIdentity from './UserExternalIdentity'; +import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; +import { isSonarCloud } from '../../../helpers/system'; import UserDeleteAccount from './UserDeleteAccount'; +import UserExternalIdentity from './UserExternalIdentity'; import UserGroups from './UserGroups'; import UserScmAccounts from './UserScmAccounts'; -import { isSonarCloud } from '../../../helpers/system'; -import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; export interface Props { currentUser: T.LoggedInUser; diff --git a/server/sonar-web/src/main/js/apps/account/profile/UserDeleteAccount.tsx b/server/sonar-web/src/main/js/apps/account/profile/UserDeleteAccount.tsx index 38351f002b4..d114dc9d2fb 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/UserDeleteAccount.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/UserDeleteAccount.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import UserDeleteAccountModal from './UserDeleteAccountModal'; -import UserDeleteAccountContent from './UserDeleteAccountContent'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getOrganizationsThatPreventDeletion } from '../../../api/organizations'; import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; import { withUserOrganizations } from '../../../components/hoc/withUserOrganizations'; -import { getOrganizationsThatPreventDeletion } from '../../../api/organizations'; +import UserDeleteAccountContent from './UserDeleteAccountContent'; +import UserDeleteAccountModal from './UserDeleteAccountModal'; interface Props { user: T.LoggedInUser; diff --git a/server/sonar-web/src/main/js/apps/account/profile/UserDeleteAccountModal.tsx b/server/sonar-web/src/main/js/apps/account/profile/UserDeleteAccountModal.tsx index 72b4f5ca25c..80ea464225e 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/UserDeleteAccountModal.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/UserDeleteAccountModal.tsx @@ -19,15 +19,15 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import InputValidationField from 'sonar-ui-common/components/controls/InputValidationField'; import ValidationModal from 'sonar-ui-common/components/controls/ValidationModal'; -import UserDeleteAccountContent from './UserDeleteAccountContent'; -import RecentHistory from '../../../app/components/RecentHistory'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { deactivateUser } from '../../../api/users'; +import RecentHistory from '../../../app/components/RecentHistory'; import { Router, withRouter } from '../../../components/hoc/withRouter'; import { doLogout } from '../../../store/rootActions'; +import UserDeleteAccountContent from './UserDeleteAccountContent'; interface Values { login: string; diff --git a/server/sonar-web/src/main/js/apps/account/profile/__tests__/Profile-test.tsx b/server/sonar-web/src/main/js/apps/account/profile/__tests__/Profile-test.tsx index 4ef71994b28..479effa96fb 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/__tests__/Profile-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/__tests__/Profile-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 { shallow } from 'enzyme'; -import { Profile, Props } from '../Profile'; -import { mockLoggedInUser } from '../../../../helpers/testMocks'; +import * as React from 'react'; import { isSonarCloud } from '../../../../helpers/system'; +import { mockLoggedInUser } from '../../../../helpers/testMocks'; +import { Profile, Props } from '../Profile'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: jest.fn().mockReturnValue(false) })); diff --git a/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccount-test.tsx b/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccount-test.tsx index 1e4d4b217e3..215e94f194d 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccount-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccount-test.tsx @@ -20,9 +20,9 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import { getOrganizationsThatPreventDeletion } from '../../../../api/organizations'; import { mockLoggedInUser, mockOrganization } from '../../../../helpers/testMocks'; import { UserDeleteAccount } from '../UserDeleteAccount'; -import { getOrganizationsThatPreventDeletion } from '../../../../api/organizations'; jest.mock('../../../../api/organizations', () => ({ getOrganizationsThatPreventDeletion: jest.fn().mockResolvedValue({ organizations: [] }) diff --git a/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccountContent-test.tsx b/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccountContent-test.tsx index c9e5e334d5e..37aa8ec4321 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccountContent-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccountContent-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 UserDeleteAccountContent, { ShowOrganizations, ShowOrganizationsToTransferOrDelete diff --git a/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccountModal-test.tsx b/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccountModal-test.tsx index e820b6c0284..0ad5db24db2 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccountModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserDeleteAccountModal-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 { deactivateUser } from '../../../../api/users'; import { mockLoggedInUser, mockRouter } from '../../../../helpers/testMocks'; import { UserDeleteAccountModal } from '../UserDeleteAccountModal'; -import { deactivateUser } from '../../../../api/users'; jest.mock('../../../../api/users', () => ({ deactivateUser: jest.fn() diff --git a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx index 0d29fd77e5c..5580e9e4896 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import Level from 'sonar-ui-common/components/ui/Level'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import DateFromNow from '../../../components/intl/DateFromNow'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import MetaLink from '../../overview/meta/MetaLink'; diff --git a/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx b/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx index 74014ec1edd..2a6e4b32c79 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import ProjectCard from './ProjectCard'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx b/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx index 44f0cfe435f..737f3bef3c0 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Projects from './Projects'; import { getMyProjects } from '../../../api/components'; +import Projects from './Projects'; interface State { loading: boolean; diff --git a/server/sonar-web/src/main/js/apps/account/projects/__tests__/ProjectCard-test.tsx b/server/sonar-web/src/main/js/apps/account/projects/__tests__/ProjectCard-test.tsx index e74288226c1..996e6bca629 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/__tests__/ProjectCard-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/__tests__/ProjectCard-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 ProjectCard from '../ProjectCard'; it('should render key and name', () => { diff --git a/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.tsx index fc82404339f..460ff001641 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-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 { shallow } from 'enzyme'; +import * as React from 'react'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import Projects from '../Projects'; import ProjectCard from '../ProjectCard'; +import Projects from '../Projects'; const PROJECTS = [ { key: 'key1', links: [], name: 'name1' }, diff --git a/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-test.tsx index 654a8e07e0a..b1d97a96895 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; import Search from '../components/Search'; -import { STATUSES, CURRENTS, DEBOUNCE_DELAY, DEFAULT_FILTERS } from '../constants'; +import { CURRENTS, DEBOUNCE_DELAY, DEFAULT_FILTERS, STATUSES } from '../constants'; import { formatDuration } from '../utils'; describe('Constants', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx index 8562271fa7c..ade93950644 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx @@ -17,31 +17,31 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { debounce, uniq } from 'lodash'; import * as React from 'react'; import Helmet from 'react-helmet'; -import { debounce, uniq } from 'lodash'; import { connect } from 'react-redux'; -import { parseAsDate } from 'sonar-ui-common/helpers/query'; import { toShortNotSoISOString } from 'sonar-ui-common/helpers/dates'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Header from './Header'; -import Footer from './Footer'; -import Stats from './Stats'; -import Search from './Search'; -import Tasks from './Tasks'; -import { DEFAULT_FILTERS, DEBOUNCE_DELAY, STATUSES, CURRENTS } from '../constants'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { Location, Router } from '../../../components/hoc/withRouter'; +import { parseAsDate } from 'sonar-ui-common/helpers/query'; import { - getTypes, + cancelAllTasks, + cancelTask as cancelTaskAPI, getActivity, getStatus, - cancelAllTasks, - cancelTask as cancelTaskAPI + getTypes } from '../../../api/ce'; -import { updateTask, mapFiltersToParameters, Query } from '../utils'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import { Location, Router } from '../../../components/hoc/withRouter'; import { fetchOrganizations } from '../../../store/rootActions'; import '../background-tasks.css'; +import { CURRENTS, DEBOUNCE_DELAY, DEFAULT_FILTERS, STATUSES } from '../constants'; +import { mapFiltersToParameters, Query, updateTask } from '../utils'; +import Footer from './Footer'; +import Header from './Header'; +import Search from './Search'; +import Stats from './Stats'; +import Tasks from './Tasks'; interface Props { component?: Pick<T.Component, 'key'> & { id: string }; // id should be removed when api/ce/activity accept a component key instead of an id diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx index 5890931fa27..bbdfcab3aa5 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { CURRENTS } from '../constants'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx index 2319474622a..736a797ea27 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getTask } from '../../../api/ce'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx index 3c87bc36390..ef0951d3f89 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; -import StatusFilter from './StatusFilter'; -import TypesFilter from './TypesFilter'; -import CurrentsFilter from './CurrentsFilter'; -import DateFilter from './DateFilter'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { DEFAULT_FILTERS } from '../constants'; import { Query } from '../utils'; +import CurrentsFilter from './CurrentsFilter'; +import DateFilter from './DateFilter'; +import StatusFilter from './StatusFilter'; +import TypesFilter from './TypesFilter'; interface Props { component?: unknown; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.tsx index d769dbae798..a20cf56733d 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getTask } from '../../../api/ce'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx index 8fb7a39fc9e..f40f55bd575 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ClearButton } from 'sonar-ui-common/components/controls/buttons'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { colors } from '../../../app/theme'; import { getAppState, Store } from '../../../store/rootReducer'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/StatStillFailing.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/StatStillFailing.tsx index 035f1178c54..bd232f0e213 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/StatStillFailing.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/StatStillFailing.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; export interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx index 5d06d9a244d..fa1a07b4927 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { STATUSES } from '../constants'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Task.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Task.tsx index 72953c5074a..8bf68063afc 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Task.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Task.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import TaskActions from './TaskActions'; import TaskComponent from './TaskComponent'; -import TaskExecutionTime from './TaskExecutionTime'; -import TaskDay from './TaskDay'; import TaskDate from './TaskDate'; +import TaskDay from './TaskDay'; +import TaskExecutionTime from './TaskExecutionTime'; import TaskId from './TaskId'; import TaskStatus from './TaskStatus'; import TaskSubmitter from './TaskSubmitter'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx index c7c34c37d85..7a2b93dd6f4 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import ActionsDropdown, { ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { STATUSES } from '../constants'; import ScannerContext from './ScannerContext'; import Stacktrace from './Stacktrace'; -import { STATUSES } from '../constants'; const AnalysisWarningsModal = lazyLoad( () => import('../../../components/common/AnalysisWarningsModal'), diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx index b99889a7c91..a453b1390e7 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx @@ -18,19 +18,19 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Link } from 'react-router'; import LongLivingBranchIcon from 'sonar-ui-common/components/icons/LongLivingBranchIcon'; import PullRequestIcon from 'sonar-ui-common/components/icons/PullRequestIcon'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import ShortLivingBranchIcon from 'sonar-ui-common/components/icons/ShortLivingBranchIcon'; -import { Link } from 'react-router'; -import TaskType from './TaskType'; import Organization from '../../../components/shared/Organization'; import { - getProjectUrl, - getShortLivingBranchUrl, getLongLivingBranchUrl, - getPullRequestUrl + getProjectUrl, + getPullRequestUrl, + getShortLivingBranchUrl } from '../../../helpers/urls'; +import TaskType from './TaskType'; interface Props { task: T.Task; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx index 8b980caa833..2362c9f829a 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.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 differenceInDays from 'date-fns/difference_in_days'; +import * as React from 'react'; import { isValidDate, parseDate } from 'sonar-ui-common/helpers/dates'; import TimeFormatter from '../../../components/intl/TimeFormatter'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx index 2c5608fb7cd..fccbe0e26ed 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.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 isSameDay from 'date-fns/is_same_day'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; import DateFormatter from '../../../components/intl/DateFormatter'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx index 9fc950f879d..5ac1789ed0d 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.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 { translate } from 'sonar-ui-common/helpers/l10n'; import Task from './Task'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx index ea6ee48e5e9..24c03303e5d 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { ALL_TYPES } from '../constants'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx index 796e04b40c1..73ef5fa31ba 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import AlertWarnIcon from 'sonar-ui-common/components/icons/AlertWarnIcon'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import { EditButton } from 'sonar-ui-common/components/controls/buttons'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; -import WorkersForm from './WorkersForm'; -import NoWorkersSupportPopup from './NoWorkersSupportPopup'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import AlertWarnIcon from 'sonar-ui-common/components/icons/AlertWarnIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getWorkers } from '../../../api/ce'; +import NoWorkersSupportPopup from './NoWorkersSupportPopup'; +import WorkersForm from './WorkersForm'; interface State { canSetWorkerCount: boolean; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/WorkersForm.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/WorkersForm.tsx index 5059f31b416..9b0aef6f6cf 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/WorkersForm.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/WorkersForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import Select from 'sonar-ui-common/components/controls/Select'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { setWorkerCount } from '../../../api/ce'; const MAX_WORKERS = 10; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/BackgroundTasksApp-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/BackgroundTasksApp-test.tsx index 35089b798d2..0b761102145 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/BackgroundTasksApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/BackgroundTasksApp-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { BackgroundTasksApp } from '../BackgroundTasksApp'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; +import { BackgroundTasksApp } from '../BackgroundTasksApp'; jest.mock('../../../../api/ce', () => ({ getTypes: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx index 4ac9bdd3a0b..b9def36e8d8 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import ScannerContext from '../ScannerContext'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; +import ScannerContext from '../ScannerContext'; jest.mock('../../../../api/ce', () => ({ getTask: jest.fn(() => Promise.resolve({ scannerContext: 'context' })) diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx index 4bb4b4339b3..7ce28caf343 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import Stacktrace from '../Stacktrace'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; +import Stacktrace from '../Stacktrace'; jest.mock('../../../../api/ce', () => ({ getTask: jest.fn(() => Promise.resolve({ errorStacktrace: 'stacktrace' })) diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatPendingCount-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatPendingCount-test.tsx index 82dff7aecf4..278059b39c6 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatPendingCount-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatPendingCount-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 { shallow } from 'enzyme'; -import { StatPendingCount, Props } from '../StatPendingCount'; +import * as React from 'react'; +import { Props, StatPendingCount } from '../StatPendingCount'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatPendingTime-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatPendingTime-test.tsx index 5aa625193fe..c9c2bba9224 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatPendingTime-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatPendingTime-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 StatPendingTime, { Props } from '../StatPendingTime'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatStillFailing-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatStillFailing-test.tsx index 01babc019fe..11eb2084452 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatStillFailing-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatStillFailing-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 { click } from 'sonar-ui-common/helpers/testUtils'; import StatStillFailing, { Props } from '../StatStillFailing'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stats-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stats-test.tsx index c20b3f1ea02..debe0fb5a8b 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stats-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stats-test.tsx @@ -17,10 +17,10 @@ * 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 Stats, { Props } from '../Stats'; +import * as React from 'react'; import { mockComponent } from '../../../../helpers/testMocks'; +import Stats, { Props } from '../Stats'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Task-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Task-test.tsx index ce12e9035be..6c6e697489f 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Task-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Task-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 Task from '../Task'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskActions-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskActions-test.tsx index eb2a42191ca..14d32aa8143 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskActions-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 { click } from 'sonar-ui-common/helpers/testUtils'; import TaskActions from '../TaskActions'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskComponent-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskComponent-test.tsx index ab570fc3057..e1e249a775e 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskComponent-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskComponent-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 TaskComponent from '../TaskComponent'; const TASK = { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskDate-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskDate-test.tsx index 6e41faa6814..39295b1e2d6 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskDate-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskDate-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 TaskDate from '../TaskDate'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskDay-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskDay-test.tsx index 7496fff2783..25221d836de 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskDay-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskDay-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 TaskDay from '../TaskDay'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskExecutionTime-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskExecutionTime-test.tsx index c0bd8571734..e3df36b561b 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskExecutionTime-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskExecutionTime-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 TaskExecutionTime from '../TaskExecutionTime'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskId-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskId-test.tsx index f3166f8fb44..5ba279b7058 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskId-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskId-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 TaskId from '../TaskId'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskStatus-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskStatus-test.tsx index e28b85640b7..c1733805c53 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskStatus-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskStatus-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 TaskStatus from '../TaskStatus'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskType-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskType-test.tsx index 91be8b823ef..4a2eb4805f6 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskType-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskType-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 TaskType from '../TaskType'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Workers-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Workers-test.tsx index 0a404a52446..5f809888b83 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Workers-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Workers-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 { click } from 'sonar-ui-common/helpers/testUtils'; import Workers from '../Workers'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/WorkersForm-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/WorkersForm-test.tsx index 61b46961fb3..af146d1bfb4 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/WorkersForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/WorkersForm-test.tsx @@ -22,10 +22,10 @@ jest.mock('../../../../api/ce', () => ({ setWorkerCount: () => Promise.resolve() })); -import * as React from 'react'; import { shallow } from 'enzyme'; -import WorkersForm from '../WorkersForm'; +import * as React from 'react'; import { submit } from 'sonar-ui-common/helpers/testUtils'; +import WorkersForm from '../WorkersForm'; it('changes select', () => { const wrapper = shallow(<WorkersForm onClose={jest.fn()} workerCount={1} />); diff --git a/server/sonar-web/src/main/js/apps/background-tasks/utils.ts b/server/sonar-web/src/main/js/apps/background-tasks/utils.ts index b6ad34fd8fa..279f7049bfa 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/utils.ts +++ b/server/sonar-web/src/main/js/apps/background-tasks/utils.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { toShortNotSoISOString } from 'sonar-ui-common/helpers/dates'; -import { STATUSES, CURRENTS, ALL_TYPES } from './constants'; +import { ALL_TYPES, CURRENTS, STATUSES } from './constants'; export interface Query { currents: string; diff --git a/server/sonar-web/src/main/js/apps/code/__tests__/buckets-test.tsx b/server/sonar-web/src/main/js/apps/code/__tests__/buckets-test.tsx index 47d2ce08bf2..3f1eb3b0981 100644 --- a/server/sonar-web/src/main/js/apps/code/__tests__/buckets-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/__tests__/buckets-test.tsx @@ -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 { addComponent, getComponent, addComponentChildren, getComponentChildren } from '../bucket'; +import { addComponent, addComponentChildren, getComponent, getComponentChildren } from '../bucket'; const component: T.ComponentMeasure = { key: 'frodo', name: 'frodo', qualifier: 'frodo' }; diff --git a/server/sonar-web/src/main/js/apps/code/components/App.tsx b/server/sonar-web/src/main/js/apps/code/components/App.tsx index 0d2ccde10a6..226abca45d4 100644 --- a/server/sonar-web/src/main/js/apps/code/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/App.tsx @@ -17,27 +17,27 @@ * 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 { connect } from 'react-redux'; +import { Location } from 'history'; +import * as React from 'react'; import Helmet from 'react-helmet'; +import { connect } from 'react-redux'; import { InjectedRouter } from 'react-router'; -import { Location } from 'history'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import Components from './Components'; -import Breadcrumbs from './Breadcrumbs'; -import Search from './Search'; -import SourceViewerWrapper from './SourceViewerWrapper'; -import { addComponent, addComponentBreadcrumbs, clearBucket } from '../bucket'; -import { retrieveComponentChildren, retrieveComponent, loadMoreChildren } from '../utils'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { fetchMetrics, fetchBranchStatus } from '../../../store/rootActions'; +import { isPullRequest, isSameBranchLike, isShortLivingBranch } from '../../../helpers/branches'; +import { getCodeUrl, getProjectUrl } from '../../../helpers/urls'; +import { fetchBranchStatus, fetchMetrics } from '../../../store/rootActions'; import { getMetrics } from '../../../store/rootReducer'; -import { isSameBranchLike, isPullRequest, isShortLivingBranch } from '../../../helpers/branches'; -import { getProjectUrl, getCodeUrl } from '../../../helpers/urls'; +import { addComponent, addComponentBreadcrumbs, clearBucket } from '../bucket'; import '../code.css'; +import { loadMoreChildren, retrieveComponent, retrieveComponentChildren } from '../utils'; +import Breadcrumbs from './Breadcrumbs'; +import Components from './Components'; +import Search from './Search'; +import SourceViewerWrapper from './SourceViewerWrapper'; interface StateToProps { metrics: T.Dict<T.Metric>; diff --git a/server/sonar-web/src/main/js/apps/code/components/Component.tsx b/server/sonar-web/src/main/js/apps/code/components/Component.tsx index e57e3ab4de2..5b001ac62a1 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Component.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Component.tsx @@ -19,11 +19,11 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import ComponentName from './ComponentName'; +import { withScrollTo } from '../../../components/hoc/withScrollTo'; +import { WorkspaceContext } from '../../../components/workspace/context'; import ComponentMeasure from './ComponentMeasure'; +import ComponentName from './ComponentName'; import ComponentPin from './ComponentPin'; -import { WorkspaceContext } from '../../../components/workspace/context'; -import { withScrollTo } from '../../../components/hoc/withScrollTo'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx index 51a0d681420..2c62fb2da11 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import Measure from '../../../components/measure/Measure'; -import { isDiffMetric } from '../../../helpers/measures'; import { getLeakValue } from '../../../components/measure/utils'; +import { isDiffMetric } from '../../../helpers/measures'; interface Props { component: T.ComponentMeasure; diff --git a/server/sonar-web/src/main/js/apps/code/components/Components.tsx b/server/sonar-web/src/main/js/apps/code/components/Components.tsx index 41125ef8c33..c00591859b8 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Components.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Components.tsx @@ -17,13 +17,13 @@ * 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 { intersection } from 'lodash'; +import * as React from 'react'; +import withKeyboardNavigation from '../../../components/hoc/withKeyboardNavigation'; +import { getCodeMetrics } from '../utils'; import Component from './Component'; import ComponentsEmpty from './ComponentsEmpty'; import ComponentsHeader from './ComponentsHeader'; -import withKeyboardNavigation from '../../../components/hoc/withKeyboardNavigation'; -import { getCodeMetrics } from '../utils'; interface Props { baseComponent?: T.ComponentMeasure; diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.tsx index 05c70f4721d..fb0ec6f0724 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.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 { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/code/components/Search.tsx b/server/sonar-web/src/main/js/apps/code/components/Search.tsx index 616d43e33ac..60f79e0c11b 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Search.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getTree } from '../../../api/components'; +import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; import { getBranchLikeQuery } from '../../../helpers/branches'; -import { withRouter, Router, Location } from '../../../components/hoc/withRouter'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/code/components/SourceViewerWrapper.tsx b/server/sonar-web/src/main/js/apps/code/components/SourceViewerWrapper.tsx index 5c9f6fbd1af..438a17f0178 100644 --- a/server/sonar-web/src/main/js/apps/code/components/SourceViewerWrapper.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/SourceViewerWrapper.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 { Location } from 'history'; +import * as React from 'react'; import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; -import SourceViewer from '../../../components/SourceViewer/SourceViewer'; import withKeyboardNavigation from '../../../components/hoc/withKeyboardNavigation'; +import SourceViewer from '../../../components/SourceViewer/SourceViewer'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/code/components/__tests__/App-test.tsx index 8ad174bf7c5..f00cf796cc7 100644 --- a/server/sonar-web/src/main/js/apps/code/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/App-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 { App } from '../App'; +import { mockIssue, mockPullRequest, mockRouter } from '../../../../helpers/testMocks'; import { retrieveComponent } from '../../utils'; -import { mockRouter, mockPullRequest, mockIssue } from '../../../../helpers/testMocks'; +import { App } from '../App'; jest.mock('../../utils', () => ({ retrieveComponent: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/Component-test.tsx b/server/sonar-web/src/main/js/apps/code/components/__tests__/Component-test.tsx index 222a2cd5f4d..daddfa001b7 100644 --- a/server/sonar-web/src/main/js/apps/code/components/__tests__/Component-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/Component-test.tsx @@ -17,10 +17,10 @@ * 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 { Component } from '../Component'; +import * as React from 'react'; import { mockComponentMeasure, mockMetric } from '../../../../helpers/testMocks'; +import { Component } from '../Component'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentMeasure-test.tsx b/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentMeasure-test.tsx index 23a3a5019b1..2f5a1c81a9a 100644 --- a/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentMeasure-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentMeasure-test.tsx @@ -17,10 +17,10 @@ * 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 { mockComponentMeasure, mockMeasure, mockMetric } from '../../../../helpers/testMocks'; import ComponentMeasure from '../ComponentMeasure'; -import { mockMetric, mockMeasure, mockComponentMeasure } from '../../../../helpers/testMocks'; it('renders correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentName-test.tsx b/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentName-test.tsx index b8ca1816795..daac35be17a 100644 --- a/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentName-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentName-test.tsx @@ -17,10 +17,10 @@ * 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 { mockComponentMeasure, mockMainBranch } from '../../../../helpers/testMocks'; import ComponentName, { getTooltip, mostCommonPrefix, Props } from '../ComponentName'; -import { mockMainBranch, mockComponentMeasure } from '../../../../helpers/testMocks'; describe('#getTooltip', () => { it('should correctly format component information', () => { diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/Components-test.tsx b/server/sonar-web/src/main/js/apps/code/components/__tests__/Components-test.tsx index 324e4276002..210667dcec3 100644 --- a/server/sonar-web/src/main/js/apps/code/components/__tests__/Components-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/Components-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 { Components } from '../Components'; const COMPONENT = { key: 'foo', name: 'Foo', qualifier: 'TRK' }; diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentsHeader-test.tsx b/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentsHeader-test.tsx index 1b8fd7e98de..dcd6108d3d1 100644 --- a/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentsHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/ComponentsHeader-test.tsx @@ -17,10 +17,10 @@ * 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 ComponentsHeader from '../ComponentsHeader'; +import * as React from 'react'; import { mockComponent } from '../../../../helpers/testMocks'; +import ComponentsHeader from '../ComponentsHeader'; it('renders correctly for projects', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/code/utils.ts b/server/sonar-web/src/main/js/apps/code/utils.ts index 63adf57bde7..fe238eae14a 100644 --- a/server/sonar-web/src/main/js/apps/code/utils.ts +++ b/server/sonar-web/src/main/js/apps/code/utils.ts @@ -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 { getBreadcrumbs, getChildren, getComponent } from '../../api/components'; +import { getBranchLikeQuery, isPullRequest, isShortLivingBranch } from '../../helpers/branches'; import { addComponent, - getComponent as getComponentFromBucket, - addComponentChildren, - getComponentChildren, addComponentBreadcrumbs, - getComponentBreadcrumbs + addComponentChildren, + getComponent as getComponentFromBucket, + getComponentBreadcrumbs, + getComponentChildren } from './bucket'; -import { getChildren, getComponent, getBreadcrumbs } from '../../api/components'; -import { getBranchLikeQuery, isShortLivingBranch, isPullRequest } from '../../helpers/branches'; const METRICS = [ 'ncloc', diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx index ebcc04a173f..28ceeea2d1b 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import ActivationFormModal from './ActivationFormModal'; import { Profile as BaseProfile } from '../../../api/quality-profiles'; +import ActivationFormModal from './ActivationFormModal'; interface Props { activation?: T.RuleActivation; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx index d5a4c8bfc04..8756fc7b5d2 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import Select from 'sonar-ui-common/components/controls/Select'; -import SeverityHelper from '../../../components/shared/SeverityHelper'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { activateRule, Profile } from '../../../api/quality-profiles'; +import SeverityHelper from '../../../components/shared/SeverityHelper'; import { SEVERITIES } from '../../../helpers/constants'; import { sortProfiles } from '../../quality-profiles/utils'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx index 71e8702cc60..7cf1a71eab8 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Facet, { BasicProps } from './Facet'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import { SEVERITIES } from '../../../helpers/constants'; +import Facet, { BasicProps } from './Facet'; interface Props extends BasicProps { disabled: boolean; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx index 78624c9c3e9..291b64054f5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx @@ -17,12 +17,15 @@ * 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 ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { addSideBarClass, addWhitePageClass, @@ -30,51 +33,48 @@ import { removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; -import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import BulkChange from './BulkChange'; -import FacetsList from './FacetsList'; -import PageActions from './PageActions'; -import RuleDetails from './RuleDetails'; -import RuleListItem from './RuleListItem'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { - Facets, - Query, - parseQuery, - serializeQuery, - areQueriesEqual, - shouldRequestFacet, - FacetKey, - OpenFacets, - getServerFacet, - getAppFacet, - Actives, - Activation, - getOpen -} from '../query'; +import { Profile, searchQualityProfiles } from '../../../api/quality-profiles'; +import { getRulesApp, searchRules } from '../../../api/rules'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; -import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import FiltersHeader from '../../../components/common/FiltersHeader'; -import { searchRules, getRulesApp } from '../../../api/rules'; -import { searchQualityProfiles, Profile } from '../../../api/quality-profiles'; +import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; +import '../../../components/search-navigator.css'; +import { hasPrivateAccess } from '../../../helpers/organizations'; import { + getAppState, getCurrentUser, getLanguages, getMyOrganizations, - Store, - getAppState + Store } from '../../../store/rootReducer'; import { - shouldOpenStandardsFacet, shouldOpenSonarSourceSecurityFacet, shouldOpenStandardsChildFacet, + shouldOpenStandardsFacet, STANDARDS } from '../../issues/utils'; -import { hasPrivateAccess } from '../../../helpers/organizations'; -import '../../../components/search-navigator.css'; +import { + Activation, + Actives, + areQueriesEqual, + FacetKey, + Facets, + getAppFacet, + getOpen, + getServerFacet, + OpenFacets, + parseQuery, + Query, + serializeQuery, + shouldRequestFacet +} from '../query'; import '../styles.css'; +import BulkChange from './BulkChange'; +import FacetsList from './FacetsList'; +import PageActions from './PageActions'; +import RuleDetails from './RuleDetails'; +import RuleListItem from './RuleListItem'; const PAGE_SIZE = 100; const LIMIT_BEFORE_LOAD_MORE = 5; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/AvailableSinceFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/AvailableSinceFacet.tsx index bb464f86d38..8b6642ed170 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/AvailableSinceFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/AvailableSinceFacet.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { injectIntl, InjectedIntlProps } from 'react-intl'; +import { InjectedIntlProps, injectIntl } from 'react-intl'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Query } from '../query'; import DateInput from '../../../components/controls/DateInput'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import { longFormatterOption } from '../../../components/intl/DateFormatter'; +import { Query } from '../query'; interface Props { onChange: (changes: Partial<Query>) => void; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx index 7f111e83c4d..12edc48e775 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -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 BulkChangeModal from './BulkChangeModal'; -import { Query } from '../query'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Profile } from '../../../api/quality-profiles'; +import { Query } from '../query'; +import BulkChangeModal from './BulkChangeModal'; interface Props { languages: T.Languages; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx index 4785706906f..23b8724aaab 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import Select from 'sonar-ui-common/components/controls/Select'; 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 Select from 'sonar-ui-common/components/controls/Select'; +import { bulkActivateRules, bulkDeactivateRules, Profile } from '../../../api/quality-profiles'; import { Query, serializeQuery } from '../query'; -import { Profile, bulkActivateRules, bulkDeactivateRules } from '../../../api/quality-profiles'; interface Props { action: string; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx index 5a0afefe1f7..eb41e4b5b89 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx @@ -18,18 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { csvEscape } from 'sonar-ui-common/helpers/csv'; -import { latinize } from 'sonar-ui-common/helpers/strings'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import Select from 'sonar-ui-common/components/controls/Select'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { csvEscape } from 'sonar-ui-common/helpers/csv'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { latinize } from 'sonar-ui-common/helpers/strings'; +import { createRule, updateRule } from '../../../api/rules'; import MarkdownTips from '../../../components/common/MarkdownTips'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import TypeHelper from '../../../components/shared/TypeHelper'; -import { createRule, updateRule } from '../../../api/rules'; -import { SEVERITIES, RULE_TYPES, RULE_STATUSES } from '../../../helpers/constants'; +import { RULE_STATUSES, RULE_TYPES, SEVERITIES } from '../../../helpers/constants'; interface Props { customRule?: T.RuleDetails; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx index 8c08b742f95..b6b5e027787 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Facet, { BasicProps } from './Facet'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import { SEVERITIES } from '../../../helpers/constants'; +import Facet, { BasicProps } from './Facet'; export default class DefaultSeverityFacet extends React.PureComponent<BasicProps> { renderName = (severity: string) => <SeverityHelper severity={severity} />; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx index bd7a381fef7..66144310426 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx @@ -17,17 +17,17 @@ * 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 { orderBy, without, sortBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import { orderBy, sortBy, without } from 'lodash'; +import * as React from 'react'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import { FacetKey } from '../query'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; +import { FacetKey } from '../query'; export interface BasicProps { onChange: (changes: T.Dict<string | string[] | undefined>) => void; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/FacetsList.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/FacetsList.tsx index 1eb17fa8cfd..b64220cff73 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/FacetsList.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/FacetsList.tsx @@ -18,6 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Profile } from '../../../api/quality-profiles'; +import StandardFacet from '../../issues/sidebar/StandardFacet'; +import { Facets, OpenFacets, Query } from '../query'; import ActivationSeverityFacet from './ActivationSeverityFacet'; import AvailableSinceFacet from './AvailableSinceFacet'; import DefaultSeverityFacet from './DefaultSeverityFacet'; @@ -29,9 +32,6 @@ import StatusFacet from './StatusFacet'; import TagFacet from './TagFacet'; import TemplateFacet from './TemplateFacet'; import TypeFacet from './TypeFacet'; -import StandardFacet from '../../issues/sidebar/StandardFacet'; -import { Facets, Query, OpenFacets } from '../query'; -import { Profile } from '../../../api/quality-profiles'; interface Props { facets?: Facets; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/LanguageFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/LanguageFacet.tsx index 1904a3081b9..03c97e7f2e7 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/LanguageFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/LanguageFacet.tsx @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { uniqBy } from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; -import { uniqBy } from 'lodash'; -import { highlightTerm } from 'sonar-ui-common/helpers/search'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { BasicProps } from './Facet'; -import { getLanguages, Store } from '../../../store/rootReducer'; +import { highlightTerm } from 'sonar-ui-common/helpers/search'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import { getLanguages, Store } from '../../../store/rootReducer'; +import { BasicProps } from './Facet'; interface InstalledLanguage { key: string; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx index e0486cafceb..886369de9fc 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ReloadButton from 'sonar-ui-common/components/controls/ReloadButton'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import PageCounter from '../../../components/common/PageCounter'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ProfileFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ProfileFacet.tsx index 6197f0adf1a..c50359b6325 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ProfileFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ProfileFacet.tsx @@ -17,17 +17,17 @@ * 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 { sortBy } from 'lodash'; import * as classNames from 'classnames'; +import { sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Query, FacetKey } from '../query'; import { Profile } from '../../../api/quality-profiles'; import DocTooltip from '../../../components/docs/DocTooltip'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; +import { FacetKey, Query } from '../query'; interface Props { activation: boolean | undefined; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RemoveExtendedDescriptionModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RemoveExtendedDescriptionModal.tsx index fc6712657fb..67e5c0b94cd 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RemoveExtendedDescriptionModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RemoveExtendedDescriptionModal.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { onCancel: () => void; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RepositoryFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RepositoryFacet.tsx index e3f82deade2..11e09afa050 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RepositoryFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RepositoryFacet.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import Facet, { BasicProps } from './Facet'; import { getLanguages, Store } from '../../../store/rootReducer'; +import Facet, { BasicProps } from './Facet'; interface StateProps { referencedLanguages: T.Dict<{ key: string; name: string }>; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx index c12426d713c..d6c901ee473 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx @@ -18,10 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { Profile } from '../../../api/quality-profiles'; +import { deleteRule, getRuleDetails, updateRule } from '../../../api/rules'; +import DocTooltip from '../../../components/docs/DocTooltip'; +import { Activation, Query } from '../query'; import CustomRuleButton from './CustomRuleButton'; import RuleDetailsCustomRules from './RuleDetailsCustomRules'; import RuleDetailsDescription from './RuleDetailsDescription'; @@ -29,10 +33,6 @@ import RuleDetailsIssues from './RuleDetailsIssues'; import RuleDetailsMeta from './RuleDetailsMeta'; import RuleDetailsParameters from './RuleDetailsParameters'; import RuleDetailsProfiles from './RuleDetailsProfiles'; -import { Query, Activation } from '../query'; -import { Profile } from '../../../api/quality-profiles'; -import { getRuleDetails, deleteRule, updateRule } from '../../../api/rules'; -import DocTooltip from '../../../components/docs/DocTooltip'; interface Props { allowCustomRules?: boolean; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx index 6f88046a22d..fa2607f9de5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx @@ -17,17 +17,17 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; -import { sortBy } from 'lodash'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; -import CustomRuleButton from './CustomRuleButton'; -import { searchRules, deleteRule } from '../../../api/rules'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { deleteRule, searchRules } from '../../../api/rules'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import { getRuleUrl } from '../../../helpers/urls'; +import CustomRuleButton from './CustomRuleButton'; interface Props { canChange?: boolean; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx index a5c4397451b..60acd29b35f 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import RemoveExtendedDescriptionModal from './RemoveExtendedDescriptionModal'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { updateRule } from '../../../api/rules'; import MarkdownTips from '../../../components/common/MarkdownTips'; +import RemoveExtendedDescriptionModal from './RemoveExtendedDescriptionModal'; interface Props { canWrite: boolean | undefined; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx index 86b9e3fb5c6..489d48a521b 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { getFacet } from '../../../api/issues'; -import { getIssuesUrl } from '../../../helpers/urls'; import { withAppState } from '../../../components/hoc/withAppState'; +import { getIssuesUrl } from '../../../helpers/urls'; interface Props { appState: Pick<T.AppState, 'branchesEnabled'>; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx index da19cbce288..d48523fafb1 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx @@ -19,22 +19,22 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; import LinkIcon from 'sonar-ui-common/components/icons/LinkIcon'; import RuleScopeIcon from 'sonar-ui-common/components/icons/RuleScopeIcon'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; -import RuleDetailsTagsPopup from './RuleDetailsTagsPopup'; -import SimilarRulesFilter from './SimilarRulesFilter'; -import DateFormatter from '../../../components/intl/DateFormatter'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import DocTooltip from '../../../components/docs/DocTooltip'; +import DateFormatter from '../../../components/intl/DateFormatter'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import TagsList from '../../../components/tags/TagsList'; -import { Query } from '../query'; import { getRuleUrl } from '../../../helpers/urls'; +import { Query } from '../query'; +import RuleDetailsTagsPopup from './RuleDetailsTagsPopup'; +import SimilarRulesFilter from './SimilarRulesFilter'; interface Props { canWrite: boolean | undefined; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx index a79d58e48b0..9ced9cd1497 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx @@ -17,20 +17,20 @@ * 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 { filter } from 'lodash'; +import * as React from 'react'; import { Link } from 'react-router'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; -import ActivationButton from './ActivationButton'; -import RuleInheritanceIcon from './RuleInheritanceIcon'; -import { Profile, deactivateRule, activateRule } from '../../../api/quality-profiles'; -import BuiltInQualityProfileBadge from '../../quality-profiles/components/BuiltInQualityProfileBadge'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { activateRule, deactivateRule, Profile } from '../../../api/quality-profiles'; import InstanceMessage from '../../../components/common/InstanceMessage'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import { getQualityProfileUrl } from '../../../helpers/urls'; +import BuiltInQualityProfileBadge from '../../quality-profiles/components/BuiltInQualityProfileBadge'; +import ActivationButton from './ActivationButton'; +import RuleInheritanceIcon from './RuleInheritanceIcon'; interface Props { activations: T.RuleActivation[] | undefined; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx index 32b0d109afb..859caf48fe7 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { difference, uniq, without } from 'lodash'; import * as React from 'react'; -import { without, uniq, difference } from 'lodash'; -import TagsSelector from '../../../components/tags/TagsSelector'; import { getRuleTags } from '../../../api/rules'; +import TagsSelector from '../../../components/tags/TagsSelector'; export interface Props { organization: string | undefined; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx index 2acb0a63683..f99010447e9 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx @@ -17,22 +17,22 @@ * 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 { Link } from 'react-router'; -import SeverityIcon from 'sonar-ui-common/components/icons/SeverityIcon'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; +import SeverityIcon from 'sonar-ui-common/components/icons/SeverityIcon'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { deactivateRule, Profile } from '../../../api/quality-profiles'; +import TagsList from '../../../components/tags/TagsList'; +import { getRuleUrl } from '../../../helpers/urls'; +import { Activation, Query } from '../query'; import ActivationButton from './ActivationButton'; import RuleInheritanceIcon from './RuleInheritanceIcon'; import SimilarRulesFilter from './SimilarRulesFilter'; -import { Activation, Query } from '../query'; -import { Profile, deactivateRule } from '../../../api/quality-profiles'; -import TagsList from '../../../components/tags/TagsList'; -import { getRuleUrl } from '../../../helpers/urls'; interface Props { activation?: Activation; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx index f61d9278356..83e73cdd632 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import FilterIcon from 'sonar-ui-common/components/icons/FilterIcon'; import TagsIcon from 'sonar-ui-common/components/icons/TagsIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; -import { Query } from '../query'; import SeverityHelper from '../../../components/shared/SeverityHelper'; +import { Query } from '../query'; interface Props { onFilterChange: (changes: Partial<Query>) => void; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/StatusFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/StatusFacet.tsx index 6739f0b974f..cef5a46d7d4 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/StatusFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/StatusFacet.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Facet, { BasicProps } from './Facet'; import { RULE_STATUSES } from '../../../helpers/constants'; +import Facet, { BasicProps } from './Facet'; export default class StatusFacet extends React.PureComponent<BasicProps> { renderName = (status: string) => translate('rules.status', status.toLowerCase()); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx index 9cab40f1045..1de9ab5c9d3 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { uniq } from 'lodash'; import * as React from 'react'; import TagsIcon from 'sonar-ui-common/components/icons/TagsIcon'; -import { uniq } from 'lodash'; -import { highlightTerm } from 'sonar-ui-common/helpers/search'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { BasicProps } from './Facet'; +import { highlightTerm } from 'sonar-ui-common/helpers/search'; import { getRuleTags } from '../../../api/rules'; import { colors } from '../../../app/theme'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import { BasicProps } from './Facet'; interface Props extends BasicProps { organization: string | undefined; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/TemplateFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/TemplateFacet.tsx index 8f02d5373c6..69222f53f7d 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/TemplateFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/TemplateFacet.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Facet, { BasicProps } from './Facet'; import DocTooltip from '../../../components/docs/DocTooltip'; +import Facet, { BasicProps } from './Facet'; interface Props extends T.Omit<BasicProps, 'onChange' | 'values'> { onChange: (changes: { template: boolean | undefined }) => void; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/ActivationFormModal-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/ActivationFormModal-test.tsx index 5b9cd54183d..df732f79a2b 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/ActivationFormModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/ActivationFormModal-test.tsx @@ -17,10 +17,10 @@ * 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 ActivationFormModal from '../ActivationFormModal'; +import * as React from 'react'; import { mockQualityProfile, mockRule } from '../../../../helpers/testMocks'; +import ActivationFormModal from '../ActivationFormModal'; it('render correctly', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChange-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChange-test.tsx index 1a22fdf85b2..b96125caf16 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChange-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChange-test.tsx @@ -17,10 +17,10 @@ * 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 BulkChange from '../BulkChange'; +import * as React from 'react'; import { mockEvent, mockQualityProfile } from '../../../../helpers/testMocks'; +import BulkChange from '../BulkChange'; const profile = mockQualityProfile({ actions: { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChangeModal-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChangeModal-test.tsx index 6174a899e02..0f7fde8e95a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChangeModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChangeModal-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 { shallow } from 'enzyme'; -import BulkChangeModal from '../BulkChangeModal'; +import * as React from 'react'; import { mockQualityProfile } from '../../../../helpers/testMocks'; import { Query } from '../../query'; +import BulkChangeModal from '../BulkChangeModal'; it('render correctly', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/CustomRuleFormModal-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/CustomRuleFormModal-test.tsx index b5d62422781..4a7ed8606c2 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/CustomRuleFormModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/CustomRuleFormModal-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 { submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import CustomRuleFormModal from '../CustomRuleFormModal'; import { createRule } from '../../../../api/rules'; import { mockRule } from '../../../../helpers/testMocks'; +import CustomRuleFormModal from '../CustomRuleFormModal'; jest.mock('../../../../api/rules', () => ({ createRule: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/FacetsList-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/FacetsList-test.tsx index 51839b88b04..f93e567ef0a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/FacetsList-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/FacetsList-test.tsx @@ -17,10 +17,10 @@ * 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 FacetsList from '../FacetsList'; +import * as React from 'react'; import { Query } from '../../query'; +import FacetsList from '../FacetsList'; it('should render correctly', () => { const wrapper = shallowRender(); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetails-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetails-test.tsx index c3c858daf42..c721cedf1ab 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetails-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetails-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import RuleDetails from '../RuleDetails'; import { updateRule } from '../../../../api/rules'; +import RuleDetails from '../RuleDetails'; jest.mock('../../../../api/rules', () => ({ deleteRule: jest.fn(), diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsDescription-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsDescription-test.tsx index 0a5891616e3..129abf0b086 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsDescription-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsDescription-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 { shallow } from 'enzyme'; -import { click, change, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import * as React from 'react'; +import { change, click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import RuleDetailsDescription from '../RuleDetailsDescription'; jest.mock('../../../../api/rules', () => ({ diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsIssues-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsIssues-test.tsx index 107b7cb18ae..20fcbb5f74a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsIssues-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsIssues-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { RuleDetailsIssues } from '../RuleDetailsIssues'; import { getFacet } from '../../../../api/issues'; +import { RuleDetailsIssues } from '../RuleDetailsIssues'; jest.mock('../../../../api/issues', () => ({ getFacet: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsMeta-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsMeta-test.tsx index 0b14669c104..03c096f8847 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsMeta-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsMeta-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 RuleDetailsMeta from '../RuleDetailsMeta'; import RuleDetailsTagsPopup from '../RuleDetailsTagsPopup'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsParameters-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsParameters-test.tsx index 1e017749c54..06cae07dd56 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsParameters-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsParameters-test.tsx @@ -17,10 +17,10 @@ * 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 RuleDetailsParameters from '../RuleDetailsParameters'; +import * as React from 'react'; import { mockRuleDetailsParameter } from '../../../../helpers/testMocks'; +import RuleDetailsParameters from '../RuleDetailsParameters'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsTagsPopup-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsTagsPopup-test.tsx index cd6e79e9afd..4f05d8d49c2 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsTagsPopup-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsTagsPopup-test.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; +import * as React from 'react'; import RuleDetailsTagsPopup, { Props } from '../RuleDetailsTagsPopup'; jest.mock('../../../../api/rules', () => ({ diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleListItem-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleListItem-test.tsx index cc06721c692..589e92bcb21 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleListItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleListItem-test.tsx @@ -17,10 +17,10 @@ * 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 RuleListItem from '../RuleListItem'; +import * as React from 'react'; import { mockEvent, mockRule } from '../../../../helpers/testMocks'; +import RuleListItem from '../RuleListItem'; it('should render', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/query.ts b/server/sonar-web/src/main/js/apps/coding-rules/query.ts index e3bd82cbbd2..1d1970c8bf3 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/query.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/query.ts @@ -18,17 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { - parseAsString, - parseAsArray, - serializeString, - serializeStringArray, cleanQuery, - queriesEqual, + parseAsArray, parseAsDate, - serializeDateShort, parseAsOptionalBoolean, + parseAsOptionalString, + parseAsString, + queriesEqual, + serializeDateShort, serializeOptionalBoolean, - parseAsOptionalString + serializeString, + serializeStringArray } from 'sonar-ui-common/helpers/query'; export interface Query { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/routes.ts b/server/sonar-web/src/main/js/apps/coding-rules/routes.ts index 91f5e869529..d38afd56a4b 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/routes.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/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'; import { parseQuery, serializeQuery } from './query'; 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'; diff --git a/server/sonar-web/src/main/js/apps/create/components/FreeCardPlan.tsx b/server/sonar-web/src/main/js/apps/create/components/FreeCardPlan.tsx index c66055cbe30..b03217392a5 100644 --- a/server/sonar-web/src/main/js/apps/create/components/FreeCardPlan.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/FreeCardPlan.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import RadioCard, { RadioCardProps } from 'sonar-ui-common/components/controls/RadioCard'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatPrice } from '../organization/utils'; interface Props extends RadioCardProps { diff --git a/server/sonar-web/src/main/js/apps/create/components/OrganizationAvatarInput.tsx b/server/sonar-web/src/main/js/apps/create/components/OrganizationAvatarInput.tsx index ec1da554e80..201fc674290 100644 --- a/server/sonar-web/src/main/js/apps/create/components/OrganizationAvatarInput.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/OrganizationAvatarInput.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 { isWebUri } from 'valid-url'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import ValidationInput from 'sonar-ui-common/components/controls/ValidationInput'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { isWebUri } from 'valid-url'; import OrganizationAvatar from '../../../components/common/OrganizationAvatar'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/create/components/OrganizationKeyInput.tsx b/server/sonar-web/src/main/js/apps/create/components/OrganizationKeyInput.tsx index f8d4d04ab5d..9d8657d33eb 100644 --- a/server/sonar-web/src/main/js/apps/create/components/OrganizationKeyInput.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/OrganizationKeyInput.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 classNames from 'classnames'; import { debounce } from 'lodash'; +import * as React from 'react'; import ValidationInput from 'sonar-ui-common/components/controls/ValidationInput'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getHostUrl } from 'sonar-ui-common/helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/create/components/OrganizationSelect.tsx b/server/sonar-web/src/main/js/apps/create/components/OrganizationSelect.tsx index eb17508806e..af551bf825b 100644 --- a/server/sonar-web/src/main/js/apps/create/components/OrganizationSelect.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/OrganizationSelect.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 { sortBy } from 'lodash'; +import * as React from 'react'; +import Select from 'sonar-ui-common/components/controls/Select'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import Select from 'sonar-ui-common/components/controls/Select'; import { sanitizeAlmId } from '../../../helpers/almIntegrations'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/create/components/OrganizationUrlInput.tsx b/server/sonar-web/src/main/js/apps/create/components/OrganizationUrlInput.tsx index e9c2685bc74..813fb0e309c 100644 --- a/server/sonar-web/src/main/js/apps/create/components/OrganizationUrlInput.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/OrganizationUrlInput.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 { isWebUri } from 'valid-url'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import ValidationInput from 'sonar-ui-common/components/controls/ValidationInput'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { isWebUri } from 'valid-url'; interface Props { initialValue?: string; diff --git a/server/sonar-web/src/main/js/apps/create/components/PaidCardPlan.tsx b/server/sonar-web/src/main/js/apps/create/components/PaidCardPlan.tsx index eb3bc5c6cb1..f54f0b51e17 100644 --- a/server/sonar-web/src/main/js/apps/create/components/PaidCardPlan.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/PaidCardPlan.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import RadioCard, { RadioCardProps } from 'sonar-ui-common/components/controls/RadioCard'; -import UpgradeOrganizationAdvantages from './UpgradeOrganizationAdvantages'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatPrice } from '../organization/utils'; +import UpgradeOrganizationAdvantages from './UpgradeOrganizationAdvantages'; interface Props extends RadioCardProps { isRecommended: boolean; diff --git a/server/sonar-web/src/main/js/apps/create/components/ProjectKeyInput.tsx b/server/sonar-web/src/main/js/apps/create/components/ProjectKeyInput.tsx index e35fa1ce458..0fd857b8b2d 100644 --- a/server/sonar-web/src/main/js/apps/create/components/ProjectKeyInput.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/ProjectKeyInput.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 classNames from 'classnames'; import { debounce } from 'lodash'; +import * as React from 'react'; import ValidationInput from 'sonar-ui-common/components/controls/ValidationInput'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { doesComponentExists } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/create/components/UpgradeOrganizationBox.tsx b/server/sonar-web/src/main/js/apps/create/components/UpgradeOrganizationBox.tsx index 2ca5f92a050..355c67814d8 100644 --- a/server/sonar-web/src/main/js/apps/create/components/UpgradeOrganizationBox.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/UpgradeOrganizationBox.tsx @@ -20,13 +20,13 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate, hasMessage } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import RadioCard from 'sonar-ui-common/components/controls/RadioCard'; +import { hasMessage, translate } from 'sonar-ui-common/helpers/l10n'; +import { getSubscriptionPlans } from '../../../api/billing'; +import { formatPrice } from '../organization/utils'; import UpgradeOrganizationAdvantages from './UpgradeOrganizationAdvantages'; import UpgradeOrganizationModal from './UpgradeOrganizationModal'; -import { formatPrice } from '../organization/utils'; -import { getSubscriptionPlans } from '../../../api/billing'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/create/components/UpgradeOrganizationModal.tsx b/server/sonar-web/src/main/js/apps/create/components/UpgradeOrganizationModal.tsx index b1619c23e7e..71e5203ac8c 100644 --- a/server/sonar-web/src/main/js/apps/create/components/UpgradeOrganizationModal.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/UpgradeOrganizationModal.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import BillingFormShim from './BillingFormShim'; -import UpgradeOrganizationAdvantages from './UpgradeOrganizationAdvantages'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; import { getExtensionStart } from '../../../helpers/extensions'; +import BillingFormShim from './BillingFormShim'; +import UpgradeOrganizationAdvantages from './UpgradeOrganizationAdvantages'; const BillingForm = withCurrentUser(BillingFormShim); diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/BillingFormShim-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/BillingFormShim-test.tsx index ed49c90dade..55217b9e781 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/BillingFormShim-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/BillingFormShim-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 BillingFormShim from '../BillingFormShim'; beforeAll(() => { diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/FreeCardPlan-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/FreeCardPlan-test.tsx index 3c4cfec0d48..4bf54f55888 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/FreeCardPlan-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/FreeCardPlan-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 FreeCardPlan from '../FreeCardPlan'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationAvatarInput-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationAvatarInput-test.tsx index d033e5aa8e8..51e22f5b958 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationAvatarInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationAvatarInput-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 OrganizationAvatarInput from '../OrganizationAvatarInput'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationKeyInput-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationKeyInput-test.tsx index 17b4a49ec73..3ff9010ca64 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationKeyInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationKeyInput-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import OrganizationKeyInput from '../OrganizationKeyInput'; import { getOrganization } from '../../../../api/organizations'; +import OrganizationKeyInput from '../OrganizationKeyInput'; jest.mock('../../../../api/organizations', () => ({ getOrganization: jest.fn().mockResolvedValue(undefined) diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationSelect-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationSelect-test.tsx index 6d607b0117d..1635c547bcd 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationSelect-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationSelect-test.tsx @@ -17,10 +17,10 @@ * 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 OrganizationSelect, { getOptionRenderer } from '../OrganizationSelect'; +import * as React from 'react'; import { mockOrganization, mockOrganizationWithAlm } from '../../../../helpers/testMocks'; +import OrganizationSelect, { getOptionRenderer } from '../OrganizationSelect'; const organizations = [mockOrganization(), mockOrganizationWithAlm({ key: 'bar', name: 'Bar' })]; diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationUrlInput-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationUrlInput-test.tsx index 17d9613cfc5..9dd3916e103 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationUrlInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/OrganizationUrlInput-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 OrganizationUrlInput from '../OrganizationUrlInput'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/PaidCardPlan-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/PaidCardPlan-test.tsx index b775c18aca5..d5a21e448dc 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/PaidCardPlan-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/PaidCardPlan-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 PaidCardPlan from '../PaidCardPlan'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/ProjectKeyInput-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/ProjectKeyInput-test.tsx index 3670a4f08dc..4f0214d7e9a 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/ProjectKeyInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/ProjectKeyInput-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import ProjectKeyInput from '../ProjectKeyInput'; diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationAdvantages-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationAdvantages-test.tsx index 0c41d59c758..7537dee4bfd 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationAdvantages-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationAdvantages-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 UpgradeOrganizationAdvantages from '../UpgradeOrganizationAdvantages'; it('should render correctly ', () => { diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationBox-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationBox-test.tsx index e93f695e013..bfa506c07ed 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationBox-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationBox-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 { hasMessage } from 'sonar-ui-common/helpers/l10n'; -import { waitAndUpdate, click } from 'sonar-ui-common/helpers/testUtils'; -import UpgradeOrganizationBox from '../UpgradeOrganizationBox'; +import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { getSubscriptionPlans } from '../../../../api/billing'; +import UpgradeOrganizationBox from '../UpgradeOrganizationBox'; jest.mock('sonar-ui-common/helpers/l10n', () => ({ ...jest.requireActual('sonar-ui-common/helpers/l10n'), diff --git a/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationModal-test.tsx b/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationModal-test.tsx index d5767eb0b16..c3e432409fe 100644 --- a/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/components/__tests__/UpgradeOrganizationModal-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import UpgradeOrganizationModal from '../UpgradeOrganizationModal'; import { getExtensionStart } from '../../../../helpers/extensions'; +import UpgradeOrganizationModal from '../UpgradeOrganizationModal'; jest.mock('../../../../helpers/extensions', () => ({ getExtensionStart: jest.fn().mockResolvedValue(undefined) diff --git a/server/sonar-web/src/main/js/apps/create/organization/AlmApplicationInstalling.tsx b/server/sonar-web/src/main/js/apps/create/organization/AlmApplicationInstalling.tsx index d43f7e2219e..3250c08ba69 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/AlmApplicationInstalling.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/AlmApplicationInstalling.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { sanitizeAlmId } from '../../../helpers/almIntegrations'; export default function AlmApplicationInstalling({ almKey }: { almKey?: string }) { diff --git a/server/sonar-web/src/main/js/apps/create/organization/AutoOrganizationBind.tsx b/server/sonar-web/src/main/js/apps/create/organization/AutoOrganizationBind.tsx index 2e01467abc7..d3933484963 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/AutoOrganizationBind.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/AutoOrganizationBind.tsx @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import OrganizationSelect from '../components/OrganizationSelect'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { isGithub } from '../../../helpers/almIntegrations'; +import OrganizationSelect from '../components/OrganizationSelect'; interface Props { almKey: string; diff --git a/server/sonar-web/src/main/js/apps/create/organization/AutoOrganizationCreate.tsx b/server/sonar-web/src/main/js/apps/create/organization/AutoOrganizationCreate.tsx index ba1fb55e851..4e3982833fb 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/AutoOrganizationCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/AutoOrganizationCreate.tsx @@ -19,18 +19,18 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import { ClearButton } from 'sonar-ui-common/components/controls/buttons'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import RadioToggle from 'sonar-ui-common/components/controls/RadioToggle'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; +import { bindAlmOrganization } from '../../../api/alm-integration'; +import { getAlmMembersUrl, isGithub, sanitizeAlmId } from '../../../helpers/almIntegrations'; import AutoOrganizationBind from './AutoOrganizationBind'; import OrganizationDetailsForm from './OrganizationDetailsForm'; import OrganizationDetailsStep from './OrganizationDetailsStep'; import PlanStep from './PlanStep'; import { Step } from './utils'; -import { bindAlmOrganization } from '../../../api/alm-integration'; -import { sanitizeAlmId, getAlmMembersUrl, isGithub } from '../../../helpers/almIntegrations'; enum Filters { Bind = 'bind', diff --git a/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx b/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx index 0fba53427c9..01562f9704a 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx @@ -17,52 +17,52 @@ * 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 differenceInMinutes from 'date-fns/difference_in_minutes'; import { times } from 'lodash'; -import { connect } from 'react-redux'; +import * as React from 'react'; import { Helmet } from 'react-helmet'; +import { connect } from 'react-redux'; import { withRouter, WithRouterProps } from 'react-router'; +import Tabs from 'sonar-ui-common/components/controls/Tabs'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; import { get, remove } from 'sonar-ui-common/helpers/storage'; import { slugify } from 'sonar-ui-common/helpers/strings'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import Tabs from 'sonar-ui-common/components/controls/Tabs'; -import { createOrganization } from './actions'; -import { - ORGANIZATION_IMPORT_REDIRECT_TO_PROJECT_TIMESTAMP, - parseQuery, - serializeQuery, - Query, - ORGANIZATION_IMPORT_BINDING_IN_PROGRESS_TIMESTAMP, - Step, - BIND_ORGANIZATION_REDIRECT_TO_ORG_TIMESTAMP, - BIND_ORGANIZATION_KEY -} from './utils'; -import AlmApplicationInstalling from './AlmApplicationInstalling'; -import AutoOrganizationCreate from './AutoOrganizationCreate'; -import ManualOrganizationCreate from './ManualOrganizationCreate'; -import RemoteOrganizationChoose from './RemoteOrganizationChoose'; -import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; -import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; -import { withUserOrganizations } from '../../../components/hoc/withUserOrganizations'; -import { deleteOrganization } from '../../organizations/actions'; import { + bindAlmOrganization, getAlmAppInfo, getAlmOrganization, GetAlmOrganizationResponse, - listUnboundApplications, - bindAlmOrganization + listUnboundApplications } from '../../../api/alm-integration'; import { getSubscriptionPlans } from '../../../api/billing'; import * as api from '../../../api/organizations'; +import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; +import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage'; +import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; +import { withUserOrganizations } from '../../../components/hoc/withUserOrganizations'; import { hasAdvancedALMIntegration, sanitizeAlmId } from '../../../helpers/almIntegrations'; import { getOrganizationUrl } from '../../../helpers/urls'; import { skipOnboarding } from '../../../store/users'; -import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage'; +import { deleteOrganization } from '../../organizations/actions'; import '../../tutorials/styles.css'; // TODO remove me +import { createOrganization } from './actions'; +import AlmApplicationInstalling from './AlmApplicationInstalling'; +import AutoOrganizationCreate from './AutoOrganizationCreate'; +import ManualOrganizationCreate from './ManualOrganizationCreate'; +import RemoteOrganizationChoose from './RemoteOrganizationChoose'; +import { + BIND_ORGANIZATION_KEY, + BIND_ORGANIZATION_REDIRECT_TO_ORG_TIMESTAMP, + ORGANIZATION_IMPORT_BINDING_IN_PROGRESS_TIMESTAMP, + ORGANIZATION_IMPORT_REDIRECT_TO_PROJECT_TIMESTAMP, + parseQuery, + Query, + serializeQuery, + Step +} from './utils'; interface Props { createOrganization: ( diff --git a/server/sonar-web/src/main/js/apps/create/organization/OrganizationDetailsForm.tsx b/server/sonar-web/src/main/js/apps/create/organization/OrganizationDetailsForm.tsx index 93e8a5d536e..8201753d4c0 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/OrganizationDetailsForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/OrganizationDetailsForm.tsx @@ -18,10 +18,10 @@ * 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 { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import OrganizationAvatarInput from '../components/OrganizationAvatarInput'; import OrganizationKeyInput from '../components/OrganizationKeyInput'; import OrganizationUrlInput from '../components/OrganizationUrlInput'; diff --git a/server/sonar-web/src/main/js/apps/create/organization/PlanStep.tsx b/server/sonar-web/src/main/js/apps/create/organization/PlanStep.tsx index 32839e704a4..68f05c51c9e 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/PlanStep.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/PlanStep.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import PlanSelect, { Plan } from './PlanSelect'; -import BillingFormShim from '../components/BillingFormShim'; -import Step from '../../tutorials/components/Step'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; import { getExtensionStart } from '../../../helpers/extensions'; +import Step from '../../tutorials/components/Step'; +import BillingFormShim from '../components/BillingFormShim'; +import PlanSelect, { Plan } from './PlanSelect'; const BillingForm = withCurrentUser(BillingFormShim); diff --git a/server/sonar-web/src/main/js/apps/create/organization/RemoteOrganizationChoose.tsx b/server/sonar-web/src/main/js/apps/create/organization/RemoteOrganizationChoose.tsx index fb2f4aed80d..15205bf8159 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/RemoteOrganizationChoose.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/RemoteOrganizationChoose.tsx @@ -17,21 +17,21 @@ * 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 { WithRouterProps, withRouter } from 'react-router'; -import { FormattedMessage } from 'react-intl'; import { sortBy } from 'lodash'; +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; +import { withRouter, WithRouterProps } from 'react-router'; +import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import IdentityProviderLink from 'sonar-ui-common/components/controls/IdentityProviderLink'; -import { save } from 'sonar-ui-common/helpers/storage'; +import Select from 'sonar-ui-common/components/controls/Select'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { save } from 'sonar-ui-common/helpers/storage'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import Select from 'sonar-ui-common/components/controls/Select'; -import { serializeQuery, ORGANIZATION_IMPORT_BINDING_IN_PROGRESS_TIMESTAMP } from './utils'; import OrganizationAvatar from '../../../components/common/OrganizationAvatar'; import { sanitizeAlmId } from '../../../helpers/almIntegrations'; +import { ORGANIZATION_IMPORT_BINDING_IN_PROGRESS_TIMESTAMP, serializeQuery } from './utils'; interface Props { almApplication: T.AlmApplication; diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/AlmApplicationInstalling-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/AlmApplicationInstalling-test.tsx index 60673608d36..d3d0759845d 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/AlmApplicationInstalling-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/AlmApplicationInstalling-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 AlmApplicationInstalling from '../AlmApplicationInstalling'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/AutoOrganizationBind-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/AutoOrganizationBind-test.tsx index ee58e92240f..32eb593942e 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/AutoOrganizationBind-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/AutoOrganizationBind-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { submit } from 'sonar-ui-common/helpers/testUtils'; -import AutoOrganizationBind from '../AutoOrganizationBind'; import { mockOrganization } from '../../../../helpers/testMocks'; +import AutoOrganizationBind from '../AutoOrganizationBind'; it('should render correctly', () => { const onBindOrganization = jest.fn().mockResolvedValue({}); diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/AutoOrganizationCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/AutoOrganizationCreate-test.tsx index 21990d1aa18..f0233955a5e 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/AutoOrganizationCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/AutoOrganizationCreate-test.tsx @@ -17,13 +17,13 @@ * 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 { waitAndUpdate, click } from 'sonar-ui-common/helpers/testUtils'; +import * as React from 'react'; +import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import { bindAlmOrganization } from '../../../../api/alm-integration'; +import { mockAlmApplication, mockAlmOrganization } from '../../../../helpers/testMocks'; import AutoOrganizationCreate from '../AutoOrganizationCreate'; import { Step } from '../utils'; -import { bindAlmOrganization } from '../../../../api/alm-integration'; -import { mockAlmOrganization, mockAlmApplication } from '../../../../helpers/testMocks'; jest.mock('../../../../api/alm-integration', () => ({ bindAlmOrganization: jest.fn().mockResolvedValue({}) diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/CreateOrganization-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/CreateOrganization-test.tsx index c51e86e18d7..4c880e28218 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/CreateOrganization-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/CreateOrganization-test.tsx @@ -17,13 +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 { times } from 'lodash'; +import { mount, shallow } from 'enzyme'; import { Location } from 'history'; -import { shallow, mount } from 'enzyme'; +import { times } from 'lodash'; +import * as React from 'react'; import { get, remove } from 'sonar-ui-common/helpers/storage'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { CreateOrganization } from '../CreateOrganization'; import { bindAlmOrganization, getAlmAppInfo, @@ -33,13 +32,14 @@ import { import { getSubscriptionPlans } from '../../../../api/billing'; import { getOrganizations } from '../../../../api/organizations'; import { - mockRouter, - mockOrganizationWithAdminActions, - mockOrganizationWithAlm, mockAlmOrganization, + mockLocation, mockLoggedInUser, - mockLocation + mockOrganizationWithAdminActions, + mockOrganizationWithAlm, + mockRouter } from '../../../../helpers/testMocks'; +import { CreateOrganization } from '../CreateOrganization'; jest.mock('../../../../api/billing', () => ({ getSubscriptionPlans: jest diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/ManualOrganizationCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/ManualOrganizationCreate-test.tsx index 6a8f9575555..ef8a172ccc9 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/ManualOrganizationCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/ManualOrganizationCreate-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 { mockOrganization } from '../../../../helpers/testMocks'; import ManualOrganizationCreate from '../ManualOrganizationCreate'; import { Step } from '../utils'; -import { mockOrganization } from '../../../../helpers/testMocks'; it('should render and create organization', async () => { const createOrganization = jest.fn().mockResolvedValue({ key: 'foo' }); diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/OrganizationDetailsForm-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/OrganizationDetailsForm-test.tsx index 453285d15df..046a7bf2190 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/OrganizationDetailsForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/OrganizationDetailsForm-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 { click, submit } from 'sonar-ui-common/helpers/testUtils'; import OrganizationDetailsForm from '../OrganizationDetailsForm'; diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/OrganizationDetailsStep-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/OrganizationDetailsStep-test.tsx index 04c8df9a20b..a91753a37bf 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/OrganizationDetailsStep-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/OrganizationDetailsStep-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 OrganizationDetailsStep from '../OrganizationDetailsStep'; it('should render form', () => { diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/PlanSelect-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/PlanSelect-test.tsx index 9b8c8659b7e..5bf7032b57c 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/PlanSelect-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/PlanSelect-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; -import PlanSelect, { Plan } from '../PlanSelect'; import { mockAlmOrganization } from '../../../../helpers/testMocks'; +import PlanSelect, { Plan } from '../PlanSelect'; it('should render and select', () => { const onChange = jest.fn(); diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/PlanStep-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/PlanStep-test.tsx index ad313c2abcf..9fb3d70f361 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/PlanStep-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/PlanStep-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 { waitAndUpdate, submit } from 'sonar-ui-common/helpers/testUtils'; -import PlanStep from '../PlanStep'; -import { Plan } from '../PlanSelect'; +import * as React from 'react'; +import { submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { mockAlmOrganization } from '../../../../helpers/testMocks'; +import { Plan } from '../PlanSelect'; +import PlanStep from '../PlanStep'; jest.mock('../../../../helpers/extensions', () => ({ getExtensionStart: jest.fn().mockResolvedValue(undefined) diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/RemoteOrganizationChoose-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/RemoteOrganizationChoose-test.tsx index d78337d0c63..0d0d17f5717 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/RemoteOrganizationChoose-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/RemoteOrganizationChoose-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { submit } from 'sonar-ui-common/helpers/testUtils'; +import { mockAlmOrganization, mockRouter } from '../../../../helpers/testMocks'; import { RemoteOrganizationChoose } from '../RemoteOrganizationChoose'; -import { mockRouter, mockAlmOrganization } from '../../../../helpers/testMocks'; it('should render', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/create/organization/actions.ts b/server/sonar-web/src/main/js/apps/create/organization/actions.ts index 8184ad205b2..1d53505b16f 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/actions.ts +++ b/server/sonar-web/src/main/js/apps/create/organization/actions.ts @@ -19,8 +19,8 @@ */ import { Dispatch } from 'redux'; import * as api from '../../../api/organizations'; -import * as actions from '../../../store/organizations'; import { isGithub } from '../../../helpers/almIntegrations'; +import * as actions from '../../../store/organizations'; export function createOrganization({ alm, diff --git a/server/sonar-web/src/main/js/apps/create/organization/utils.ts b/server/sonar-web/src/main/js/apps/create/organization/utils.ts index 6f51cf530e8..aa37b2556c9 100644 --- a/server/sonar-web/src/main/js/apps/create/organization/utils.ts +++ b/server/sonar-web/src/main/js/apps/create/organization/utils.ts @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { memoize } from 'lodash'; -import { parseAsOptionalString, cleanQuery, serializeString } from 'sonar-ui-common/helpers/query'; -import { decodeJwt } from 'sonar-ui-common/helpers/strings'; import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; +import { cleanQuery, parseAsOptionalString, serializeString } from 'sonar-ui-common/helpers/query'; +import { decodeJwt } from 'sonar-ui-common/helpers/strings'; import { isBitbucket, isGithub } from '../../../helpers/almIntegrations'; export const ORGANIZATION_IMPORT_BINDING_IN_PROGRESS_TIMESTAMP = diff --git a/server/sonar-web/src/main/js/apps/create/project/AlmRepositoryItem.tsx b/server/sonar-web/src/main/js/apps/create/project/AlmRepositoryItem.tsx index 71e4e458a29..7063e40b451 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AlmRepositoryItem.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AlmRepositoryItem.tsx @@ -17,17 +17,17 @@ * 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 { identity } from 'lodash'; +import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import CheckIcon from 'sonar-ui-common/components/icons/CheckIcon'; import LockIcon from 'sonar-ui-common/components/icons/LockIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; import { colors } from '../../../app/theme'; import { getProjectUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/create/project/AutoProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/AutoProjectCreate.tsx index 4d906242b5f..23c22ace22d 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AutoProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AutoProjectCreate.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import IdentityProviderLink from 'sonar-ui-common/components/controls/IdentityProviderLink'; -import { save } from 'sonar-ui-common/helpers/storage'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import RemoteRepositories from './RemoteRepositories'; -import OrganizationInput from './OrganizationInput'; +import { save } from 'sonar-ui-common/helpers/storage'; import { ORGANIZATION_IMPORT_BINDING_IN_PROGRESS_TIMESTAMP, ORGANIZATION_IMPORT_REDIRECT_TO_PROJECT_TIMESTAMP } from '../organization/utils'; +import OrganizationInput from './OrganizationInput'; +import RemoteRepositories from './RemoteRepositories'; interface Props { almApplication: T.AlmApplication; diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx index 16cb1496fb3..092992fc0b9 100644 --- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { WithRouterProps } from 'react-router'; -import CreateProjectPageSonarCloud from './CreateProjectPageSonarCloud'; -import CreateProjectPageSonarQube from './CreateProjectPageSonarQube'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import { isSonarCloud } from '../../../helpers/system'; +import CreateProjectPageSonarCloud from './CreateProjectPageSonarCloud'; +import CreateProjectPageSonarQube from './CreateProjectPageSonarQube'; export default function CreateProjectPage(props: WithRouterProps) { return ( diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarCloud.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarCloud.tsx index a80fbca019e..ac23b515e8b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarCloud.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarCloud.tsx @@ -21,18 +21,18 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { WithRouterProps } from 'react-router'; -import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import Tabs from 'sonar-ui-common/components/controls/Tabs'; -import AutoProjectCreate from './AutoProjectCreate'; -import ManualProjectCreate from './ManualProjectCreate'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; +import { getAlmAppInfo } from '../../../api/alm-integration'; import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; import { withUserOrganizations } from '../../../components/hoc/withUserOrganizations'; -import { getAlmAppInfo } from '../../../api/alm-integration'; import { hasAdvancedALMIntegration } from '../../../helpers/almIntegrations'; -import { getProjectUrl, getOrganizationUrl } from '../../../helpers/urls'; +import { getOrganizationUrl, getProjectUrl } from '../../../helpers/urls'; import { skipOnboarding } from '../../../store/users'; +import AutoProjectCreate from './AutoProjectCreate'; +import ManualProjectCreate from './ManualProjectCreate'; import './style.css'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarQube.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarQube.tsx index 92befdd374d..711899aa7cd 100644 --- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarQube.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarQube.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { WithRouterProps } from 'react-router'; -import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ManualProjectCreate from './ManualProjectCreate'; +import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; import { getProjectUrl } from '../../../helpers/urls'; +import ManualProjectCreate from './ManualProjectCreate'; import './style.css'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx index f1f07936b43..40513c90d50 100644 --- a/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.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 * as classNames from 'classnames'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; -import OrganizationInput from './OrganizationInput'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { createProject } from '../../../api/components'; -import ProjectKeyInput from '../components/ProjectKeyInput'; import VisibilitySelector from '../../../components/common/VisibilitySelector'; -import UpgradeOrganizationBox from '../components/UpgradeOrganizationBox'; import { isSonarCloud } from '../../../helpers/system'; +import ProjectKeyInput from '../components/ProjectKeyInput'; +import UpgradeOrganizationBox from '../components/UpgradeOrganizationBox'; import './ManualProjectCreate.css'; +import OrganizationInput from './OrganizationInput'; interface Props { currentUser: T.LoggedInUser; diff --git a/server/sonar-web/src/main/js/apps/create/project/OrganizationInput.tsx b/server/sonar-web/src/main/js/apps/create/project/OrganizationInput.tsx index 6f0c8117454..1cec987241d 100644 --- a/server/sonar-web/src/main/js/apps/create/project/OrganizationInput.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/OrganizationInput.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { WithRouterProps, withRouter } from 'react-router'; -import { save } from 'sonar-ui-common/helpers/storage'; +import { withRouter, WithRouterProps } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { save } from 'sonar-ui-common/helpers/storage'; import OrganizationSelect from '../components/OrganizationSelect'; import { ORGANIZATION_IMPORT_REDIRECT_TO_PROJECT_TIMESTAMP } from '../organization/utils'; diff --git a/server/sonar-web/src/main/js/apps/create/project/RemoteRepositories.tsx b/server/sonar-web/src/main/js/apps/create/project/RemoteRepositories.tsx index c714b9aca96..e549064c48b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/RemoteRepositories.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/RemoteRepositories.tsx @@ -17,20 +17,20 @@ * 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 { keyBy } from 'lodash'; -import { isDefined } from 'sonar-ui-common/helpers/types'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import * as React from 'react'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; -import AlmRepositoryItem from './AlmRepositoryItem'; -import SetupProjectBox from './SetupProjectBox'; -import UpgradeOrganizationBox from '../components/UpgradeOrganizationBox'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { isDefined } from 'sonar-ui-common/helpers/types'; import { getRepositories } from '../../../api/alm-integration'; import { isPaidOrganization } from '../../../helpers/organizations'; +import UpgradeOrganizationBox from '../components/UpgradeOrganizationBox'; +import AlmRepositoryItem from './AlmRepositoryItem'; +import SetupProjectBox from './SetupProjectBox'; interface Props { almApplication: T.AlmApplication; diff --git a/server/sonar-web/src/main/js/apps/create/project/SetupProjectBox.tsx b/server/sonar-web/src/main/js/apps/create/project/SetupProjectBox.tsx index d67fe669c87..b31275a5681 100644 --- a/server/sonar-web/src/main/js/apps/create/project/SetupProjectBox.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/SetupProjectBox.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 * as classNames from 'classnames'; import { partition } from 'lodash'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { provisionProject } from '../../../api/alm-integration'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/AlmRepositoryItem-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/AlmRepositoryItem-test.tsx index f1c96b2b6aa..13de9bb4716 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/AlmRepositoryItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/AlmRepositoryItem-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 AlmRepositoryItem from '../AlmRepositoryItem'; const identityProviders = { diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/AutoProjectCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/AutoProjectCreate-test.tsx index ca1c9b9201c..f0f1ccd4893 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/AutoProjectCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/AutoProjectCreate-test.tsx @@ -17,13 +17,13 @@ * 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 AutoProjectCreate from '../AutoProjectCreate'; +import * as React from 'react'; import { mockOrganizationWithAdminActions, mockOrganizationWithAlm } from '../../../../helpers/testMocks'; +import AutoProjectCreate from '../AutoProjectCreate'; const almApplication = { backgroundColor: 'blue', diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx index 3df094a3191..cf66566cb0b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-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 { shallow } from 'enzyme'; -import CreateProjectPage from '../CreateProjectPage'; -import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; +import * as React from 'react'; import { isSonarCloud } from '../../../../helpers/system'; +import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; +import CreateProjectPage from '../CreateProjectPage'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: jest.fn().mockReturnValue(false) diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPageSonarCloud-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPageSonarCloud-test.tsx index 83c7375fc9f..fe276ad948e 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPageSonarCloud-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPageSonarCloud-test.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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { CreateProjectPageSonarCloud } from '../CreateProjectPageSonarCloud'; import { getAlmAppInfo } from '../../../../api/alm-integration'; import { - mockRouter, mockOrganizationWithAdminActions, - mockOrganizationWithAlm + mockOrganizationWithAlm, + mockRouter } from '../../../../helpers/testMocks'; +import { CreateProjectPageSonarCloud } from '../CreateProjectPageSonarCloud'; jest.mock('../../../../api/alm-integration', () => ({ getAlmAppInfo: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx index bb290f457e1..d0815b405c7 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { change, submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import ManualProjectCreate from '../ManualProjectCreate'; import { createProject } from '../../../../api/components'; +import ManualProjectCreate from '../ManualProjectCreate'; jest.mock('../../../../api/components', () => ({ createProject: jest.fn().mockResolvedValue({ project: { key: 'bar', name: 'Bar' } }) diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/OrganizationInput-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/OrganizationInput-test.tsx index 35ff3d1878e..73e9c75f675 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/OrganizationInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/OrganizationInput-test.tsx @@ -17,14 +17,14 @@ * 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 { OrganizationInput } from '../OrganizationInput'; +import * as React from 'react'; import { - mockRouter, mockOrganization, - mockOrganizationWithAlm + mockOrganizationWithAlm, + mockRouter } from '../../../../helpers/testMocks'; +import { OrganizationInput } from '../OrganizationInput'; const organizations = [mockOrganization(), mockOrganizationWithAlm({ key: 'bar', name: 'Bar' })]; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/RemoteRepositories-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/RemoteRepositories-test.tsx index 213ed1086a0..02258ea81e1 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/RemoteRepositories-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/RemoteRepositories-test.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 { times } from 'lodash'; import { shallow } from 'enzyme'; +import { times } from 'lodash'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import RemoteRepositories from '../RemoteRepositories'; import { getRepositories } from '../../../../api/alm-integration'; import { - mockOrganizationWithAlm, - mockOrganizationWithAdminActions + mockOrganizationWithAdminActions, + mockOrganizationWithAlm } from '../../../../helpers/testMocks'; +import RemoteRepositories from '../RemoteRepositories'; jest.mock('../../../../api/alm-integration', () => ({ getRepositories: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/SetupProjectBox-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/SetupProjectBox-test.tsx index aa0ab623ddf..1c892e7fdb7 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/SetupProjectBox-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/SetupProjectBox-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 { waitAndUpdate, submit } from 'sonar-ui-common/helpers/testUtils'; -import SetupProjectBox from '../SetupProjectBox'; +import * as React from 'react'; +import { submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { provisionProject } from '../../../../api/alm-integration'; import { mockOrganizationWithAlm } from '../../../../helpers/testMocks'; +import SetupProjectBox from '../SetupProjectBox'; jest.mock('../../../../api/alm-integration', () => ({ provisionProject: jest diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/App.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/App.tsx index fcbfb7f0b8d..302aa9dcce7 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/App.tsx @@ -19,17 +19,17 @@ */ import * as React from 'react'; import Helmet from 'react-helmet'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import Header from './Header'; -import List from './List'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { - getCustomMeasures, createCustomMeasure, - updateCustomMeasure, - deleteCustomMeasure + deleteCustomMeasure, + getCustomMeasures, + updateCustomMeasure } from '../../../api/measures'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import Header from './Header'; +import List from './List'; interface Props { component: { key: string }; diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/CreateButton.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/CreateButton.tsx index cb8d5309570..04d04d6a7a5 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/CreateButton.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/CreateButton.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import Form from './Form'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/DeleteForm.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/DeleteForm.tsx index 60d949bdf37..24a61d66639 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/DeleteForm.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/DeleteForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { measure: T.CustomMeasure; diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/Form.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/Form.tsx index f6baaf7697d..cb4c1bb2a62 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/Form.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/Form.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; +import Select from 'sonar-ui-common/components/controls/Select'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import Select from 'sonar-ui-common/components/controls/Select'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getAllMetrics } from '../../../api/metrics'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/Header.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/Header.tsx index 62035962e0f..b0dbb44c931 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/Header.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/Header.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CreateButton from './CreateButton'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/Item.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/Item.tsx index 92ec1433518..fd5379b7ded 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/Item.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/Item.tsx @@ -18,17 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import ActionsDropdown, { ActionsDropdownDivider, ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; +import { isUserActive } from '../../../helpers/users'; import DeleteForm from './DeleteForm'; import Form from './Form'; import MeasureDate from './MeasureDate'; -import { isUserActive } from '../../../helpers/users'; interface Props { measure: T.CustomMeasure; diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/List.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/List.tsx index a2ce72366e9..4d299af24e6 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/List.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/List.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import Item from './Item'; diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/App-test.tsx index 4c51cb2b30d..d853557dea6 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/App-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import App from '../App'; diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/CreateButton-test.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/CreateButton-test.tsx index a4b8f562bcc..05b58960989 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/CreateButton-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/CreateButton-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 { click } from 'sonar-ui-common/helpers/testUtils'; import CreateButton from '../CreateButton'; diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/DeleteForm-test.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/DeleteForm-test.tsx index 60d60ded1e2..fd06820ab9c 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/DeleteForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/DeleteForm-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 DeleteForm from '../DeleteForm'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Form-test.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Form-test.tsx index 9bf5f2ef9e2..4b41ec41a56 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Form-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Form-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 { shallow } from 'enzyme'; -import { change, submit, click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import * as React from 'react'; +import { change, click, submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import Form from '../Form'; jest.mock('../../../../api/metrics', () => ({ diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Header-test.tsx index df4b754e2d9..b022fa50fbf 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Header-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 Header from '../Header'; it('should create new custom measure', () => { diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Item-test.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Item-test.tsx index 667d1f38a88..6565d8e46b0 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Item-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/Item-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 { click } from 'sonar-ui-common/helpers/testUtils'; import Item from '../Item'; diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/List-test.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/List-test.tsx index 05ed9c230b2..1c41fcda096 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/List-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/List-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 List from '../List'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/App.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/App.tsx index effde5c881a..01a69f22265 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/App.tsx @@ -19,21 +19,21 @@ */ import * as React from 'react'; import { Helmet } from 'react-helmet'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import { MetricProps } from './Form'; -import Header from './Header'; -import List from './List'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { + createMetric, + deleteMetric, getMetricDomains, - getMetricTypes, getMetrics, - deleteMetric, - updateMetric, - createMetric, - MetricsResponse + getMetricTypes, + MetricsResponse, + updateMetric } from '../../../api/metrics'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import { MetricProps } from './Form'; +import Header from './Header'; +import List from './List'; interface Props {} diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/CreateButton.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/CreateButton.tsx index 9ff279ed47b..4e84fe96a42 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/CreateButton.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/CreateButton.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import Form, { MetricProps } from './Form'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/DeleteForm.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/DeleteForm.tsx index 577be8f76f8..7e5e8f3f89a 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/DeleteForm.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/DeleteForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { metric: T.Metric; diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/Form.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/Form.tsx index 9a0632a929b..4a7fdf95b6d 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/Form.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/Form.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Select, { Creatable } from 'sonar-ui-common/components/controls/Select'; +import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; export interface MetricProps { description: string; diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/Header.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/Header.tsx index ed13d6e2cbe..15d2bb21220 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/Header.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/Header.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CreateButton from './CreateButton'; import { MetricProps } from './Form'; diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/Item.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/Item.tsx index 6fb601706d3..36cdbb79bf4 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/Item.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/Item.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ActionsDropdown, { ActionsDropdownDivider, ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import DeleteForm from './DeleteForm'; import Form, { MetricProps } from './Form'; diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/List.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/List.tsx index e24a5149696..0f552d14ed3 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/List.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/List.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { MetricProps } from './Form'; import Item from './Item'; diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/App-test.tsx index 3c561277fb5..2085b560496 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/App-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import App from '../App'; diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/CreateButton-test.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/CreateButton-test.tsx index d9280e4cfaa..f19e845ddda 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/CreateButton-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/CreateButton-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 { click } from 'sonar-ui-common/helpers/testUtils'; import CreateButton from '../CreateButton'; diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/DeleteForm-test.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/DeleteForm-test.tsx index e321a01cb4f..3dbb03c9199 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/DeleteForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/DeleteForm-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 DeleteForm from '../DeleteForm'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Form-test.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Form-test.tsx index 1f0fb40904b..75e02ecaff4 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Form-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Form-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 { shallow } from 'enzyme'; -import { change, submit, click } from 'sonar-ui-common/helpers/testUtils'; +import * as React from 'react'; +import { change, click, submit } from 'sonar-ui-common/helpers/testUtils'; import Form from '../Form'; it('should render form', async () => { diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Header-test.tsx index 2b8c2f8bf11..37d7d85cccf 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Header-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 Header from '../Header'; it('should create new metric', () => { diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Item-test.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Item-test.tsx index ec03beee3fa..60a7a099eab 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Item-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/Item-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 { click } from 'sonar-ui-common/helpers/testUtils'; import Item from '../Item'; diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/List-test.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/List-test.tsx index e3b46f22277..441c97c7108 100644 --- a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/List-test.tsx +++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/List-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 List from '../List'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx index b72b72e1815..2cda70e7bb9 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx @@ -17,22 +17,22 @@ * 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 navigationTreeSonarCloud from 'Docs/../static/SonarCloudNavigationTree.json'; +import * as navigationTreeSonarQube from 'Docs/../static/SonarQubeNavigationTree.json'; +import { DocNavigationItem } from 'Docs/@types/types'; import * as React from 'react'; import Helmet from 'react-helmet'; import { Link } from 'react-router'; -import { addSideBarClass, removeSideBarClass } from 'sonar-ui-common/helpers/pages'; -import { DocNavigationItem } from 'Docs/@types/types'; -import * as navigationTreeSonarQube from 'Docs/../static/SonarQubeNavigationTree.json'; -import * as navigationTreeSonarCloud from 'Docs/../static/SonarCloudNavigationTree.json'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Sidebar from './Sidebar'; -import getPages from '../pages'; +import { addSideBarClass, removeSideBarClass } from 'sonar-ui-common/helpers/pages'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import NotFound from '../../../app/components/NotFound'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; import DocMarkdownBlock from '../../../components/docs/DocMarkdownBlock'; import { isSonarCloud } from '../../../helpers/system'; +import getPages from '../pages'; import '../styles.css'; +import Sidebar from './Sidebar'; interface Props { params: { splat?: string }; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/Menu.tsx b/server/sonar-web/src/main/js/apps/documentation/components/Menu.tsx index 07e5c42e5ea..f325730844d 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/Menu.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/Menu.tsx @@ -17,17 +17,17 @@ * 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 { DocNavigationItem } from 'Docs/@types/types'; -import MenuBlock from './MenuBlock'; -import { MenuItem } from './MenuItem'; -import { MenuExternalLink } from './MenuExternalLink'; +import * as React from 'react'; import { + getOpenChainFromPath, isDocsNavigationBlock, - isDocsNavigationExternalLink, - getOpenChainFromPath + isDocsNavigationExternalLink } from '../navTreeUtils'; import { DocumentationEntry, getNodeFromUrl } from '../utils'; +import MenuBlock from './MenuBlock'; +import { MenuExternalLink } from './MenuExternalLink'; +import { MenuItem } from './MenuItem'; interface Props { navigation: DocNavigationItem[]; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/MenuBlock.tsx b/server/sonar-web/src/main/js/apps/documentation/components/MenuBlock.tsx index 1b98a65c07f..42603848845 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/MenuBlock.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/MenuBlock.tsx @@ -17,14 +17,14 @@ * 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 OpenCloseIcon from 'sonar-ui-common/components/icons/OpenCloseIcon'; import * as classNames from 'classnames'; -import { DocsNavigationBlock, DocNavigationItem } from 'Docs/@types/types'; +import { DocNavigationItem, DocsNavigationBlock } from 'Docs/@types/types'; +import * as React from 'react'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import { MenuItem } from './MenuItem'; +import OpenCloseIcon from 'sonar-ui-common/components/icons/OpenCloseIcon'; import { isDocsNavigationBlock } from '../navTreeUtils'; import { DocumentationEntry, getNodeFromUrl } from '../utils'; +import { MenuItem } from './MenuItem'; interface Props { block: DocsNavigationBlock; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/MenuItem.tsx b/server/sonar-web/src/main/js/apps/documentation/components/MenuItem.tsx index 688175c0dc8..efd4c96ad41 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/MenuItem.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/MenuItem.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 { Link } from 'react-router'; import { testPathAgainstUrl } from '../navTreeUtils'; import { DocumentationEntry } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/SearchResultEntry.tsx b/server/sonar-web/src/main/js/apps/documentation/components/SearchResultEntry.tsx index 613616375b1..37a4ba37c4a 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/SearchResultEntry.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/SearchResultEntry.tsx @@ -17,10 +17,10 @@ * 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 { Link } from 'react-router'; -import { highlightMarks, cutWords, DocumentationEntry } from '../utils'; +import { cutWords, DocumentationEntry, highlightMarks } from '../utils'; export interface SearchResult { exactMatch?: boolean; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/SearchResults.tsx b/server/sonar-web/src/main/js/apps/documentation/components/SearchResults.tsx index 251a3ae688c..29f3250897b 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/SearchResults.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/SearchResults.tsx @@ -17,14 +17,14 @@ * 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 lunr, { LunrBuilder, LunrIndex, LunrToken } from 'lunr'; -import { sortBy } from 'lodash'; import { DocNavigationItem } from 'Docs/@types/types'; +import { sortBy } from 'lodash'; +import lunr, { LunrBuilder, LunrIndex, LunrToken } from 'lunr'; +import * as React from 'react'; import { isDefined } from 'sonar-ui-common/helpers/types'; -import SearchResultEntry from './SearchResultEntry'; import { getUrlsList } from '../navTreeUtils'; import { DocumentationEntry } from '../utils'; +import SearchResultEntry from './SearchResultEntry'; interface Props { navigation: DocNavigationItem[]; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/Sidebar.tsx b/server/sonar-web/src/main/js/apps/documentation/components/Sidebar.tsx index f72c057f888..1c4d07dc574 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/Sidebar.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/Sidebar.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 { DocNavigationItem } from 'Docs/@types/types'; +import * as React from 'react'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { DocumentationEntry } from '../utils'; import Menu from './Menu'; import SearchResults from './SearchResults'; -import { DocumentationEntry } from '../utils'; interface Props { navigation: DocNavigationItem[]; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/App-test.tsx index 28c1a97d3b1..aca3d13d404 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/App-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { addSideBarClass, removeSideBarClass } from 'sonar-ui-common/helpers/pages'; -import App from '../App'; import { isSonarCloud } from '../../../../helpers/system'; +import App from '../App'; jest.mock('../../../../components/common/ScreenPositionHelper', () => ({ default: class ScreenPositionHelper extends React.Component<{ diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/Menu-test.tsx b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/Menu-test.tsx index ba3cb93e0a1..a5299bd6a3f 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/Menu-test.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/Menu-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 Menu from '../Menu'; function createPage(title: string, relativeName: string, text = '') { diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuBlock-test.tsx b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuBlock-test.tsx index a1c42e7b001..05b8a994401 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuBlock-test.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuBlock-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 { click } from 'sonar-ui-common/helpers/testUtils'; import MenuBlock from '../MenuBlock'; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuItem-test.tsx b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuItem-test.tsx index 8f3e327a172..66e0d23bf32 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuItem-test.tsx @@ -17,10 +17,10 @@ * 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 { MenuItem } from '../MenuItem'; +import * as React from 'react'; import { DocumentationEntry } from '../../utils'; +import { MenuItem } from '../MenuItem'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/SearchResultEntry-test.tsx b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/SearchResultEntry-test.tsx index a2a805fde19..4884f310c89 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/SearchResultEntry-test.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/SearchResultEntry-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 SearchResultEntry, { SearchResult, SearchResultText, diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/SearchResults-test.tsx b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/SearchResults-test.tsx index 7a55e8c44d0..13d2ee0ef2e 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/SearchResults-test.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/SearchResults-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 { shallow } from 'enzyme'; import lunr from 'lunr'; +import * as React from 'react'; import SearchResults from '../SearchResults'; jest.mock('lunr', () => ({ diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/Sidebar-test.tsx b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/Sidebar-test.tsx index a579e786b47..a630d4a70f6 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/Sidebar-test.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/__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'; function createPage(title: string, relativeName: string, text = '') { diff --git a/server/sonar-web/src/main/js/apps/documentation/navTreeUtils.ts b/server/sonar-web/src/main/js/apps/documentation/navTreeUtils.ts index 963d8a0aedd..eb4371c920f 100644 --- a/server/sonar-web/src/main/js/apps/documentation/navTreeUtils.ts +++ b/server/sonar-web/src/main/js/apps/documentation/navTreeUtils.ts @@ -17,13 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { flatten } from 'lodash'; +import NavigationTree from 'Docs/../static/SonarQubeNavigationTree.json'; import { DocNavigationItem, DocsNavigationBlock, DocsNavigationExternalLink } from 'Docs/@types/types'; -import NavigationTree from 'Docs/../static/SonarQubeNavigationTree.json'; +import { flatten } from 'lodash'; export function getNavTree() { return NavigationTree as DocNavigationItem[]; diff --git a/server/sonar-web/src/main/js/apps/documentation/pages.ts b/server/sonar-web/src/main/js/apps/documentation/pages.ts index ea6ad55a867..b1c9c998941 100644 --- a/server/sonar-web/src/main/js/apps/documentation/pages.ts +++ b/server/sonar-web/src/main/js/apps/documentation/pages.ts @@ -19,9 +19,9 @@ */ import remark from 'remark'; import visit from 'unist-util-visit'; -import { DocumentationEntry, DocumentationEntryScope } from './utils'; +import { filterContent, separateFrontMatter } from '../../helpers/markdown'; import * as Docs from './documentation.directory-loader'; -import { separateFrontMatter, filterContent } from '../../helpers/markdown'; +import { DocumentationEntry, DocumentationEntryScope } from './utils'; export default function getPages(): DocumentationEntry[] { return ((Docs as unknown) as Array<{ content: string; path: string }>).map(file => { diff --git a/server/sonar-web/src/main/js/apps/feedback/downgrade/DowngradeFeedback.tsx b/server/sonar-web/src/main/js/apps/feedback/downgrade/DowngradeFeedback.tsx index 822013c7415..d3222a24ed9 100644 --- a/server/sonar-web/src/main/js/apps/feedback/downgrade/DowngradeFeedback.tsx +++ b/server/sonar-web/src/main/js/apps/feedback/downgrade/DowngradeFeedback.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { WithRouterProps } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import Radio from 'sonar-ui-common/components/controls/Radio'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import { giveDowngradeFeedback } from '../../../api/billing'; import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage'; import './DowngradeFeedback.css'; diff --git a/server/sonar-web/src/main/js/apps/feedback/downgrade/__tests__/DowngradeFeedback-test.tsx b/server/sonar-web/src/main/js/apps/feedback/downgrade/__tests__/DowngradeFeedback-test.tsx index efbaf193e6e..6ed85aa648b 100644 --- a/server/sonar-web/src/main/js/apps/feedback/downgrade/__tests__/DowngradeFeedback-test.tsx +++ b/server/sonar-web/src/main/js/apps/feedback/downgrade/__tests__/DowngradeFeedback-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 { shallow } from 'enzyme'; -import DowngradeFeedback, { LocationState } from '../DowngradeFeedback'; +import * as React from 'react'; import { giveDowngradeFeedback } from '../../../../api/billing'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; +import DowngradeFeedback, { LocationState } from '../DowngradeFeedback'; jest.mock('../../../../api/billing', () => ({ giveDowngradeFeedback: jest.fn() diff --git a/server/sonar-web/src/main/js/apps/groups/components/App.tsx b/server/sonar-web/src/main/js/apps/groups/components/App.tsx index f37c184a35b..67fc1750278 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/App.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { Helmet } from 'react-helmet'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { createGroup, deleteGroup, searchUsersGroups, updateGroup } from '../../../api/user_groups'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import Header from './Header'; import List from './List'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { searchUsersGroups, deleteGroup, updateGroup, createGroup } from '../../../api/user_groups'; interface Props { organization?: Pick<T.Organization, 'key'>; diff --git a/server/sonar-web/src/main/js/apps/groups/components/DeleteForm.tsx b/server/sonar-web/src/main/js/apps/groups/components/DeleteForm.tsx index 703ab3eec94..e8daa6a4038 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/DeleteForm.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/DeleteForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { group: T.Group; diff --git a/server/sonar-web/src/main/js/apps/groups/components/EditMembers.tsx b/server/sonar-web/src/main/js/apps/groups/components/EditMembers.tsx index 5cd8b19ffa8..3d95e47b017 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/EditMembers.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/EditMembers.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import BulletListIcon from 'sonar-ui-common/components/icons/BulletListIcon'; import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; +import BulletListIcon from 'sonar-ui-common/components/icons/BulletListIcon'; import EditMembersModal from './EditMembersModal'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx b/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx index 71ef68106b4..46cee0ddf2a 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx @@ -17,15 +17,15 @@ * 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 { find, without } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import SelectList, { SelectListFilter, SelectListSearchParams } from 'sonar-ui-common/components/controls/SelectList'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { addUserToGroup, getUsersInGroup, removeUserFromGroup } from '../../../api/user_groups'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/groups/components/Form.tsx b/server/sonar-web/src/main/js/apps/groups/components/Form.tsx index 99c4d2ed3a1..634ccf7ec95 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/Form.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/Form.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { confirmButtonText: string; diff --git a/server/sonar-web/src/main/js/apps/groups/components/Header.tsx b/server/sonar-web/src/main/js/apps/groups/components/Header.tsx index 1f76812b7fa..98272aef888 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/Header.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/Header.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import Form from './Form'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/groups/components/List.tsx b/server/sonar-web/src/main/js/apps/groups/components/List.tsx index 798b00fcaf0..89f04764f50 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/List.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/List.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import ListItem from './ListItem'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/ListItem.tsx b/server/sonar-web/src/main/js/apps/groups/components/ListItem.tsx index 00579625222..8638abe8b86 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/ListItem.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/ListItem.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { omitNil } from 'sonar-ui-common/helpers/request'; import ActionsDropdown, { - ActionsDropdownItem, - ActionsDropdownDivider + ActionsDropdownDivider, + ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { omitNil } from 'sonar-ui-common/helpers/request'; import DeleteForm from './DeleteForm'; import EditMembers from './EditMembers'; import Form from './Form'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/App-test.tsx index 1b4a9b972da..2e1f01924a8 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/App-test.tsx @@ -17,17 +17,17 @@ * 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 { mockOrganization } from '../../../../helpers/testMocks'; import { createGroup, deleteGroup, searchUsersGroups, updateGroup } from '../../../../api/user_groups'; +import { mockOrganization } from '../../../../helpers/testMocks'; +import App from '../App'; jest.mock('../../../../api/user_groups', () => ({ createGroup: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/DeleteForm-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/DeleteForm-test.tsx index 1b37f85883f..bc853eb2794 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/DeleteForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/DeleteForm-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 DeleteForm from '../DeleteForm'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx index 2e69b46be3d..bff23ac3655 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-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 { click } from 'sonar-ui-common/helpers/testUtils'; import EditMembers from '../EditMembers'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembersModal-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembersModal-test.tsx index 24e6f464d85..57c33b1e0e5 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembersModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembersModal-test.tsx @@ -21,8 +21,8 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import SelectList, { SelectListFilter } from 'sonar-ui-common/components/controls/SelectList'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import { addUserToGroup, getUsersInGroup, removeUserFromGroup } from '../../../../api/user_groups'; import EditMembersModal from '../EditMembersModal'; -import { getUsersInGroup, addUserToGroup, removeUserFromGroup } from '../../../../api/user_groups'; const organization = 'orga'; const group = { id: 1, name: 'foo', membersCount: 1 }; diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/Form-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/Form-test.tsx index feca1dbee75..0921d58681a 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/Form-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/Form-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 { shallow } from 'enzyme'; -import { change, submit, click } from 'sonar-ui-common/helpers/testUtils'; +import * as React from 'react'; +import { change, click, submit } from 'sonar-ui-common/helpers/testUtils'; import Form from '../Form'; it('should render form', async () => { diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/Header-test.tsx index e8b7228d143..7356cb9e367 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/Header-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 { click } from 'sonar-ui-common/helpers/testUtils'; import Header from '../Header'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/List-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/List-test.tsx index e0295182e39..60d9d76cdcf 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/List-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/List-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 List from '../List'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/ListItem-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/ListItem-test.tsx index e6dc9c48d20..24b088201ef 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/ListItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/ListItem-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 { click } from 'sonar-ui-common/helpers/testUtils'; import ListItem from '../ListItem'; diff --git a/server/sonar-web/src/main/js/apps/issues/IssuesPageSelector.tsx b/server/sonar-web/src/main/js/apps/issues/IssuesPageSelector.tsx index 7846107689a..3efdac73976 100644 --- a/server/sonar-web/src/main/js/apps/issues/IssuesPageSelector.tsx +++ b/server/sonar-web/src/main/js/apps/issues/IssuesPageSelector.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import AppContainer from './components/AppContainer'; -import { isSonarCloud } from '../../helpers/system'; -import { isLoggedIn } from '../../helpers/users'; import { withCurrentUser } from '../../components/hoc/withCurrentUser'; import { Location } from '../../components/hoc/withRouter'; +import { isSonarCloud } from '../../helpers/system'; +import { isLoggedIn } from '../../helpers/users'; +import AppContainer from './components/AppContainer'; export interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesPageSelector-test.tsx b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesPageSelector-test.tsx index 65abdcd1186..3a65e6b0e95 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesPageSelector-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesPageSelector-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 { shallow } from 'enzyme'; -import { IssuesPage, Props } from '../IssuesPageSelector'; -import { mockLocation, mockCurrentUser, mockLoggedInUser } from '../../../helpers/testMocks'; +import * as React from 'react'; import { isSonarCloud } from '../../../helpers/system'; +import { mockCurrentUser, mockLocation, mockLoggedInUser } from '../../../helpers/testMocks'; +import { IssuesPage, Props } from '../IssuesPageSelector'; jest.mock('../../../helpers/system', () => ({ isSonarCloud: jest.fn().mockReturnValue(false) })); diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts b/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts index bead280986a..6028ada5ad9 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { selectFlow, selectLocation } from '../actions'; import { mockIssue } from '../../../helpers/testMocks'; +import { selectFlow, selectLocation } from '../actions'; describe('selectFlow', () => { it('should select flow and enable locations navigator', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts index a50edcdcf1a..fd0cdea3b6c 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts @@ -19,11 +19,11 @@ */ import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; import { - shouldOpenSeverityFacet, - shouldOpenStandardsFacet, scrollToIssue, + shouldOpenSeverityFacet, + shouldOpenSonarSourceSecurityFacet, shouldOpenStandardsChildFacet, - shouldOpenSonarSourceSecurityFacet + shouldOpenStandardsFacet } from '../utils'; jest.mock('sonar-ui-common/helpers/scrolling', () => ({ diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/App.tsx index 4d3262d3fec..8885d0ec8b8 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/App.tsx @@ -17,42 +17,46 @@ * 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 Helmet from 'react-helmet'; import { keyBy, omit, without } from 'lodash'; +import * as React from 'react'; +import Helmet from 'react-helmet'; import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; +import { Button } from 'sonar-ui-common/components/controls/buttons'; +import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; +import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { addSideBarClass, addWhitePageClass, removeSideBarClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; -import { Button } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; -import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import BulkChangeModal, { MAX_PAGE_SIZE } from './BulkChangeModal'; -import IssuesList from './IssuesList'; -import IssuesSourceViewer from './IssuesSourceViewer'; -import MyIssuesFilter from './MyIssuesFilter'; -import NoIssues from './NoIssues'; -import NoMyIssues from './NoMyIssues'; -import PageActions from './PageActions'; -import ConciseIssuesList from '../conciseIssuesList/ConciseIssuesList'; -import ConciseIssuesListHeader from '../conciseIssuesList/ConciseIssuesListHeader'; -import Sidebar from '../sidebar/Sidebar'; +import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import EmptySearch from '../../../components/common/EmptySearch'; import FiltersHeader from '../../../components/common/FiltersHeader'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; -import { withRouter, Location, Router } from '../../../components/hoc/withRouter'; +import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; +import '../../../components/search-navigator.css'; +import { + fillBranchLike, + getBranchLikeQuery, + isPullRequest, + isSameBranchLike, + isShortLivingBranch +} from '../../../helpers/branches'; +import { isSonarCloud } from '../../../helpers/system'; +import { fetchBranchStatus } from '../../../store/rootActions'; import * as actions from '../actions'; +import ConciseIssuesList from '../conciseIssuesList/ConciseIssuesList'; +import ConciseIssuesListHeader from '../conciseIssuesList/ConciseIssuesListHeader'; +import Sidebar from '../sidebar/Sidebar'; +import '../styles.css'; import { areMyIssuesSelected, areQueriesEqual, @@ -67,25 +71,21 @@ import { ReferencedLanguage, ReferencedRule, saveMyIssues, - serializeQuery, - STANDARDS, scrollToIssue, + serializeQuery, shouldOpenSeverityFacet, shouldOpenSonarSourceSecurityFacet, + shouldOpenStandardsChildFacet, shouldOpenStandardsFacet, - shouldOpenStandardsChildFacet + STANDARDS } from '../utils'; -import { - isShortLivingBranch, - isSameBranchLike, - getBranchLikeQuery, - isPullRequest, - fillBranchLike -} from '../../../helpers/branches'; -import { isSonarCloud } from '../../../helpers/system'; -import { fetchBranchStatus } from '../../../store/rootActions'; -import '../../../components/search-navigator.css'; -import '../styles.css'; +import BulkChangeModal, { MAX_PAGE_SIZE } from './BulkChangeModal'; +import IssuesList from './IssuesList'; +import IssuesSourceViewer from './IssuesSourceViewer'; +import MyIssuesFilter from './MyIssuesFilter'; +import NoIssues from './NoIssues'; +import NoMyIssues from './NoMyIssues'; +import PageActions from './PageActions'; interface FetchIssuesPromise { components: ReferencedComponent[]; diff --git a/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx b/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx index 7e806e7fe0f..993cf959687 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx @@ -17,21 +17,21 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { uniq } from 'lodash'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; -import { uniq } from 'lodash'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; import { searchIssues } from '../../../api/issues'; import { getOrganizations } from '../../../api/organizations'; import throwGlobalError from '../../../app/utils/throwGlobalError'; +import { parseIssueFromResponse } from '../../../helpers/issues'; +import { receiveOrganizations } from '../../../store/organizations'; import { - getCurrentUser, areThereCustomOrganizations, + getCurrentUser, getMyOrganizations, Store } from '../../../store/rootReducer'; -import { parseIssueFromResponse } from '../../../helpers/issues'; -import { receiveOrganizations } from '../../../store/organizations'; interface StateProps { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx b/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx index ae679fb59f5..6ed30634422 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx @@ -17,26 +17,26 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { pickBy, sortBy } from 'lodash'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { pickBy, sortBy } from 'lodash'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import Modal from 'sonar-ui-common/components/controls/Modal'; -import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import Modal from 'sonar-ui-common/components/controls/Modal'; import Radio from 'sonar-ui-common/components/controls/Radio'; -import Select from 'sonar-ui-common/components/controls/Select'; import SearchSelect from 'sonar-ui-common/components/controls/SearchSelect'; -import { searchAssignees } from '../utils'; -import Avatar from '../../../components/ui/Avatar'; +import Select from 'sonar-ui-common/components/controls/Select'; +import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { bulkChangeIssues, searchIssueTags } from '../../../api/issues'; +import throwGlobalError from '../../../app/utils/throwGlobalError'; import MarkdownTips from '../../../components/common/MarkdownTips'; import SeverityHelper from '../../../components/shared/SeverityHelper'; -import throwGlobalError from '../../../app/utils/throwGlobalError'; -import { searchIssueTags, bulkChangeIssues } from '../../../api/issues'; +import Avatar from '../../../components/ui/Avatar'; import { isLoggedIn, isUserActive } from '../../../helpers/users'; +import { searchAssignees } from '../utils'; interface AssigneeOption { avatar?: string; diff --git a/server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx b/server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx index 1956aec1595..314e61b6594 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { collapsePath, limitComponentName } from 'sonar-ui-common/helpers/path'; -import { getSelectedLocation } from '../utils'; import Organization from '../../../components/shared/Organization'; +import { getSelectedLocation } from '../utils'; interface Props { component?: T.Component; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesList.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesList.tsx index 66fec76a000..ed378927511 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesList.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesList.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ListItem from './ListItem'; import { Query, scrollToIssue } from '../utils'; +import ListItem from './ListItem'; interface Props { branchLike: T.BranchLike | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx index ec5f83e8400..81f3f2621bc 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.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 { uniq } from 'lodash'; +import * as React from 'react'; import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; -import { getLocations, getSelectedLocation } from '../utils'; -import CrossComponentSourceViewer from '../crossComponentSourceViewer/CrossComponentSourceViewer'; import SourceViewer from '../../../components/SourceViewer/SourceViewer'; +import CrossComponentSourceViewer from '../crossComponentSourceViewer/CrossComponentSourceViewer'; +import { getLocations, getSelectedLocation } from '../utils'; interface Props { branchLike: T.BranchLike | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/components/ListItem.tsx b/server/sonar-web/src/main/js/apps/issues/components/ListItem.tsx index 91cbcd95e15..d8aa5380053 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/ListItem.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/ListItem.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ComponentBreadcrumbs from './ComponentBreadcrumbs'; -import { Query } from '../utils'; import Issue from '../../../components/issue/Issue'; +import { Query } from '../utils'; +import ComponentBreadcrumbs from './ComponentBreadcrumbs'; interface Props { branchLike: T.BranchLike | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/components/MyIssuesFilter.tsx b/server/sonar-web/src/main/js/apps/issues/components/MyIssuesFilter.tsx index 82dc0989d09..353fa7b1489 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/MyIssuesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/MyIssuesFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { myIssues: boolean; diff --git a/server/sonar-web/src/main/js/apps/issues/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/issues/components/PageActions.tsx index d5eabf5aa3a..0ca13c98a64 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/PageActions.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ReloadButton from 'sonar-ui-common/components/controls/ReloadButton'; -import IssuesCounter from './IssuesCounter'; -import TotalEffort from './TotalEffort'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import HomePageSelect from '../../../components/controls/HomePageSelect'; import { isSonarCloud } from '../../../helpers/system'; +import IssuesCounter from './IssuesCounter'; +import TotalEffort from './TotalEffort'; interface Props { canSetHome: boolean; diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/App-test.tsx index 8909ef98427..f3edf2be346 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/App-test.tsx @@ -17,28 +17,28 @@ * 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 handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; -import { waitAndUpdate, KEYCODE_MAP, keydown } from 'sonar-ui-common/helpers/testUtils'; -import { App } from '../App'; +import { KEYCODE_MAP, keydown, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { - mockLoggedInUser, - mockRouter, + mockComponent, + mockCurrentUser, + mockEvent, mockIssue, mockLocation, - mockEvent, - mockCurrentUser, + mockLoggedInUser, mockPullRequest, - mockComponent + mockRouter } from '../../../../helpers/testMocks'; import { enableLocationsNavigator, - selectNextLocation, - selectPreviousLocation, selectNextFlow, - selectPreviousFlow + selectNextLocation, + selectPreviousFlow, + selectPreviousLocation } from '../../actions'; +import { App } from '../App'; jest.mock('sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ default: jest.fn() diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-test.tsx index 67d19818468..3803de3e021 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import BulkChangeModal, { MAX_PAGE_SIZE } from '../BulkChangeModal'; import { mockIssue } from '../../../../helpers/testMocks'; +import BulkChangeModal, { MAX_PAGE_SIZE } from '../BulkChangeModal'; jest.mock('../../../../api/issues', () => ({ searchIssueTags: () => Promise.resolve([undefined, []]) diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/ComponentBreadcrumbs-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/ComponentBreadcrumbs-test.tsx index c5500568c95..a17b886a846 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/ComponentBreadcrumbs-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/ComponentBreadcrumbs-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 ComponentBreadcrumbs from '../ComponentBreadcrumbs'; const baseIssue = { diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesContainer-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesContainer-test.tsx index 6582bbc41d8..38030a9532a 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesContainer-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 IssuesCounter from '../IssuesCounter'; it('formats numbers', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesList-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesList-test.tsx index 6311073e38b..5ed72f1b851 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesList-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesList-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import IssuesList from '../IssuesList'; import { mockIssue } from '../../../../helpers/testMocks'; +import IssuesList from '../IssuesList'; it('should render correctly', async () => { jest.useFakeTimers(); diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesSourceViewer-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesSourceViewer-test.tsx index 47580bcf048..9e96ee51066 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesSourceViewer-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesSourceViewer-test.tsx @@ -17,10 +17,10 @@ * 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 { mockIssue, mockMainBranch } from '../../../../helpers/testMocks'; import IssuesSourceViewer from '../IssuesSourceViewer'; -import { mockMainBranch, mockIssue } from '../../../../helpers/testMocks'; it('should render SourceViewer correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/LocationNavigationKeyboardShortcuts-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/LocationNavigationKeyboardShortcuts-test.tsx index 75d37689718..0da2efe7ae9 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/LocationNavigationKeyboardShortcuts-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/LocationNavigationKeyboardShortcuts-test.tsx @@ -17,10 +17,10 @@ * 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 LocationNavigationKeyboardShortcuts, { Props } from '../LocationNavigationKeyboardShortcuts'; +import * as React from 'react'; import { mockFlowLocation } from '../../../../helpers/testMocks'; +import LocationNavigationKeyboardShortcuts, { Props } from '../LocationNavigationKeyboardShortcuts'; it('should render correctly', () => { expect(shallowRender().type()).toBeNull(); diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/PageActions-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/PageActions-test.tsx index e6040cd2e92..1e3d8c7bbb7 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/PageActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/PageActions-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 PageActions from '../PageActions'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/TotalEffort-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/TotalEffort-test.tsx index c0974942095..7be044ee0d6 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/TotalEffort-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/TotalEffort-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 TotalEffort from '../TotalEffort'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueBox.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueBox.tsx index 7ac678ccca1..98c9117fca8 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueBox.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueBox.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 * as classNames from 'classnames'; +import * as React from 'react'; +import TypeHelper from '../../../components/shared/TypeHelper'; +import LocationNavigationKeyboardShortcuts from '../components/LocationNavigationKeyboardShortcuts'; import ConciseIssueLocations from './ConciseIssueLocations'; import ConciseIssueLocationsNavigator from './ConciseIssueLocationsNavigator'; -import LocationNavigationKeyboardShortcuts from '../components/LocationNavigationKeyboardShortcuts'; -import TypeHelper from '../../../components/shared/TypeHelper'; interface Props { issue: T.Issue; diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.tsx index 29610ab6b1c..2d850d4097a 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import LocationIndex from '../../../components/common/LocationIndex'; diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigator.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigator.tsx index 0def805f2fa..c62edc05a82 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigator.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigator.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 { uniq } from 'lodash'; +import * as React from 'react'; +import { getLocations } from '../utils'; import ConciseIssueLocationsNavigatorLocation from './ConciseIssueLocationsNavigatorLocation'; import CrossFileLocationsNavigator from './CrossFileLocationsNavigator'; -import { getLocations } from '../utils'; interface Props { issue: Pick<T.Issue, 'component' | 'key' | 'flows' | 'secondaryLocations' | 'type'>; diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/CrossFileLocationsNavigator.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/CrossFileLocationsNavigator.tsx index 75a40d84b71..20697df830c 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/CrossFileLocationsNavigator.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/CrossFileLocationsNavigator.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { collapsePath } from 'sonar-ui-common/helpers/path'; import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { collapsePath } from 'sonar-ui-common/helpers/path'; import ConciseIssueLocationsNavigatorLocation from './ConciseIssueLocationsNavigatorLocation'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssue-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssue-test.tsx index 0bde1677151..9305f3a8d91 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssue-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssue-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 ConciseIssue from '../ConciseIssue'; const issue: T.Issue = { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueBox-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueBox-test.tsx index 3bd98700da9..404dcd39c45 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueBox-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueBox-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 { shallow } from 'enzyme'; -import { waitAndUpdate, click } from 'sonar-ui-common/helpers/testUtils'; -import ConciseIssueBox from '../ConciseIssueBox'; +import * as React from 'react'; +import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { mockIssue } from '../../../../helpers/testMocks'; +import ConciseIssueBox from '../ConciseIssueBox'; it('should render correctly', async () => { const onClick = jest.fn(); diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueComponent-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueComponent-test.tsx index 778abc0614d..a097ede876e 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueComponent-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueComponent-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 ConciseIssueComponent from '../ConciseIssueComponent'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationBadge-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationBadge-test.tsx index 7a3931c2958..644796dea35 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationBadge-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationBadge-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 ConciseIssueLocationBadge from '../ConciseIssueLocationBadge'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocations-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocations-test.tsx index 4f4ac181730..6cc8b07c1b1 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocations-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocations-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 ConciseIssueLocations from '../ConciseIssueLocations'; const textRange = { startLine: 1, startOffset: 1, endLine: 1, endOffset: 1 }; diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationsNavigator-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationsNavigator-test.tsx index 28da9ead72b..e07123b73ae 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationsNavigator-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationsNavigator-test.tsx @@ -17,10 +17,10 @@ * 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 ConciseIssueLocationsNavigator from '../ConciseIssueLocationsNavigator'; +import * as React from 'react'; import { mockIssue } from '../../../../helpers/testMocks'; +import ConciseIssueLocationsNavigator from '../ConciseIssueLocationsNavigator'; const location1: T.FlowLocation = { component: 'foo', diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationsNavigatorLocation-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationsNavigatorLocation-test.tsx index c95ff1112e9..677dd2f99df 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationsNavigatorLocation-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueLocationsNavigatorLocation-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 ConciseIssueLocationsNavigatorLocation from '../ConciseIssueLocationsNavigatorLocation'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssuesList-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssuesList-test.tsx index 0dd6975f6a8..228b57152fe 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssuesList-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssuesList-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 ConciseIssuesList from '../ConciseIssuesList'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/CrossFileLocationsNavigator-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/CrossFileLocationsNavigator-test.tsx index e1b9ec81dd8..451c76ee197 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/CrossFileLocationsNavigator-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/CrossFileLocationsNavigator-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 { click } from 'sonar-ui-common/helpers/testUtils'; import CrossFileLocationsNavigator from '../CrossFileLocationsNavigator'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetViewer.tsx index 90332683273..0093e08ea02 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetViewer.tsx @@ -17,21 +17,21 @@ * 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 { getSources } from '../../../api/components'; +import getCoverageStatus from '../../../components/SourceViewer/helpers/getCoverageStatus'; +import { locationsByLine } from '../../../components/SourceViewer/helpers/indexing'; +import SourceViewerHeaderSlim from '../../../components/SourceViewer/SourceViewerHeaderSlim'; +import { getBranchLikeQuery } from '../../../helpers/branches'; +import SnippetViewer from './SnippetViewer'; import { createSnippets, expandSnippet, EXPAND_BY_LINES, - MERGE_DISTANCE, - linesForSnippets + linesForSnippets, + MERGE_DISTANCE } from './utils'; -import SnippetViewer from './SnippetViewer'; -import SourceViewerHeaderSlim from '../../../components/SourceViewer/SourceViewerHeaderSlim'; -import getCoverageStatus from '../../../components/SourceViewer/helpers/getCoverageStatus'; -import { getSources } from '../../../api/components'; -import { locationsByLine } from '../../../components/SourceViewer/helpers/indexing'; -import { getBranchLikeQuery } from '../../../helpers/branches'; interface Props { branchLike: T.BranchLike | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx index 49376aafc48..41bcaf7335a 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx @@ -19,23 +19,23 @@ */ import * as React from 'react'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import ComponentSourceSnippetViewer from './ComponentSourceSnippetViewer'; -import { groupLocationsByComponent } from './utils'; -import DuplicationPopup from '../../../components/SourceViewer/components/DuplicationPopup'; -import { SourceViewerContext } from '../../../components/SourceViewer/SourceViewerContext'; -import { WorkspaceContext } from '../../../components/workspace/context'; +import { getDuplications } from '../../../api/components'; import { getIssueFlowSnippets } from '../../../api/issues'; +import DuplicationPopup from '../../../components/SourceViewer/components/DuplicationPopup'; import { filterDuplicationBlocksByLine, - isDuplicationBlockInRemovedComponent, - getDuplicationBlocksForIndex + getDuplicationBlocksForIndex, + isDuplicationBlockInRemovedComponent } from '../../../components/SourceViewer/helpers/duplications'; import { duplicationsByLine, issuesByComponentAndLine } from '../../../components/SourceViewer/helpers/indexing'; -import { getDuplications } from '../../../api/components'; +import { SourceViewerContext } from '../../../components/SourceViewer/SourceViewerContext'; +import { WorkspaceContext } from '../../../components/workspace/context'; import { getBranchLikeQuery } from '../../../helpers/branches'; +import ComponentSourceSnippetViewer from './ComponentSourceSnippetViewer'; +import { groupLocationsByComponent } from './utils'; interface Props { branchLike: T.Branch | T.PullRequest | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx index 91ded7f72fd..a932293f62b 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx @@ -20,17 +20,17 @@ import * as React from 'react'; import classNames from 'classnames'; import ExpandSnippetIcon from 'sonar-ui-common/components/icons/ExpandSnippetIcon'; -import { scrollHorizontally } from 'sonar-ui-common/helpers/scrolling'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { inSnippet, LINES_BELOW_LAST } from './utils'; +import { scrollHorizontally } from 'sonar-ui-common/helpers/scrolling'; import Line from '../../../components/SourceViewer/components/Line'; import { symbolsByLine } from '../../../components/SourceViewer/helpers/indexing'; import { getSecondaryIssueLocationsForLine } from '../../../components/SourceViewer/helpers/issueLocations'; import { - optimizeLocationMessage, optimizeHighlightedSymbols, + optimizeLocationMessage, optimizeSelectedIssue } from '../../../components/SourceViewer/helpers/lines'; +import { inSnippet, LINES_BELOW_LAST } from './utils'; interface Props { branchLike: T.BranchLike | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/ComponentSourceSnippetViewer-test.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/ComponentSourceSnippetViewer-test.tsx index 0b78f105f23..b4c433d478b 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/ComponentSourceSnippetViewer-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/ComponentSourceSnippetViewer-test.tsx @@ -17,21 +17,21 @@ * 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, mount, ReactWrapper } from 'enzyme'; +import { mount, ReactWrapper, shallow } from 'enzyme'; import { times } from 'lodash'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import ComponentSourceSnippetViewer from '../ComponentSourceSnippetViewer'; +import { getSources } from '../../../../api/components'; import { - mockMainBranch, - mockIssue, - mockSourceViewerFile, mockFlowLocation, + mockIssue, + mockMainBranch, + mockShortLivingBranch, mockSnippetsByComponent, mockSourceLine, - mockShortLivingBranch + mockSourceViewerFile } from '../../../../helpers/testMocks'; -import { getSources } from '../../../../api/components'; +import ComponentSourceSnippetViewer from '../ComponentSourceSnippetViewer'; jest.mock('../../../../api/components', () => ({ getSources: jest.fn().mockResolvedValue([]) diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/CrossComponentSourceViewerWrapper-test.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/CrossComponentSourceViewerWrapper-test.tsx index d0032b09b4b..d3942849c75 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/CrossComponentSourceViewerWrapper-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/CrossComponentSourceViewerWrapper-test.tsx @@ -17,10 +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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import CrossComponentSourceViewerWrapper from '../CrossComponentSourceViewerWrapper'; +import { getDuplications } from '../../../../api/components'; +import { getIssueFlowSnippets } from '../../../../api/issues'; import { mockFlowLocation, mockIssue, @@ -28,8 +29,7 @@ import { mockSourceLine, mockSourceViewerFile } from '../../../../helpers/testMocks'; -import { getIssueFlowSnippets } from '../../../../api/issues'; -import { getDuplications } from '../../../../api/components'; +import CrossComponentSourceViewerWrapper from '../CrossComponentSourceViewerWrapper'; jest.mock('../../../../api/issues', () => { const { mockSnippetsByComponent } = require.requireActual('../../../../helpers/testMocks'); diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx index 2424539c41a..ef8e495d61f 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.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 { range } from 'lodash'; import { shallow } from 'enzyme'; -import SnippetViewer from '../SnippetViewer'; +import { range } from 'lodash'; +import * as React from 'react'; import { - mockSourceViewerFile, - mockMainBranch, mockIssue, - mockSourceLine + mockMainBranch, + mockSourceLine, + mockSourceViewerFile } from '../../../../helpers/testMocks'; +import SnippetViewer from '../SnippetViewer'; it('should render correctly', () => { const snippet = range(5, 8).map(line => mockSourceLine({ line })); diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/utils-test.ts index 7f93c687f3a..7d17cb3d81c 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__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 { groupLocationsByComponent, createSnippets, expandSnippet } from '../utils'; import { mockFlowLocation, mockSnippetsByComponent } from '../../../../helpers/testMocks'; +import { createSnippets, expandSnippet, groupLocationsByComponent } from '../utils'; describe('groupLocationsByComponent', () => { it('should handle empty args', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/redirects.ts b/server/sonar-web/src/main/js/apps/issues/redirects.ts index 6c5a2325125..e79d6e47685 100644 --- a/server/sonar-web/src/main/js/apps/issues/redirects.ts +++ b/server/sonar-web/src/main/js/apps/issues/redirects.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { Location } from 'sonar-ui-common/helpers/urls'; -import { parseQuery, areMyIssuesSelected, serializeQuery } from './utils'; +import { areMyIssuesSelected, parseQuery, serializeQuery } from './utils'; function parseHash(hash: string) { const query: T.RawQuery = {}; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx index 95c4446ff8d..76c93284a5f 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx @@ -17,14 +17,14 @@ * 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 { omit, sortBy, without } from 'lodash'; -import { highlightTerm } from 'sonar-ui-common/helpers/search'; +import * as React from 'react'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { searchAssignees, Query, Facet } from '../utils'; -import Avatar from '../../../components/ui/Avatar'; +import { highlightTerm } from 'sonar-ui-common/helpers/search'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import Avatar from '../../../components/ui/Avatar'; import { isUserActive } from '../../../helpers/users'; +import { Facet, Query, searchAssignees } from '../utils'; interface Props { assigned: boolean; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.tsx index 461e19f38fb..278112aab83 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.tsx @@ -17,13 +17,13 @@ * 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 { omit } from 'lodash'; -import { highlightTerm } from 'sonar-ui-common/helpers/search'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Query, Facet } from '../utils'; -import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import { highlightTerm } from 'sonar-ui-common/helpers/search'; import { searchIssueAuthors } from '../../../api/issues'; +import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import { Facet, Query } from '../utils'; interface Props { component: T.Component | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx index c390a1ce08a..024ffc8b6fc 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx @@ -17,22 +17,22 @@ * 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 isSameDay from 'date-fns/is_same_day'; import { max } from 'lodash'; -import { injectIntl, InjectedIntlProps } from 'react-intl'; +import * as React from 'react'; +import { InjectedIntlProps, injectIntl } from 'react-intl'; import BarChart from 'sonar-ui-common/components/charts/BarChart'; import { parseDate } from 'sonar-ui-common/helpers/dates'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import { Query } from '../utils'; +import DateRangeInput from '../../../components/controls/DateRangeInput'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import { longFormatterOption } from '../../../components/intl/DateFormatter'; import DateFromNow from '../../../components/intl/DateFromNow'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; -import DateRangeInput from '../../../components/controls/DateRangeInput'; +import { Query } from '../utils'; interface Props { component: T.Component | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx index a6818b86abc..3eb7246ae1f 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx @@ -17,15 +17,15 @@ * 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 { omit } from 'lodash'; +import * as React from 'react'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { collapsePath } from 'sonar-ui-common/helpers/path'; import { highlightTerm } from 'sonar-ui-common/helpers/search'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Query, Facet } from '../utils'; -import ListStyleFacet from '../../../components/facet/ListStyleFacet'; import { getTree, TreeComponent } from '../../../api/components'; +import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import { Facet, Query } from '../utils'; interface Props { componentKey: string; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx index 0ed7b7e3df6..6b3a11ba383 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx @@ -17,15 +17,15 @@ * 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 { omit } from 'lodash'; +import * as React from 'react'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { collapsePath } from 'sonar-ui-common/helpers/path'; import { highlightTerm } from 'sonar-ui-common/helpers/search'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Query, ReferencedComponent, Facet } from '../utils'; -import { TreeComponent, getTree } from '../../../api/components'; +import { getTree, TreeComponent } from '../../../api/components'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import { Facet, Query, ReferencedComponent } from '../utils'; interface Props { componentKey: string; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx index 09c7fb58203..f6ff1cd9849 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { omit, uniqBy } from 'lodash'; import * as React from 'react'; -import { uniqBy, omit } from 'lodash'; import { connect } from 'react-redux'; -import { highlightTerm } from 'sonar-ui-common/helpers/search'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { highlightTerm } from 'sonar-ui-common/helpers/search'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import { Query, ReferencedLanguage, Facet } from '../utils'; import { getLanguages, Store } from '../../../store/rootReducer'; +import { Facet, Query, ReferencedLanguage } from '../utils'; interface InstalledLanguage { key: string; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx index d850aa896e5..b14b6052b60 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { omit } from 'lodash'; import * as React from 'react'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; -import { omit } from 'lodash'; -import { highlightTerm } from 'sonar-ui-common/helpers/search'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { highlightTerm } from 'sonar-ui-common/helpers/search'; +import { getTree, searchProjects } from '../../../api/components'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import { Query, ReferencedComponent, Facet } from '../utils'; -import { searchProjects, getTree } from '../../../api/components'; import Organization from '../../../components/shared/Organization'; +import { Facet, Query, ReferencedComponent } from '../utils'; interface Props { component: T.Component | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ResolutionFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ResolutionFacet.tsx index d57abd81a69..d59d70f4dd9 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ResolutionFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ResolutionFacet.tsx @@ -17,15 +17,15 @@ * 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 { orderBy, without } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { formatFacetStat, Query } from '../utils'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; +import { formatFacetStat, Query } from '../utils'; interface Props { fetching: boolean; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.tsx index 1732e5270ca..4a28e770859 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.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 { omit } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import { Query, ReferencedRule, Facet } from '../utils'; import { searchRules } from '../../../api/rules'; +import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import { Facet, Query, ReferencedRule } from '../utils'; interface Props { fetching: boolean; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/SeverityFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/SeverityFacet.tsx index bbd1920b9df..ea46dab51dd 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/SeverityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/SeverityFacet.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 { orderBy, without } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { formatFacetStat, Query } from '../utils'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; -import SeverityHelper from '../../../components/shared/SeverityHelper'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; +import SeverityHelper from '../../../components/shared/SeverityHelper'; +import { formatFacetStat, Query } from '../utils'; interface Props { fetching: boolean; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx index ade6f7080b8..ba3e4c6c88c 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Facet, Query, ReferencedComponent, ReferencedLanguage, ReferencedRule } from '../utils'; import AssigneeFacet from './AssigneeFacet'; import AuthorFacet from './AuthorFacet'; import CreationDateFacet from './CreationDateFacet'; @@ -32,7 +33,6 @@ import StandardFacet from './StandardFacet'; import StatusFacet from './StatusFacet'; import TagFacet from './TagFacet'; import TypeFacet from './TypeFacet'; -import { Query, Facet, ReferencedComponent, ReferencedLanguage, ReferencedRule } from '../utils'; export interface Props { component: T.Component | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx index ead34843711..c00e5329e16 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { omit, sortBy, without } from 'lodash'; import * as React from 'react'; -import { sortBy, without, omit } from 'lodash'; -import { highlightTerm } from 'sonar-ui-common/helpers/search'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { highlightTerm } from 'sonar-ui-common/helpers/search'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; @@ -34,7 +34,7 @@ import { renderSansTop25Category, renderSonarSourceSecurityCategory } from '../../../helpers/security-standard'; -import { Query, STANDARDS, formatFacetStat, Facet } from '../utils'; +import { Facet, formatFacetStat, Query, STANDARDS } from '../utils'; interface Props { cwe: string[]; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx index dda16cd4290..47a9264b055 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.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 { orderBy, without } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { formatFacetStat, Query } from '../utils'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; -import StatusHelper from '../../../components/shared/StatusHelper'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; +import StatusHelper from '../../../components/shared/StatusHelper'; +import { formatFacetStat, Query } from '../utils'; interface Props { fetching: boolean; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx index 4907edc42a2..209e606ade9 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { omit } from 'lodash'; import * as React from 'react'; import TagsIcon from 'sonar-ui-common/components/icons/TagsIcon'; -import { omit } from 'lodash'; -import { highlightTerm } from 'sonar-ui-common/helpers/search'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Query, Facet } from '../utils'; +import { highlightTerm } from 'sonar-ui-common/helpers/search'; import { searchIssueTags } from '../../../api/issues'; import { colors } from '../../../app/theme'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import { Facet, Query } from '../utils'; interface Props { component: T.Component | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.tsx index e10e8ed51b5..ff4885ad4ea 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.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 { orderBy, without } from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; -import { orderBy, without } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; import NewsBox from 'sonar-ui-common/components/ui/NewsBox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; -import { formatFacetStat, Query } from '../utils'; +import { ISSUE_TYPES } from '../../../helpers/constants'; import { getCurrentUser, getCurrentUserSetting, Store } from '../../../store/rootReducer'; import { setCurrentUserSetting } from '../../../store/users'; -import { ISSUE_TYPES } from '../../../helpers/constants'; +import { formatFacetStat, Query } from '../utils'; interface Props { fetching: boolean; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/AssigneeFacet-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/AssigneeFacet-test.tsx index 4ce377cd1be..6529d30e529 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/AssigneeFacet-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/AssigneeFacet-test.tsx @@ -17,10 +17,10 @@ * 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 AssigneeFacet from '../AssigneeFacet'; +import * as React from 'react'; import { Query } from '../../utils'; +import AssigneeFacet from '../AssigneeFacet'; jest.mock('../../../../store/rootReducer', () => ({})); diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/Sidebar-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/Sidebar-test.tsx index aaacb3ecc80..49997922475 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/Sidebar-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/Sidebar-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 { shallow, ShallowWrapper } from 'enzyme'; import { flatten } from 'lodash'; -import Sidebar, { Props } from '../Sidebar'; +import * as React from 'react'; import { Query } from '../../utils'; +import Sidebar, { Props } from '../Sidebar'; jest.mock('../../../../store/rootReducer', () => ({})); diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StandardFacet-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StandardFacet-test.tsx index c63b7e16743..090aa647fed 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StandardFacet-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StandardFacet-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 { click } from 'sonar-ui-common/helpers/testUtils'; -import StandardFacet from '../StandardFacet'; -import { Query } from '../../utils'; import { getStandards } from '../../../../helpers/security-standard'; +import { Query } from '../../utils'; +import StandardFacet from '../StandardFacet'; jest.mock('../../../../helpers/security-standard', () => ({ ...require.requireActual('../../../../helpers/security-standard'), diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx index 73fe8ca3029..a9d5beadcb1 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-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 { click } from 'sonar-ui-common/helpers/testUtils'; import StatusFacet from '../StatusFacet'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/TypeFacet-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/TypeFacet-test.tsx index 52344512ea9..1fe75f2c67d 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/TypeFacet-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/TypeFacet-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 { click } from 'sonar-ui-common/helpers/testUtils'; import { TypeFacet } from '../TypeFacet'; diff --git a/server/sonar-web/src/main/js/apps/issues/utils.ts b/server/sonar-web/src/main/js/apps/issues/utils.ts index 8e98b7919cb..2b8cf29ed89 100644 --- a/server/sonar-web/src/main/js/apps/issues/utils.ts +++ b/server/sonar-web/src/main/js/apps/issues/utils.ts @@ -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 { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { - queriesEqual, cleanQuery, - parseAsBoolean, parseAsArray, + parseAsBoolean, + parseAsDate, parseAsString, + queriesEqual, + serializeDateShort, serializeString, - serializeStringArray, - parseAsDate, - serializeDateShort + serializeStringArray } from 'sonar-ui-common/helpers/query'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; import { get, save } from 'sonar-ui-common/helpers/storage'; import { searchMembers } from '../../api/organizations'; diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx index 75a83ccc176..8a5b462d0a4 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx @@ -17,17 +17,17 @@ * 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 Helmet from 'react-helmet'; import { FormattedMessage } from 'react-intl'; +import { Button } from 'sonar-ui-common/components/controls/buttons'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl, getReturnUrl } from 'sonar-ui-common/helpers/urls'; -import { Button } from 'sonar-ui-common/components/controls/buttons'; import { getMigrationStatus, getSystemStatus, migrateDatabase } from '../../../api/system'; +import InstanceMessage from '../../../components/common/InstanceMessage'; import DateFromNow from '../../../components/intl/DateFromNow'; import TimeFormatter from '../../../components/intl/TimeFormatter'; -import InstanceMessage from '../../../components/common/InstanceMessage'; import { isSonarCloud } from '../../../helpers/system'; import '../styles.css'; diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/App-test.tsx index 2a6e2636c1c..af233c795b8 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/App-test.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import App from '../App'; +import * as React from 'react'; import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import App from '../App'; jest.mock('../../../../api/system', () => ({ getMigrationStatus: jest.fn(), diff --git a/server/sonar-web/src/main/js/apps/marketplace/App.tsx b/server/sonar-web/src/main/js/apps/marketplace/App.tsx index 78aea8ccad8..a21f283ed69 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/App.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/App.tsx @@ -17,27 +17,27 @@ * 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 { sortBy, uniqBy } from 'lodash'; +import * as React from 'react'; import Helmet from 'react-helmet'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Header from './Header'; -import EditionBoxes from './EditionBoxes'; -import Footer from './Footer'; -import PluginsList from './PluginsList'; -import Search from './Search'; -import { filterPlugins, parseQuery, Query, serializeQuery } from './utils'; -import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; import { getAvailablePlugins, + getInstalledPlugins, getInstalledPluginsWithUpdates, getPluginUpdates, Plugin, - PluginPendingResult, - getInstalledPlugins + PluginPendingResult } from '../../api/plugins'; -import { withRouter, Location, Router } from '../../components/hoc/withRouter'; +import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; +import { Location, Router, withRouter } from '../../components/hoc/withRouter'; +import EditionBoxes from './EditionBoxes'; +import Footer from './Footer'; +import Header from './Header'; +import PluginsList from './PluginsList'; +import Search from './Search'; import './style.css'; +import { filterPlugins, parseQuery, Query, serializeQuery } from './utils'; export interface Props { currentEdition?: T.EditionKey; diff --git a/server/sonar-web/src/main/js/apps/marketplace/AppContainer.tsx b/server/sonar-web/src/main/js/apps/marketplace/AppContainer.tsx index df33131b6ae..bf9d761eed9 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/AppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/AppContainer.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import App from './App'; -import { getAppState, getGlobalSettingValue, Store } from '../../store/rootReducer'; import AdminContext from '../../app/components/AdminContext'; +import { getAppState, getGlobalSettingValue, Store } from '../../store/rootReducer'; +import App from './App'; interface OwnProps { location: { pathname: string; query: T.RawQuery }; diff --git a/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx b/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx index 0f388606982..0f0cf9c21a7 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { getMarketplaceNavigation } from '../../api/nav'; import EditionBox from './components/EditionBox'; import { EDITIONS } from './utils'; -import { getMarketplaceNavigation } from '../../api/nav'; export interface Props { currentEdition?: T.EditionKey; diff --git a/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx b/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx index e32c877e4f0..b94c5336380 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Plugin, PluginPending } from '../../api/plugins'; import PluginAvailable from './components/PluginAvailable'; import PluginInstalled from './components/PluginInstalled'; import { isPluginAvailable, isPluginInstalled } from './utils'; -import { Plugin, PluginPending } from '../../api/plugins'; interface Props { plugins: Plugin[]; diff --git a/server/sonar-web/src/main/js/apps/marketplace/Search.tsx b/server/sonar-web/src/main/js/apps/marketplace/Search.tsx index 2d7a885cdfc..dd8bc9310c4 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/Search.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/Search.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; import RadioToggle from 'sonar-ui-common/components/controls/RadioToggle'; +import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Query } from './utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/marketplace/__tests__/EditionBoxes-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/__tests__/EditionBoxes-test.tsx index b7134779e7e..5a3091c8670 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/__tests__/EditionBoxes-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/__tests__/EditionBoxes-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 EditionBoxes from '../EditionBoxes'; import { EditionKey } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/__tests__/Footer-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/__tests__/Footer-test.tsx index aff89ab8283..e17ca61c541 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/__tests__/Footer-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/__tests__/Footer-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 Footer from '../Footer'; it('should display the number of plugins', () => { diff --git a/server/sonar-web/src/main/js/apps/marketplace/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/__tests__/Header-test.tsx index 998228ca90e..9c2a9700454 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/__tests__/Header-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 Header from '../Header'; import { EditionKey } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx index bf90ce5a917..a4cd935eca9 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.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 tooltipDCE from 'Docs/tooltips/editions/datacenter.md'; import tooltipDE from 'Docs/tooltips/editions/developer.md'; import tooltipEE from 'Docs/tooltips/editions/enterprise.md'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Edition, getEditionUrl } from '../utils'; const DocMarkdownBlock = lazyLoad(() => import('../../../components/docs/DocMarkdownBlock')); diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/LicensePromptModal.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/LicensePromptModal.tsx index d01fb6af074..f3a104628cd 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/LicensePromptModal.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/LicensePromptModal.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx index 5ed93ff0ac5..8697d29d5ea 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import CheckIcon from 'sonar-ui-common/components/icons/CheckIcon'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; -import PluginUpdateButton from './PluginUpdateButton'; +import CheckIcon from 'sonar-ui-common/components/icons/CheckIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { installPlugin, Plugin, uninstallPlugin, updatePlugin } from '../../../api/plugins'; import { isPluginAvailable, isPluginInstalled } from '../utils'; -import { Plugin, installPlugin, updatePlugin, uninstallPlugin } from '../../../api/plugins'; +import PluginUpdateButton from './PluginUpdateButton'; interface Props { plugin: Plugin; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginAvailable.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginAvailable.tsx index f14283e3ff0..289bfb46efa 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginAvailable.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginAvailable.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { PluginAvailable as IPluginAvailable } from '../../../api/plugins'; import PluginChangeLogButton from './PluginChangeLogButton'; import PluginDescription from './PluginDescription'; import PluginLicense from './PluginLicense'; import PluginOrganization from './PluginOrganization'; import PluginStatus from './PluginStatus'; import PluginUrls from './PluginUrls'; -import { PluginAvailable as IPluginAvailable } from '../../../api/plugins'; interface Props { plugin: IPluginAvailable; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLog.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLog.tsx index db5c5e47995..fa350e3c532 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLog.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLog.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import PluginChangeLogItem from './PluginChangeLogItem'; import { Release, Update } from '../../../api/plugins'; +import PluginChangeLogItem from './PluginChangeLogItem'; export interface Props { release: Release; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx index 76149ba2f36..c4283eb656e 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import EllipsisIcon from 'sonar-ui-common/components/icons/EllipsisIcon'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; -import PluginChangeLog from './PluginChangeLog'; +import EllipsisIcon from 'sonar-ui-common/components/icons/EllipsisIcon'; import { Release, Update } from '../../../api/plugins'; +import PluginChangeLog from './PluginChangeLog'; interface Props { release: Release; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx index 63be648be04..78a2249c529 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import DateFormatter from '../../../components/intl/DateFormatter'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Release, Update } from '../../../api/plugins'; +import DateFormatter from '../../../components/intl/DateFormatter'; interface Props { release: Release; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginInstalled.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginInstalled.tsx index a13b8c2d37e..60d9e193815 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginInstalled.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginInstalled.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { PluginInstalled as IPluginInstalled } from '../../../api/plugins'; import PluginDescription from './PluginDescription'; import PluginLicense from './PluginLicense'; import PluginOrganization from './PluginOrganization'; import PluginStatus from './PluginStatus'; import PluginUpdates from './PluginUpdates'; import PluginUrls from './PluginUrls'; -import { PluginInstalled as IPluginInstalled } from '../../../api/plugins'; interface Props { plugin: IPluginInstalled; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginLicense.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginLicense.tsx index f2898f44d51..d90e13f1565 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginLicense.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginLicense.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { license?: string; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginStatus.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginStatus.tsx index 5ea763109f8..aed787040a4 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginStatus.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginStatus.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import PluginActions from './PluginActions'; import { Plugin } from '../../../api/plugins'; +import PluginActions from './PluginActions'; interface Props { plugin: Plugin; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateButton.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateButton.tsx index 8be60fa6678..6a1cd72bed1 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateButton.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateButton.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Update } from '../../../api/plugins'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx index c5e69f6b9c4..dc96d653cb9 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import PluginChangeLogButton from './PluginChangeLogButton'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Release, Update } from '../../../api/plugins'; +import PluginChangeLogButton from './PluginChangeLogButton'; interface Props { update: Update; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdates.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdates.tsx index 8516ac00539..97c1912f22a 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdates.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdates.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import PluginUpdateItem from './PluginUpdateItem'; import { Update } from '../../../api/plugins'; +import PluginUpdateItem from './PluginUpdateItem'; interface Props { updates?: Update[]; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/EditionBox-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/EditionBox-test.tsx index c101f2fcf4d..a774f10d0be 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/EditionBox-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/EditionBox-test.tsx @@ -17,10 +17,10 @@ * 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 EditionBox from '../EditionBox'; +import * as React from 'react'; import { EditionKey } from '../../utils'; +import EditionBox from '../EditionBox'; const DEFAULT_EDITION = { key: EditionKey.developer, diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginActions-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginActions-test.tsx index 646d5b849ae..bf71ab0362d 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginActions-test.tsx @@ -17,10 +17,10 @@ * 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 { PluginAvailable, PluginInstalled } from '../../../../api/plugins'; import PluginActions from '../PluginActions'; -import { PluginInstalled, PluginAvailable } from '../../../../api/plugins'; const installedPlugin: PluginInstalled = { key: 'foo', diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginChangeLog-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginChangeLog-test.tsx index 30a3dacd6da..b35267fda61 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginChangeLog-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginChangeLog-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 PluginChangeLog, { Props } from '../PluginChangeLog'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginDescription-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginDescription-test.tsx index 1cf11a70b11..021bdacf436 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginDescription-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginDescription-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 PluginDescription from '../PluginDescription'; it('should display the description and category', () => { diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginLicense-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginLicense-test.tsx index 3bb48de42e2..c7439809f80 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginLicense-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginLicense-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 PluginLicense from '../PluginLicense'; it('should display the license field', () => { diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginUrls-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginUrls-test.tsx index 924f6c60c3d..c40ee4b1c79 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginUrls-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/PluginUrls-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 PluginUrls from '../PluginUrls'; it('should display the urls', () => { diff --git a/server/sonar-web/src/main/js/apps/marketplace/utils.ts b/server/sonar-web/src/main/js/apps/marketplace/utils.ts index d2e5cbc1f04..f1f2f939fa2 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/utils.ts +++ b/server/sonar-web/src/main/js/apps/marketplace/utils.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 { stringify } from 'querystring'; import { memoize } from 'lodash'; +import { stringify } from 'querystring'; import { cleanQuery, parseAsString, serializeString } from 'sonar-ui-common/helpers/query'; import { omitNil } from 'sonar-ui-common/helpers/request'; import { Plugin, PluginAvailable, PluginInstalled, PluginPending } from '../../api/plugins'; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/AddMemberForm.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/AddMemberForm.tsx index e4161058978..70c00e84390 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/AddMemberForm.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/AddMemberForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink, Button } from 'sonar-ui-common/components/controls/buttons'; +import { Button, ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import UsersSelectSearch from '../users/components/UsersSelectSearch'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { searchMembers } from '../../api/organizations'; +import UsersSelectSearch from '../users/components/UsersSelectSearch'; interface Props { addMember: (member: T.OrganizationMember) => void; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/ManageMemberGroupsForm.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/ManageMemberGroupsForm.tsx index 3fa085f9562..189b0c72efa 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/ManageMemberGroupsForm.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/ManageMemberGroupsForm.tsx @@ -17,14 +17,14 @@ * 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 { keyBy, pickBy, some } from 'lodash'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import * as React from 'react'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import OrganizationGroupCheckbox from '../organizations/components/OrganizationGroupCheckbox'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getUserGroups, UserGroup } from '../../api/users'; +import OrganizationGroupCheckbox from '../organizations/components/OrganizationGroupCheckbox'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/MembersList.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/MembersList.tsx index d42ee011562..f20de765cb2 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/MembersList.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/MembersList.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import MembersListItem from './MembersListItem'; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/MembersListHeader.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/MembersListHeader.tsx index 1945857d66f..10bb78f9570 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/MembersListHeader.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/MembersListHeader.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { getAlmMembersUrl, sanitizeAlmId } from '../../helpers/almIntegrations'; export interface Props { diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/MembersListItem.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/MembersListItem.tsx index e5a148a2321..0746555b328 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/MembersListItem.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/MembersListItem.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import ActionsDropdown, { ActionsDropdownDivider, ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; -import RemoveMemberForm from './RemoveMemberForm'; -import ManageMemberGroupsForm from './ManageMemberGroupsForm'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import Avatar from '../../components/ui/Avatar'; +import ManageMemberGroupsForm from './ManageMemberGroupsForm'; +import RemoveMemberForm from './RemoveMemberForm'; interface Props { member: T.OrganizationMember; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/MembersPageHeader.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/MembersPageHeader.tsx index bedc92b8cbb..0b6978e4590 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/MembersPageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/MembersPageHeader.tsx @@ -20,13 +20,13 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import DocTooltip from '../../components/docs/DocTooltip'; +import { isGithub, sanitizeAlmId } from '../../helpers/almIntegrations'; import AddMemberForm from './AddMemberForm'; import SyncMemberForm from './SyncMemberForm'; -import DocTooltip from '../../components/docs/DocTooltip'; -import { sanitizeAlmId, isGithub } from '../../helpers/almIntegrations'; export interface Props { handleAddMember: (member: T.OrganizationMember) => void; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembers.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembers.tsx index 95d53640e09..517b21fd265 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembers.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembers.tsx @@ -19,15 +19,15 @@ */ import * as React from 'react'; import Helmet from 'react-helmet'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import MembersPageHeader from './MembersPageHeader'; -import MembersListHeader from './MembersListHeader'; -import MembersList from './MembersList'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { addMember, removeMember, searchMembers } from '../../api/organizations'; +import { addUserToGroup, removeUserFromGroup, searchUsersGroups } from '../../api/user_groups'; import A11ySkipTarget from '../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; -import { searchMembers, addMember, removeMember } from '../../api/organizations'; -import { searchUsersGroups, addUserToGroup, removeUserFromGroup } from '../../api/user_groups'; +import MembersList from './MembersList'; +import MembersListHeader from './MembersListHeader'; +import MembersPageHeader from './MembersPageHeader'; interface Props { currentUser: T.LoggedInUser; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembersContainer.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembersContainer.tsx index 05c709f3920..8fe0df6ba08 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembersContainer.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembersContainer.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import OrganizationMembers from './OrganizationMembers'; -import { getOrganizationByKey, Store } from '../../store/rootReducer'; import { withCurrentUser } from '../../components/hoc/withCurrentUser'; +import { getOrganizationByKey, Store } from '../../store/rootReducer'; +import OrganizationMembers from './OrganizationMembers'; interface OwnProps { params: { organizationKey: string }; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/RemoveMemberForm.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/RemoveMemberForm.tsx index 905f5056bd5..8093cd17908 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/RemoveMemberForm.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/RemoveMemberForm.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/SyncMemberForm.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/SyncMemberForm.tsx index bcde5a4acb8..beca324f264 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/SyncMemberForm.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/SyncMemberForm.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import RadioCard from 'sonar-ui-common/components/controls/RadioCard'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { setOrganizationMemberSync, syncMembers } from '../../api/organizations'; import { sanitizeAlmId } from '../../helpers/almIntegrations'; import { fetchOrganization } from '../../store/rootActions'; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/AddMemberForm-test.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/AddMemberForm-test.tsx index 08a930d9aee..dd5e550a2ce 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/AddMemberForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/AddMemberForm-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click, submit } from 'sonar-ui-common/helpers/testUtils'; -import AddMemberForm from '../AddMemberForm'; import { searchMembers } from '../../../api/organizations'; +import AddMemberForm from '../AddMemberForm'; jest.mock('../../../api/organizations', () => ({ searchMembers: jest.fn().mockResolvedValue({ paging: {}, users: [] }) diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/ManageMemberGroupsForm-test.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/ManageMemberGroupsForm-test.tsx index 30b2f906974..dbce6af0131 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/ManageMemberGroupsForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/ManageMemberGroupsForm-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 ManageMemberGroupsForm from '../ManageMemberGroupsForm'; const member = { login: 'admin', name: 'Admin Istrator', avatar: '', groupCount: 3 }; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersList-test.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersList-test.tsx index b04b6978982..19ad57b975a 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersList-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersList-test.tsx @@ -17,10 +17,10 @@ * 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 MembersList from '../MembersList'; +import * as React from 'react'; import { mockLoggedInUser, mockOrganization } from '../../../helpers/testMocks'; +import MembersList from '../MembersList'; const members = [ { login: 'admin', name: 'Admin Istrator', avatar: '', groupCount: 3 }, diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersListHeader-test.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersListHeader-test.tsx index 5c2d17ddc1d..9a54ce60ebe 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersListHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersListHeader-test.tsx @@ -17,10 +17,10 @@ * 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 MembersListHeader, { Props } from '../MembersListHeader'; +import * as React from 'react'; import { mockOrganization, mockOrganizationWithAlm } from '../../../helpers/testMocks'; +import MembersListHeader, { Props } from '../MembersListHeader'; it('should render without the total', () => { expect(shallowRender({ total: undefined })).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersListItem-test.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersListItem-test.tsx index 88d8c7e2d9f..857aee1488e 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersListItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersListItem-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; +import { mockOrganization, mockOrganizationWithAdminActions } from '../../../helpers/testMocks'; import MembersListItem from '../MembersListItem'; -import { mockOrganizationWithAdminActions, mockOrganization } from '../../../helpers/testMocks'; it('should not render actions and groups for non admin', () => { expect(shallowRender({ organization: mockOrganization() })).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersPageHeader-test.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersPageHeader-test.tsx index 98cae6d4a69..a2ce15d4c40 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersPageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/MembersPageHeader-test.tsx @@ -17,14 +17,14 @@ * 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 MembersPageHeader, { Props } from '../MembersPageHeader'; +import * as React from 'react'; import { mockOrganization, - mockOrganizationWithAlm, - mockOrganizationWithAdminActions + mockOrganizationWithAdminActions, + mockOrganizationWithAlm } from '../../../helpers/testMocks'; +import MembersPageHeader, { Props } from '../MembersPageHeader'; it('should render correctly', () => { expect(shallowRender({ loading: true })).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/OrganizationMembers-test.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/OrganizationMembers-test.tsx index 0eeb0e9ba9d..3f8e8c1d997 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/OrganizationMembers-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/OrganizationMembers-test.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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import OrganizationMembers from '../OrganizationMembers'; -import { searchMembers, addMember, removeMember } from '../../../api/organizations'; -import { searchUsersGroups, addUserToGroup, removeUserFromGroup } from '../../../api/user_groups'; +import { addMember, removeMember, searchMembers } from '../../../api/organizations'; +import { addUserToGroup, removeUserFromGroup, searchUsersGroups } from '../../../api/user_groups'; import { mockLoggedInUser, mockOrganization, mockOrganizationWithAdminActions, mockOrganizationWithAlm } from '../../../helpers/testMocks'; +import OrganizationMembers from '../OrganizationMembers'; jest.mock('../../../api/organizations', () => ({ addMember: jest.fn().mockResolvedValue({ login: 'bar', name: 'Bar', groupCount: 1 }), diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/RemoveMemberForm-test.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/RemoveMemberForm-test.tsx index 6e7caf42f18..684f4abdfd6 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/RemoveMemberForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/RemoveMemberForm-test.tsx @@ -17,10 +17,10 @@ * 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 RemoveMemberForm from '../RemoveMemberForm'; +import * as React from 'react'; import { mockEvent } from '../../../helpers/testMocks'; +import RemoveMemberForm from '../RemoveMemberForm'; const member = { login: 'admin', name: 'Admin Istrator', avatar: '', groupCount: 3 }; const organization = { key: 'myorg', name: 'MyOrg' }; diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/SyncMemberForm-test.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/SyncMemberForm-test.tsx index e56a96348eb..9116ec241ed 100644 --- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/SyncMemberForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/SyncMemberForm-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 { SyncMemberForm } from '../SyncMemberForm'; import { setOrganizationMemberSync, syncMembers } from '../../../api/organizations'; import { mockOrganizationWithAlm } from '../../../helpers/testMocks'; +import { SyncMemberForm } from '../SyncMemberForm'; jest.mock('../../../api/organizations', () => ({ setOrganizationMemberSync: jest.fn().mockResolvedValue(undefined), diff --git a/server/sonar-web/src/main/js/apps/organizations/__tests__/actions-test.ts b/server/sonar-web/src/main/js/apps/organizations/__tests__/actions-test.ts index dcf0b9d3327..2888d939f26 100644 --- a/server/sonar-web/src/main/js/apps/organizations/__tests__/actions-test.ts +++ b/server/sonar-web/src/main/js/apps/organizations/__tests__/actions-test.ts @@ -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 actions from '../actions'; -import { mockOrganization } from '../../../helpers/testMocks'; import { deleteOrganization, updateOrganization } from '../../../api/organizations'; +import { mockOrganization } from '../../../helpers/testMocks'; +import * as actions from '../actions'; jest.mock('../../../api/organizations', () => ({ deleteOrganization: jest.fn().mockResolvedValue({}), diff --git a/server/sonar-web/src/main/js/apps/organizations/actions.ts b/server/sonar-web/src/main/js/apps/organizations/actions.ts index 0bc1166bfaf..b6cd0db8166 100644 --- a/server/sonar-web/src/main/js/apps/organizations/actions.ts +++ b/server/sonar-web/src/main/js/apps/organizations/actions.ts @@ -20,8 +20,8 @@ import { Dispatch } from 'redux'; import { translate } from 'sonar-ui-common/helpers/l10n'; import * as api from '../../api/organizations'; -import * as actions from '../../store/organizations'; import { addGlobalSuccessMessage } from '../../store/globalMessages'; +import * as actions from '../../store/organizations'; export function updateOrganization(key: string, changes: T.OrganizationBase) { return (dispatch: Dispatch<any>) => { diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationAccessContainer.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationAccessContainer.tsx index 09cc660109c..7bd96ed2e93 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationAccessContainer.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationAccessContainer.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { RouterState } from 'react-router'; -import { getCurrentUser, getOrganizationByKey, Store } from '../../../store/rootReducer'; import handleRequiredAuthorization from '../../../app/utils/handleRequiredAuthorization'; import { isLoggedIn } from '../../../helpers/users'; +import { getCurrentUser, getOrganizationByKey, Store } from '../../../store/rootReducer'; interface StateToProps { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationBind.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationBind.tsx index b7748f2011c..c881445bc6a 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationBind.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationBind.tsx @@ -19,15 +19,15 @@ */ import * as React from 'react'; import IdentityProviderLink from 'sonar-ui-common/components/controls/IdentityProviderLink'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { save } from 'sonar-ui-common/helpers/storage'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import { - BIND_ORGANIZATION_REDIRECT_TO_ORG_TIMESTAMP, - BIND_ORGANIZATION_KEY -} from '../../create/organization/utils'; import { getAlmAppInfo } from '../../../api/alm-integration'; import { sanitizeAlmId } from '../../../helpers/almIntegrations'; +import { + BIND_ORGANIZATION_KEY, + BIND_ORGANIZATION_REDIRECT_TO_ORG_TIMESTAMP +} from '../../create/organization/utils'; interface Props { currentUser: T.LoggedInUser; diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.tsx index 24545ac7249..97ae9e70640 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.tsx @@ -19,16 +19,16 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import InstanceMessage from '../../../components/common/InstanceMessage'; -import { deleteOrganization } from '../actions'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getOrganizationBilling } from '../../../api/organizations'; -import { isSonarCloud } from '../../../helpers/system'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage'; +import InstanceMessage from '../../../components/common/InstanceMessage'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; +import { isSonarCloud } from '../../../helpers/system'; +import { deleteOrganization } from '../actions'; interface DispatchToProps { deleteOrganization: (key: string) => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.tsx index 8c8d98d9c67..993f14040b9 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.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 { debounce } from 'lodash'; import * as React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; -import { debounce } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import OrganizationBind from './OrganizationBind'; -import OrganizationDelete from './OrganizationDelete'; -import { updateOrganization } from '../actions'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import OrganizationAvatar from '../../../components/common/OrganizationAvatar'; import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; import { hasAdvancedALMIntegration } from '../../../helpers/almIntegrations'; +import { updateOrganization } from '../actions'; +import OrganizationBind from './OrganizationBind'; +import OrganizationDelete from './OrganizationDelete'; interface DispatchProps { updateOrganization: (organization: string, changes: T.OrganizationBase) => Promise<any>; diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEmpty.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEmpty.tsx index 43c0a6a434e..07df070635e 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEmpty.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEmpty.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Button } from 'sonar-ui-common/components/controls/buttons'; import OnboardingAddMembersIcon from 'sonar-ui-common/components/icons/OnboardingAddMembersIcon'; import OnboardingProjectIcon from 'sonar-ui-common/components/icons/OnboardingProjectIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Button } from 'sonar-ui-common/components/controls/buttons'; import { OnboardingContextShape } from '../../../app/components/OnboardingContext'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; import '../../tutorials/styles.css'; import './OrganizationEmpty.css'; diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationGroupCheckbox.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationGroupCheckbox.tsx index 07e4450e8aa..5ea47e0c0bf 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationGroupCheckbox.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationGroupCheckbox.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 Checkbox from 'sonar-ui-common/components/controls/Checkbox'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.tsx index 18ebcc78c52..9422be09cd4 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.tsx @@ -17,20 +17,20 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { Location } from 'history'; import * as React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; -import { Location } from 'history'; -import OrganizationNavigation from '../navigation/OrganizationNavigation'; -import NotFound from '../../../app/components/NotFound'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import NotFound from '../../../app/components/NotFound'; +import { fetchOrganization } from '../../../store/rootActions'; import { - getOrganizationByKey, getCurrentUser, getMyOrganizations, + getOrganizationByKey, Store } from '../../../store/rootReducer'; -import { fetchOrganization } from '../../../store/rootActions'; +import OrganizationNavigation from '../navigation/OrganizationNavigation'; interface OwnProps { children?: React.ReactNode; diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationProjects.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationProjects.tsx index 4eab0d0de2b..865fe08da40 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationProjects.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationProjects.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import AllProjectsContainer from '../../projects/components/AllProjectsContainer'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import AllProjectsContainer from '../../projects/components/AllProjectsContainer'; interface Props { location: { pathname: string; query: T.Dict<string> }; diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationAccessContainer-test.tsx b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationAccessContainer-test.tsx index e7aac456f71..8ece0679d4d 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationAccessContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationAccessContainer-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 { shallow } from 'enzyme'; import { Location } from 'history'; +import * as React from 'react'; import { hasAdminAccess, OrganizationAccess } from '../OrganizationAccessContainer'; jest.mock('../../../../app/utils/handleRequiredAuthorization', () => ({ default: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationBind-test.tsx b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationBind-test.tsx index c42dea7a07a..f8c1ff8eb29 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationBind-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationBind-test.tsx @@ -17,20 +17,20 @@ * 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 { save } from 'sonar-ui-common/helpers/storage'; -import OrganizationBind from '../OrganizationBind'; -import { - BIND_ORGANIZATION_REDIRECT_TO_ORG_TIMESTAMP, - BIND_ORGANIZATION_KEY -} from '../../../create/organization/utils'; import { getAlmAppInfo } from '../../../../api/alm-integration'; import { mockAlmApplication, mockLoggedInUser, mockOrganization } from '../../../../helpers/testMocks'; +import { + BIND_ORGANIZATION_KEY, + BIND_ORGANIZATION_REDIRECT_TO_ORG_TIMESTAMP +} from '../../../create/organization/utils'; +import OrganizationBind from '../OrganizationBind'; jest.mock('../../../../api/alm-integration', () => ({ getAlmAppInfo: jest.fn(() => Promise.resolve({ application: mockAlmApplication() })) diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationDelete-test.tsx b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationDelete-test.tsx index 29d1d6f8bba..2a51b22c354 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationDelete-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationDelete-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 { OrganizationDelete } from '../OrganizationDelete'; import { getOrganizationBilling } from '../../../../api/organizations'; import { isSonarCloud } from '../../../../helpers/system'; +import { OrganizationDelete } from '../OrganizationDelete'; jest.mock('../../../../api/organizations', () => ({ getOrganizationBilling: jest.fn(() => diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationEdit-test.tsx b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationEdit-test.tsx index 357786f3d9b..7713247185a 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationEdit-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationEdit-test.tsx @@ -17,10 +17,10 @@ * 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 { OrganizationEdit } from '../OrganizationEdit'; +import * as React from 'react'; import { mockLoggedInUser } from '../../../../helpers/testMocks'; +import { OrganizationEdit } from '../OrganizationEdit'; it('smoke test', () => { const organization = { key: 'foo', name: 'Foo' }; diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationEmpty-test.tsx b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationEmpty-test.tsx index b40a3cb4842..75e0c52f311 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationEmpty-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationEmpty-test.tsx @@ -17,15 +17,15 @@ * 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 { click } from 'sonar-ui-common/helpers/testUtils'; -import { OrganizationEmpty } from '../OrganizationEmpty'; import { - mockRouter, mockOrganization, - mockOrganizationWithAlm + mockOrganizationWithAlm, + mockRouter } from '../../../../helpers/testMocks'; +import { OrganizationEmpty } from '../OrganizationEmpty'; const organization: T.Organization = mockOrganization(); diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationGroupCheckbox-test.tsx b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationGroupCheckbox-test.tsx index 7289fe42775..477092056ce 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationGroupCheckbox-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationGroupCheckbox-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 OrganizationGroupCheckbox from '../OrganizationGroupCheckbox'; const group = { diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationPage-test.tsx b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationPage-test.tsx index 7adf2005c88..abd4b3a7964 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationPage-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationPage-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 { shallow } from 'enzyme'; import { Location } from 'history'; +import * as React from 'react'; import { OrganizationPage } from '../OrganizationPage'; const fetchOrganization = jest.fn().mockResolvedValue(undefined); diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.tsx index a2f791bdc0f..9491503f9ff 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import ContextNavBar from 'sonar-ui-common/components/ui/ContextNavBar'; +import { rawSizes } from '../../../app/theme'; import OrganizationNavigationHeader from './OrganizationNavigationHeader'; -import OrganizationNavigationMeta from './OrganizationNavigationMeta'; import OrganizationNavigationMenuContainer from './OrganizationNavigationMenuContainer'; -import { rawSizes } from '../../../app/theme'; +import OrganizationNavigationMeta from './OrganizationNavigationMeta'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationAdministration.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationAdministration.tsx index 9f585ca8bee..abe16bfa896 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationAdministration.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationAdministration.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 classNames from 'classnames'; import * as React from 'react'; -import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { Link } from 'react-router'; -import * as classNames from 'classnames'; -import { translate } from 'sonar-ui-common/helpers/l10n'; 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'; interface Props { location: { pathname: string }; diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationExtensions.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationExtensions.tsx index 25f11add266..187a2e64816 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationExtensions.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationExtensions.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 classNames from 'classnames'; import * as React from 'react'; -import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { Link } from 'react-router'; -import * as classNames from 'classnames'; -import { translate } from 'sonar-ui-common/helpers/l10n'; 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'; interface Props { location: { pathname: string }; diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx index 9c5ecf259c5..0dfceb1a3c7 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx @@ -17,20 +17,20 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { sortBy } from 'lodash'; import * as React from 'react'; -import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { Link } from 'react-router'; -import { sortBy } from 'lodash'; +import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import OrganizationAvatar from '../../../components/common/OrganizationAvatar'; import OrganizationListItem from '../../../components/ui/OrganizationListItem'; import { - sanitizeAlmId, + getUserAlmKey, hasAdvancedALMIntegration, - getUserAlmKey + sanitizeAlmId } from '../../../helpers/almIntegrations'; export interface Props { diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMenuContainer.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMenuContainer.tsx index 4c8e786326a..a4cc60b8daa 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMenuContainer.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMenuContainer.tsx @@ -22,11 +22,11 @@ import { connect } from 'react-redux'; import { Link } from 'react-router'; import NavBarTabs from 'sonar-ui-common/components/ui/NavBarTabs'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import OrganizationNavigationExtensions from './OrganizationNavigationExtensions'; -import OrganizationNavigationAdministration from './OrganizationNavigationAdministration'; -import { getQualityGatesUrl } from '../../../helpers/urls'; import { hasPrivateAccess, isCurrentUserMemberOf } from '../../../helpers/organizations'; +import { getQualityGatesUrl } from '../../../helpers/urls'; import { getCurrentUser, getMyOrganizations, Store } from '../../../store/rootReducer'; +import OrganizationNavigationAdministration from './OrganizationNavigationAdministration'; +import OrganizationNavigationExtensions from './OrganizationNavigationExtensions'; interface StateToProps { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMeta.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMeta.tsx index e1528c451ad..5dca58a6fcc 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMeta.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMeta.tsx @@ -21,8 +21,8 @@ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import HomePageSelect from '../../../components/controls/HomePageSelect'; import DocTooltip from '../../../components/docs/DocTooltip'; -import { isSonarCloud } from '../../../helpers/system'; import { hasPrivateAccess, isPaidOrganization } from '../../../helpers/organizations'; +import { isSonarCloud } from '../../../helpers/system'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.tsx index fb255758463..e2dc7293882 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-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 OrganizationNavigation from '../OrganizationNavigation'; it('render', () => { diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationAdministration-test.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationAdministration-test.tsx index 13fc21eb36d..f768734330e 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationAdministration-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationAdministration-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 OrganizationNavigationAdministration from '../OrganizationNavigationAdministration'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationHeader-test.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationHeader-test.tsx index ab3816953c8..d808a6a1895 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationHeader-test.tsx @@ -17,14 +17,14 @@ * 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 OrganizationNavigationHeader, { Props } from '../OrganizationNavigationHeader'; +import * as React from 'react'; import { - mockOrganizationWithAlm, mockCurrentUser, - mockLoggedInUser + mockLoggedInUser, + mockOrganizationWithAlm } from '../../../../helpers/testMocks'; +import OrganizationNavigationHeader, { Props } from '../OrganizationNavigationHeader'; it('renders', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationMenuContainer-test.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationMenuContainer-test.tsx index 1768bd4ef2e..b4abe055d25 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationMenuContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationMenuContainer-test.tsx @@ -17,10 +17,10 @@ * 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 { hasPrivateAccess, isCurrentUserMemberOf } from '../../../../helpers/organizations'; import { OrganizationNavigationMenu } from '../OrganizationNavigationMenuContainer'; -import { isCurrentUserMemberOf, hasPrivateAccess } from '../../../../helpers/organizations'; jest.mock('../../../../helpers/organizations', () => ({ isCurrentUserMemberOf: jest.fn().mockReturnValue(true), diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationMeta-test.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationMeta-test.tsx index d66b583fdc5..1b499889917 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationMeta-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationMeta-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 OrganizationNavigationMeta from '../OrganizationNavigationMeta'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: () => true })); diff --git a/server/sonar-web/src/main/js/apps/organizations/routes.ts b/server/sonar-web/src/main/js/apps/organizations/routes.ts index e25b348a2e8..b891744a2fe 100644 --- a/server/sonar-web/src/main/js/apps/organizations/routes.ts +++ b/server/sonar-web/src/main/js/apps/organizations/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'; import codingRulesRoutes from '../coding-rules/routes'; import qualityGatesRoutes from '../quality-gates/routes'; diff --git a/server/sonar-web/src/main/js/apps/overview/badges/BadgeButton.tsx b/server/sonar-web/src/main/js/apps/overview/badges/BadgeButton.tsx index ba58b1dbc00..e5d231148a2 100644 --- a/server/sonar-web/src/main/js/apps/overview/badges/BadgeButton.tsx +++ b/server/sonar-web/src/main/js/apps/overview/badges/BadgeButton.tsx @@ -17,10 +17,10 @@ * 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 { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { BadgeType } from './utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/overview/badges/BadgeParams.tsx b/server/sonar-web/src/main/js/apps/overview/badges/BadgeParams.tsx index 56ae174319e..4856b2c0087 100644 --- a/server/sonar-web/src/main/js/apps/overview/badges/BadgeParams.tsx +++ b/server/sonar-web/src/main/js/apps/overview/badges/BadgeParams.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 * as classNames from 'classnames'; -import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Select from 'sonar-ui-common/components/controls/Select'; -import { BadgeColors, BadgeType, BadgeOptions, BadgeFormats } from './utils'; +import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; import { fetchWebApi } from '../../../api/web-api'; +import { BadgeColors, BadgeFormats, BadgeOptions, BadgeType } from './utils'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/overview/badges/BadgesModal.tsx b/server/sonar-web/src/main/js/apps/overview/badges/BadgesModal.tsx index 64b5fe1f860..8efeea8f9b2 100644 --- a/server/sonar-web/src/main/js/apps/overview/badges/BadgesModal.tsx +++ b/server/sonar-web/src/main/js/apps/overview/badges/BadgesModal.tsx @@ -18,16 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import BadgeButton from './BadgeButton'; -import BadgeParams from './BadgeParams'; -import { BadgeType, BadgeOptions, getBadgeUrl, getBadgeSnippet } from './utils'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CodeSnippet from '../../../components/common/CodeSnippet'; import { getBranchLikeQuery } from '../../../helpers/branches'; import { isSonarCloud } from '../../../helpers/system'; +import BadgeButton from './BadgeButton'; +import BadgeParams from './BadgeParams'; import './styles.css'; +import { BadgeOptions, BadgeType, getBadgeSnippet, getBadgeUrl } from './utils'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgeButton-test.tsx b/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgeButton-test.tsx index ca5d25df76d..4338784024b 100644 --- a/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgeButton-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgeButton-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 { click } from 'sonar-ui-common/helpers/testUtils'; import BadgeButton from '../BadgeButton'; import { BadgeType } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgeParams-test.tsx b/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgeParams-test.tsx index 87efe41ee80..9f278492ff5 100644 --- a/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgeParams-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgeParams-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 BadgeParams from '../BadgeParams'; import { BadgeType } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgesModal-test.tsx b/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgesModal-test.tsx index 2ed4edc72e3..5daad7315a2 100644 --- a/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgesModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/badges/__tests__/BadgesModal-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 { Location } from 'sonar-ui-common/helpers/urls'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; -import BadgesModal from '../BadgesModal'; +import { Location } from 'sonar-ui-common/helpers/urls'; import { isSonarCloud } from '../../../../helpers/system'; +import BadgesModal from '../BadgesModal'; jest.mock('sonar-ui-common/helpers/urls', () => ({ getHostUrl: () => 'host', diff --git a/server/sonar-web/src/main/js/apps/overview/badges/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/overview/badges/__tests__/utils-test.ts index ee6fe616726..5b4b603957b 100644 --- a/server/sonar-web/src/main/js/apps/overview/badges/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/overview/badges/__tests__/utils-test.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { Location } from 'sonar-ui-common/helpers/urls'; -import { getBadgeUrl, BadgeOptions, BadgeType, getBadgeSnippet } from '../utils'; +import { BadgeOptions, BadgeType, getBadgeSnippet, getBadgeUrl } from '../utils'; jest.mock('sonar-ui-common/helpers/urls', () => ({ ...require.requireActual('sonar-ui-common/helpers/urls'), diff --git a/server/sonar-web/src/main/js/apps/overview/components/App.tsx b/server/sonar-web/src/main/js/apps/overview/components/App.tsx index 3c2d06963a1..71fd2c09ed8 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/App.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import { Helmet } from 'react-helmet'; -import { getBaseUrl, getPathUrlAsString } from 'sonar-ui-common/helpers/urls'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; -import OverviewApp from './OverviewApp'; +import { getBaseUrl, getPathUrlAsString } from 'sonar-ui-common/helpers/urls'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; -import { getProjectUrl } from '../../../helpers/urls'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; +import { isPullRequest, isShortLivingBranch } from '../../../helpers/branches'; import { isSonarCloud } from '../../../helpers/system'; -import { isShortLivingBranch, isPullRequest } from '../../../helpers/branches'; +import { getProjectUrl } from '../../../helpers/urls'; +import OverviewApp from './OverviewApp'; const EmptyOverview = lazyLoad(() => import('./EmptyOverview')); const ReviewApp = lazyLoad(() => import('../pullRequests/ReviewApp')); diff --git a/server/sonar-web/src/main/js/apps/overview/components/ApplicationLeakPeriodLegend.tsx b/server/sonar-web/src/main/js/apps/overview/components/ApplicationLeakPeriodLegend.tsx index 62d696e2a31..f8e88da5743 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/ApplicationLeakPeriodLegend.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/ApplicationLeakPeriodLegend.tsx @@ -17,14 +17,14 @@ * 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 { sortBy } from 'lodash'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import DateTooltipFormatter from '../../../components/intl/DateTooltipFormatter'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getApplicationLeak } from '../../../api/application'; import DateFromNow from '../../../components/intl/DateFromNow'; +import DateTooltipFormatter from '../../../components/intl/DateTooltipFormatter'; interface Props { branch?: T.LongLivingBranch; diff --git a/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.tsx b/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.tsx index 85deb63e719..6035db37576 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.tsx @@ -18,17 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import { connect } from 'react-redux'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { isBranch, isLongLivingBranch, isMainBranch } from '../../../helpers/branches'; +import { isSonarCloud } from '../../../helpers/system'; +import { isLoggedIn } from '../../../helpers/users'; +import { getCurrentUser, Store } from '../../../store/rootReducer'; import AnalyzeTutorial from '../../tutorials/analyzeProject/AnalyzeTutorial'; import AnalyzeTutorialSonarCloud from '../../tutorials/analyzeProject/AnalyzeTutorialSonarCloud'; import MetaContainer from '../meta/MetaContainer'; -import { isLongLivingBranch, isBranch, isMainBranch } from '../../../helpers/branches'; -import { isLoggedIn } from '../../../helpers/users'; -import { getCurrentUser, Store } from '../../../store/rootReducer'; -import { isSonarCloud } from '../../../helpers/system'; interface OwnProps { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.tsx b/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.tsx index 49963fa193d..265c7f49b29 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.tsx @@ -17,13 +17,13 @@ * 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 { injectIntl, InjectedIntlProps } from 'react-intl'; -import { 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 { 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 { getPeriodDate, getPeriodLabel } from '../../../helpers/periods'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx index 9c91fb05acd..c907475cef5 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx @@ -17,40 +17,40 @@ * 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 { uniq } from 'lodash'; +import * as React from 'react'; import { connect } from 'react-redux'; import { parseDate } from 'sonar-ui-common/helpers/dates'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import ApplicationQualityGate from '../qualityGate/ApplicationQualityGate'; -import Bugs from '../main/Bugs'; -import CodeSmells from '../main/CodeSmells'; -import Coverage from '../main/Coverage'; -import Duplications from '../main/Duplications'; -import VulnerabilitiesAndHotspots from '../main/VulnerabilitiesAndHotspots'; -import MetaContainer from '../meta/MetaContainer'; -import QualityGate from '../qualityGate/QualityGate'; -import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import { getMeasuresAndMeta } from '../../../api/measures'; import { getAllTimeMachineData } from '../../../api/time-machine'; -import { enhanceMeasuresWithMetrics } from '../../../helpers/measures'; -import { getLeakPeriod } from '../../../helpers/periods'; -import { METRICS, HISTORY_METRICS_LIST } from '../utils'; -import { - DEFAULT_GRAPH, - getDisplayedHistoryMetrics, - getProjectActivityGraph -} from '../../projectActivity/utils'; +import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import { - isSameBranchLike, + getBranchLikeDisplayName, getBranchLikeQuery, isLongLivingBranch, isMainBranch, - getBranchLikeDisplayName + isSameBranchLike } from '../../../helpers/branches'; +import { enhanceMeasuresWithMetrics } from '../../../helpers/measures'; +import { getLeakPeriod } from '../../../helpers/periods'; import { fetchMetrics } from '../../../store/rootActions'; import { getMetrics, Store } from '../../../store/rootReducer'; +import { + DEFAULT_GRAPH, + getDisplayedHistoryMetrics, + getProjectActivityGraph +} from '../../projectActivity/utils'; +import Bugs from '../main/Bugs'; +import CodeSmells from '../main/CodeSmells'; +import Coverage from '../main/Coverage'; +import Duplications from '../main/Duplications'; +import VulnerabilitiesAndHotspots from '../main/VulnerabilitiesAndHotspots'; +import MetaContainer from '../meta/MetaContainer'; +import ApplicationQualityGate from '../qualityGate/ApplicationQualityGate'; +import QualityGate from '../qualityGate/QualityGate'; import '../styles.css'; +import { HISTORY_METRICS_LIST, METRICS } from '../utils'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/overview/components/Timeline.tsx b/server/sonar-web/src/main/js/apps/overview/components/Timeline.tsx index 681cd04a55b..c390784e15d 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/Timeline.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/Timeline.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 { max } from 'd3-array'; +import * as React from 'react'; import LineChart from 'sonar-ui-common/components/charts/LineChart'; const HEIGHT = 80; diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx index ea7d83aa658..ae3a4f522c8 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx @@ -17,10 +17,10 @@ * 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 { App } from '../App'; +import * as React from 'react'; import { isSonarCloud } from '../../../../helpers/system'; +import { App } from '../App'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/ApplicationLeakPeriodLegend-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/ApplicationLeakPeriodLegend-test.tsx index d669efcec36..6b9831bbca0 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/ApplicationLeakPeriodLegend-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/ApplicationLeakPeriodLegend-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import ApplicationLeakPeriodLegend from '../ApplicationLeakPeriodLegend'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/EmptyOverview-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/EmptyOverview-test.tsx index 1d986047c0c..f442759f929 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/EmptyOverview-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/EmptyOverview-test.tsx @@ -17,15 +17,15 @@ * 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 { EmptyOverview, WarningMessage } from '../EmptyOverview'; +import * as React from 'react'; import { - mockPullRequest, + mockComponent, mockLoggedInUser, mockMainBranch, - mockComponent + mockPullRequest } from '../../../../helpers/testMocks'; +import { EmptyOverview, WarningMessage } from '../EmptyOverview'; const branch = mockMainBranch(); const component = mockComponent({ version: '0.0.1' }); diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/LeakPeriodLegend-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/LeakPeriodLegend-test.tsx index 14cf3822ed7..4009de8b1b2 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/LeakPeriodLegend-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/LeakPeriodLegend-test.tsx @@ -17,10 +17,10 @@ * 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 { InjectedIntlProps } from 'react-intl'; import { shallow } from 'enzyme'; +import * as React from 'react'; +import { InjectedIntlProps } from 'react-intl'; import { LeakPeriodLegend } from '../LeakPeriodLegend'; jest.mock('date-fns/difference_in_days', () => jest.fn().mockReturnValue(10)); diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/OverviewApp-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/OverviewApp-test.tsx index 103fa901c06..f032121332f 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/OverviewApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/OverviewApp-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 { OverviewApp } from '../OverviewApp'; import { getMeasuresAndMeta } from '../../../../api/measures'; import { getAllTimeMachineData } from '../../../../api/time-machine'; import { - mockMainBranch, mockComponent, - mockMetric, + mockLongLivingBranch, + mockMainBranch, mockMeasure, - mockLongLivingBranch + mockMetric } from '../../../../helpers/testMocks'; +import { OverviewApp } from '../OverviewApp'; jest.mock('../../../../api/measures', () => { const { mockMeasure, mockMetric } = getMockHelpers(); diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/Timeline-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/Timeline-test.tsx index 4bbc806e7f2..d8bafc64a8a 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/Timeline-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/Timeline-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 { parseDate } from 'sonar-ui-common/helpers/dates'; import Timeline from '../Timeline'; diff --git a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.tsx b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.tsx index baf3ce3d63c..92043634f54 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.tsx +++ b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import { Link } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Analysis from './Analysis'; import { getProjectActivity } from '../../../api/projectActivity'; import PreviewGraph from '../../../components/preview-graph/PreviewGraph'; import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches'; import { getActivityUrl } from '../../../helpers/urls'; +import Analysis from './Analysis'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/overview/events/Analysis.tsx b/server/sonar-web/src/main/js/apps/overview/events/Analysis.tsx index b363955c87a..51ab959d31a 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/Analysis.tsx +++ b/server/sonar-web/src/main/js/apps/overview/events/Analysis.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Event from './Event'; import DateTooltipFormatter from '../../../components/intl/DateTooltipFormatter'; +import Event from './Event'; interface Props { analysis: T.Analysis; diff --git a/server/sonar-web/src/main/js/apps/overview/events/Event.tsx b/server/sonar-web/src/main/js/apps/overview/events/Event.tsx index 3e1c5ff9715..de75239dd8d 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/Event.tsx +++ b/server/sonar-web/src/main/js/apps/overview/events/Event.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Level from 'sonar-ui-common/components/ui/Level'; -import { isRichQualityGateEvent } from '../../projectActivity/components/RichQualityGateEventInner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { isDefinitionChangeEvent } from '../../projectActivity/components/DefinitionChangeEventInner'; +import { isRichQualityGateEvent } from '../../projectActivity/components/RichQualityGateEventInner'; interface Props { event: T.AnalysisEvent; diff --git a/server/sonar-web/src/main/js/apps/overview/events/__tests__/AnalysesList-test.tsx b/server/sonar-web/src/main/js/apps/overview/events/__tests__/AnalysesList-test.tsx index 6a8567f48ee..cf25a4e9c18 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/__tests__/AnalysesList-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/events/__tests__/AnalysesList-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 AnalysesList from '../AnalysesList'; it('should render show more link', () => { diff --git a/server/sonar-web/src/main/js/apps/overview/events/__tests__/Analysis-test.tsx b/server/sonar-web/src/main/js/apps/overview/events/__tests__/Analysis-test.tsx index 0ac09c37c84..cc272b6d63d 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/__tests__/Analysis-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/events/__tests__/Analysis-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 Analysis from '../Analysis'; const ANALYSIS = { diff --git a/server/sonar-web/src/main/js/apps/overview/events/__tests__/Event-test.tsx b/server/sonar-web/src/main/js/apps/overview/events/__tests__/Event-test.tsx index 4483ffa2036..14583b88dfb 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/__tests__/Event-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/events/__tests__/Event-test.tsx @@ -17,10 +17,10 @@ * 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 Event from '../Event'; +import * as React from 'react'; import { RichQualityGateEvent } from '../../../projectActivity/components/RichQualityGateEventInner'; +import Event from '../Event'; const EVENT = { key: '1', category: 'OTHER', name: 'test' }; const VERSION = { key: '2', category: 'VERSION', name: '6.5-SNAPSHOT' }; diff --git a/server/sonar-web/src/main/js/apps/overview/main/Bugs.tsx b/server/sonar-web/src/main/js/apps/overview/main/Bugs.tsx index 7b3bf1ea23e..06712825131 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/Bugs.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/Bugs.tsx @@ -20,13 +20,13 @@ import * as React from 'react'; import BugIcon from 'sonar-ui-common/components/icons/BugIcon'; import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import enhance, { ComposedProps } from './enhance'; -import ApplicationLeakPeriodLegend from '../components/ApplicationLeakPeriodLegend'; import DocTooltip from '../../../components/docs/DocTooltip'; import DateFromNow from '../../../components/intl/DateFromNow'; +import { isLongLivingBranch } from '../../../helpers/branches'; +import ApplicationLeakPeriodLegend from '../components/ApplicationLeakPeriodLegend'; import LeakPeriodLegend from '../components/LeakPeriodLegend'; import { getMetricName } from '../utils'; -import { isLongLivingBranch } from '../../../helpers/branches'; +import enhance, { ComposedProps } from './enhance'; export class Bugs extends React.PureComponent<ComposedProps> { renderHeader() { diff --git a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.tsx b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.tsx index 75387ffd28b..f6617ae03c8 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import CodeSmellIcon from 'sonar-ui-common/components/icons/CodeSmellIcon'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import enhance, { ComposedProps } from './enhance'; import DocTooltip from '../../../components/docs/DocTooltip'; -import { getMetricName } from '../utils'; import DrilldownLink from '../../../components/shared/DrilldownLink'; +import { getMetricName } from '../utils'; +import enhance, { ComposedProps } from './enhance'; export class CodeSmells extends React.PureComponent<ComposedProps> { renderHeader() { diff --git a/server/sonar-web/src/main/js/apps/overview/main/Coverage.tsx b/server/sonar-web/src/main/js/apps/overview/main/Coverage.tsx index d9745621a74..dac39392ff8 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/Coverage.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/Coverage.tsx @@ -20,12 +20,12 @@ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import enhance, { ComposedProps } from './enhance'; import DocTooltip from '../../../components/docs/DocTooltip'; import DrilldownLink from '../../../components/shared/DrilldownLink'; -import { getMetricName } from '../utils'; -import { getPeriodValue } from '../../../helpers/measures'; import CoverageRating from '../../../components/ui/CoverageRating'; +import { getPeriodValue } from '../../../helpers/measures'; +import { getMetricName } from '../utils'; +import enhance, { ComposedProps } from './enhance'; export class Coverage extends React.PureComponent<ComposedProps> { getCoverage() { diff --git a/server/sonar-web/src/main/js/apps/overview/main/Duplications.tsx b/server/sonar-web/src/main/js/apps/overview/main/Duplications.tsx index 873dc05dd30..8b3d03f5662 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/Duplications.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/Duplications.tsx @@ -21,11 +21,11 @@ import * as React from 'react'; import DuplicationsRating from 'sonar-ui-common/components/ui/DuplicationsRating'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import enhance, { ComposedProps } from './enhance'; import DocTooltip from '../../../components/docs/DocTooltip'; import DrilldownLink from '../../../components/shared/DrilldownLink'; -import { getMetricName } from '../utils'; import { getPeriodValue } from '../../../helpers/measures'; +import { getMetricName } from '../utils'; +import enhance, { ComposedProps } from './enhance'; export class Duplications extends React.PureComponent<ComposedProps> { renderHeader() { diff --git a/server/sonar-web/src/main/js/apps/overview/main/VulnerabilitiesAndHotspots.tsx b/server/sonar-web/src/main/js/apps/overview/main/VulnerabilitiesAndHotspots.tsx index 733c527ac33..62b936b08e3 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/VulnerabilitiesAndHotspots.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/VulnerabilitiesAndHotspots.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import SecurityHotspotIcon from 'sonar-ui-common/components/icons/SecurityHotspotIcon'; import VulnerabilityIcon from 'sonar-ui-common/components/icons/VulnerabilityIcon'; -import enhance, { ComposedProps } from './enhance'; import DocTooltip from '../../../components/docs/DocTooltip'; import { getMetricName } from '../utils'; +import enhance, { ComposedProps } from './enhance'; export class VulnerabiltiesAndHotspots extends React.PureComponent<ComposedProps> { renderHeader() { diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Bugs-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Bugs-test.tsx index c8efbeb2a65..e784fa3c9e8 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Bugs-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Bugs-test.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 { shallow } from 'enzyme'; -import Bugs from '../Bugs'; -import { ComposedProps } from '../enhance'; +import * as React from 'react'; import { mockComponent, mockMainBranch, mockMeasureEnhanced, mockMetric } from '../../../../helpers/testMocks'; +import Bugs from '../Bugs'; +import { ComposedProps } from '../enhance'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/CodeSmells-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/CodeSmells-test.tsx index ebac5811e93..fedf6e0aed6 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/CodeSmells-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/CodeSmells-test.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 { shallow } from 'enzyme'; -import CodeSmells from '../CodeSmells'; -import { ComposedProps } from '../enhance'; +import * as React from 'react'; import { mockComponent, mockMainBranch, mockMeasureEnhanced, mockMetric } from '../../../../helpers/testMocks'; +import CodeSmells from '../CodeSmells'; +import { ComposedProps } from '../enhance'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Coverage-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Coverage-test.tsx index d2a35960c3a..bcf72336499 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Coverage-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Coverage-test.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 { shallow } from 'enzyme'; -import Coverage from '../Coverage'; -import { ComposedProps } from '../enhance'; +import * as React from 'react'; import { mockComponent, mockMainBranch, mockMeasureEnhanced, mockMetric } from '../../../../helpers/testMocks'; +import Coverage from '../Coverage'; +import { ComposedProps } from '../enhance'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Duplications-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Duplications-test.tsx index 76cde775ec5..3d61e5f980a 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/Duplications-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/Duplications-test.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 { shallow } from 'enzyme'; -import Duplications from '../Duplications'; -import { ComposedProps } from '../enhance'; +import * as React from 'react'; import { mockComponent, mockMainBranch, mockMeasureEnhanced, mockMetric } from '../../../../helpers/testMocks'; +import Duplications from '../Duplications'; +import { ComposedProps } from '../enhance'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/overview/main/__tests__/VulnerabilitiesAndHotspots-test.tsx b/server/sonar-web/src/main/js/apps/overview/main/__tests__/VulnerabilitiesAndHotspots-test.tsx index 8320bcb0cf9..13f0d69b10f 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/__tests__/VulnerabilitiesAndHotspots-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/__tests__/VulnerabilitiesAndHotspots-test.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 { shallow } from 'enzyme'; -import VulnerabilitiesAndHotspots from '../VulnerabilitiesAndHotspots'; -import { ComposedProps } from '../enhance'; +import * as React from 'react'; import { mockComponent, mockMainBranch, mockMeasureEnhanced, mockMetric } from '../../../../helpers/testMocks'; +import { ComposedProps } from '../enhance'; +import VulnerabilitiesAndHotspots from '../VulnerabilitiesAndHotspots'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/overview/main/enhance.tsx b/server/sonar-web/src/main/js/apps/overview/main/enhance.tsx index 7fe6dab4c3d..98cf4b50eca 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/enhance.tsx +++ b/server/sonar-web/src/main/js/apps/overview/main/enhance.tsx @@ -18,20 +18,20 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HistoryIcon from 'sonar-ui-common/components/icons/HistoryIcon'; import { Link } from 'react-router'; -import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import HistoryIcon from 'sonar-ui-common/components/icons/HistoryIcon'; import Rating from 'sonar-ui-common/components/ui/Rating'; -import DrilldownLink from '../../../components/shared/DrilldownLink'; -import Timeline from '../components/Timeline'; +import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { getWrappedDisplayName } from '../../../components/hoc/utils'; +import DrilldownLink from '../../../components/shared/DrilldownLink'; +import { getBranchLikeQuery } from '../../../helpers/branches'; import { - isDiffMetric, getPeriodValue, + getRatingTooltip, getShortType, - getRatingTooltip + isDiffMetric } from '../../../helpers/measures'; import { getPeriodDate } from '../../../helpers/periods'; import { @@ -39,7 +39,7 @@ import { getComponentIssuesUrl, getMeasureHistoryUrl } from '../../../helpers/urls'; -import { getBranchLikeQuery } from '../../../helpers/branches'; +import Timeline from '../components/Timeline'; export interface EnhanceProps { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaContainer.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaContainer.tsx index 92d10a2a038..3f2c86595cf 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaContainer.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaContainer.tsx @@ -21,23 +21,23 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import MetaKey from './MetaKey'; -import MetaOrganizationKey from './MetaOrganizationKey'; -import MetaLinks from './MetaLinks'; -import MetaQualityGate from './MetaQualityGate'; -import MetaQualityProfiles from './MetaQualityProfiles'; -import MetaSize from './MetaSize'; -import MetaTags from './MetaTags'; -import AnalysesList from '../events/AnalysesList'; +import PrivacyBadgeContainer from '../../../components/common/PrivacyBadgeContainer'; import { hasPrivateAccess } from '../../../helpers/organizations'; import { + getAppState, getCurrentUser, getMyOrganizations, getOrganizationByKey, - Store, - getAppState + Store } from '../../../store/rootReducer'; -import PrivacyBadgeContainer from '../../../components/common/PrivacyBadgeContainer'; +import AnalysesList from '../events/AnalysesList'; +import MetaKey from './MetaKey'; +import MetaLinks from './MetaLinks'; +import MetaOrganizationKey from './MetaOrganizationKey'; +import MetaQualityGate from './MetaQualityGate'; +import MetaQualityProfiles from './MetaQualityProfiles'; +import MetaSize from './MetaSize'; +import MetaTags from './MetaTags'; const BadgesModal = lazyLoad(() => import('../badges/BadgesModal'), 'BadgesModal'); diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaKey.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaKey.tsx index 3bd681a7447..282516fa475 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaKey.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaKey.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ClipboardButton from 'sonar-ui-common/components/controls/ClipboardButton'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { componentKey: string; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.tsx index 7e092b7cda3..8b0e47117e7 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaLink.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ProjectLinkIcon from 'sonar-ui-common/components/icons/ProjectLinkIcon'; import { ClearButton } from 'sonar-ui-common/components/controls/buttons'; +import ProjectLinkIcon from 'sonar-ui-common/components/icons/ProjectLinkIcon'; import isValidUri from '../../../app/utils/isValidUri'; import { getLinkName } from '../../projectLinks/utils'; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaLinks.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaLinks.tsx index 36c5ba4f37e..6b048b68a8f 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaLinks.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaLinks.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import MetaLink from './MetaLink'; -import { orderLinks } from '../../projectLinks/utils'; import { getProjectLinks } from '../../../api/projectLinks'; +import { orderLinks } from '../../projectLinks/utils'; +import MetaLink from './MetaLink'; interface Props { component: T.LightComponent; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaOrganizationKey.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaOrganizationKey.tsx index 2f021d0f32c..75cce62c63e 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaOrganizationKey.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaOrganizationKey.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ClipboardButton from 'sonar-ui-common/components/controls/ClipboardButton'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { organization: string; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.tsx index 34393bc590e..e50208a5a79 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.tsx @@ -17,14 +17,14 @@ * 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 classNames from 'classnames'; import * as React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; -import * as classNames from 'classnames'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import { getQualityProfileUrl } from '../../../helpers/urls'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { searchRules } from '../../../api/rules'; +import { getQualityProfileUrl } from '../../../helpers/urls'; import { getLanguages, Store } from '../../../store/rootReducer'; interface StateProps { diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.tsx index 50b17a83509..1ef8689626f 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.tsx @@ -17,13 +17,13 @@ * 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 SizeRating from 'sonar-ui-common/components/ui/SizeRating'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import DrilldownLink from '../../../components/shared/DrilldownLink'; import LanguageDistributionContainer from '../../../components/charts/LanguageDistributionContainer'; +import DrilldownLink from '../../../components/shared/DrilldownLink'; import { getMetricName } from '../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaTags.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaTags.tsx index 5ab868ab222..65f5902873c 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaTags.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaTags.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; -import MetaTagsSelector from './MetaTagsSelector'; -import TagsList from '../../../components/tags/TagsList'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { setProjectTags } from '../../../api/components'; +import TagsList from '../../../components/tags/TagsList'; +import MetaTagsSelector from './MetaTagsSelector'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaTagsSelector.tsx b/server/sonar-web/src/main/js/apps/overview/meta/MetaTagsSelector.tsx index 0abb6eebb4c..59c8b1f7e5d 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaTagsSelector.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaTagsSelector.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { difference, without } from 'lodash'; import * as React from 'react'; -import { without, difference } from 'lodash'; -import TagsSelector from '../../../components/tags/TagsSelector'; import { searchProjectTags } from '../../../api/components'; +import TagsSelector from '../../../components/tags/TagsSelector'; interface Props { project: string; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaContainer-test.tsx b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaContainer-test.tsx index be344becf16..623bc62265b 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaContainer-test.tsx @@ -17,15 +17,15 @@ * 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 { Meta } from '../MetaContainer'; +import * as React from 'react'; import { mockAppState, + mockComponent, mockLoggedInUser, - mockOrganization, - mockComponent + mockOrganization } from '../../../../helpers/testMocks'; +import { Meta } from '../MetaContainer'; it('should render correctly', () => { const wrapper = shallowRender(); diff --git a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaLink-test.tsx b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaLink-test.tsx index b2e1f9c0a19..59a955eac8a 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaLink-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaLink-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 { click } from 'sonar-ui-common/helpers/testUtils'; import MetaLink from '../MetaLink'; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaQualityProfiles-test.tsx b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaQualityProfiles-test.tsx index 11785dfc93b..b40ebc2799a 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaQualityProfiles-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaQualityProfiles-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 { MetaQualityProfiles } from '../MetaQualityProfiles'; -import { mockLanguage, mockQualityProfile } from '../../../../helpers/testMocks'; import { searchRules } from '../../../../api/rules'; +import { mockLanguage, mockQualityProfile } from '../../../../helpers/testMocks'; +import { MetaQualityProfiles } from '../MetaQualityProfiles'; jest.mock('../../../../api/rules', () => { return { diff --git a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaTags-test.tsx b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaTags-test.tsx index c3b32b28fa5..c881f83c3c3 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaTags-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaTags-test.tsx @@ -17,10 +17,10 @@ * 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 MetaTags from '../MetaTags'; +import * as React from 'react'; import { mockComponent } from '../../../../helpers/testMocks'; +import MetaTags from '../MetaTags'; const component = mockComponent({ configuration: { diff --git a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaTagsSelector-test.tsx b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaTagsSelector-test.tsx index 23e6f073180..e22ea1df8d2 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaTagsSelector-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaTagsSelector-test.tsx @@ -18,8 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order, import/first */ -import * as React from 'react'; import { mount, shallow } from 'enzyme'; +import * as React from 'react'; +import { searchProjectTags } from '../../../../api/components'; import MetaTagsSelector from '../MetaTagsSelector'; jest.mock('../../../../api/components', () => ({ @@ -32,8 +33,6 @@ jest.mock('lodash', () => { return lodash; }); -import { searchProjectTags } from '../../../../api/components'; - it('searches tags on mount', () => { (searchProjectTags as jest.Mock).mockImplementation(() => Promise.resolve({ tags: ['foo', 'bar'] }) diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/AfterMergeEstimate.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/AfterMergeEstimate.tsx index 3acd3c3cb8e..7f5db6c617c 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/AfterMergeEstimate.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/AfterMergeEstimate.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 { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { findMeasure } from '../../../helpers/measures'; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueLabel.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueLabel.tsx index 69b35c106da..b7fa8f83677 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueLabel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueLabel.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 classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; -import * as classNames from 'classnames'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import { getMetricName, ISSUETYPE_MAP, IssueType } from '../utils'; +import DocTooltip from '../../../components/docs/DocTooltip'; import { getLeakValue } from '../../../components/measure/utils'; import { getBranchLikeQuery } from '../../../helpers/branches'; -import { getComponentIssuesUrl } from '../../../helpers/urls'; import { findMeasure } from '../../../helpers/measures'; -import DocTooltip from '../../../components/docs/DocTooltip'; +import { getComponentIssuesUrl } from '../../../helpers/urls'; +import { getMetricName, IssueType, ISSUETYPE_MAP } from '../utils'; export interface Props { branchLike?: T.ShortLivingBranch | T.PullRequest; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueRating.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueRating.tsx index 6b8a39e1db0..508fd803f8e 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueRating.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueRating.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import Rating from 'sonar-ui-common/components/ui/Rating'; -import DrilldownLink from '../../../components/shared/DrilldownLink'; -import { getRatingName, ISSUETYPE_MAP, IssueType } from '../utils'; import { getLeakValue, getRatingTooltip } from '../../../components/measure/utils'; +import DrilldownLink from '../../../components/shared/DrilldownLink'; import { findMeasure } from '../../../helpers/measures'; +import { getRatingName, IssueType, ISSUETYPE_MAP } from '../utils'; interface Props { branchLike?: T.ShortLivingBranch | T.PullRequest; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx index b46ed39a052..7a81fa6bf0d 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.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 HelpIcon from 'sonar-ui-common/components/icons/HelpIcon'; import * as classNames from 'classnames'; -import { Link } from 'react-router'; +import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import { Link } from 'react-router'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; -import { getQualityGateUrl, getQualityGatesUrl } from '../../../helpers/urls'; -import { isSonarCloud } from '../../../helpers/system'; +import HelpIcon from 'sonar-ui-common/components/icons/HelpIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { colors } from '../../../app/theme'; +import { isSonarCloud } from '../../../helpers/system'; +import { getQualityGatesUrl, getQualityGateUrl } from '../../../helpers/urls'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasurementLabel.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasurementLabel.tsx index b919d59eacd..45a6e7698fd 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasurementLabel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasurementLabel.tsx @@ -17,14 +17,14 @@ * 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 { FormattedMessage } from 'react-intl'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; +import { getLeakValue } from '../../../components/measure/utils'; import DrilldownLink from '../../../components/shared/DrilldownLink'; import { findMeasure } from '../../../helpers/measures'; -import { getLeakValue } from '../../../components/measure/utils'; import { MEASUREMENTS_MAP, MeasurementType } from '../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/ReviewApp.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/ReviewApp.tsx index 156db2c19e8..8a3a942b3ac 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/ReviewApp.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/ReviewApp.tsx @@ -17,26 +17,26 @@ * 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 { connect } from 'react-redux'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; -import AfterMergeEstimate from './AfterMergeEstimate'; -import LargeQualityGateBadge from './LargeQualityGateBadge'; -import IssueLabel from './IssueLabel'; -import IssueRating from './IssueRating'; -import MeasurementLabel from './MeasurementLabel'; -import DocTooltip from '../../../components/docs/DocTooltip'; -import QualityGateConditions from '../qualityGate/QualityGateConditions'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getMeasures } from '../../../api/measures'; -import { PR_METRICS, IssueType, MeasurementType } from '../utils'; +import DocTooltip from '../../../components/docs/DocTooltip'; import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches'; import { isSameStatusConditionList } from '../../../helpers/qualityGates'; -import { Store, getBranchStatusByBranchLike } from '../../../store/rootReducer'; import { fetchBranchStatus } from '../../../store/rootActions'; +import { getBranchStatusByBranchLike, Store } from '../../../store/rootReducer'; +import QualityGateConditions from '../qualityGate/QualityGateConditions'; import '../styles.css'; +import { IssueType, MeasurementType, PR_METRICS } from '../utils'; +import AfterMergeEstimate from './AfterMergeEstimate'; +import IssueLabel from './IssueLabel'; +import IssueRating from './IssueRating'; +import LargeQualityGateBadge from './LargeQualityGateBadge'; +import MeasurementLabel from './MeasurementLabel'; interface OwnProps { branchLike: T.PullRequest | T.ShortLivingBranch; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/AfterMergeEstimate-test.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/AfterMergeEstimate-test.tsx index a08dc887b3b..f403b248948 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/AfterMergeEstimate-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/AfterMergeEstimate-test.tsx @@ -17,10 +17,10 @@ * 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 AfterMergeEstimate from '../AfterMergeEstimate'; +import * as React from 'react'; import { mockMeasure } from '../../../../helpers/testMocks'; +import AfterMergeEstimate from '../AfterMergeEstimate'; it('should render correctly for coverage', () => { expect(shallowRender({ measures: [mockMeasure({ metric: 'coverage' })] })).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/IssueLabel-test.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/IssueLabel-test.tsx index 5fd5cb4881b..eda38e87bdc 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/IssueLabel-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/IssueLabel-test.tsx @@ -17,10 +17,10 @@ * 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 { mockComponent, mockMeasure, mockPullRequest } from '../../../../helpers/testMocks'; import IssueLabel, { Props } from '../IssueLabel'; -import { mockComponent, mockPullRequest, mockMeasure } from '../../../../helpers/testMocks'; it('should render correctly for bugs', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/IssueRating-test.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/IssueRating-test.tsx index 1e95943f56b..0c35519a79b 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/IssueRating-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/IssueRating-test.tsx @@ -17,10 +17,10 @@ * 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 { mockComponent, mockMeasure, mockPullRequest } from '../../../../helpers/testMocks'; import IssueRating from '../IssueRating'; -import { mockPullRequest, mockComponent, mockMeasure } from '../../../../helpers/testMocks'; it('should render correctly for bugs', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/LargeQualityGateBadge-test.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/LargeQualityGateBadge-test.tsx index 1a53b0a7a11..ac3f20f498d 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/LargeQualityGateBadge-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/LargeQualityGateBadge-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 { shallow } from 'enzyme'; -import LargeQualityGateBadge from '../LargeQualityGateBadge'; -import { mockComponent } from '../../../../helpers/testMocks'; +import * as React from 'react'; import { isSonarCloud } from '../../../../helpers/system'; +import { mockComponent } from '../../../../helpers/testMocks'; +import LargeQualityGateBadge from '../LargeQualityGateBadge'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: jest.fn() diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/MeasurementLabel-test.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/MeasurementLabel-test.tsx index 2e3fd264608..6e251163662 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/MeasurementLabel-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/MeasurementLabel-test.tsx @@ -17,10 +17,10 @@ * 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 { mockComponent, mockMeasure, mockShortLivingBranch } from '../../../../helpers/testMocks'; import MeasurementLabel from '../MeasurementLabel'; -import { mockShortLivingBranch, mockComponent, mockMeasure } from '../../../../helpers/testMocks'; it('should render correctly for coverage', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/ReviewApp-test.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/ReviewApp-test.tsx index 78cea6b9c1e..4ec662fe9de 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/ReviewApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/ReviewApp-test.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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { ReviewApp } from '../ReviewApp'; import { getMeasures } from '../../../../api/measures'; import { mockComponent, mockPullRequest, mockQualityGateStatusCondition } from '../../../../helpers/testMocks'; +import { ReviewApp } from '../ReviewApp'; jest.mock('../../../../api/measures', () => { const { mockMeasure } = require.requireActual('../../../../helpers/testMocks'); diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGate.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGate.tsx index 90ef08a71e4..98ffeb8798b 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGate.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGate.tsx @@ -17,14 +17,14 @@ * 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 { keyBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import Level from 'sonar-ui-common/components/ui/Level'; -import ApplicationQualityGateProject from './ApplicationQualityGateProject'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { ApplicationProject, getApplicationQualityGate } from '../../../api/quality-gates'; import DocTooltip from '../../../components/docs/DocTooltip'; -import { getApplicationQualityGate, ApplicationProject } from '../../../api/quality-gates'; +import ApplicationQualityGateProject from './ApplicationQualityGateProject'; interface Props { branch?: T.LongLivingBranch; diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGateProject.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGateProject.tsx index 3e55351e388..0e219d17352 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGateProject.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGateProject.tsx @@ -17,15 +17,15 @@ * 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 { Link } from 'react-router'; import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; +import { ApplicationProject, ConditionAnalysis } from '../../../api/quality-gates'; import { isDiffMetric } from '../../../helpers/measures'; import { getProjectUrl } from '../../../helpers/urls'; import './ApplicationQualityGateProject.css'; -import { ApplicationProject, ConditionAnalysis } from '../../../api/quality-gates'; interface Props { metrics: T.Dict<T.Metric>; diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGate.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGate.tsx index 3055c84bb99..eb5b9d1911c 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGate.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGate.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; import Level from 'sonar-ui-common/components/ui/Level'; -import QualityGateConditions from './QualityGateConditions'; -import EmptyQualityGate from './EmptyQualityGate'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import DocTooltip from '../../../components/docs/DocTooltip'; +import EmptyQualityGate from './EmptyQualityGate'; +import QualityGateConditions from './QualityGateConditions'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.tsx index 313ee282d9f..ed38b125e69 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.tsx @@ -17,17 +17,17 @@ * 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 { Link } from 'react-router'; +import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; -import DrilldownLink from '../../../components/shared/DrilldownLink'; import Measure from '../../../components/measure/Measure'; +import DrilldownLink from '../../../components/shared/DrilldownLink'; +import { getBranchLikeQuery, isPullRequest, isShortLivingBranch } from '../../../helpers/branches'; import { getPeriodValue, isDiffMetric } from '../../../helpers/measures'; import { getComponentIssuesUrl } from '../../../helpers/urls'; -import { getBranchLikeQuery, isPullRequest, isShortLivingBranch } from '../../../helpers/branches'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.tsx index 1ca392a5bd2..ef6395132de 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.tsx @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { sortBy } from 'lodash'; import * as React from 'react'; +import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import ChevronDownIcon from 'sonar-ui-common/components/icons/ChevronDownIcon'; -import { sortBy } from 'lodash'; import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import QualityGateCondition from './QualityGateCondition'; import { getMeasuresAndMeta } from '../../../api/measures'; +import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches'; import { enhanceMeasuresWithMetrics } from '../../../helpers/measures'; -import { isSameBranchLike, getBranchLikeQuery } from '../../../helpers/branches'; +import QualityGateCondition from './QualityGateCondition'; const LEVEL_ORDER = ['ERROR', 'WARN']; diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/ApplicationQualityGate-test.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/ApplicationQualityGate-test.tsx index d41fbe031f5..b962367cae9 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/ApplicationQualityGate-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/ApplicationQualityGate-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 ApplicationQualityGate from '../ApplicationQualityGate'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/ApplicationQualityGateProject-test.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/ApplicationQualityGateProject-test.tsx index 1302a238807..df12300e278 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/ApplicationQualityGateProject-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/ApplicationQualityGateProject-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 ApplicationQualityGateProject from '../ApplicationQualityGateProject'; const metrics = { diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGate-test.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGate-test.tsx index bad3d0ee867..5f6700ad2c3 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGate-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGate-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 QualityGate from '../QualityGate'; it('renders message about ignored conditions', () => { diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateCondition-test.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateCondition-test.tsx index 1e8994fe855..13e6469e540 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateCondition-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateCondition-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 QualityGateCondition from '../QualityGateCondition'; const mockRatingCondition = (metric: string): T.QualityGateStatusConditionEnhanced => ({ diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateConditions-test.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateConditions-test.tsx index 200df59b118..724dbcee643 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateConditions-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateConditions-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 QualityGateConditions from '../QualityGateConditions'; import { getMeasuresAndMeta } from '../../../../api/measures'; import { mockComponent, mockQualityGateStatusCondition } from '../../../../helpers/testMocks'; +import QualityGateConditions from '../QualityGateConditions'; jest.mock('../../../../api/measures', () => { return { diff --git a/server/sonar-web/src/main/js/apps/overview/utils.ts b/server/sonar-web/src/main/js/apps/overview/utils.ts index c4fff32eeca..034bca95fe9 100644 --- a/server/sonar-web/src/main/js/apps/overview/utils.ts +++ b/server/sonar-web/src/main/js/apps/overview/utils.ts @@ -19,8 +19,8 @@ */ import BugIcon from 'sonar-ui-common/components/icons/BugIcon'; import CodeSmellIcon from 'sonar-ui-common/components/icons/CodeSmellIcon'; -import VulnerabilityIcon from 'sonar-ui-common/components/icons/VulnerabilityIcon'; import SecurityHotspotIcon from 'sonar-ui-common/components/icons/SecurityHotspotIcon'; +import VulnerabilityIcon from 'sonar-ui-common/components/icons/VulnerabilityIcon'; import DuplicationsRating from 'sonar-ui-common/components/ui/DuplicationsRating'; import { translate } from 'sonar-ui-common/helpers/l10n'; import CoverageRating from '../../components/ui/CoverageRating'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx index df3cf311566..6207c932d30 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx @@ -17,21 +17,21 @@ * 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 QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import { difference } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import ActionsDropdown, { ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; -import DeleteForm from './DeleteForm'; -import Form from './Form'; +import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { - setDefaultPermissionTemplate, deletePermissionTemplate, + setDefaultPermissionTemplate, updatePermissionTemplate } from '../../../api/permissions'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; +import DeleteForm from './DeleteForm'; +import Form from './Form'; interface Props { fromDetails?: boolean; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/App.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/App.tsx index 19d8b03615b..a671b0e5e0a 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/App.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 { Location } from 'history'; import * as React from 'react'; import { connect } from 'react-redux'; -import { Location } from 'history'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Home from './Home'; -import Template from './Template'; -import OrganizationHelmet from '../../../components/common/OrganizationHelmet'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { sortPermissions, mergePermissionsToTemplates, mergeDefaultsToTemplates } from '../utils'; import { getPermissionTemplates } from '../../../api/permissions'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import OrganizationHelmet from '../../../components/common/OrganizationHelmet'; import { getAppState, Store } from '../../../store/rootReducer'; import '../../permissions/styles.css'; +import { mergeDefaultsToTemplates, mergePermissionsToTemplates, sortPermissions } from '../utils'; +import Home from './Home'; +import Template from './Template'; interface Props { location: Location; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.tsx index d7bd7c9a3b7..4257fafcbd7 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/DeleteForm.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/DeleteForm.tsx index 350d0d15fd2..1ca69e30de0 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/DeleteForm.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/DeleteForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Form.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Form.tsx index de9cbbd3a34..f2f3beeb245 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Form.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Form.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { confirmButtonText: string; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Header.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Header.tsx index 3a63dba8bbd..4946e61a041 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Header.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Header.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import Form from './Form'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { createPermissionTemplate } from '../../../api/permissions'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; +import Form from './Form'; interface Props { organization?: { key: string }; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.tsx index 8499f5f6453..f4f8dd02c91 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import InstanceMessage from '../../../components/common/InstanceMessage'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.tsx index d1edf663f5b..3443de4d102 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import ActionsCell from './ActionsCell'; import NameCell from './NameCell'; import PermissionCell from './PermissionCell'; -import ActionsCell from './ActionsCell'; interface Props { organization: T.Organization | undefined; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx index 5115d65c4f3..49e623f1f55 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { isSonarCloud } from '../../../helpers/system'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx index dcff3c8d116..6cc8f0ae831 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx @@ -20,15 +20,15 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import TemplateHeader from './TemplateHeader'; -import TemplateDetails from './TemplateDetails'; +import * as api from '../../../api/permissions'; import HoldersList from '../../permissions/shared/components/HoldersList'; import SearchForm from '../../permissions/shared/components/SearchForm'; import { convertToPermissionDefinitions, PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE } from '../../permissions/utils'; -import * as api from '../../../api/permissions'; +import TemplateDetails from './TemplateDetails'; +import TemplateHeader from './TemplateHeader'; interface Props { organization: T.Organization | undefined; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/ActionsCell-test.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/ActionsCell-test.tsx index 7f2ffacff65..9efc31c42e0 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/ActionsCell-test.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/ActionsCell-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 { ActionsCell } from '../ActionsCell'; const SAMPLE = { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/App-test.tsx index 4f2faace5f2..2a40b032cea 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/App-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { App } from '../App'; import { mockLocation, mockOrganization } from '../../../../helpers/testMocks'; +import { App } from '../App'; jest.mock('../../../../api/permissions', () => ({ getPermissionTemplates: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/Defaults-test.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/Defaults-test.tsx index 4c58ae3f4a1..9a6e35b52e4 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/Defaults-test.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/Defaults-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 Defaults from '../Defaults'; const SAMPLE: T.PermissionTemplate = { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/Form-test.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/Form-test.tsx index 1d8dfd32c52..6c86a6afa70 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/Form-test.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/Form-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 Form from '../Form'; it('render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/permissions/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/permissions/__tests__/utils-test.ts index fea86e4fb63..3dde8bfe81c 100644 --- a/server/sonar-web/src/main/js/apps/permissions/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/permissions/__tests__/utils-test.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { resetBundle } from 'sonar-ui-common/helpers/l10n'; -import { convertToPermissionDefinitions } from '../utils'; import { isSonarCloud } from '../../../helpers/system'; +import { convertToPermissionDefinitions } from '../utils'; jest.mock('../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.tsx index 910c83695fb..882e68bf3ab 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.tsx @@ -20,14 +20,14 @@ import * as React from 'react'; import { connect } from 'react-redux'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import SearchForm from '../../shared/components/SearchForm'; +import { getAppState, Store } from '../../../../store/rootReducer'; import HoldersList from '../../shared/components/HoldersList'; +import SearchForm from '../../shared/components/SearchForm'; import { - PERMISSIONS_ORDER_GLOBAL, convertToPermissionDefinitions, + PERMISSIONS_ORDER_GLOBAL, PERMISSIONS_ORDER_GLOBAL_GOV } from '../../utils'; -import { Store, getAppState } from '../../../../store/rootReducer'; interface StateProps { appState: Pick<T.AppState, 'qualifiers'>; diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx index 5c590c8ba4f..decc38c4b3a 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { without } from 'lodash'; import * as React from 'react'; import Helmet from 'react-helmet'; -import { without } from 'lodash'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import PageHeader from './PageHeader'; -import AllHoldersList from './AllHoldersList'; import * as api from '../../../../api/permissions'; import Suggestions from '../../../../app/components/embed-docs-modal/Suggestions'; import '../../styles.css'; +import AllHoldersList from './AllHoldersList'; +import PageHeader from './PageHeader'; interface Props { organization?: T.Organization; diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/App-test.tsx index 883b877f0f2..2e4c89b8bb6 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/App-test.tsx @@ -17,10 +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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import App from '../App'; import { grantPermissionToGroup, grantPermissionToUser, @@ -28,6 +27,7 @@ import { revokePermissionFromUser } from '../../../../../api/permissions'; import { mockOrganization } from '../../../../../helpers/testMocks'; +import App from '../App'; jest.mock('../../../../../api/permissions', () => ({ getGlobalPermissionsGroups: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.tsx index b766826b1a4..b869abf3447 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.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 { without } from 'lodash'; +import * as React from 'react'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import SearchForm from '../../shared/components/SearchForm'; import HoldersList from '../../shared/components/HoldersList'; -import { PERMISSIONS_ORDER_BY_QUALIFIER, convertToPermissionDefinitions } from '../../utils'; +import SearchForm from '../../shared/components/SearchForm'; +import { convertToPermissionDefinitions, PERMISSIONS_ORDER_BY_QUALIFIER } from '../../utils'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx index 465e2b800b9..a775d062645 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx @@ -17,17 +17,17 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { without } from 'lodash'; import * as React from 'react'; import Helmet from 'react-helmet'; -import { without } from 'lodash'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as api from '../../../../api/permissions'; +import VisibilitySelector from '../../../../components/common/VisibilitySelector'; +import UpgradeOrganizationBox from '../../../create/components/UpgradeOrganizationBox'; +import '../../styles.css'; import AllHoldersList from './AllHoldersList'; import PageHeader from './PageHeader'; import PublicProjectDisclaimer from './PublicProjectDisclaimer'; -import UpgradeOrganizationBox from '../../../create/components/UpgradeOrganizationBox'; -import VisibilitySelector from '../../../../components/common/VisibilitySelector'; -import * as api from '../../../../api/permissions'; -import '../../styles.css'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/AppContainer.ts b/server/sonar-web/src/main/js/apps/permissions/project/components/AppContainer.ts index 6f7637fec18..4a35db43f3e 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/AppContainer.ts +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/AppContainer.ts @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import App from './App'; -import { getCurrentUser, getOrganizationByKey, Store } from '../../../../store/rootReducer'; import { fetchOrganization } from '../../../../store/rootActions'; +import { getCurrentUser, getOrganizationByKey, Store } from '../../../../store/rootReducer'; +import App from './App'; interface OwnProps { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx index fbbe9af3150..01d48dafde5 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; +import Select from 'sonar-ui-common/components/controls/Select'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import Select from 'sonar-ui-common/components/controls/Select'; -import { getPermissionTemplates, applyTemplateToProject } from '../../../../api/permissions'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { applyTemplateToProject, getPermissionTemplates } from '../../../../api/permissions'; interface Props { onApply?: () => void; diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx index b0912321591..d8bbdda8331 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import ApplyTemplate from './ApplyTemplate'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx index ef481e78e45..ce3f84140e8 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { component: { diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/App-test.tsx index 413b44b8d3d..f11f6ae7367 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/App-test.tsx @@ -17,10 +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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import App from '../App'; import { grantPermissionToGroup, grantPermissionToUser, @@ -28,6 +27,7 @@ import { revokePermissionFromUser } from '../../../../../api/permissions'; import { mockComponent, mockOrganization } from '../../../../../helpers/testMocks'; +import App from '../App'; jest.mock('../../../../../api/permissions', () => ({ getPermissionsGroupsForComponent: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/ApplyTemplate-test.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/ApplyTemplate-test.tsx index be07604a090..6ae6d7840f4 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/ApplyTemplate-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/ApplyTemplate-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import ApplyTemplate from '../ApplyTemplate'; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.tsx index b37edb40ceb..a9c8de8cd17 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.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 { without } from 'lodash'; import * as React from 'react'; import GroupIcon from 'sonar-ui-common/components/icons/GroupIcon'; -import { without } from 'lodash'; -import PermissionCell from './PermissionCell'; import { isPermissionDefinitionGroup } from '../../utils'; +import PermissionCell from './PermissionCell'; interface Props { group: T.PermissionGroup; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.tsx index 179286c40ba..8dc88ddb94a 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.tsx @@ -17,13 +17,13 @@ * 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 { partition, sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import UserHolder from './UserHolder'; +import { isPermissionDefinitionGroup } from '../../utils'; import GroupHolder from './GroupHolder'; import PermissionHeader from './PermissionHeader'; -import { isPermissionDefinitionGroup } from '../../utils'; +import UserHolder from './UserHolder'; interface Props { filter?: string; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionCell.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionCell.tsx index cb305a463c2..9d8b59c6f10 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionCell.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionCell.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 Checkbox from 'sonar-ui-common/components/controls/Checkbox'; import { isPermissionDefinitionGroup } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionHeader.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionHeader.tsx index 533603c0fef..df47522462b 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionHeader.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionHeader.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 * as classNames from 'classnames'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; +import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import InstanceMessage from '../../../../components/common/InstanceMessage'; import { isPermissionDefinitionGroup } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.tsx index 6445d95ae66..15ee2fd5929 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; import RadioToggle from 'sonar-ui-common/components/controls/RadioToggle'; +import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { filter: string; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.tsx index 6597c652c99..dd00ea3f832 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.tsx @@ -17,13 +17,13 @@ * 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 { without } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import PermissionCell from './PermissionCell'; import Avatar from '../../../../components/ui/Avatar'; -import { isPermissionDefinitionGroup } from '../../utils'; import { isSonarCloud } from '../../../../helpers/system'; +import { isPermissionDefinitionGroup } from '../../utils'; +import PermissionCell from './PermissionCell'; interface Props { onToggle: (user: T.PermissionUser, permission: string) => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/GroupHolder-test.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/GroupHolder-test.tsx index 483ac46a2b5..9de6a7cc86c 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/GroupHolder-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/GroupHolder-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import GroupHolder from '../GroupHolder'; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/HoldersList-test.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/HoldersList-test.tsx index f1579ca4061..f0c92949760 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/HoldersList-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/HoldersList-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 HoldersList from '../HoldersList'; const permissions = [ diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/PermissionCell-test.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/PermissionCell-test.tsx index 8b68442211b..20a9a7b1228 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/PermissionCell-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/PermissionCell-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 PermissionCell from '../PermissionCell'; const permissionItem = { diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/UserHolder-test.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/UserHolder-test.tsx index 3419b3a115c..f96b9e3cd6c 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/UserHolder-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/UserHolder-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import UserHolder from '../UserHolder'; import { isSonarCloud } from '../../../../../helpers/system'; +import UserHolder from '../UserHolder'; jest.mock('../../../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); 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', () => { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx index 0621b442da8..5583a4e55fb 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.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 classNames from 'classnames'; -import { Link } from 'react-router'; +import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import LongLivingBranchIcon from 'sonar-ui-common/components/icons/LongLivingBranchIcon'; +import { Link } from 'react-router'; +import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; +import LongLivingBranchIcon from 'sonar-ui-common/components/icons/LongLivingBranchIcon'; import ProjectEventIcon from 'sonar-ui-common/components/icons/ProjectEventIcon'; -import { limitComponentName } from 'sonar-ui-common/helpers/path'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import { getProjectUrl } from '../../../helpers/urls'; +import { limitComponentName } from 'sonar-ui-common/helpers/path'; import { isMainBranch } from '../../../helpers/branches'; +import { getProjectUrl } from '../../../helpers/urls'; export type DefinitionChangeEvent = T.AnalysisEvent & Required<Pick<T.AnalysisEvent, 'definitionChange'>>; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx index a801bc551a1..b295b7af807 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import { DeleteButton, EditButton } from 'sonar-ui-common/components/controls/buttons'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import EventInner from './EventInner'; import ChangeEventForm from './forms/ChangeEventForm'; import RemoveEventForm from './forms/RemoveEventForm'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/EventInner.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/EventInner.tsx index 83ad95439a0..0472b32916e 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/EventInner.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/EventInner.tsx @@ -17,13 +17,13 @@ * 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 classNames from 'classnames'; import * as React from 'react'; import ProjectEventIcon from 'sonar-ui-common/components/icons/ProjectEventIcon'; -import * as classNames from 'classnames'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { isRichQualityGateEvent, RichQualityGateEventInner } from './RichQualityGateEventInner'; -import { isDefinitionChangeEvent, DefinitionChangeEventInner } from './DefinitionChangeEventInner'; import { ComponentContext } from '../../../app/components/ComponentContext'; +import { DefinitionChangeEventInner, isDefinitionChangeEvent } from './DefinitionChangeEventInner'; +import { isRichQualityGateEvent, RichQualityGateEventInner } from './RichQualityGateEventInner'; interface Props { event: T.AnalysisEvent; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/Events.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/Events.tsx index 8631b7ba2fb..84e418c7527 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/Events.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/Events.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 { sortBy } from 'lodash'; +import * as React from 'react'; import Event from './Event'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphHistory.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphHistory.tsx index a9b058ee709..4f3ef963c85 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphHistory.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphHistory.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import AdvancedTimeline from 'sonar-ui-common/components/charts/AdvancedTimeline'; -import GraphsTooltips from './GraphsTooltips'; -import GraphsLegendCustom from './GraphsLegendCustom'; -import GraphsLegendStatic from './GraphsLegendStatic'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { getShortType } from '../../../helpers/measures'; import { MeasureHistory, Serie } from '../utils'; +import GraphsLegendCustom from './GraphsLegendCustom'; +import GraphsLegendStatic from './GraphsLegendStatic'; +import GraphsTooltips from './GraphsTooltips'; interface Props { events: T.AnalysisEvent[]; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsHistory.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsHistory.tsx index e92ac38e4f1..c52f9217dce 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsHistory.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsHistory.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 { isEqual } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import GraphHistory from './GraphHistory'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getSeriesMetricType, hasHistoryData, isCustomGraph, - Serie, MeasureHistory, - ParsedAnalysis + ParsedAnalysis, + Serie } from '../utils'; +import GraphHistory from './GraphHistory'; interface Props { analyses: ParsedAnalysis[]; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendCustom.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendCustom.tsx index 93a041a9be6..bbb5d53a997 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendCustom.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendCustom.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import GraphsLegendItem from './GraphsLegendItem'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { hasDataValues, Serie } from '../utils'; +import GraphsLegendItem from './GraphsLegendItem'; interface Props { removeMetric: (metric: string) => void; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendItem.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendItem.tsx index 67dac1cdeb1..9ba64dac9f5 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendItem.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendItem.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 { ClearButton } from 'sonar-ui-common/components/controls/buttons'; import AlertWarnIcon from 'sonar-ui-common/components/icons/AlertWarnIcon'; import ChartLegendIcon from 'sonar-ui-common/components/icons/ChartLegendIcon'; -import { ClearButton } from 'sonar-ui-common/components/controls/buttons'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendStatic.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendStatic.tsx index f5f3d13f8d3..afb7e59e9fc 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendStatic.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendStatic.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import GraphsLegendItem from './GraphsLegendItem'; import { Serie } from '../utils'; +import GraphsLegendItem from './GraphsLegendItem'; interface Props { series: Array<Pick<Serie, 'name' | 'translatedName'>>; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.tsx index 350e01bf445..aa6be9244d6 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.tsx @@ -18,15 +18,15 @@ * 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 { Popup, PopupPlacement } from 'sonar-ui-common/components/ui/popups'; +import { isDefined } from 'sonar-ui-common/helpers/types'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; +import { DEFAULT_GRAPH, MeasureHistory, Serie } from '../utils'; import GraphsTooltipsContent from './GraphsTooltipsContent'; -import GraphsTooltipsContentEvents from './GraphsTooltipsContentEvents'; import GraphsTooltipsContentCoverage from './GraphsTooltipsContentCoverage'; import GraphsTooltipsContentDuplication from './GraphsTooltipsContentDuplication'; +import GraphsTooltipsContentEvents from './GraphsTooltipsContentEvents'; import GraphsTooltipsContentIssues from './GraphsTooltipsContentIssues'; -import { DEFAULT_GRAPH, MeasureHistory, Serie } from '../utils'; -import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; interface Props { events: T.AnalysisEvent[]; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx index 98f1b52317c..88215bd42c5 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx @@ -17,21 +17,21 @@ * 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 { throttle } from 'lodash'; +import * as React from 'react'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import { toShortNotSoISOString } from 'sonar-ui-common/helpers/dates'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import ProjectActivityAnalysis from './ProjectActivityAnalysis'; import DateFormatter from '../../../components/intl/DateFormatter'; import { activityQueryChanged, getAnalysesByVersionByDay, - selectedDateQueryChanged, + ParsedAnalysis, Query, - ParsedAnalysis + selectedDateQueryChanged } from '../utils'; +import ProjectActivityAnalysis from './ProjectActivityAnalysis'; interface Props { addCustomEvent: (analysis: string, name: string, category?: string) => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx index f42ef933749..e24bd6e9f87 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx @@ -17,20 +17,20 @@ * 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 { parseDate } from 'sonar-ui-common/helpers/dates'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import * as React from 'react'; import ActionsDropdown, { ActionsDropdownDivider, ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { parseDate } from 'sonar-ui-common/helpers/dates'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import TimeFormatter from '../../../components/intl/TimeFormatter'; +import { ParsedAnalysis } from '../utils'; import Events from './Events'; import AddEventForm from './forms/AddEventForm'; import RemoveAnalysisForm from './forms/RemoveAnalysisForm'; -import TimeFormatter from '../../../components/intl/TimeFormatter'; -import { ParsedAnalysis } from '../utils'; interface Props { addCustomEvent: (analysis: string, name: string, category?: string) => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx index 29faa217d81..f5ad361bd9a 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx @@ -21,13 +21,13 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { parseDate } from 'sonar-ui-common/helpers/dates'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ProjectActivityPageHeader from './ProjectActivityPageHeader'; -import ProjectActivityAnalysesList from './ProjectActivityAnalysesList'; -import ProjectActivityGraphs from './ProjectActivityGraphs'; -import { MeasureHistory, Query, ParsedAnalysis } from '../utils'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import { MeasureHistory, ParsedAnalysis, Query } from '../utils'; import './projectActivity.css'; +import ProjectActivityAnalysesList from './ProjectActivityAnalysesList'; +import ProjectActivityGraphs from './ProjectActivityGraphs'; +import ProjectActivityPageHeader from './ProjectActivityPageHeader'; interface Props { addCustomEvent: (analysis: string, name: string, category?: string) => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.tsx index 52170c3ef3f..7283ba97355 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.tsx @@ -17,16 +17,15 @@ * 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 { Location } from 'history'; +import * as React from 'react'; import { InjectedRouter } from 'react-router'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import ProjectActivityApp from './ProjectActivityApp'; -import { getAllTimeMachineData } from '../../../api/time-machine'; import { getAllMetrics } from '../../../api/metrics'; import * as api from '../../../api/projectActivity'; -import * as actions from '../actions'; +import { getAllTimeMachineData } from '../../../api/time-machine'; import { getBranchLikeQuery } from '../../../helpers/branches'; +import * as actions from '../actions'; import { customMetricsChanged, DEFAULT_GRAPH, @@ -34,12 +33,13 @@ import { getProjectActivityGraph, isCustomGraph, MeasureHistory, - parseQuery, ParsedAnalysis, + parseQuery, Query, serializeQuery, serializeUrlQuery } from '../utils'; +import ProjectActivityApp from './ProjectActivityApp'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx index 979315d5f78..4390e23afd5 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import DateRangeInput from '../../../components/controls/DateRangeInput'; import { Query } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx index d161bd0761f..2f7ac01cbda 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx @@ -17,16 +17,14 @@ * 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 { debounce, findLast, maxBy, minBy, sortBy } from 'lodash'; +import * as React from 'react'; import { save } from 'sonar-ui-common/helpers/storage'; -import ProjectActivityGraphsHeader from './ProjectActivityGraphsHeader'; -import GraphsZoom from './GraphsZoom'; -import GraphsHistory from './GraphsHistory'; import { datesQueryChanged, generateSeries, getDisplayedHistoryMetrics, + getProjectActivityGraph, getSeriesMetricType, historyQueryChanged, isCustomGraph, @@ -37,9 +35,11 @@ import { PROJECT_ACTIVITY_GRAPH_CUSTOM, Query, Serie, - splitSeriesInGraphs, - getProjectActivityGraph + splitSeriesInGraphs } from '../utils'; +import GraphsHistory from './GraphsHistory'; +import GraphsZoom from './GraphsZoom'; +import ProjectActivityGraphsHeader from './ProjectActivityGraphsHeader'; interface Props { analyses: ParsedAnalysis[]; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphsHeader.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphsHeader.tsx index 97d42dd7ded..f5b99e07919 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphsHeader.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphsHeader.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { GRAPH_TYPES, isCustomGraph } from '../utils'; import AddGraphMetric from './forms/AddGraphMetric'; -import { isCustomGraph, GRAPH_TYPES } from '../utils'; interface Props { addCustomMetric: (metric: string) => void; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageHeader.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageHeader.tsx index f5a5f4d0b13..c6e413b6806 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageHeader.tsx @@ -17,14 +17,14 @@ * 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 { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { APPLICATION_EVENT_TYPES, EVENT_TYPES, Query } from '../utils'; +import ProjectActivityDateInput from './ProjectActivityDateInput'; import ProjectActivityEventSelectOption from './ProjectActivityEventSelectOption'; import ProjectActivityEventSelectValue from './ProjectActivityEventSelectValue'; -import ProjectActivityDateInput from './ProjectActivityDateInput'; -import { EVENT_TYPES, APPLICATION_EVENT_TYPES, Query } from '../utils'; interface Props { category?: string; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx index ca9e1602245..0f684955400 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx @@ -17,15 +17,15 @@ * 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 classNames from 'classnames'; import * as React from 'react'; -import ProjectEventIcon from 'sonar-ui-common/components/icons/ProjectEventIcon'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import * as classNames from 'classnames'; -import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; +import ProjectEventIcon from 'sonar-ui-common/components/icons/ProjectEventIcon'; import Level from 'sonar-ui-common/components/ui/Level'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getProjectUrl } from '../../../helpers/urls'; export type RichQualityGateEvent = T.AnalysisEvent & Required<Pick<T.AnalysisEvent, 'qualityGate'>>; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/DefinitionChangeEventInner-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/DefinitionChangeEventInner-test.tsx index e089ae5f454..c176bf584de 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/DefinitionChangeEventInner-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/DefinitionChangeEventInner-test.tsx @@ -17,10 +17,10 @@ * 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 { click } from 'sonar-ui-common/helpers/testUtils'; -import { DefinitionChangeEventInner, DefinitionChangeEvent } from '../DefinitionChangeEventInner'; +import { DefinitionChangeEvent, DefinitionChangeEventInner } from '../DefinitionChangeEventInner'; it('should render', () => { const event: DefinitionChangeEvent = { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphHistory-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphHistory-test.tsx index 7b9f4732cc7..42485b9cb15 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphHistory-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphHistory-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import GraphHistory from '../GraphHistory'; import { DEFAULT_GRAPH } from '../../utils'; +import GraphHistory from '../GraphHistory'; const SERIES = [ { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsHistory-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsHistory-test.tsx index 0db7568611c..153b6352e31 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsHistory-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsHistory-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import GraphsHistory from '../GraphsHistory'; import { DEFAULT_GRAPH } from '../../utils'; +import GraphsHistory from '../GraphsHistory'; const ANALYSES = [ { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendCustom-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendCustom-test.tsx index 8ce92380a7d..b0b1f880909 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendCustom-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendCustom-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 { parseDate } from 'sonar-ui-common/helpers/dates'; import GraphsLegendCustom from '../GraphsLegendCustom'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendItem-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendItem-test.tsx index ec7433efaf6..ae939984ab0 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendItem-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 GraphsLegendItem from '../GraphsLegendItem'; it('should render correctly a legend', () => { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendStatic-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendStatic-test.tsx index 211c193d84b..2230ae7cb26 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendStatic-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsLegendStatic-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 GraphsLegendStatic from '../GraphsLegendStatic'; const SERIES = [ diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltips-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltips-test.tsx index 6b40182e280..7ddf932ba1d 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltips-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltips-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import GraphsTooltips from '../GraphsTooltips'; import { DEFAULT_GRAPH } from '../../utils'; +import GraphsTooltips from '../GraphsTooltips'; const SERIES_ISSUES = [ { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContent-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContent-test.tsx index 41c2e49bb3f..a54ec0bb8be 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContent-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContent-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 GraphsTooltipsContent from '../GraphsTooltipsContent'; const DEFAULT_PROPS = { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentCoverage-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentCoverage-test.tsx index 2174c899222..221f2b64b7c 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentCoverage-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentCoverage-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 { parseDate } from 'sonar-ui-common/helpers/dates'; import GraphsTooltipsContentCoverage from '../GraphsTooltipsContentCoverage'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentDuplication-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentDuplication-test.tsx index 0ca03e26686..dbc163bfae9 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentDuplication-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentDuplication-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 { parseDate } from 'sonar-ui-common/helpers/dates'; import GraphsTooltipsContentDuplication from '../GraphsTooltipsContentDuplication'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentEvents-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentEvents-test.tsx index 4407dc5207d..55f5c251497 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentEvents-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentEvents-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 GraphsTooltipsContentEvents from '../GraphsTooltipsContentEvents'; const EVENTS = [ diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentIssues-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentIssues-test.tsx index 03f2df12cfd..c16db4e54d6 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentIssues-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentIssues-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 { parseDate } from 'sonar-ui-common/helpers/dates'; import GraphsTooltipsContentIssues from '../GraphsTooltipsContentIssues'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.tsx index e9f0fe2a6d0..3f4e5a879ed 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import ProjectActivityAnalysesList from '../ProjectActivityAnalysesList'; import { DEFAULT_GRAPH } from '../../utils'; +import ProjectActivityAnalysesList from '../ProjectActivityAnalysesList'; jest.mock('date-fns/start_of_day', () => (date: Date) => { const startDay = new Date(date); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysis-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysis-test.tsx index b07bc81f2aa..8e842ab107c 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysis-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysis-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import { mockAnalysisEvent, mockParsedAnalysis } from '../../../../helpers/testMocks'; import ProjectActivityAnalysis from '../ProjectActivityAnalysis'; -import { mockParsedAnalysis, mockAnalysisEvent } from '../../../../helpers/testMocks'; jest.mock('sonar-ui-common/helpers/dates', () => ({ parseDate: () => ({ diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.tsx index c323a6754bf..08c9f439407 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import ProjectActivityApp from '../ProjectActivityApp'; import { DEFAULT_GRAPH } from '../../utils'; +import ProjectActivityApp from '../ProjectActivityApp'; const ANALYSES = [ { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAppContainer-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAppContainer-test.tsx index 7309e391713..bb7e8384a91 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAppContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAppContainer-test.tsx @@ -17,10 +17,10 @@ * 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 ProjectActivityAppContainer from '../ProjectActivityAppContainer'; +import * as React from 'react'; import { mockComponent, mockLocation, mockRouter } from '../../../../helpers/testMocks'; +import ProjectActivityAppContainer from '../ProjectActivityAppContainer'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityDateInput-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityDateInput-test.tsx index 70634f4d10c..45ce664a09f 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityDateInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityDateInput-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 { parseDate } from 'sonar-ui-common/helpers/dates'; import ProjectActivityDateInput from '../ProjectActivityDateInput'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityEventSelectOption-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityEventSelectOption-test.tsx index 15bf4126525..20af2f91c90 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityEventSelectOption-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityEventSelectOption-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 ProjectActivityEventSelectOption from '../ProjectActivityEventSelectOption'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.tsx index db359a66394..5c601b3d5ea 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import ProjectActivityGraphs from '../ProjectActivityGraphs'; import { DEFAULT_GRAPH } from '../../utils'; +import ProjectActivityGraphs from '../ProjectActivityGraphs'; const ANALYSES = [ { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityPageHeader-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityPageHeader-test.tsx index a0a8e922e31..60df9de3531 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityPageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityPageHeader-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 { parseDate } from 'sonar-ui-common/helpers/dates'; import ProjectActivityPageHeader from '../ProjectActivityPageHeader'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/RichQualityGateEventInner-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/RichQualityGateEventInner-test.tsx index 57dbfbb01f6..c14cbc13449 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/RichQualityGateEventInner-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/RichQualityGateEventInner-test.tsx @@ -17,10 +17,10 @@ * 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 { click } from 'sonar-ui-common/helpers/testUtils'; -import { RichQualityGateEventInner, RichQualityGateEvent } from '../RichQualityGateEventInner'; +import { RichQualityGateEvent, RichQualityGateEventInner } from '../RichQualityGateEventInner'; const event: RichQualityGateEvent = { category: 'QUALITY_GATE', diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx index ab37de8bf64..3b0c9ff0e54 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { ParsedAnalysis } from '../../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.tsx index d32e34c254a..ddd10146615 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.tsx @@ -17,14 +17,14 @@ * 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 DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { find, sortBy } from 'lodash'; -import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; -import AddGraphMetricPopup from './AddGraphMetricPopup'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; +import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; import { isDiffMetric } from '../../../../helpers/measures'; +import AddGraphMetricPopup from './AddGraphMetricPopup'; interface Props { addMetric: (metric: string) => void; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetricPopup.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetricPopup.tsx index 37a957d4600..4fcedfb15ed 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetricPopup.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetricPopup.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import MultiSelect from '../../../../components/common/MultiSelect'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx index ccc290d8dc8..05cca219c36 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { changeEvent: (event: string, name: string) => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx index 4e111415060..c3dee2cac2d 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { ParsedAnalysis } from '../../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx index 38acabb7677..07be3232557 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { analysis: string; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/AddEventForm-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/AddEventForm-test.tsx index 0fe6350b213..5e9984bb35b 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/AddEventForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/AddEventForm-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 AddEventForm from '../AddEventForm'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/ChangeEventForm-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/ChangeEventForm-test.tsx index 4c739f499f7..ec0a6193c94 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/ChangeEventForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/ChangeEventForm-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 ChangeEventForm from '../ChangeEventForm'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/utils.ts b/server/sonar-web/src/main/js/apps/projectActivity/utils.ts index d62745f3350..7d8c774edd2 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/utils.ts +++ b/server/sonar-web/src/main/js/apps/projectActivity/utils.ts @@ -19,18 +19,18 @@ */ import * as startOfDay from 'date-fns/start_of_day'; import { chunk, flatMap, groupBy, isEqual, sortBy } from 'lodash'; +import { parseDate } from 'sonar-ui-common/helpers/dates'; +import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; import { cleanQuery, parseAsArray, parseAsDate, parseAsString, - serializeStringArray, serializeDate, - serializeString + serializeString, + serializeStringArray } from 'sonar-ui-common/helpers/query'; -import { parseDate } from 'sonar-ui-common/helpers/dates'; import { get } from 'sonar-ui-common/helpers/storage'; -import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; export type ParsedAnalysis = T.Omit<T.Analysis, 'date'> & { date: Date }; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx index d72852ebeee..83a78038dcd 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx @@ -20,18 +20,18 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; -import BranchRow from './BranchRow'; -import LongBranchesPattern from './LongBranchesPattern'; +import { getValues } from '../../../api/settings'; import { - sortBranchesAsTree, getBranchLikeKey, + isPullRequest, isShortLivingBranch, - isPullRequest + sortBranchesAsTree } from '../../../helpers/branches'; -import { getValues } from '../../../api/settings'; +import BranchRow from './BranchRow'; +import LongBranchesPattern from './LongBranchesPattern'; interface Props { branchLikes: T.BranchLike[]; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/AppContainer.ts b/server/sonar-web/src/main/js/apps/projectBranches/components/AppContainer.ts index 3dbf7df8024..10205a7f932 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/AppContainer.ts +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/AppContainer.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import App from './App'; import { getAppState, Store } from '../../../store/rootReducer'; +import App from './App'; const mapStateToProps = (state: Store) => ({ canAdmin: getAppState(state).canAdmin diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx index e9141320229..6dc8f5e82a8 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx @@ -17,26 +17,26 @@ * 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 { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import ActionsDropdown, { - ActionsDropdownItem, - ActionsDropdownDivider + ActionsDropdownDivider, + ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; -import DeleteBranchModal from './DeleteBranchModal'; -import LeakPeriodForm from './LeakPeriodForm'; -import RenameBranchModal from './RenameBranchModal'; -import BranchIcon from '../../../components/icons-components/BranchIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import BranchStatus from '../../../components/common/BranchStatus'; +import BranchIcon from '../../../components/icons-components/BranchIcon'; +import DateFromNow from '../../../components/intl/DateFromNow'; import { - isShortLivingBranch, + getBranchLikeDisplayName, isLongLivingBranch, isMainBranch, - getBranchLikeDisplayName, - isPullRequest + isPullRequest, + isShortLivingBranch } from '../../../helpers/branches'; -import DateFromNow from '../../../components/intl/DateFromNow'; +import DeleteBranchModal from './DeleteBranchModal'; +import LeakPeriodForm from './LeakPeriodForm'; +import RenameBranchModal from './RenameBranchModal'; interface Props { branchLike: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx index a9d87b4914e..8306c30d8a5 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { deleteBranch, deletePullRequest } from '../../../api/branches'; -import { isPullRequest, getBranchLikeDisplayName } from '../../../helpers/branches'; +import { getBranchLikeDisplayName, isPullRequest } from '../../../helpers/branches'; interface Props { branchLike: T.BranchLike; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/LeakPeriodForm.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/LeakPeriodForm.tsx index 6b13c59c835..5861698439a 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/LeakPeriodForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/LeakPeriodForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import SettingForm from './SettingForm'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getValues } from '../../../api/settings'; +import SettingForm from './SettingForm'; interface Props { branch: string; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/LongBranchesPattern.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/LongBranchesPattern.tsx index 319eb46d959..0199d201ead 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/LongBranchesPattern.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/LongBranchesPattern.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { EditButton } from 'sonar-ui-common/components/controls/buttons'; -import LongBranchesPatternForm from './LongBranchesPatternForm'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getValues } from '../../../api/settings'; +import LongBranchesPatternForm from './LongBranchesPatternForm'; interface Props { project: string; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/LongBranchesPatternForm.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/LongBranchesPatternForm.tsx index 842592db598..a0d6816dc21 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/LongBranchesPatternForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/LongBranchesPatternForm.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import SettingForm from './SettingForm'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/RenameBranchModal.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/RenameBranchModal.tsx index 4826832374d..8319d79e1f5 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/RenameBranchModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/RenameBranchModal.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { renameBranch } from '../../../api/branches'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/SettingForm.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/SettingForm.tsx index 6aaaeb599fa..8ea209f8ad8 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/SettingForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/SettingForm.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Button, ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { Button, SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import { setSimpleSettingValue, resetSettingValue } from '../../../api/settings'; +import { resetSettingValue, setSimpleSettingValue } from '../../../api/settings'; import { sanitizeTranslation } from '../../settings/utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/App-test.tsx index 0d8aa106578..9b04e82dcf4 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/App-test.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 { mount, shallow } from 'enzyme'; -import App from '../App'; +import * as React from 'react'; import { getValues } from '../../../../api/settings'; import { - mockMainBranch, mockLongLivingBranch, - mockShortLivingBranch, - mockPullRequest + mockMainBranch, + mockPullRequest, + mockShortLivingBranch } from '../../../../helpers/testMocks'; +import App from '../App'; jest.mock('../../../../api/settings', () => ({ getValues: jest.fn(() => Promise.resolve([])) diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchRow-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchRow-test.tsx index 479c3489b35..68fb7a85a3f 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchRow-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchRow-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; -import BranchRow from '../BranchRow'; import { mockPullRequest, mockShortLivingBranch } from '../../../../helpers/testMocks'; +import BranchRow from '../BranchRow'; const mainBranch: T.MainBranch = { isMain: true, name: 'master' }; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/DeleteBranchModal-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/DeleteBranchModal-test.tsx index 16ebf2e7aed..589b3a699d6 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/DeleteBranchModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/DeleteBranchModal-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, ShallowWrapper } from 'enzyme'; -import { submit, doAsync, click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import DeleteBranchModal from '../DeleteBranchModal'; +import * as React from 'react'; +import { click, doAsync, submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { deleteBranch, deletePullRequest } from '../../../../api/branches'; -import { mockShortLivingBranch, mockPullRequest } from '../../../../helpers/testMocks'; +import { mockPullRequest, mockShortLivingBranch } from '../../../../helpers/testMocks'; +import DeleteBranchModal from '../DeleteBranchModal'; jest.mock('../../../../api/branches', () => ({ deleteBranch: jest.fn(), diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LongBranchesPattern-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LongBranchesPattern-test.tsx index 291687975ce..8e307c9679c 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LongBranchesPattern-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LongBranchesPattern-test.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import LongBranchesPattern from '../LongBranchesPattern'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; +import LongBranchesPattern from '../LongBranchesPattern'; jest.mock('../../../../api/settings', () => ({ getValues: jest.fn(() => Promise.resolve([])) diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LongBranchesPatternForm-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LongBranchesPatternForm-test.tsx index b61882956a0..ce4508257f1 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LongBranchesPatternForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LongBranchesPatternForm-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 LongBranchesPatternForm from '../LongBranchesPatternForm'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/RenameBranchModal-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/RenameBranchModal-test.tsx index 6e8dc328b60..8fe1853007b 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/RenameBranchModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/RenameBranchModal-test.tsx @@ -20,11 +20,11 @@ /* eslint-disable import/first */ jest.mock('../../../../api/branches', () => ({ renameBranch: jest.fn() })); -import * as React from 'react'; import { shallow, ShallowWrapper } from 'enzyme'; -import { submit, doAsync, click, change, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import RenameBranchModal from '../RenameBranchModal'; +import * as React from 'react'; +import { change, click, doAsync, submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { renameBranch } from '../../../../api/branches'; +import RenameBranchModal from '../RenameBranchModal'; beforeEach(() => { (renameBranch as jest.Mock<any>).mockClear(); diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/SettingForm-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/SettingForm-test.tsx index 54976f26ea3..8d1c72aaaf4 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/SettingForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/SettingForm-test.tsx @@ -23,10 +23,10 @@ jest.mock('../../../../api/settings', () => ({ resetSettingValue: jest.fn(() => Promise.resolve()) })); -import * as React from 'react'; import { shallow } from 'enzyme'; +import * as React from 'react'; +import { change, click, submit } from 'sonar-ui-common/helpers/testUtils'; import SettingForm from '../SettingForm'; -import { change, submit, click } from 'sonar-ui-common/helpers/testUtils'; const setSimpleSettingValue = require('../../../../api/settings') .setSimpleSettingValue as jest.Mock<any>; diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx index bdc1ce9fe58..e9edf1d4eb6 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Header from './Header'; import Form from './Form'; +import Header from './Header'; interface Props { component: Pick<T.Component, 'key' | 'name' | 'qualifier'>; diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx index 4db17817d6b..0d9c4dc8cb9 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; -import { withRouter, Router } from '../../components/hoc/withRouter'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { deletePortfolio, deleteProject } from '../../api/components'; import addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage'; -import { deleteProject, deletePortfolio } from '../../api/components'; +import { Router, withRouter } from '../../components/hoc/withRouter'; interface Props { component: Pick<T.Component, 'key' | 'name' | 'qualifier'>; diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/App-test.tsx index f9510026a73..0217bedc168 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/App-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 App from '../App'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/Form-test.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/Form-test.tsx index 340e5ec4268..4e8da33f9ff 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/Form-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/Form-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 { shallow } from 'enzyme'; -import { Form } from '../Form'; -import { deleteProject, deletePortfolio } from '../../../api/components'; +import * as React from 'react'; +import { deletePortfolio, deleteProject } from '../../../api/components'; import { mockRouter } from '../../../helpers/testMocks'; +import { Form } from '../Form'; jest.mock('../../../api/components', () => ({ deleteProject: jest.fn().mockResolvedValue(undefined), diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/Header-test.tsx index 4a6539eb90a..1280d266618 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/Header-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 Header from '../Header'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/projectKey/Key.tsx b/server/sonar-web/src/main/js/apps/projectKey/Key.tsx index 06727783c59..8b14bca58bd 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/Key.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/Key.tsx @@ -21,9 +21,9 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { withRouter, WithRouterProps } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import UpdateForm from './UpdateForm'; import { changeKey } from '../../api/components'; import RecentHistory from '../../app/components/RecentHistory'; +import UpdateForm from './UpdateForm'; interface Props { component: Pick<T.Component, 'key' | 'name'>; diff --git a/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx b/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx index dd074484a7d..fb24ccc1b9e 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { component: Pick<T.Component, 'key' | 'name'>; diff --git a/server/sonar-web/src/main/js/apps/projectKey/__tests__/Key-test.tsx b/server/sonar-web/src/main/js/apps/projectKey/__tests__/Key-test.tsx index be2fb9df4a9..e95f7062c03 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/__tests__/Key-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/__tests__/Key-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { WithRouterProps } from 'react-router'; -import { Key } from '../Key'; import { changeKey } from '../../../api/components'; +import { Key } from '../Key'; jest.mock('../../../api/components', () => ({ changeKey: jest.fn().mockResolvedValue(undefined) diff --git a/server/sonar-web/src/main/js/apps/projectKey/__tests__/UpdateForm-test.tsx b/server/sonar-web/src/main/js/apps/projectKey/__tests__/UpdateForm-test.tsx index 9c53f5252bd..4149bb04072 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/__tests__/UpdateForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/__tests__/UpdateForm-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, ShallowWrapper } from 'enzyme'; +import * as React from 'react'; import { change, click } from 'sonar-ui-common/helpers/testUtils'; import UpdateForm from '../UpdateForm'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/App.tsx b/server/sonar-web/src/main/js/apps/projectLinks/App.tsx index 213771d8bba..e10e0ccbeb5 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/App.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import Helmet from 'react-helmet'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { createLink, deleteLink, getProjectLinks } from '../../api/projectLinks'; import Header from './Header'; import Table from './Table'; -import { getProjectLinks, createLink, deleteLink } from '../../api/projectLinks'; interface Props { component: Pick<T.Component, 'key'>; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx b/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx index ebdc7db435f..0e44cc7bfce 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx b/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx index c5090a2df91..cf919e02836 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CreationModal from './CreationModal'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx b/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx index a628eb2f2a8..bab3dd9271e 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ProjectLinkIcon from 'sonar-ui-common/components/icons/ProjectLinkIcon'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; -import { isProvided, getLinkName } from './utils'; +import ProjectLinkIcon from 'sonar-ui-common/components/icons/ProjectLinkIcon'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import isValidUri from '../../app/utils/isValidUri'; +import { getLinkName, isProvided } from './utils'; interface Props { link: T.ProjectLink; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/App-test.tsx index d849e477f82..64230d1b54f 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/App-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import App from '../App'; import { createLink, deleteLink, getProjectLinks } from '../../../api/projectLinks'; +import App from '../App'; // import { getProjectLinks, createLink, deleteLink } from '../../api/projectLinks'; jest.mock('../../../api/projectLinks', () => ({ diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/CreationModal-test.tsx b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/CreationModal-test.tsx index 781303f1a6d..a87ca967251 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/CreationModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/CreationModal-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 { change, submit } from 'sonar-ui-common/helpers/testUtils'; import CreationModal from '../CreationModal'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Header-test.tsx index 105117e83ec..9d289aef9be 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Header-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 { click } from 'sonar-ui-common/helpers/testUtils'; import Header from '../Header'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/LinkRow-test.tsx b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/LinkRow-test.tsx index e91ae81458b..a71da3215de 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/LinkRow-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/LinkRow-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 LinkRow from '../LinkRow'; it('should render provided link', () => { diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Table-test.tsx b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Table-test.tsx index 35cd1ed19b3..07bc5142a10 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Table-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Table-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 Table from '../Table'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx index 351b224b8da..42e67969a5c 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx @@ -20,18 +20,18 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Header from './Header'; -import Form from './Form'; import { - fetchQualityGates, - getGateForProject, associateGateWithProject, - dissociateGateWithProject + dissociateGateWithProject, + fetchQualityGates, + getGateForProject } from '../../api/quality-gates'; import A11ySkipTarget from '../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; import addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage'; import handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization'; +import Form from './Form'; +import Header from './Header'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/Form.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/Form.tsx index d47df6d134e..3dd1ddcee06 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/Form.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/Form.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { allGates: T.QualityGate[]; diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/App-test.tsx index e619d66a04a..e24808238ad 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/App-test.tsx @@ -33,8 +33,8 @@ jest.mock('../../../app/utils/handleRequiredAuthorization', () => ({ default: jest.fn() })); -import * as React from 'react'; import { shallow } from 'enzyme'; +import * as React from 'react'; import App from '../App'; const associateGateWithProject = require('../../../api/quality-gates') diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/Form-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/Form-test.tsx index 437685be0a3..f9333099013 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/Form-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/Form-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 Form from '../Form'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/Header-test.tsx index f898192c4c0..d5d9dafc2e3 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/Header-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 Header from '../Header'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/App.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/App.tsx index 795994b4a9b..52b84a72ebf 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/App.tsx @@ -20,18 +20,18 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import Header from './Header'; -import Table from './Table'; import { associateProject, dissociateProject, - searchQualityProfiles, - Profile + Profile, + searchQualityProfiles } from '../../api/quality-profiles'; import A11ySkipTarget from '../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; import addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage'; import handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization'; +import Header from './Header'; +import Table from './Table'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProfileRow.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProfileRow.tsx index e4ed9fe34ab..b34b2430e30 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProfileRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProfileRow.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Profile } from '../../api/quality-profiles'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/Table.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/Table.tsx index 2b3c350f8b6..a1f691bba68 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/Table.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/Table.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 { groupBy, orderBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ProfileRow from './ProfileRow'; import { Profile } from '../../api/quality-profiles'; +import ProfileRow from './ProfileRow'; interface Props { allProfiles: Profile[]; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/App-test.tsx index c902e2b8e71..25a77d0d9ce 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/App-test.tsx @@ -32,8 +32,8 @@ jest.mock('../../../app/utils/handleRequiredAuthorization', () => ({ default: jest.fn() })); -import * as React from 'react'; import { shallow } from 'enzyme'; +import * as React from 'react'; import App from '../App'; const associateProject = require('../../../api/quality-profiles').associateProject as jest.Mock< diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/Header-test.tsx index f898192c4c0..d5d9dafc2e3 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/Header-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 Header from '../Header'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/ProfileRow-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/ProfileRow-test.tsx index d01dc3676e3..7decc1058a8 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/ProfileRow-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/ProfileRow-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 ProfileRow from '../ProfileRow'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/Table-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/Table-test.tsx index cdb345bdeec..c3bc393ff79 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/Table-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/Table-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 Table from '../Table'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts index 5272d0240f5..11d00c65698 100644 --- a/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts @@ -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 utils from '../utils'; import { searchProjects } from '../../../api/components'; -import { mockOrganization, mockComponent } from '../../../helpers/testMocks'; +import { mockComponent, mockOrganization } from '../../../helpers/testMocks'; +import * as utils from '../utils'; jest.mock('../../../api/components', () => ({ searchProjects: jest.fn().mockResolvedValue({ components: [], facets: [], paging: { total: 10 } }) diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx index 2fb44311290..39687da019f 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx @@ -17,32 +17,32 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { omitBy } from 'lodash'; import * as React from 'react'; import Helmet from 'react-helmet'; -import { omitBy } from 'lodash'; +import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { addSideBarClass, removeSideBarClass } from 'sonar-ui-common/helpers/pages'; import { get, save } from 'sonar-ui-common/helpers/storage'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import PageHeader from './PageHeader'; -import ProjectsList from './ProjectsList'; -import PageSidebar from './PageSidebar'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; -import OrganizationEmpty from '../../organizations/components/OrganizationEmpty'; -import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import Visualizations from '../visualizations/Visualizations'; -import { Project, Facets } from '../types'; -import { fetchProjects, parseSorting, SORTING_SWITCH } from '../utils'; -import { parseUrlQuery, Query, hasFilterParams, hasVisualizationParams } from '../query'; -import { isSonarCloud } from '../../../helpers/system'; -import { isLoggedIn } from '../../../helpers/users'; import { OnboardingContext } from '../../../app/components/OnboardingContext'; -import { withRouter, Location, Router } from '../../../components/hoc/withRouter'; +import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; +import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; import '../../../components/search-navigator.css'; +import { isSonarCloud } from '../../../helpers/system'; +import { isLoggedIn } from '../../../helpers/users'; +import OrganizationEmpty from '../../organizations/components/OrganizationEmpty'; +import { hasFilterParams, hasVisualizationParams, parseUrlQuery, Query } from '../query'; import '../styles.css'; +import { Facets, Project } from '../types'; +import { fetchProjects, parseSorting, SORTING_SWITCH } from '../utils'; +import Visualizations from '../visualizations/Visualizations'; +import PageHeader from './PageHeader'; +import PageSidebar from './PageSidebar'; +import ProjectsList from './ProjectsList'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx b/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx index 0039aa6e1f6..357325ccfbf 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx @@ -19,7 +19,7 @@ */ import { connect } from 'react-redux'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; -import { getCurrentUser, areThereCustomOrganizations, Store } from '../../../store/rootReducer'; +import { areThereCustomOrganizations, getCurrentUser, Store } from '../../../store/rootReducer'; const stateToProps = (state: Store) => ({ currentUser: getCurrentUser(state), diff --git a/server/sonar-web/src/main/js/apps/projects/components/ClearAll.tsx b/server/sonar-web/src/main/js/apps/projects/components/ClearAll.tsx index dc3801ee475..8b9b8b2ba6c 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ClearAll.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ClearAll.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { onClearAll: () => void; diff --git a/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx b/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx index 2107f27314c..c5eb3db4bfe 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { get } from 'sonar-ui-common/helpers/storage'; -import AllProjectsContainer from './AllProjectsContainer'; -import { PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE, PROJECTS_ALL } from '../utils'; import { searchProjects } from '../../../api/components'; +import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; import { isSonarCloud } from '../../../helpers/system'; import { isLoggedIn } from '../../../helpers/users'; -import { withRouter, Location, Router } from '../../../components/hoc/withRouter'; +import { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE } from '../utils'; +import AllProjectsContainer from './AllProjectsContainer'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelectorContainer.tsx b/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelectorContainer.tsx index 0961b1b41a4..a69bce02fba 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelectorContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelectorContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import DefaultPageSelector from './DefaultPageSelector'; import { getCurrentUser, Store } from '../../../store/rootReducer'; +import DefaultPageSelector from './DefaultPageSelector'; const stateToProps = (state: Store) => ({ currentUser: getCurrentUser(state) diff --git a/server/sonar-web/src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx b/server/sonar-web/src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx index 7519ba586f3..37ce4ffcd08 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx @@ -21,8 +21,8 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Query } from '../query'; import '../../../components/common/EmptySearch.css'; +import { Query } from '../query'; export default function EmptyFavoriteSearch({ query }: { query: Query }) { return ( diff --git a/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.tsx b/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.tsx index bfd3e2a6250..d6cbd0cf004 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { OnboardingContextShape } from '../../../app/components/OnboardingContext'; import { isSonarCloud } from '../../../helpers/system'; import { hasGlobalPermission, isLoggedIn } from '../../../helpers/users'; -import { OnboardingContextShape } from '../../../app/components/OnboardingContext'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilter.tsx b/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilter.tsx index 4e112bffa6c..3f5dcd2aa17 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilter.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { IndexLink, Link } from 'react-router'; -import { save } from 'sonar-ui-common/helpers/storage'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE, PROJECTS_ALL } from '../utils'; +import { save } from 'sonar-ui-common/helpers/storage'; import { isLoggedIn } from '../../../helpers/users'; +import { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE } from '../utils'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilterContainer.tsx b/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilterContainer.tsx index a0f823f885a..486c4a845a0 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilterContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilterContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import FavoriteFilter from './FavoriteFilter'; import { getCurrentUser, Store } from '../../../store/rootReducer'; +import FavoriteFilter from './FavoriteFilter'; function mapStateToProps(state: Store) { return { currentUser: getCurrentUser(state) }; diff --git a/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.tsx b/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.tsx index 02a75616768..49052650671 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.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 { sortBy } from 'lodash'; import * as React from 'react'; -import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; -import { Link } from 'react-router'; import { connect } from 'react-redux'; -import { sortBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import { Link } from 'react-router'; 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 { OnboardingContextShape } from '../../../app/components/OnboardingContext'; import OrganizationListItem from '../../../components/ui/OrganizationListItem'; -import { getMyOrganizations, Store } from '../../../store/rootReducer'; import { isSonarCloud } from '../../../helpers/system'; -import { OnboardingContextShape } from '../../../app/components/OnboardingContext'; +import { getMyOrganizations, Store } from '../../../store/rootReducer'; interface OwnProps { openProjectOnboarding: OnboardingContextShape; diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx index 29abf49354a..1cbfa649982 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx @@ -17,17 +17,17 @@ * 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 { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import PerspectiveSelect from './PerspectiveSelect'; -import ProjectsSortingSelect from './ProjectsSortingSelect'; -import SearchFilterContainer from '../filters/SearchFilterContainer'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import HomePageSelect from '../../../components/controls/HomePageSelect'; -import { Project } from '../types'; import { isSonarCloud } from '../../../helpers/system'; import { isLoggedIn } from '../../../helpers/users'; +import SearchFilterContainer from '../filters/SearchFilterContainer'; +import { Project } from '../types'; +import PerspectiveSelect from './PerspectiveSelect'; +import ProjectsSortingSelect from './ProjectsSortingSelect'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx index 6b9ca2629a8..fb1f81fbcbe 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx @@ -17,28 +17,28 @@ * 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 { flatMap } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import FavoriteFilterContainer from './FavoriteFilterContainer'; -import ClearAll from './ClearAll'; -import LanguagesFilterContainer from '../filters/LanguagesFilterContainer'; import CoverageFilter from '../filters/CoverageFilter'; import DuplicationsFilter from '../filters/DuplicationsFilter'; +import LanguagesFilterContainer from '../filters/LanguagesFilterContainer'; import MaintainabilityFilter from '../filters/MaintainabilityFilter'; import NewCoverageFilter from '../filters/NewCoverageFilter'; import NewDuplicationsFilter from '../filters/NewDuplicationsFilter'; +import NewLinesFilter from '../filters/NewLinesFilter'; import NewMaintainabilityFilter from '../filters/NewMaintainabilityFilter'; import NewReliabilityFilter from '../filters/NewReliabilityFilter'; import NewSecurityFilter from '../filters/NewSecurityFilter'; -import NewLinesFilter from '../filters/NewLinesFilter'; import QualityGateFilter from '../filters/QualityGateFilter'; import ReliabilityFilter from '../filters/ReliabilityFilter'; import SecurityFilter from '../filters/SecurityFilter'; import SizeFilter from '../filters/SizeFilter'; import TagsFilter from '../filters/TagsFilter'; -import { Facets } from '../types'; import { hasFilterParams } from '../query'; +import { Facets } from '../types'; +import ClearAll from './ClearAll'; +import FavoriteFilterContainer from './FavoriteFilterContainer'; interface Props { facets?: Facets; diff --git a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx index dd8e17564de..ca12a85c5c0 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; -import PerspectiveSelectOption, { Option } from './PerspectiveSelectOption'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { VIEWS, VISUALIZATIONS } from '../utils'; +import PerspectiveSelectOption, { Option } from './PerspectiveSelectOption'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelectOption.tsx b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelectOption.tsx index e5caa34de30..b94f05029d0 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelectOption.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelectOption.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ListIcon from 'sonar-ui-common/components/icons/ListIcon'; import BubblesIcon from 'sonar-ui-common/components/icons/BubblesIcon'; +import ListIcon from 'sonar-ui-common/components/icons/ListIcon'; export interface Option { label: string; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCard.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCard.tsx index 41eff587d2f..e3fb68d065b 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCard.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCard.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Project } from '../types'; import ProjectCardLeak from './ProjectCardLeak'; import ProjectCardOverall from './ProjectCardOverall'; -import { Project } from '../types'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLanguages.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLanguages.tsx index aae782adfc3..f9f8f1af4c4 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLanguages.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLanguages.tsx @@ -17,10 +17,10 @@ * 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 { sortBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLanguagesContainer.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLanguagesContainer.tsx index c893b0f4170..9798fc27ee8 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLanguagesContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLanguagesContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import ProjectCardLanguages from './ProjectCardLanguages'; import { getLanguages, Store } from '../../../store/rootReducer'; +import ProjectCardLanguages from './ProjectCardLanguages'; const stateToProps = (state: Store) => ({ languages: getLanguages(state) diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.tsx index 4c471ed73d1..fd50146e150 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.tsx @@ -17,21 +17,21 @@ * 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 difference from 'date-fns/difference_in_milliseconds'; import * as React from 'react'; import { Link } from 'react-router'; -import * as difference from 'date-fns/difference_in_milliseconds'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import ProjectCardQualityGate from './ProjectCardQualityGate'; -import ProjectCardLeakMeasures from './ProjectCardLeakMeasures'; -import ProjectCardOrganizationContainer from './ProjectCardOrganizationContainer'; +import PrivacyBadgeContainer from '../../../components/common/PrivacyBadgeContainer'; import Favorite from '../../../components/controls/Favorite'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import TagsList from '../../../components/tags/TagsList'; -import PrivacyBadgeContainer from '../../../components/common/PrivacyBadgeContainer'; -import { Project } from '../types'; -import { formatDuration } from '../utils'; import { getProjectUrl } from '../../../helpers/urls'; import { isLoggedIn } from '../../../helpers/users'; +import { Project } from '../types'; +import { formatDuration } from '../utils'; +import ProjectCardLeakMeasures from './ProjectCardLeakMeasures'; +import ProjectCardOrganizationContainer from './ProjectCardOrganizationContainer'; +import ProjectCardQualityGate from './ProjectCardQualityGate'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOrganizationContainer.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOrganizationContainer.tsx index 57d6e9f18fb..c2aedf96ded 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOrganizationContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOrganizationContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import ProjectCardOrganization from './ProjectCardOrganization'; import { areThereCustomOrganizations, Store } from '../../../store/rootReducer'; +import ProjectCardOrganization from './ProjectCardOrganization'; const stateToProps = (state: Store) => ({ organizationsEnabled: areThereCustomOrganizations(state) diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverall.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverall.tsx index 34edd81944d..2d7c85ef735 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverall.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverall.tsx @@ -20,16 +20,16 @@ import * as React from 'react'; import { Link } from 'react-router'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import ProjectCardQualityGate from './ProjectCardQualityGate'; -import ProjectCardOverallMeasures from './ProjectCardOverallMeasures'; -import ProjectCardOrganizationContainer from './ProjectCardOrganizationContainer'; +import PrivacyBadgeContainer from '../../../components/common/PrivacyBadgeContainer'; import Favorite from '../../../components/controls/Favorite'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import TagsList from '../../../components/tags/TagsList'; -import PrivacyBadgeContainer from '../../../components/common/PrivacyBadgeContainer'; -import { Project } from '../types'; import { getProjectUrl } from '../../../helpers/urls'; import { isLoggedIn } from '../../../helpers/users'; +import { Project } from '../types'; +import ProjectCardOrganizationContainer from './ProjectCardOrganizationContainer'; +import ProjectCardOverallMeasures from './ProjectCardOverallMeasures'; +import ProjectCardQualityGate from './ProjectCardQualityGate'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx index 0d9a4a49e6a..4b50e69158f 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx @@ -25,9 +25,9 @@ import DuplicationsRating from 'sonar-ui-common/components/ui/DuplicationsRating import Rating from 'sonar-ui-common/components/ui/Rating'; import SizeRating from 'sonar-ui-common/components/ui/SizeRating'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ProjectCardLanguagesContainer from './ProjectCardLanguagesContainer'; import Measure from '../../../components/measure/Measure'; import CoverageRating from '../../../components/ui/CoverageRating'; +import ProjectCardLanguagesContainer from './ProjectCardLanguagesContainer'; interface Props { measures: T.Dict<string | undefined>; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardQualityGate.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardQualityGate.tsx index ba15537458f..bb636f9a726 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardQualityGate.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardQualityGate.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import Level from 'sonar-ui-common/components/ui/Level'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; interface Props { status?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx index fed40f17638..a7967ec2bcf 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx @@ -21,14 +21,14 @@ import * as React from 'react'; import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; import { List, ListRowProps } from 'react-virtualized/dist/commonjs/List'; import { WindowScroller } from 'react-virtualized/dist/commonjs/WindowScroller'; -import ProjectCard from './ProjectCard'; -import NoFavoriteProjects from './NoFavoriteProjects'; -import EmptyInstance from './EmptyInstance'; -import EmptyFavoriteSearch from './EmptyFavoriteSearch'; +import { OnboardingContext } from '../../../app/components/OnboardingContext'; import EmptySearch from '../../../components/common/EmptySearch'; -import { Project } from '../types'; import { Query } from '../query'; -import { OnboardingContext } from '../../../app/components/OnboardingContext'; +import { Project } from '../types'; +import EmptyFavoriteSearch from './EmptyFavoriteSearch'; +import EmptyInstance from './EmptyInstance'; +import NoFavoriteProjects from './NoFavoriteProjects'; +import ProjectCard from './ProjectCard'; interface Props { cardType?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx index 32563195b02..aa3d3d15253 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx @@ -17,17 +17,17 @@ * 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 SortDescIcon from 'sonar-ui-common/components/icons/SortDescIcon'; import { sortBy } from 'lodash'; -import SortAscIcon from 'sonar-ui-common/components/icons/SortAscIcon'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import * as React from 'react'; import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; import Select from 'sonar-ui-common/components/controls/Select'; -import ProjectsSortingSelectOption, { Option } from './ProjectsSortingSelectOption'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import SortAscIcon from 'sonar-ui-common/components/icons/SortAscIcon'; +import SortDescIcon from 'sonar-ui-common/components/icons/SortDescIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { colors } from '../../../app/theme'; -import { SORTING_METRICS, SORTING_LEAK_METRICS, parseSorting } from '../utils'; +import { parseSorting, SORTING_LEAK_METRICS, SORTING_METRICS } from '../utils'; +import ProjectsSortingSelectOption, { Option } from './ProjectsSortingSelectOption'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelectOption.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelectOption.tsx index e4963d9ff56..54a4b2bcfb1 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelectOption.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelectOption.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'; export interface Option { label: string; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx index 29b8363d5cd..e3d9c927cdc 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import { AllProjects } from '../AllProjects'; +import * as React from 'react'; import { get, save } from 'sonar-ui-common/helpers/storage'; -import { isSonarCloud } from '../../../../helpers/system'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import { isSonarCloud } from '../../../../helpers/system'; +import { AllProjects } from '../AllProjects'; jest.mock('../ProjectsList', () => ({ // eslint-disable-next-line diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ClearAll-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ClearAll-test.tsx index de36c1d738c..342186afb36 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ClearAll-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ClearAll-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 { click } from 'sonar-ui-common/helpers/testUtils'; import ClearAll from '../ClearAll'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx index 0e0399f342c..b09650eed9a 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-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 { mount } from 'enzyme'; +import * as React from 'react'; import { get } from 'sonar-ui-common/helpers/storage'; import { doAsync } from 'sonar-ui-common/helpers/testUtils'; -import { DefaultPageSelector } from '../DefaultPageSelector'; import { searchProjects } from '../../../../api/components'; +import { DefaultPageSelector } from '../DefaultPageSelector'; jest.mock('../AllProjectsContainer', () => ({ // eslint-disable-next-line diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/EmptyInstance-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/EmptyInstance-test.tsx index 4b29c688d04..9f7123845b1 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/EmptyInstance-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/EmptyInstance-test.tsx @@ -17,10 +17,10 @@ * 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 EmptyInstance from '../EmptyInstance'; +import * as React from 'react'; import { isSonarCloud } from '../../../../helpers/system'; +import EmptyInstance from '../EmptyInstance'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: jest.fn() diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx index 91e44c29770..fb228eb7792 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-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 { save } from 'sonar-ui-common/helpers/storage'; import { click } from 'sonar-ui-common/helpers/testUtils'; import FavoriteFilter from '../FavoriteFilter'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/NoFavoriteProjects-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/NoFavoriteProjects-test.tsx index 0f8947329a5..433c0e5b654 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/NoFavoriteProjects-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/NoFavoriteProjects-test.tsx @@ -17,10 +17,10 @@ * 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 { NoFavoriteProjects } from '../NoFavoriteProjects'; +import * as React from 'react'; import { isSonarCloud } from '../../../../helpers/system'; +import { NoFavoriteProjects } from '../NoFavoriteProjects'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx index 6eba52f5af3..26d50191204 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-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 PageHeader from '../PageHeader'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageSidebar-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageSidebar-test.tsx index f5abcd2c522..c81b88eb791 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageSidebar-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageSidebar-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 PageSidebar from '../PageSidebar'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PerspectiveSelect-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PerspectiveSelect-test.tsx index 5fb72beed87..3587d6f54d0 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PerspectiveSelect-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PerspectiveSelect-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 PerspectiveSelect from '../PerspectiveSelect'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PerspectiveSelectOption-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PerspectiveSelectOption-test.tsx index be6a07c8370..39f89fb0657 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PerspectiveSelectOption-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PerspectiveSelectOption-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 PerspectiveSelectOption from '../PerspectiveSelectOption'; it('should render correctly for a view', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCard-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCard-test.tsx index 6b40eb67293..5d1d8d7af77 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCard-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCard-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 { shallow } from 'enzyme'; +import * as React from 'react'; +import { mockCurrentUser } from '../../../../helpers/testMocks'; import { Project } from '../../types'; import ProjectCard from '../ProjectCard'; -import { mockCurrentUser } from '../../../../helpers/testMocks'; const ORGANIZATION = { key: 'org', name: 'org' }; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLanguages-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLanguages-test.tsx index f5e34035068..f49f34dd1ba 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLanguages-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLanguages-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 ProjectCardLanguages from '../ProjectCardLanguages'; const languages = { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeak-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeak-test.tsx index 88d83f3fef5..a92e0a2b856 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeak-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeak-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 { shallow } from 'enzyme'; -import ProjectCardLeak from '../ProjectCardLeak'; -import { Project } from '../../types'; +import * as React from 'react'; import { mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks'; +import { Project } from '../../types'; +import ProjectCardLeak from '../ProjectCardLeak'; jest.mock( 'date-fns/difference_in_milliseconds', diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeakMeasures-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeakMeasures-test.tsx index a4f7f29219c..d76ca94e2ce 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeakMeasures-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeakMeasures-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 ProjectCardLeakMeasures from '../ProjectCardLeakMeasures'; it('should render correctly with all data', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardOverall-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardOverall-test.tsx index 979844f75e4..72cc69266ac 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardOverall-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardOverall-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 { shallow } from 'enzyme'; -import ProjectCardOverall from '../ProjectCardOverall'; -import { Project } from '../../types'; +import * as React from 'react'; import { mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks'; +import { Project } from '../../types'; +import ProjectCardOverall from '../ProjectCardOverall'; const MEASURES = { alert_status: 'OK', diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardOverallMeasures-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardOverallMeasures-test.tsx index 59166250b71..ef0fb8400b6 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardOverallMeasures-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardOverallMeasures-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 ProjectCardOverallMeasures from '../ProjectCardOverallMeasures'; it('should render correctly with all data', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardQualityGate-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardQualityGate-test.tsx index 2b297784904..fa738b2ebd6 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardQualityGate-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardQualityGate-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 ProjectCardQualityGate from '../ProjectCardQualityGate'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsList-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsList-test.tsx index 207f1bd0ade..f2b289c0ae2 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsList-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsList-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 ProjectsList from '../ProjectsList'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelect-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelect-test.tsx index 5fdaf267cc4..e27cbe84d07 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelect-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelect-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 { click } from 'sonar-ui-common/helpers/testUtils'; import ProjectsSortingSelect from '../ProjectsSortingSelect'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelectOption-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelectOption-test.tsx index 02d65e9cfb3..57bb6442bf3 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelectOption-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelectOption-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 ProjectsSortingSelectOption from '../ProjectsSortingSelectOption'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx index d6b103de254..79604f890dd 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { - getCoverageRatingLabel, - getCoverageRatingAverageValue + getCoverageRatingAverageValue, + getCoverageRatingLabel } from 'sonar-ui-common/helpers/ratings'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import Filter from './Filter'; -import FilterHeader from './FilterHeader'; import CoverageRating from '../../../components/ui/CoverageRating'; import { Facet } from '../types'; +import Filter from './Filter'; +import FilterHeader from './FilterHeader'; export interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.tsx index 656bf42fa21..b03265d4800 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import DuplicationsRating from 'sonar-ui-common/components/ui/DuplicationsRating'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { - getDuplicationsRatingLabel, - getDuplicationsRatingAverageValue + getDuplicationsRatingAverageValue, + getDuplicationsRatingLabel } from 'sonar-ui-common/helpers/ratings'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; -import { Facet } from '../types'; export interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx index b28aaaf8c91..e9518b70f86 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/Filter.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 { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { Facet } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.tsx index 08b190a63bb..34284a21089 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -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 { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; -import { Facet } from '../types'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.tsx index 364033ea765..5656fcd8440 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.tsx @@ -17,15 +17,15 @@ * 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 { difference, sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getLanguageByKey } from '../../../store/languages'; +import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; import SearchableFilterFooter from './SearchableFilterFooter'; import SearchableFilterOption from './SearchableFilterOption'; -import { getLanguageByKey } from '../../../store/languages'; -import { Facet } from '../types'; interface Props { facet?: Facet; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilterContainer.tsx b/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilterContainer.tsx index aaae92a8fbc..c57164a2ff5 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilterContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilterContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import LanguagesFilter from './LanguagesFilter'; import { getLanguages, Store } from '../../../store/rootReducer'; +import LanguagesFilter from './LanguagesFilter'; const stateToProps = (state: Store) => ({ languages: getLanguages(state) diff --git a/server/sonar-web/src/main/js/apps/projects/filters/MaintainabilityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/MaintainabilityFilter.tsx index c0e678a4ade..15213518e20 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/MaintainabilityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/MaintainabilityFilter.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import CodeSmellIcon from 'sonar-ui-common/components/icons/CodeSmellIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import IssuesFilter from './IssuesFilter'; import { Facet } from '../types'; +import IssuesFilter from './IssuesFilter'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx index 0a18a2c8f23..391180e1139 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { getSizeRatingLabel } from 'sonar-ui-common/helpers/ratings'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getSizeRatingLabel } from 'sonar-ui-common/helpers/ratings'; +import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; -import { Facet } from '../types'; export interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewMaintainabilityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewMaintainabilityFilter.tsx index 89cf199f3a2..07481beacdb 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewMaintainabilityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewMaintainabilityFilter.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import CodeSmellIcon from 'sonar-ui-common/components/icons/CodeSmellIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import IssuesFilter from './IssuesFilter'; import { Facet } from '../types'; +import IssuesFilter from './IssuesFilter'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.tsx index e7735b5eaea..33979883d61 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import BugIcon from 'sonar-ui-common/components/icons/BugIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import IssuesFilter from './IssuesFilter'; import { Facet } from '../types'; +import IssuesFilter from './IssuesFilter'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewSecurityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewSecurityFilter.tsx index 7f9218e54db..572bbc01a0c 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewSecurityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewSecurityFilter.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import VulnerabilityIcon from 'sonar-ui-common/components/icons/VulnerabilityIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import IssuesFilter from './IssuesFilter'; import { Facet } from '../types'; +import IssuesFilter from './IssuesFilter'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx index dda19769873..01189a6998b 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -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 { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; -import { Facet } from '../types'; export interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/ReliabilityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/ReliabilityFilter.tsx index f1d8b7f3da0..deec7ba9d51 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/ReliabilityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/ReliabilityFilter.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import BugIcon from 'sonar-ui-common/components/icons/BugIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import IssuesFilter from './IssuesFilter'; import { Facet } from '../types'; +import IssuesFilter from './IssuesFilter'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SearchFilterContainer.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SearchFilterContainer.tsx index 5db734ab487..a8b29e821ac 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SearchFilterContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SearchFilterContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterFooter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterFooter.tsx index 1e7cdf74af4..f353442ba39 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterFooter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterFooter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { isFavorite?: boolean; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SecurityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SecurityFilter.tsx index 556840154f6..a246d0160dd 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SecurityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SecurityFilter.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import VulnerabilityIcon from 'sonar-ui-common/components/icons/VulnerabilityIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import IssuesFilter from './IssuesFilter'; import { Facet } from '../types'; +import IssuesFilter from './IssuesFilter'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.tsx index 19d51a68b57..543136e6e0f 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import SizeRating from 'sonar-ui-common/components/ui/SizeRating'; -import { getSizeRatingLabel, getSizeRatingAverageValue } from 'sonar-ui-common/helpers/ratings'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getSizeRatingAverageValue, getSizeRatingLabel } from 'sonar-ui-common/helpers/ratings'; +import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; -import { Facet } from '../types'; export interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.tsx index bf3f8db2886..302ac599345 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.tsx @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { debounce, difference, size, sortBy } from 'lodash'; import * as React from 'react'; -import { debounce, difference, sortBy, size } from 'lodash'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { searchProjectTags } from '../../../api/components'; +import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; import SearchableFilterFooter from './SearchableFilterFooter'; import SearchableFilterOption from './SearchableFilterOption'; -import { searchProjectTags } from '../../../api/components'; -import { Facet } from '../types'; interface Props { facet?: Facet; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/CoverageFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/CoverageFilter-test.tsx index 33c8a9801c5..919cd4b7cab 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/CoverageFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/CoverageFilter-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 CoverageFilter from '../CoverageFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/DuplicationsFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/DuplicationsFilter-test.tsx index 1e9afcace84..3746bb76ec9 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/DuplicationsFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/DuplicationsFilter-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 DuplicationsFilter from '../DuplicationsFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/Filter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/Filter-test.tsx index 9fa96f2f9d8..126a2f491ab 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/Filter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/Filter-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 Filter from '../Filter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/FilterHeader-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/FilterHeader-test.tsx index ff70fb31a0c..eb1c7feee0c 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/FilterHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/FilterHeader-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 FilterHeader from '../FilterHeader'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/IssuesFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/IssuesFilter-test.tsx index b47a92ec9b2..0ff65bf4383 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/IssuesFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/IssuesFilter-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 IssuesFilter from '../IssuesFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/LanguagesFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/LanguagesFilter-test.tsx index ab640e65286..cf2c5f542f9 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/LanguagesFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/LanguagesFilter-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 LanguagesFilter from '../LanguagesFilter'; const languages = { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/MaintainabilityFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/MaintainabilityFilter-test.tsx index a11fd728368..8c3181c4d18 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/MaintainabilityFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/MaintainabilityFilter-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 MaintainabilityFilter from '../MaintainabilityFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewCoverageFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewCoverageFilter-test.tsx index 3d450dd4328..e5daa43a91e 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewCoverageFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewCoverageFilter-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 NewCoverageFilter from '../NewCoverageFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewDuplicationsFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewDuplicationsFilter-test.tsx index ea9c723c13a..aade29fc7d5 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewDuplicationsFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewDuplicationsFilter-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 NewDuplicationsFilter from '../NewDuplicationsFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewLinesFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewLinesFilter-test.tsx index e84404bc025..021ad851357 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewLinesFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewLinesFilter-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 NewLinesFilter from '../NewLinesFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewMaintainabilityFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewMaintainabilityFilter-test.tsx index 86724075175..5e303296cfb 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewMaintainabilityFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewMaintainabilityFilter-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 NewMaintainabilityFilter from '../NewMaintainabilityFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewReliabilityFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewReliabilityFilter-test.tsx index c84af529c78..fb9a193986d 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewReliabilityFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewReliabilityFilter-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 NewReliabilityFilter from '../NewReliabilityFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewSecurityFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewSecurityFilter-test.tsx index 1d54974509c..97147038663 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewSecurityFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/NewSecurityFilter-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 NewSecurityFilter from '../NewSecurityFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/QualityGateFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/QualityGateFilter-test.tsx index 49eb71d6cf5..142179aad28 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/QualityGateFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/QualityGateFilter-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 QualityGateFilter, { Props } from '../QualityGateFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/ReliabilityFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/ReliabilityFilter-test.tsx index b246fbeaf87..6554df2e737 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/ReliabilityFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/ReliabilityFilter-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 ReliabilityFilter from '../ReliabilityFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchFilterContainer-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchFilterContainer-test.tsx index fa86a0389b7..daec54ed2bc 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchFilterContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchFilterContainer-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 SearchFilterContainer from '../SearchFilterContainer'; it('searches', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchableFilterFooter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchableFilterFooter-test.tsx index 814ee919cf6..2d61af757f1 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchableFilterFooter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchableFilterFooter-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 SearchableFilterFooter from '../SearchableFilterFooter'; const options = [ diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchableFilterOption-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchableFilterOption-test.tsx index f5f5dcd58d5..97d520c89e8 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchableFilterOption-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SearchableFilterOption-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 SearchableFilterOption from '../SearchableFilterOption'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SecurityFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SecurityFilter-test.tsx index 0c84d82cb17..30191268728 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SecurityFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SecurityFilter-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 SecurityFilter from '../SecurityFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SizeFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SizeFilter-test.tsx index 39cbef02d72..7a53940b0da 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SizeFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/SizeFilter-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 SizeFilter from '../SizeFilter'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/TagsFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/TagsFilter-test.tsx index b5ae600972a..4a78df85193 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/TagsFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/TagsFilter-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 TagsFilter from '../TagsFilter'; const tags = ['lang', 'sonar', 'csharp', 'dotnet', 'it', 'net']; diff --git a/server/sonar-web/src/main/js/apps/projects/routes.ts b/server/sonar-web/src/main/js/apps/projects/routes.ts index e382730ea53..cc5baf7f4fe 100644 --- a/server/sonar-web/src/main/js/apps/projects/routes.ts +++ b/server/sonar-web/src/main/js/apps/projects/routes.ts @@ -17,13 +17,13 @@ * 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'; import { save } from 'sonar-ui-common/helpers/storage'; import { isDefined } from 'sonar-ui-common/helpers/types'; -import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; import DefaultPageSelectorContainer from './components/DefaultPageSelectorContainer'; import FavoriteProjectsContainer from './components/FavoriteProjectsContainer'; -import { PROJECTS_DEFAULT_FILTER, PROJECTS_ALL } from './utils'; +import { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER } from './utils'; const routes = [ { indexRoute: { component: DefaultPageSelectorContainer } }, diff --git a/server/sonar-web/src/main/js/apps/projects/utils.ts b/server/sonar-web/src/main/js/apps/projects/utils.ts index 110e0436d3f..846fa23aceb 100644 --- a/server/sonar-web/src/main/js/apps/projects/utils.ts +++ b/server/sonar-web/src/main/js/apps/projects/utils.ts @@ -20,11 +20,11 @@ import { uniq } from 'lodash'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { RequestData } from 'sonar-ui-common/helpers/request'; -import { Query, convertToFilter } from './query'; -import { getOrganizations } from '../../api/organizations'; -import { searchProjects, Facet } from '../../api/components'; +import { Facet, searchProjects } from '../../api/components'; import { getMeasuresForProjects } from '../../api/measures'; -import { isDiffMetric, getPeriodValue } from '../../helpers/measures'; +import { getOrganizations } from '../../api/organizations'; +import { getPeriodValue, isDiffMetric } from '../../helpers/measures'; +import { convertToFilter, Query } from './query'; interface SortingOption { class?: string; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Coverage.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Coverage.tsx index f91dd5f67f7..489bc092879 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Coverage.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Coverage.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import SimpleBubbleChart from './SimpleBubbleChart'; import { Project } from '../types'; +import SimpleBubbleChart from './SimpleBubbleChart'; interface Props { displayOrganizations: boolean; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx index f0972d82fe4..36aaf80d980 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import SimpleBubbleChart from './SimpleBubbleChart'; import { Project } from '../types'; +import SimpleBubbleChart from './SimpleBubbleChart'; interface Props { displayOrganizations: boolean; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Maintainability.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Maintainability.tsx index 7bd976e0365..b5763d15a80 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Maintainability.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Maintainability.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import SimpleBubbleChart from './SimpleBubbleChart'; import { Project } from '../types'; +import SimpleBubbleChart from './SimpleBubbleChart'; interface Props { displayOrganizations: boolean; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Reliability.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Reliability.tsx index 9b42b27b98c..47e37dc54c8 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Reliability.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Reliability.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import SimpleBubbleChart from './SimpleBubbleChart'; import { Project } from '../types'; +import SimpleBubbleChart from './SimpleBubbleChart'; interface Props { displayOrganizations: boolean; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.tsx index 57583a7ffd2..5f4069936d3 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import BubbleChart from 'sonar-ui-common/components/charts/BubbleChart'; +import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; -import { Project } from '../types'; import ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend'; import { RATING_COLORS } from '../../../helpers/constants'; import { getProjectUrl } from '../../../helpers/urls'; +import { Project } from '../types'; const X_METRIC = 'sqale_index'; const X_METRIC_TYPE = 'SHORT_WORK_DUR'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Security.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Security.tsx index 4e5bd53a8d2..13581721727 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Security.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Security.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import SimpleBubbleChart from './SimpleBubbleChart'; import { Project } from '../types'; +import SimpleBubbleChart from './SimpleBubbleChart'; interface Props { displayOrganizations: boolean; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.tsx index e6d20dca4f6..79febca2d35 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import BubbleChart from 'sonar-ui-common/components/charts/BubbleChart'; +import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend'; import { RATING_COLORS } from '../../../helpers/constants'; import { getProjectUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.tsx index d1d72100f15..c3de794561f 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import Risk from './Risk'; -import Reliability from './Reliability'; -import Security from './Security'; -import Maintainability from './Maintainability'; +import { Project } from '../types'; +import { localizeSorting } from '../utils'; import Coverage from './Coverage'; import Duplications from './Duplications'; -import { localizeSorting } from '../utils'; -import { Project } from '../types'; +import Maintainability from './Maintainability'; +import Reliability from './Reliability'; +import Risk from './Risk'; +import Security from './Security'; interface Props { displayOrganizations?: boolean; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Coverage-test.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Coverage-test.tsx index c0a8973b8d5..af63f0c4311 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Coverage-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Coverage-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 Coverage from '../Coverage'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Duplications-test.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Duplications-test.tsx index 1dbe63f8b21..a8a28d0384f 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Duplications-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Duplications-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 Duplications from '../Duplications'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Maintainability-test.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Maintainability-test.tsx index a2f3ba9c07b..5fa717a0dc7 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Maintainability-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Maintainability-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 Maintainability from '../Maintainability'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Reliability-test.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Reliability-test.tsx index c12ffab6935..2c9576d85e7 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Reliability-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Reliability-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 Reliability from '../Reliability'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Risk-test.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Risk-test.tsx index 5f6967e3cca..0be86dfbb7b 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Risk-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Risk-test.tsx @@ -17,10 +17,10 @@ * 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 Risk from '../Risk'; +import * as React from 'react'; import { Project } from '../../types'; +import Risk from '../Risk'; it('renders', () => { const project1: Project = { diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Security-test.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Security-test.tsx index e5ad79c9b6a..dbff212214a 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Security-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Security-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 Security from '../Security'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/SimpleBubbleChart-test.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/SimpleBubbleChart-test.tsx index f8650b120ad..7529d1d0e08 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/SimpleBubbleChart-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/SimpleBubbleChart-test.tsx @@ -17,10 +17,10 @@ * 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 SimpleBubbleChart from '../SimpleBubbleChart'; +import * as React from 'react'; import { Project } from '../../types'; +import SimpleBubbleChart from '../SimpleBubbleChart'; it('renders', () => { const project1: Project = { diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Visualizations-test.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Visualizations-test.tsx index f36228125a1..cc128871226 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Visualizations-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/__tests__/Visualizations-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 Visualizations from '../Visualizations'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx index 7de9677ea73..f8c96116762 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/App.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 { debounce, uniq, without } from 'lodash'; import * as React from 'react'; import Helmet from 'react-helmet'; -import { debounce, uniq, without } from 'lodash'; +import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; import { toNotSoISOString } from 'sonar-ui-common/helpers/dates'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import { getComponents, Project } from '../../api/components'; +import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; +import CreateProjectForm from './CreateProjectForm'; import Header from './Header'; -import Search from './Search'; import Projects from './Projects'; -import CreateProjectForm from './CreateProjectForm'; -import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; -import { getComponents, Project } from '../../api/components'; +import Search from './Search'; export interface Props { currentUser: Pick<T.LoggedInUser, 'login'>; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/AppContainer.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/AppContainer.tsx index 34bf91b190b..059abe09b68 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/AppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/AppContainer.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import App from './App'; import { changeProjectDefaultVisibility } from '../../api/permissions'; -import { getAppState, getOrganizationByKey, getCurrentUser, Store } from '../../store/rootReducer'; -import { fetchOrganization } from '../../store/rootActions'; import { receiveOrganizations } from '../../store/organizations'; +import { fetchOrganization } from '../../store/rootActions'; +import { getAppState, getCurrentUser, getOrganizationByKey, Store } from '../../store/rootReducer'; +import App from './App'; interface StateProps { appState: { defaultOrganization: string; qualifiers: string[] }; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx index 2c10f12852a..5c73ebbbd51 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { toNotSoISOString } from 'sonar-ui-common/helpers/dates'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import Select from 'sonar-ui-common/components/controls/Select'; -import { getPermissionTemplates, bulkApplyTemplate } from '../../api/permissions'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { toNotSoISOString } from 'sonar-ui-common/helpers/dates'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { bulkApplyTemplate, getPermissionTemplates } from '../../api/permissions'; export interface Props { analyzedBefore: Date | undefined; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx index be3465b3518..b5ca045a803 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.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 * as classNames from 'classnames'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; export interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx index a1ae7dd12be..1794c814505 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx @@ -18,16 +18,16 @@ * 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 { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { Link } from 'react-router'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { createProject } from '../../api/components'; -import UpgradeOrganizationBox from '../create/components/UpgradeOrganizationBox'; import VisibilitySelector from '../../components/common/VisibilitySelector'; import { getProjectUrl } from '../../helpers/urls'; +import UpgradeOrganizationBox from '../create/components/UpgradeOrganizationBox'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx index c4ebb6bbd48..b4d8269981e 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { toNotSoISOString } from 'sonar-ui-common/helpers/dates'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { toNotSoISOString } from 'sonar-ui-common/helpers/dates'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { bulkDeleteProjects } from '../../api/components'; export interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx index b3c87ccfc74..701b28da158 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Button, EditButton } from 'sonar-ui-common/components/controls/buttons'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { EditButton, Button } from 'sonar-ui-common/components/controls/buttons'; -import ChangeDefaultVisibilityForm from './ChangeDefaultVisibilityForm'; import { isSonarCloud } from '../../helpers/system'; +import ChangeDefaultVisibilityForm from './ChangeDefaultVisibilityForm'; export interface Props { hasProvisionPermission?: boolean; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx index b76fe3fa4ab..21b4fa11589 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import { Link } from 'react-router'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; -import ProjectRowActions from './ProjectRowActions'; +import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; +import { Project } from '../../api/components'; import PrivacyBadgeContainer from '../../components/common/PrivacyBadgeContainer'; import DateTooltipFormatter from '../../components/intl/DateTooltipFormatter'; -import { Project } from '../../api/components'; +import ProjectRowActions from './ProjectRowActions'; interface Props { currentUser: Pick<T.LoggedInUser, 'login'>; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx index 54727d18669..ac49f162fe7 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx @@ -18,16 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ActionsDropdown, { ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import RestoreAccessModal from './RestoreAccessModal'; -import ApplyTemplate from '../permissions/project/components/ApplyTemplate'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Project } from '../../api/components'; import { getComponentNavigation } from '../../api/nav'; import { getComponentPermissionsUrl } from '../../helpers/urls'; +import ApplyTemplate from '../permissions/project/components/ApplyTemplate'; +import RestoreAccessModal from './RestoreAccessModal'; export interface Props { currentUser: Pick<T.LoggedInUser, 'login'>; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Projects.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Projects.tsx index 5c89aaac9b1..642ceb0882f 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Projects.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 { translate } from 'sonar-ui-common/helpers/l10n'; -import ProjectRow from './ProjectRow'; import { Project } from '../../api/components'; +import ProjectRow from './ProjectRow'; interface Props { currentUser: Pick<T.LoggedInUser, 'login'>; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx index ad11a0f3ded..3327034d4f7 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import { grantPermissionToUser } from '../../api/permissions'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Project } from '../../api/components'; +import { grantPermissionToUser } from '../../api/permissions'; interface Props { currentUser: Pick<T.LoggedInUser, 'login'>; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx index 81835b45b74..4f80bfc7b98 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Search.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 QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import { sortBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; import Select from 'sonar-ui-common/components/controls/Select'; +import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { Project } from '../../api/components'; +import DateInput from '../../components/controls/DateInput'; import BulkApplyTemplateModal from './BulkApplyTemplateModal'; import DeleteModal from './DeleteModal'; -import DateInput from '../../components/controls/DateInput'; -import { Project } from '../../api/components'; export interface Props { analyzedBefore: Date | undefined; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx index eaa33f8dec5..758f41ebdbf 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; +import * as React from 'react'; import App, { Props } from '../App'; jest.mock('lodash', () => { diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx index 8bec56364c4..815b871e52d 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { mount, shallow } from 'enzyme'; -import BulkApplyTemplateModal, { Props } from '../BulkApplyTemplateModal'; -import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; +import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import BulkApplyTemplateModal, { Props } from '../BulkApplyTemplateModal'; jest.mock('../../../api/permissions', () => ({ bulkApplyTemplate: jest.fn(() => Promise.resolve()), diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ChangeDefaultVisibilityForm-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ChangeDefaultVisibilityForm-test.tsx index 2c5045b55c0..af37537a1cd 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ChangeDefaultVisibilityForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ChangeDefaultVisibilityForm-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 { click } from 'sonar-ui-common/helpers/testUtils'; import ChangeDefaultVisibilityForm from '../ChangeDefaultVisibilityForm'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx index 111d396074f..7514e9aecce 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx @@ -24,10 +24,10 @@ jest.mock('../../../api/components', () => ({ ) })); -import * as React from 'react'; import { shallow } from 'enzyme'; -import CreateProjectForm from '../CreateProjectForm'; +import * as React from 'react'; import { change, submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import CreateProjectForm from '../CreateProjectForm'; const createProject = require('../../../api/components').createProject as jest.Mock<any>; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx index 7683448ed02..ca559355e3f 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx @@ -22,11 +22,11 @@ jest.mock('../../../api/components', () => ({ bulkDeleteProjects: jest.fn(() => Promise.resolve()) })); -import * as React from 'react'; import { shallow } from 'enzyme'; -import DeleteModal, { Props } from '../DeleteModal'; -import { click } from 'sonar-ui-common/helpers/testUtils'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; +import { click } from 'sonar-ui-common/helpers/testUtils'; +import DeleteModal, { Props } from '../DeleteModal'; const bulkDeleteProjects = require('../../../api/components').bulkDeleteProjects as jest.Mock<any>; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Header-test.tsx index 28c593e890c..79904f46c95 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Header-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 { click } from 'sonar-ui-common/helpers/testUtils'; import Header, { Props } from '../Header'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRow-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRow-test.tsx index 8500001a6a3..b13eaaf8389 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRow-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRow-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 ProjectRow from '../ProjectRow'; const project = { diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRowActions-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRowActions-test.tsx index 9ef48c4026f..3f40b0ee688 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRowActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRowActions-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 { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import ProjectRowActions, { Props } from '../ProjectRowActions'; -import { mockLoggedInUser } from '../../../helpers/testMocks'; import { getComponentNavigation } from '../../../api/nav'; +import { mockLoggedInUser } from '../../../helpers/testMocks'; +import ProjectRowActions, { Props } from '../ProjectRowActions'; jest.mock('../../../api/nav', () => ({ getComponentNavigation: jest.fn().mockResolvedValue({}) diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Projects-test.tsx index 448f36625c8..29e6de96e8e 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Projects-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Projects-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 Projects from '../Projects'; const organization = { key: 'org', name: 'org', projectVisibility: 'public' }; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Search-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Search-test.tsx index b78e61297db..0b2aea4b0dd 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Search-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Search-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 { click } from 'sonar-ui-common/helpers/testUtils'; import Search, { Props } from '../Search'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx index eaff4833624..7dd90d2c88d 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx @@ -20,23 +20,23 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { WithRouterProps } from 'react-router'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { addSideBarClass, addWhitePageClass, removeSideBarClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import Details from './Details'; -import List from './List'; -import ListHeader from './ListHeader'; -import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import { fetchQualityGates } from '../../../api/quality-gates'; -import { getQualityGateUrl } from '../../../helpers/urls'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; import '../../../components/search-navigator.css'; +import { getQualityGateUrl } from '../../../helpers/urls'; import '../styles.css'; +import Details from './Details'; +import List from './List'; +import ListHeader from './ListHeader'; interface Props extends WithRouterProps { organization?: Pick<T.Organization, 'key'>; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx index fd51afca73b..cca68961575 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.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 { translate } from 'sonar-ui-common/helpers/l10n'; import DocTooltip from '../../../components/docs/DocTooltip'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx index 79a98095530..84a6e8b4e94 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx @@ -18,18 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import ActionsDropdown, { + ActionsDropdownItem +} from 'sonar-ui-common/components/controls/ActionsDropdown'; +import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; import { - translate, getLocalizedMetricName, + translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; -import ActionsDropdown, { - ActionsDropdownItem -} from 'sonar-ui-common/components/controls/ActionsDropdown'; -import ConditionModal from './ConditionModal'; import { deleteCondition } from '../../../api/quality-gates'; +import ConditionModal from './ConditionModal'; interface Props { condition: T.Condition; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx index 7ddad4e8b7e..ba87f3434a8 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, getLocalizedMetricName } from 'sonar-ui-common/helpers/l10n'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import MetricSelect from './MetricSelect'; -import ConditionOperator from './ConditionOperator'; -import ThresholdInput from './ThresholdInput'; +import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; import { createCondition, updateCondition } from '../../../api/quality-gates'; import { getPossibleOperators } from '../utils'; +import ConditionOperator from './ConditionOperator'; +import MetricSelect from './MetricSelect'; +import ThresholdInput from './ThresholdInput'; interface Props { condition?: T.Condition; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionOperator.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionOperator.tsx index 5be41be1de7..a6d44dc1446 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionOperator.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionOperator.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getPossibleOperators } from '../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx index c3e3804f7fc..5c04b8148a6 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx @@ -17,15 +17,15 @@ * 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 { differenceWith, map, sortBy, uniqBy } from 'lodash'; -import { translate, getLocalizedMetricName } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ModalButton from 'sonar-ui-common/components/controls/ModalButton'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; +import DocTooltip from '../../../components/docs/DocTooltip'; import Condition from './Condition'; import ConditionModal from './ConditionModal'; -import DocTooltip from '../../../components/docs/DocTooltip'; interface Props { canEdit: boolean; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx index fa2c8bdf741..1670886c74c 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { copyQualityGate } from '../../../api/quality-gates'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; import { getQualityGateUrl } from '../../../helpers/urls'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx index 90acce88d7d..e3936f140e3 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { createQualityGate } from '../../../api/quality-gates'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; import { getQualityGateUrl } from '../../../helpers/urls'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx index 8e6bbe9b863..3c822e3e0ff 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { deleteQualityGate } from '../../../api/quality-gates'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; import { getQualityGatesUrl } from '../../../helpers/urls'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; interface Props { onDelete: () => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx index 386fadf2e85..e2f2dff4fa9 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx @@ -21,12 +21,12 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import DetailsHeader from './DetailsHeader'; -import DetailsContent from './DetailsContent'; -import { getMetrics, Store } from '../../../store/rootReducer'; -import { fetchMetrics } from '../../../store/rootActions'; import { fetchQualityGate } from '../../../api/quality-gates'; -import { checkIfDefault, addCondition, replaceCondition, deleteCondition } from '../utils'; +import { fetchMetrics } from '../../../store/rootActions'; +import { getMetrics, Store } from '../../../store/rootReducer'; +import { addCondition, checkIfDefault, deleteCondition, replaceCondition } from '../utils'; +import DetailsContent from './DetailsContent'; +import DetailsHeader from './DetailsHeader'; interface OwnProps { id: string; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx index 38ea2e8c0b6..bf13d082f92 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import DocTooltip from '../../../components/docs/DocTooltip'; import Conditions from './Conditions'; import Projects from './Projects'; -import DocTooltip from '../../../components/docs/DocTooltip'; interface Props { isDefault?: boolean; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx index b175b15bc5b..4d61edff81b 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ModalButton from 'sonar-ui-common/components/controls/ModalButton'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { setQualityGateAsDefault } from '../../../api/quality-gates'; import BuiltInQualityGateBadge from './BuiltInQualityGateBadge'; -import RenameQualityGateForm from './RenameQualityGateForm'; import CopyQualityGateForm from './CopyQualityGateForm'; import DeleteQualityGateForm from './DeleteQualityGateForm'; -import { setQualityGateAsDefault } from '../../../api/quality-gates'; +import RenameQualityGateForm from './RenameQualityGateForm'; interface Props { onSetDefault: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx index 3d66dd9b26d..7ada92f5d67 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import { Link } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import BuiltInQualityGateBadge from './BuiltInQualityGateBadge'; import { getQualityGateUrl } from '../../../helpers/urls'; +import BuiltInQualityGateBadge from './BuiltInQualityGateBadge'; interface Props { organization?: string; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx index f13b6507bc8..032692b0b2f 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ModalButton from 'sonar-ui-common/components/controls/ModalButton'; -import CreateQualityGateForm from './CreateQualityGateForm'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import DocTooltip from '../../../components/docs/DocTooltip'; +import CreateQualityGateForm from './CreateQualityGateForm'; interface Props { canCreate: boolean; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx index e1069d8c516..2a6f9ad4a00 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx @@ -17,14 +17,14 @@ * 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 { sortBy } from 'lodash'; +import * as React from 'react'; +import Select from 'sonar-ui-common/components/controls/Select'; import { - translate, + getLocalizedMetricDomain, getLocalizedMetricName, - getLocalizedMetricDomain + translate } from 'sonar-ui-common/helpers/l10n'; -import Select from 'sonar-ui-common/components/controls/Select'; interface Props { metrics: T.Metric[]; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx index 05bb7d8e7d7..0b89853b691 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx @@ -17,13 +17,13 @@ * 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 { find, without } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import SelectList, { SelectListFilter, SelectListSearchParams } from 'sonar-ui-common/components/controls/SelectList'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { associateGateWithProject, dissociateGateWithProject, diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx index b6e438e73cb..89edd5b6b18 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { renameQualityGate } from '../../../api/quality-gates'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ConditionModal-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ConditionModal-test.tsx index b1769f7a610..7b243bf4b42 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ConditionModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ConditionModal-test.tsx @@ -17,10 +17,10 @@ * 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 ConditionModal from '../ConditionModal'; +import * as React from 'react'; import { mockQualityGate } from '../../../../helpers/testMocks'; +import ConditionModal from '../ConditionModal'; it('should render correctly', () => { const wrapper = shallowRender(); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ConditionOperator-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ConditionOperator-test.tsx index ef6c9fd2776..6b4228d3324 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ConditionOperator-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ConditionOperator-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 ConditionOperator from '../ConditionOperator'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CopyQualityGateForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CopyQualityGateForm-test.tsx index 85310abd443..3f8423842ec 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CopyQualityGateForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CopyQualityGateForm-test.tsx @@ -17,10 +17,10 @@ * 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 CopyQualityGateForm from '../CopyQualityGateForm'; +import * as React from 'react'; import { mockQualityGate } from '../../../../helpers/testMocks'; +import CopyQualityGateForm from '../CopyQualityGateForm'; it('should render correctly', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CreateQualityGateForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CreateQualityGateForm-test.tsx index dde2fafa955..474eb5c3aa7 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CreateQualityGateForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CreateQualityGateForm-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 CreateQualityGateForm from '../CreateQualityGateForm'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/MetricSelect-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/MetricSelect-test.tsx index ad2d9fea3f3..6210a5adc43 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/MetricSelect-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/MetricSelect-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 MetricSelect from '../MetricSelect'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx index fa12351ea98..ec5d27898dc 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx @@ -19,15 +19,15 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import SelectList, { SelectListFilter } from 'sonar-ui-common/components/controls/SelectList'; -import Projects from '../Projects'; -import { mockQualityGate } from '../../../../helpers/testMocks'; +import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { - searchProjects, associateGateWithProject, - dissociateGateWithProject + dissociateGateWithProject, + searchProjects } from '../../../../api/quality-gates'; +import { mockQualityGate } from '../../../../helpers/testMocks'; +import Projects from '../Projects'; const qualityGate = mockQualityGate(); const organization = 'TEST'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/RenameQualityGateForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/RenameQualityGateForm-test.tsx index 1ed1d7d18eb..bdd1ce4841c 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/RenameQualityGateForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/RenameQualityGateForm-test.tsx @@ -17,10 +17,10 @@ * 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 RenameQualityGateForm from '../RenameQualityGateForm'; +import * as React from 'react'; import { mockQualityGate } from '../../../../helpers/testMocks'; +import RenameQualityGateForm from '../RenameQualityGateForm'; it('should render correctly', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.tsx index edc3654e2a0..598068115e8 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-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 { change } from 'sonar-ui-common/helpers/testUtils'; import ThresholdInput from '../ThresholdInput'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.ts index cf3826f12d4..4f13b95c19d 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/quality-profiles/__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 { sortProfiles } from '../utils'; import { Profile } from '../types'; +import { sortProfiles } from '../utils'; function createProfile(key: string, parentKey?: string) { return { name: key, key, parentKey } as Profile; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx index 38515f1a09d..798169075ba 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.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 isSameMinute from 'date-fns/is_same_minute'; +import { sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; -import { sortBy } from 'lodash'; -import * as isSameMinute from 'date-fns/is_same_minute'; import { parseDate } from 'sonar-ui-common/helpers/dates'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ChangesList from './ChangesList'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import { getRulesUrl } from '../../../helpers/urls'; import { ProfileChangelogEvent } from '../types'; +import ChangesList from './ChangesList'; interface Props { events: ProfileChangelogEvent[]; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx index d0211605f04..aa92d3750f9 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx @@ -21,12 +21,12 @@ import * as React from 'react'; import { withRouter, WithRouterProps } from 'react-router'; import { parseDate, toShortNotSoISOString } from 'sonar-ui-common/helpers/dates'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Changelog from './Changelog'; -import ChangelogSearch from './ChangelogSearch'; -import ChangelogEmpty from './ChangelogEmpty'; import { getProfileChangelog } from '../../../api/quality-profiles'; -import { getProfileChangelogPath } from '../utils'; import { Profile, ProfileChangelogEvent } from '../types'; +import { getProfileChangelogPath } from '../utils'; +import Changelog from './Changelog'; +import ChangelogEmpty from './ChangelogEmpty'; +import ChangelogSearch from './ChangelogSearch'; interface Props extends WithRouterProps { organization: string | null; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx index f7a9937adef..d348cdf6712 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import DateRangeInput from '../../../components/controls/DateRangeInput'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.tsx index 2f27ed4c65d..62f4285966e 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import SeverityChange from './SeverityChange'; import ParameterChange from './ParameterChange'; +import SeverityChange from './SeverityChange'; interface Props { changes: T.Dict<string | null>; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx index 4afbc84b778..c90da95cb97 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { ProfileChangelogEvent } from '../../types'; import Changelog from '../Changelog'; import ChangesList from '../ChangesList'; -import { ProfileChangelogEvent } from '../../types'; function createEvent(overrides?: Partial<ProfileChangelogEvent>): ProfileChangelogEvent { return { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangesList-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangesList-test.tsx index 6fb2f6e823d..8b905783bf7 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangesList-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangesList-test.tsx @@ -20,8 +20,8 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import ChangesList from '../ChangesList'; -import SeverityChange from '../SeverityChange'; import ParameterChange from '../ParameterChange'; +import SeverityChange from '../SeverityChange'; it('should render changes', () => { const changes = { severity: 'BLOCKER', foo: 'bar' }; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/SeverityChange-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/SeverityChange-test.tsx index 660d2bfcb13..1370cab088b 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/SeverityChange-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/SeverityChange-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import SeverityChange from '../SeverityChange'; import SeverityHelper from '../../../../components/shared/SeverityHelper'; +import SeverityChange from '../SeverityChange'; it('should render SeverityHelper', () => { const output = shallow(<SeverityChange severity="BLOCKER" />).find(SeverityHelper); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx index 1a201c990bd..b3bfb157f0e 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { withRouter, WithRouterProps } from 'react-router'; -import ComparisonForm from './ComparisonForm'; -import ComparisonResults from './ComparisonResults'; import { compareProfiles, CompareResponse } from '../../../api/quality-profiles'; -import { getProfileComparePath } from '../utils'; import { Profile } from '../types'; +import { getProfileComparePath } from '../utils'; +import ComparisonForm from './ComparisonForm'; +import ComparisonResults from './ComparisonResults'; interface Props extends WithRouterProps { organization?: string; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx index fde6c0583ad..280d29db061 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Profile } from '../types'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx index e58e2bf64ce..a9c556510b3 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Profile } from '../../../api/quality-profiles'; import { getRuleDetails } from '../../../api/rules'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx index 18ccfe9808e..6efe7b368f3 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx @@ -23,10 +23,10 @@ import ChevronLeftIcon from 'sonar-ui-common/components/icons/ChevronLeftIcon'; import ChevronRightIcon from 'sonar-ui-common/components/icons/ChevronRightIcon'; import SeverityIcon from 'sonar-ui-common/components/icons/SeverityIcon'; import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { CompareResponse, Profile } from '../../../api/quality-profiles'; +import { getRulesUrl } from '../../../helpers/urls'; import ComparisonEmpty from './ComparisonEmpty'; import ComparisonResultActivation from './ComparisonResultActivation'; -import { getRulesUrl } from '../../../helpers/urls'; -import { CompareResponse, Profile } from '../../../api/quality-profiles'; type Params = T.Dict<string>; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonForm-test.tsx index 514a7acd2d0..288ef7d986e 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonForm-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import ComparisonForm from '../ComparisonForm'; import { mockQualityProfile } from '../../../../helpers/testMocks'; +import ComparisonForm from '../ComparisonForm'; it('should render Select with right options', () => { const profile = mockQualityProfile(); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResultActivation-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResultActivation-test.tsx index 2c8d7450b3d..150777c095a 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResultActivation-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResultActivation-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import ComparisonResultActivation from '../ComparisonResultActivation'; import { Profile } from '../../../../api/quality-profiles'; +import ComparisonResultActivation from '../ComparisonResultActivation'; jest.mock('../../../../api/rules', () => ({ getRuleDetails: jest.fn().mockResolvedValue({ key: 'foo' }) diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.tsx index 3653943ff56..72f7b89cb83 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.tsx @@ -20,9 +20,9 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { Link } from 'react-router'; -import ComparisonResults from '../ComparisonResults'; -import ComparisonEmpty from '../ComparisonEmpty'; import { Profile } from '../../../../api/quality-profiles'; +import ComparisonEmpty from '../ComparisonEmpty'; +import ComparisonResults from '../ComparisonResults'; it('should render ComparisonEmpty', () => { const output = shallow( diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx index 8af6e8742c0..165956f67c0 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { searchQualityProfiles, getExporters, Actions } from '../../../api/quality-profiles'; +import { Actions, getExporters, searchQualityProfiles } from '../../../api/quality-profiles'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { sortProfiles } from '../utils'; -import { Exporter, Profile } from '../types'; import OrganizationHelmet from '../../../components/common/OrganizationHelmet'; import '../styles.css'; +import { Exporter, Profile } from '../types'; +import { sortProfiles } from '../utils'; interface Props { children: React.ReactElement<any>; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/AppContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/AppContainer.tsx index 89bf7448f64..534a63c1ca2 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/AppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/AppContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import App from './App'; import { getLanguages, getOrganizationByKey, Store } from '../../../store/rootReducer'; +import App from './App'; const mapStateToProps = (state: Store, ownProps: any) => ({ languages: getLanguages(state), diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx index 599cf63a29d..b8dcedb1c3f 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.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 { translate } from 'sonar-ui-common/helpers/l10n'; import DocTooltip from '../../../components/docs/DocTooltip'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/CopyProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/CopyProfileForm.tsx index 166ad3a27ee..7699b2e0776 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/CopyProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/CopyProfileForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import { Profile } from '../types'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { copyProfile } from '../../../api/quality-profiles'; +import { Profile } from '../types'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx index 8a0e151d704..2aaf88c3f84 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import { Profile } from '../types'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { deleteProfile } from '../../../api/quality-profiles'; +import { Profile } from '../types'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ExtendProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ExtendProfileForm.tsx index 84899c7dd86..567c48f0687 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ExtendProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ExtendProfileForm.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { changeProfileParent, createQualityProfile } from '../../../api/quality-profiles'; import { Profile } from '../types'; -import { createQualityProfile, changeProfileParent } from '../../../api/quality-profiles'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx index c3a0490d615..c1a9b343552 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx @@ -18,20 +18,20 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ActionsDropdown, { - ActionsDropdownItem, - ActionsDropdownDivider + ActionsDropdownDivider, + ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; -import RenameProfileForm from './RenameProfileForm'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { setDefaultProfile } from '../../../api/quality-profiles'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; +import { getRulesUrl } from '../../../helpers/urls'; +import { Profile } from '../types'; +import { getProfileComparePath, getProfilePath, getProfilesPath } from '../utils'; import CopyProfileForm from './CopyProfileForm'; import DeleteProfileForm from './DeleteProfileForm'; import ExtendProfileForm from './ExtendProfileForm'; -import { getRulesUrl } from '../../../helpers/urls'; -import { setDefaultProfile } from '../../../api/quality-profiles'; -import { getProfilePath, getProfileComparePath, getProfilesPath } from '../utils'; -import { Profile } from '../types'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; +import RenameProfileForm from './RenameProfileForm'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx index f56c173a70c..e40a7e23eac 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import Helmet from 'react-helmet'; import { WithRouterProps } from 'react-router'; -import ProfileNotFound from './ProfileNotFound'; import ProfileHeader from '../details/ProfileHeader'; import { Profile } from '../types'; +import ProfileNotFound from './ProfileNotFound'; interface Props { children: React.ReactElement<any>; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.tsx index 0009955b552..3737df4b2e2 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import DateFromNow from '../../../components/intl/DateFromNow'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/RenameProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/RenameProfileForm.tsx index fe7daff295a..9d1fa253be4 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/RenameProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/RenameProfileForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import { Profile } from '../types'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { renameProfile } from '../../../api/quality-profiles'; +import { Profile } from '../types'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-test.tsx index ec078d262eb..27cebfc1b69 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-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 { click } from 'sonar-ui-common/helpers/testUtils'; -import ExtendProfileForm from '../ExtendProfileForm'; -import { createQualityProfile, changeProfileParent } from '../../../../api/quality-profiles'; +import { changeProfileParent, createQualityProfile } from '../../../../api/quality-profiles'; import { mockQualityProfile } from '../../../../helpers/testMocks'; +import ExtendProfileForm from '../ExtendProfileForm'; jest.mock('../../../../api/quality-profiles', () => ({ createQualityProfile: jest.fn().mockResolvedValue({ profile: { key: 'new-profile' } }), diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileActions-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileActions-test.tsx index 0e25063f208..5e037a560c5 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileActions-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { ProfileActions } from '../ProfileActions'; import { mockQualityProfile, mockRouter } from '../../../../helpers/testMocks'; +import { ProfileActions } from '../ProfileActions'; const PROFILE = mockQualityProfile({ activeRuleCount: 68, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx index 20aae44fc0b..774f3976501 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx @@ -17,14 +17,14 @@ * 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 Helmet from 'react-helmet'; import { WithRouterProps } from 'react-router'; +import { mockQualityProfile } from '../../../../helpers/testMocks'; +import ProfileHeader from '../../details/ProfileHeader'; import ProfileContainer from '../ProfileContainer'; import ProfileNotFound from '../ProfileNotFound'; -import ProfileHeader from '../../details/ProfileHeader'; -import { mockQualityProfile } from '../../../../helpers/testMocks'; const routerProps = { router: {} } as WithRouterProps; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx index d50bba64ee8..41aa3af09f8 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx @@ -17,14 +17,14 @@ * 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 { sortBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import * as React from 'react'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import Select from 'sonar-ui-common/components/controls/Select'; -import { Profile } from '../types'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { changeProfileParent } from '../../../api/quality-profiles'; +import { Profile } from '../types'; interface Props { onChange: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx index d7ec7959131..559a4bb9f6c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx @@ -17,21 +17,21 @@ * 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 { find, without } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Modal from 'sonar-ui-common/components/controls/Modal'; import SelectList, { SelectListFilter, SelectListSearchParams } from 'sonar-ui-common/components/controls/SelectList'; -import { Profile } from '../types'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { associateProject, dissociateProject, getProfileProjects, ProfileProject } from '../../../api/quality-profiles'; +import { Profile } from '../types'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx index a2befeebb08..ef60ace06d0 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ProfileRules from './ProfileRules'; -import ProfileProjects from './ProfileProjects'; -import ProfileInheritance from './ProfileInheritance'; +import { Exporter, Profile } from '../types'; import ProfileExporters from './ProfileExporters'; +import ProfileInheritance from './ProfileInheritance'; import ProfilePermissions from './ProfilePermissions'; -import { Exporter, Profile } from '../types'; +import ProfileProjects from './ProfileProjects'; +import ProfileRules from './ProfileRules'; interface Props { exporters: Exporter[]; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.tsx index 6514d16aebc..f0908d704af 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.tsx @@ -20,7 +20,7 @@ import { stringify } from 'querystring'; import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Profile, Exporter } from '../types'; +import { Exporter, Profile } from '../types'; interface Props { exporters: Exporter[]; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx index 802f258909c..e359a032362 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx @@ -18,19 +18,19 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Link, IndexLink } from 'react-router'; +import { IndexLink, Link } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ProfileLink from '../components/ProfileLink'; +import BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge'; import ProfileActions from '../components/ProfileActions'; import ProfileDate from '../components/ProfileDate'; -import BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge'; +import ProfileLink from '../components/ProfileLink'; +import { Profile } from '../types'; import { - isStagnant, - getProfilesPath, + getProfileChangelogPath, getProfilesForLanguagePath, - getProfileChangelogPath + getProfilesPath, + isStagnant } from '../utils'; -import { Profile } from '../types'; interface Props { profile: Profile; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx index 7626a02a489..40940d493e1 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx @@ -17,14 +17,14 @@ * 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 { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import ProfileInheritanceBox from './ProfileInheritanceBox'; -import ChangeParentForm from './ChangeParentForm'; -import { Profile } from '../types'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getProfileInheritance } from '../../../api/quality-profiles'; +import { Profile } from '../types'; +import ChangeParentForm from './ChangeParentForm'; +import ProfileInheritanceBox from './ProfileInheritanceBox'; interface Props { organization: string | null; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx index 1d7077c7c01..a2d5db6cff1 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; -import ProfileLink from '../components/ProfileLink'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge'; +import ProfileLink from '../components/ProfileLink'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissions.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissions.tsx index dc919c071df..2c8841706dd 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissions.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 { sortBy, uniqBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import ProfilePermissionsUser from './ProfilePermissionsUser'; -import ProfilePermissionsGroup from './ProfilePermissionsGroup'; -import ProfilePermissionsForm from './ProfilePermissionsForm'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { - searchUsers, searchGroups, + searchUsers, SearchUsersGroupsParameters } from '../../../api/quality-profiles'; import { Profile } from '../types'; +import ProfilePermissionsForm from './ProfilePermissionsForm'; +import ProfilePermissionsGroup from './ProfilePermissionsGroup'; +import ProfilePermissionsUser from './ProfilePermissionsUser'; export interface Group { name: string; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx index 4e93e4f12d4..2043f825c8f 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx @@ -18,18 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import ProfilePermissionsFormSelect from './ProfilePermissionsFormSelect'; -import { Group } from './ProfilePermissions'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { - searchUsers, - searchGroups, - addUser, addGroup, + addUser, + searchGroups, + searchUsers, SearchUsersGroupsParameters } from '../../../api/quality-profiles'; +import { Group } from './ProfilePermissions'; +import ProfilePermissionsFormSelect from './ProfilePermissionsFormSelect'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx index f663611028a..3f5de1e32e4 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx @@ -17,13 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { debounce, identity } from 'lodash'; import * as React from 'react'; +import Select from 'sonar-ui-common/components/controls/Select'; import GroupIcon from 'sonar-ui-common/components/icons/GroupIcon'; -import { debounce, identity } from 'lodash'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import Select from 'sonar-ui-common/components/controls/Select'; -import { Group } from './ProfilePermissions'; import Avatar from '../../../components/ui/Avatar'; +import { Group } from './ProfilePermissions'; type Option = T.UserSelected | Group; type OptionWithValue = Option & { value: string }; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx index ed8b58a2da7..c3c92319101 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import GroupIcon from 'sonar-ui-common/components/icons/GroupIcon'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { DeleteButton, Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { Button, DeleteButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal, { ChildrenProps } from 'sonar-ui-common/components/controls/SimpleModal'; -import { Group } from './ProfilePermissions'; +import GroupIcon from 'sonar-ui-common/components/icons/GroupIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { removeGroup } from '../../../api/quality-profiles'; +import { Group } from './ProfilePermissions'; interface Props { group: Group; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx index 5498efdc9b2..d39fffed6cb 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { DeleteButton, - SubmitButton, - ResetButtonLink + ResetButtonLink, + SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal, { ChildrenProps } from 'sonar-ui-common/components/controls/SimpleModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { removeUser } from '../../../api/quality-profiles'; import Avatar from '../../../components/ui/Avatar'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx index a3f1bdb45ee..70dd2ed5cae 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import ChangeProjectsForm from './ChangeProjectsForm'; -import { Profile } from '../types'; +import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getProfileProjects } from '../../../api/quality-profiles'; +import { Profile } from '../types'; +import ChangeProjectsForm from './ChangeProjectsForm'; interface Props { organization: string | null; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx index 94112a3193c..0e6c50c1482 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx @@ -17,20 +17,20 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { keyBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; -import { keyBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import ProfileRulesRowOfType from './ProfileRulesRowOfType'; -import ProfileRulesRowTotal from './ProfileRulesRowTotal'; -import ProfileRulesDeprecatedWarning from './ProfileRulesDeprecatedWarning'; -import ProfileRulesSonarWayComparison from './ProfileRulesSonarWayComparison'; -import { searchRules, takeFacet } from '../../../api/rules'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getQualityProfile } from '../../../api/quality-profiles'; +import { searchRules, takeFacet } from '../../../api/rules'; +import DocTooltip from '../../../components/docs/DocTooltip'; import { getRulesUrl } from '../../../helpers/urls'; import { Profile } from '../types'; -import DocTooltip from '../../../components/docs/DocTooltip'; +import ProfileRulesDeprecatedWarning from './ProfileRulesDeprecatedWarning'; +import ProfileRulesRowOfType from './ProfileRulesRowOfType'; +import ProfileRulesRowTotal from './ProfileRulesRowTotal'; +import ProfileRulesSonarWayComparison from './ProfileRulesSonarWayComparison'; const TYPES = ['BUG', 'VULNERABILITY', 'CODE_SMELL', 'SECURITY_HOTSPOT']; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx index f70aeea2992..b5a51ccf909 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx @@ -19,8 +19,8 @@ */ 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 { translate } from 'sonar-ui-common/helpers/l10n'; import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx index ac0db586a5b..0beee2bc4ff 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; import { getRulesUrl } from '../../../helpers/urls'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx index e3ee03d5b68..ebedb894deb 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx @@ -19,8 +19,8 @@ */ 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 { translate } from 'sonar-ui-common/helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeProjectsForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeProjectsForm-test.tsx index 610f26ae122..b8928ecf7d9 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeProjectsForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeProjectsForm-test.tsx @@ -20,13 +20,13 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import SelectList, { SelectListFilter } from 'sonar-ui-common/components/controls/SelectList'; -import { waitAndUpdate, click } from 'sonar-ui-common/helpers/testUtils'; -import ChangeProjectsForm from '../ChangeProjectsForm'; +import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { - getProfileProjects, associateProject, - dissociateProject + dissociateProject, + getProfileProjects } from '../../../../api/quality-profiles'; +import ChangeProjectsForm from '../ChangeProjectsForm'; const profile: any = { key: 'profFile_key' }; const organization = 'TEST'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileDetails-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileDetails-test.tsx index e9b7b384e66..b6b91f5c944 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileDetails-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileDetails-test.tsx @@ -17,10 +17,10 @@ * 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 ProfileDetails from '../ProfileDetails'; +import * as React from 'react'; import { Profile } from '../../types'; +import ProfileDetails from '../ProfileDetails'; it('renders without permissions', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissions-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissions-test.tsx index aa5f8479673..79bd398b5b9 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissions-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissions-test.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { mount, shallow } from 'enzyme'; -import ProfilePermissions from '../ProfilePermissions'; +import * as React from 'react'; import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; +import ProfilePermissions from '../ProfilePermissions'; jest.mock('../../../../api/quality-profiles', () => ({ searchUsers: jest.fn(() => Promise.resolve([])), diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsForm-test.tsx index 65517fe1b2a..c29ea301e94 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsForm-test.tsx @@ -23,10 +23,10 @@ jest.mock('../../../../api/quality-profiles', () => ({ addGroup: jest.fn(() => Promise.resolve()) })); -import * as React from 'react'; import { shallow } from 'enzyme'; -import ProfilePermissionsForm from '../ProfilePermissionsForm'; +import * as React from 'react'; import { submit } from 'sonar-ui-common/helpers/testUtils'; +import ProfilePermissionsForm from '../ProfilePermissionsForm'; const addUser = require('../../../../api/quality-profiles').addUser as jest.Mock<any>; const addGroup = require('../../../../api/quality-profiles').addGroup as jest.Mock<any>; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsFormSelect-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsFormSelect-test.tsx index 448e5536a0c..3580993fc36 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsFormSelect-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsFormSelect-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 ProfilePermissionsFormSelect from '../ProfilePermissionsFormSelect'; jest.mock('lodash', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsGroup-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsGroup-test.tsx index f6e3e5388db..76c61a9da74 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsGroup-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsGroup-test.tsx @@ -22,10 +22,10 @@ jest.mock('../../../../api/quality-profiles', () => ({ removeGroup: jest.fn(() => Promise.resolve()) })); -import * as React from 'react'; import { shallow } from 'enzyme'; -import ProfilePermissionsGroup from '../ProfilePermissionsGroup'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; +import ProfilePermissionsGroup from '../ProfilePermissionsGroup'; const removeGroup = require('../../../../api/quality-profiles').removeGroup as jest.Mock<any>; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsUser-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsUser-test.tsx index e70e777f7d6..b6486c31942 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsUser-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsUser-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; -import ProfilePermissionsUser from '../ProfilePermissionsUser'; import { removeUser } from '../../../../api/quality-profiles'; +import ProfilePermissionsUser from '../ProfilePermissionsUser'; jest.mock('../../../../api/quality-profiles', () => ({ removeUser: jest.fn(() => Promise.resolve()) diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileProjects-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileProjects-test.tsx index 6aa5238b4f3..36c45a63c42 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileProjects-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileProjects-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import ProfileProjects from '../ProfileProjects'; import { mockQualityProfile } from '../../../../helpers/testMocks'; +import ProfileProjects from '../ProfileProjects'; jest.mock('../../../../api/quality-profiles', () => ({ getProfileProjects: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRules-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRules-test.tsx index 124fa491bde..8181332f6d5 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRules-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRules-test.tsx @@ -17,13 +17,13 @@ * 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 ProfileRules from '../ProfileRules'; -import * as apiRules from '../../../../api/rules'; import * as apiQP from '../../../../api/quality-profiles'; +import * as apiRules from '../../../../api/rules'; import { mockQualityProfile } from '../../../../helpers/testMocks'; +import ProfileRules from '../ProfileRules'; const PROFILE = mockQualityProfile({ activeRuleCount: 68, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesDeprecatedWarning-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesDeprecatedWarning-test.tsx index 248878e0fad..3170724cd80 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesDeprecatedWarning-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesDeprecatedWarning-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 ProfileRulesDeprecatedWarning from '../ProfileRulesDeprecatedWarning'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesRowOfType-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesRowOfType-test.tsx index c07dfbe4c2b..c99e2f084ae 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesRowOfType-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesRowOfType-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 ProfileRulesRowOfType from '../ProfileRulesRowOfType'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesRowTotal-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesRowTotal-test.tsx index 92516ac8dd5..21d415dd245 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesRowTotal-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesRowTotal-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 ProfileRulesRowTotal from '../ProfileRulesRowTotal'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesSonarWayComparison-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesSonarWayComparison-test.tsx index 0e841615951..5dcd01fff78 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesSonarWayComparison-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRulesSonarWayComparison-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 ProfileRulesSonarWayComparison from '../ProfileRulesSonarWayComparison'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx index 89fb516f665..249064bc116 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.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 { sortBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import * as React from 'react'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { changeProfileParent, createQualityProfile, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/Evolution.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/Evolution.tsx index 212c13a9c70..ca0fb5fa4fa 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/Evolution.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/Evolution.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Profile } from '../types'; import EvolutionDeprecated from './EvolutionDeprecated'; -import EvolutionStagnant from './EvolutionStagnant'; import EvolutionRules from './EvolutionRules'; -import { Profile } from '../types'; +import EvolutionStagnant from './EvolutionStagnant'; interface Props { organization: string | null; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx index 8bd88d61349..d70f5605123 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.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 { sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; -import { sortBy } from 'lodash'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; -import ProfileLink from '../components/ProfileLink'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls'; +import ProfileLink from '../components/ProfileLink'; import { Profile } from '../types'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx index 165b86c633f..6dc79202b37 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.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 { sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; -import { sortBy } from 'lodash'; import { toShortNotSoISOString } from 'sonar-ui-common/helpers/dates'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; import { searchRules } from '../../../api/rules'; import { getRulesUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx index adeeb8fe88a..02bbee0e237 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx @@ -21,8 +21,8 @@ import * as React from 'react'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import DateFormatter from '../../../components/intl/DateFormatter'; import ProfileLink from '../components/ProfileLink'; -import { isStagnant } from '../utils'; import { Profile } from '../types'; +import { isStagnant } from '../utils'; interface Props { organization: string | null; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/HomeContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/HomeContainer.tsx index defe270b574..ef6e41be429 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/HomeContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/HomeContainer.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import PageHeader from './PageHeader'; +import { Actions } from '../../../api/quality-profiles'; +import { Profile } from '../types'; import Evolution from './Evolution'; +import PageHeader from './PageHeader'; import ProfilesList from './ProfilesList'; -import { Profile } from '../types'; -import { Actions } from '../../../api/quality-profiles'; interface Props { actions: Actions; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx index e320068db79..34f1d73d68e 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx @@ -19,15 +19,15 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import CreateProfileForm from './CreateProfileForm'; -import RestoreProfileForm from './RestoreProfileForm'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { Actions } from '../../../api/quality-profiles'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; import { Profile } from '../types'; import { getProfilePath } from '../utils'; -import { Actions } from '../../../api/quality-profiles'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; +import CreateProfileForm from './CreateProfileForm'; +import RestoreProfileForm from './RestoreProfileForm'; interface Props { actions: Actions; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx index 1058eb12383..93bd415bd08 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx @@ -17,15 +17,15 @@ * 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 { groupBy, pick, sortBy } from 'lodash'; import { Location } from 'history'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { groupBy, pick, sortBy } from 'lodash'; +import * as React from 'react'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import ProfilesListRow from './ProfilesListRow'; -import ProfilesListHeader from './ProfilesListHeader'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import DocTooltip from '../../../components/docs/DocTooltip'; import { Profile } from '../types'; +import ProfilesListHeader from './ProfilesListHeader'; +import ProfilesListRow from './ProfilesListRow'; interface Props { languages: T.Language[]; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx index b9a2f6b18fc..5fb64210365 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Select from 'sonar-ui-common/components/controls/Select'; -import { getProfilesPath, getProfilesForLanguagePath } from '../utils'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; +import { getProfilesForLanguagePath, getProfilesPath } from '../utils'; interface Props { currentFilter?: string; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx index 5b249be9f0c..fbafb80a7de 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx @@ -19,16 +19,16 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import ProfileLink from '../components/ProfileLink'; -import ProfileDate from '../components/ProfileDate'; -import ProfileActions from '../components/ProfileActions'; -import BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import DocTooltip from '../../../components/docs/DocTooltip'; import { getRulesUrl } from '../../../helpers/urls'; -import { isStagnant } from '../utils'; +import BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge'; +import ProfileActions from '../components/ProfileActions'; +import ProfileDate from '../components/ProfileDate'; +import ProfileLink from '../components/ProfileLink'; import { Profile } from '../types'; -import DocTooltip from '../../../components/docs/DocTooltip'; +import { isStagnant } from '../utils'; interface Props { organization: string | null; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx index 1a1e120119f..5b668ab9d38 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { restoreQualityProfile } from '../../../api/quality-profiles'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/CreateProfileForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/CreateProfileForm-test.tsx index 6d5c388e38b..d36546a0126 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/CreateProfileForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/CreateProfileForm-test.tsx @@ -17,10 +17,10 @@ * 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 CreateProfileForm from '../CreateProfileForm'; +import * as React from 'react'; import { mockQualityProfile } from '../../../../helpers/testMocks'; +import CreateProfileForm from '../CreateProfileForm'; jest.mock('../../../../api/quality-profiles', () => ({ changeProfileParent: jest.fn(), diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/EvolutionDeprecated-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/EvolutionDeprecated-test.tsx index ae320ce8ef7..cf82d8a0277 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/EvolutionDeprecated-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/EvolutionDeprecated-test.tsx @@ -17,10 +17,10 @@ * 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 EvolutionDeprecated from '../EvolutionDeprecated'; +import * as React from 'react'; import { mockQualityProfile } from '../../../../helpers/testMocks'; +import EvolutionDeprecated from '../EvolutionDeprecated'; it('should render correctly', () => { const wrapper = shallow( diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/PageHeader-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/PageHeader-test.tsx index 28facb5a45c..b12f5fe7181 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/PageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/PageHeader-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; -import { PageHeader } from '../PageHeader'; import { mockLanguage, mockQualityProfile, mockRouter } from '../../../../helpers/testMocks'; +import { PageHeader } from '../PageHeader'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/ProfilesList-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/ProfilesList-test.tsx index 560523ffebc..93213f98bd1 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/ProfilesList-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/ProfilesList-test.tsx @@ -17,10 +17,10 @@ * 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 ProfilesList from '../ProfilesList'; +import * as React from 'react'; import { mockLanguage, mockLocation, mockQualityProfile } from '../../../../helpers/testMocks'; +import ProfilesList from '../ProfilesList'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/ProfilesListHeader-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/ProfilesListHeader-test.tsx index 377d9a8b016..4cb21177735 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/ProfilesListHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/ProfilesListHeader-test.tsx @@ -17,10 +17,10 @@ * 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 { ProfilesListHeader } from '../ProfilesListHeader'; +import * as React from 'react'; import { mockRouter } from '../../../../helpers/testMocks'; +import { ProfilesListHeader } from '../ProfilesListHeader'; it('should render correctly', () => { const wrapper = shallowRender(); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/RestoreProfileForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/RestoreProfileForm-test.tsx index f5c082b3d3b..0b85dc70bc6 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/RestoreProfileForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/RestoreProfileForm-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 RestoreProfileForm from '../RestoreProfileForm'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts b/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts index c288f4cd1e2..71926d0bbde 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts +++ b/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts @@ -20,8 +20,8 @@ import * as differenceInYears from 'date-fns/difference_in_years'; import { sortBy } from 'lodash'; import { isValidDate, parseDate } from 'sonar-ui-common/helpers/dates'; -import { Profile } from './types'; import { Profile as BaseProfile } from '../../api/quality-profiles'; +import { Profile } from './types'; export function sortProfiles(profiles: BaseProfile[]): Profile[] { const result: Profile[] = []; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/EmailAlreadyExists.tsx b/server/sonar-web/src/main/js/apps/sessions/components/EmailAlreadyExists.tsx index 005ec2fb9e6..e4e5b7c23a6 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/EmailAlreadyExists.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/EmailAlreadyExists.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; import { getTextColor } from 'sonar-ui-common/helpers/colors'; import { getCookie } from 'sonar-ui-common/helpers/cookies'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import { colors } from '../../../app/theme'; import { getIdentityProviders } from '../../../api/users'; +import { colors } from '../../../app/theme'; interface State { identityProviders: T.IdentityProvider[]; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx b/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx index fb66dfff36f..907a5ce63c1 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import LoginForm from './LoginForm'; -import OAuthProviders from './OAuthProviders'; import GlobalMessagesContainer from '../../../app/components/GlobalMessagesContainer'; import './Login.css'; +import LoginForm from './LoginForm'; +import OAuthProviders from './OAuthProviders'; interface Props { identityProviders: T.IdentityProvider[]; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx index bc866210dac..3edae6c67b1 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { getReturnUrl } from 'sonar-ui-common/helpers/urls'; -import Login from './Login'; -import LoginSonarCloud from './LoginSonarCloud'; -import { doLogin } from '../../../store/rootActions'; import { getIdentityProviders } from '../../../api/users'; import { isSonarCloud } from '../../../helpers/system'; +import { doLogin } from '../../../store/rootActions'; +import Login from './Login'; +import LoginSonarCloud from './LoginSonarCloud'; interface OwnProps { location: { diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx index 387104d95f8..11ebb9851c0 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; import './LoginForm.css'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginSonarCloud.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginSonarCloud.tsx index 877b20d4514..c16147c3b5c 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginSonarCloud.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginSonarCloud.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 classNames from 'classnames'; import * as React from 'react'; import { connect } from 'react-redux'; -import * as classNames from 'classnames'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { Store } from '../../../store/rootReducer'; import LoginForm from './LoginForm'; -import OAuthProviders from './OAuthProviders'; import './LoginSonarCloud.css'; -import { Store } from '../../../store/rootReducer'; +import OAuthProviders from './OAuthProviders'; interface Props { identityProviders: T.IdentityProvider[]; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx b/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx index acf5012e120..02986d031f5 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.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 * as classNames from 'classnames'; +import * as React from 'react'; +import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import IdentityProviderLink from 'sonar-ui-common/components/controls/IdentityProviderLink'; import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import './OAuthProviders.css'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/EmailAlreadyExists-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/EmailAlreadyExists-test.tsx index 716436e8a7f..06c8139c79a 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/EmailAlreadyExists-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/EmailAlreadyExists-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import EmailAlreadyExists from '../EmailAlreadyExists'; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-test.tsx index 25e360a713f..817f62dd338 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-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 Login from '../Login'; const identityProvider = { diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginForm-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginForm-test.tsx index d1aece97c9b..e8b7196bf56 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginForm-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 { change, click, submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import LoginForm from '../LoginForm'; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginSonarCloud-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginSonarCloud-test.tsx index 5bb972b4e56..f922a702efa 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginSonarCloud-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginSonarCloud-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 { LoginSonarCloud } from '../LoginSonarCloud'; const identityProvider = { diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-test.tsx index dcd7df7c9e4..4685f0b3516 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { Logout } from '../Logout'; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/OAuthProviders-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/OAuthProviders-test.tsx index addef842523..c08b5cf0848 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/OAuthProviders-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/OAuthProviders-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 OAuthProviders from '../OAuthProviders'; const identityProviders = [ diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-test.tsx index 85552ffaf86..370409ccec4 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-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 Unauthorized from '../Unauthorized'; jest.mock('sonar-ui-common/helpers/cookies', () => ({ diff --git a/server/sonar-web/src/main/js/apps/settings/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/settings/__tests__/utils-test.ts index 642fb09c98f..0e60a124089 100644 --- a/server/sonar-web/src/main/js/apps/settings/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/settings/__tests__/utils-test.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 { getEmptyValue, getDefaultValue, sanitizeTranslation } from '../utils'; +import { getDefaultValue, getEmptyValue, sanitizeTranslation } from '../utils'; const fields = [ { key: 'foo', type: 'STRING' } as T.SettingFieldDefinition, diff --git a/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx b/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx index 6dee93eee92..daf2bc69e3d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx @@ -17,13 +17,13 @@ * 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 { connect } from 'react-redux'; import { sortBy } from 'lodash'; +import * as React from 'react'; +import { connect } from 'react-redux'; import { IndexLink } from 'react-router'; -import { getCategoryName } from '../utils'; import { getSettingsAppAllCategories, Store } from '../../../store/rootReducer'; +import { getCategoryName } from '../utils'; interface Category { key: string; diff --git a/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx b/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx index bf47b0be1ad..0ac1a690f08 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx @@ -22,15 +22,15 @@ import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { WithRouterProps } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import { getSettingsAppDefaultCategory, Store } from '../../../store/rootReducer'; +import '../side-tabs.css'; +import { fetchSettings } from '../store/actions'; +import '../styles.css'; import AllCategoriesList from './AllCategoriesList'; import CategoryDefinitionsList from './CategoryDefinitionsList'; import PageHeader from './PageHeader'; import WildcardsHelp from './WildcardsHelp'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { fetchSettings } from '../store/actions'; -import { getSettingsAppDefaultCategory, Store } from '../../../store/rootReducer'; -import '../styles.css'; -import '../side-tabs.css'; interface Props { component?: T.Component; diff --git a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx index 780ba704715..245f94a3773 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import SubCategoryDefinitionsList from './SubCategoryDefinitionsList'; -import { fetchValues } from '../store/actions'; import { getSettingsAppSettingsForCategory, Store } from '../../../store/rootReducer'; +import { fetchValues } from '../store/actions'; +import SubCategoryDefinitionsList from './SubCategoryDefinitionsList'; interface Props { category: string; diff --git a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx index c9586fdf623..7ef74e4e6cf 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx @@ -17,29 +17,29 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import classNames from 'classnames'; import * as React from 'react'; import { connect } from 'react-redux'; import AlertErrorIcon from 'sonar-ui-common/components/icons/AlertErrorIcon'; import AlertSuccessIcon from 'sonar-ui-common/components/icons/AlertSuccessIcon'; -import classNames from 'classnames'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; -import Input from './inputs/Input'; -import DefinitionActions from './DefinitionActions'; -import { - getPropertyName, - getPropertyDescription, - getSettingValue, - isDefaultOrInherited, - sanitizeTranslation -} from '../utils'; -import { resetValue, saveValue, checkValue } from '../store/actions'; -import { cancelChange, changeValue, passValidation } from '../store/settingsPage'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getSettingsAppChangedValue, getSettingsAppValidationMessage, isSettingsAppLoading, Store } from '../../../store/rootReducer'; +import { checkValue, resetValue, saveValue } from '../store/actions'; +import { cancelChange, changeValue, passValidation } from '../store/settingsPage'; +import { + getPropertyDescription, + getPropertyName, + getSettingValue, + isDefaultOrInherited, + sanitizeTranslation +} from '../utils'; +import DefinitionActions from './DefinitionActions'; +import Input from './inputs/Input'; interface Props { cancelChange: (key: string) => void; diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx b/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx index bebfc385522..d975fb30b0b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button, ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import { isEmptyValue, getDefaultValue, getSettingValue } from '../utils'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getDefaultValue, getSettingValue, isEmptyValue } from '../utils'; type Props = { changedValue: string; diff --git a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx index a1f9518c9df..dd1a311650f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { parseError } from 'sonar-ui-common/helpers/request'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { parseError } from 'sonar-ui-common/helpers/request'; import { sendTestEmail } from '../../../api/settings'; +import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; interface Props { currentUser: T.LoggedInUser; diff --git a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx index 7733c37c709..cc4e80a84e5 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.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 { groupBy, isEqual, sortBy } from 'lodash'; +import * as React from 'react'; +import { getSubCategoryDescription, getSubCategoryName, sanitizeTranslation } from '../utils'; import DefinitionsList from './DefinitionsList'; import EmailForm from './EmailForm'; -import { getSubCategoryName, getSubCategoryDescription, sanitizeTranslation } from '../utils'; interface Props { category: string; diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-test.tsx index 9babfc9fa6a..e021776ddba 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { Definition } from '../Definition'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/DefinitionActions-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/DefinitionActions-test.tsx index 6d1cac684c6..0973e800df9 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/DefinitionActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/DefinitionActions-test.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; +import * as React from 'react'; import DefinitionActions from '../DefinitionActions'; const definition: T.SettingCategoryDefinition = { diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/EmailForm-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/EmailForm-test.tsx index 7ec5daf83dc..8160d79ed58 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/EmailForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/EmailForm-test.tsx @@ -17,10 +17,10 @@ * 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 { EmailForm } from '../EmailForm'; +import * as React from 'react'; import { mockLoggedInUser } from '../../../../helpers/testMocks'; +import { EmailForm } from '../EmailForm'; it('should render correctly', () => { expect(shallow(<EmailForm currentUser={mockLoggedInUser()} />)).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.tsx index d0354778890..0dc1c3d080c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import PropertySetInput from './PropertySetInput'; +import { DefaultInputProps, isCategoryDefinition } from '../../utils'; import MultiValueInput from './MultiValueInput'; import PrimitiveInput from './PrimitiveInput'; -import { DefaultInputProps, isCategoryDefinition } from '../../utils'; +import PropertySetInput from './PropertySetInput'; export default function Input(props: DefaultInputProps) { const { definition } = props.setting; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.tsx index 3ad0d795302..d561eea96d5 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Toggle from 'sonar-ui-common/components/controls/Toggle'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { DefaultSpecializedInputProps } from '../../utils'; interface Props extends DefaultSpecializedInputProps { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForNumber.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForNumber.tsx index 3a786e01951..8337f6be190 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForNumber.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForNumber.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import SimpleInput from './SimpleInput'; import { DefaultSpecializedInputProps } from '../../utils'; +import SimpleInput from './SimpleInput'; export default function InputForNumber(props: DefaultSpecializedInputProps) { return <SimpleInput {...props} className="input-small" type="text" />; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.tsx index e0ebd2a29cf..0d93cc5e80b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Button } from 'sonar-ui-common/components/controls/buttons'; import LockIcon from 'sonar-ui-common/components/icons/LockIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Button } from 'sonar-ui-common/components/controls/buttons'; import { colors } from '../../../../app/theme'; import { DefaultSpecializedInputProps } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForString.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForString.tsx index ceaa6c255a7..f02e9eefee3 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForString.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForString.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import SimpleInput from './SimpleInput'; import { DefaultSpecializedInputProps } from '../../utils'; +import SimpleInput from './SimpleInput'; export default function InputForString(props: DefaultSpecializedInputProps) { return <SimpleInput {...props} className="settings-large-input" type="text" />; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.tsx index ebebcc05521..fc6b2f92208 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { DeleteButton } from 'sonar-ui-common/components/controls/buttons'; +import { DefaultInputProps, getEmptyValue } from '../../utils'; import PrimitiveInput from './PrimitiveInput'; -import { getEmptyValue, DefaultInputProps } from '../../utils'; export default class MultiValueInput extends React.PureComponent<DefaultInputProps> { ensureValue = () => { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx index 3744dc83ad6..d7f3fb47110 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx @@ -18,18 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import InputForString from './InputForString'; -import InputForText from './InputForText'; -import InputForPassword from './InputForPassword'; -import InputForBoolean from './InputForBoolean'; -import InputForNumber from './InputForNumber'; -import InputForSingleSelectList from './InputForSingleSelectList'; import { - getUniqueName, - isDefaultOrInherited, DefaultInputProps, - DefaultSpecializedInputProps + DefaultSpecializedInputProps, + getUniqueName, + isDefaultOrInherited } from '../../utils'; +import InputForBoolean from './InputForBoolean'; +import InputForNumber from './InputForNumber'; +import InputForPassword from './InputForPassword'; +import InputForSingleSelectList from './InputForSingleSelectList'; +import InputForString from './InputForString'; +import InputForText from './InputForText'; const typeMapping: { [type in T.SettingType]?: React.ComponentType<DefaultSpecializedInputProps> diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.tsx index d730e1a1372..c1b45aebeb2 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { DeleteButton } from 'sonar-ui-common/components/controls/buttons'; +import { DefaultInputProps, getEmptyValue, getUniqueName, isCategoryDefinition } from '../../utils'; import PrimitiveInput from './PrimitiveInput'; -import { getEmptyValue, getUniqueName, DefaultInputProps, isCategoryDefinition } from '../../utils'; export default class PropertySetInput extends React.PureComponent<DefaultInputProps> { ensureValue() { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.tsx index c76854949e4..490d4ed7714 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.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 { DefaultSpecializedInputProps } from '../../utils'; interface Props extends DefaultSpecializedInputProps { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/Input-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/Input-test.tsx index 666f57d23dd..2409086829f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/Input-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/Input-test.tsx @@ -17,10 +17,10 @@ * 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 Input from '../Input'; +import * as React from 'react'; import { DefaultInputProps } from '../../../utils'; +import Input from '../Input'; const settingValue = { key: 'example' diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForBoolean-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForBoolean-test.tsx index 6b7711c5c6c..b80474a4d92 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForBoolean-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForBoolean-test.tsx @@ -17,10 +17,10 @@ * 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 InputForBoolean from '../InputForBoolean'; +import * as React from 'react'; import { DefaultSpecializedInputProps } from '../../../utils'; +import InputForBoolean from '../InputForBoolean'; it('should render Toggle', () => { const onChange = jest.fn(); diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForNumber-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForNumber-test.tsx index e548d796d15..6a250be3b47 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForNumber-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForNumber-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 InputForNumber from '../InputForNumber'; import SimpleInput from '../SimpleInput'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.tsx index 598143c12c0..2ac8b3d7191 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-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 { shallow } from 'enzyme'; -import { click, change, submit } from 'sonar-ui-common/helpers/testUtils'; -import InputForPassword from '../InputForPassword'; +import * as React from 'react'; +import { change, click, submit } from 'sonar-ui-common/helpers/testUtils'; import { DefaultSpecializedInputProps } from '../../../utils'; +import InputForPassword from '../InputForPassword'; it('should render lock icon, but no form', () => { const onChange = jest.fn(); diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForSingleSelectList-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForSingleSelectList-test.tsx index 95a88286ec4..e30c0b183aa 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForSingleSelectList-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForSingleSelectList-test.tsx @@ -17,10 +17,10 @@ * 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 InputForSingleSelectList from '../InputForSingleSelectList'; +import * as React from 'react'; import { DefaultSpecializedInputProps } from '../../../utils'; +import InputForSingleSelectList from '../InputForSingleSelectList'; it('should render Select', () => { const onChange = jest.fn(); diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForString-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForString-test.tsx index 703b3314832..bb27326c8f7 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForString-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForString-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 InputForString from '../InputForString'; import SimpleInput from '../SimpleInput'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.tsx index cff5d753ab2..d3aa2739c48 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { change } from 'sonar-ui-common/helpers/testUtils'; -import InputForText from '../InputForText'; import { DefaultSpecializedInputProps } from '../../../utils'; +import InputForText from '../InputForText'; it('should render textarea', () => { const onChange = jest.fn(); diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.tsx index 314ee84d909..411ef8d315c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-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, ShallowWrapper } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; +import { DefaultInputProps } from '../../../utils'; import MultiValueInput from '../MultiValueInput'; import PrimitiveInput from '../PrimitiveInput'; -import { DefaultInputProps } from '../../../utils'; const settingValue = { key: 'example' diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.tsx index 06a481350b2..95d4e278430 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-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 { change } from 'sonar-ui-common/helpers/testUtils'; import SimpleInput from '../SimpleInput'; diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx index 0638b826410..95d4cb62cc2 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx +++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import Helmet from 'react-helmet'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { checkSecretKey, generateSecretKey } from '../../../api/settings'; import EncryptionForm from './EncryptionForm'; import GenerateSecretKeyForm from './GenerateSecretKeyForm'; -import { checkSecretKey, generateSecretKey } from '../../../api/settings'; interface State { loading: boolean; diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx index e9040aecc5f..62ecc6cfb5c 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import ClipboardButton from 'sonar-ui-common/components/controls/ClipboardButton'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { encryptValue } from '../../../api/settings'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx b/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx index 0df869bbee5..d5a4bf7feeb 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import ClipboardButton from 'sonar-ui-common/components/controls/ClipboardButton'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { generateSecretKey: () => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/settings/store/actions.ts b/server/sonar-web/src/main/js/apps/settings/store/actions.ts index be5d5a13d8d..0611ca45b88 100644 --- a/server/sonar-web/src/main/js/apps/settings/store/actions.ts +++ b/server/sonar-web/src/main/js/apps/settings/store/actions.ts @@ -20,28 +20,28 @@ import { Dispatch } from 'redux'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { parseError } from 'sonar-ui-common/helpers/request'; -import { receiveValues } from './values'; -import { receiveDefinitions } from './definitions'; -import { - cancelChange, - failValidation, - passValidation, - startLoading, - stopLoading -} from './settingsPage'; import { getDefinitions, getValues, - setSettingValue, - resetSettingValue + resetSettingValue, + setSettingValue } from '../../../api/settings'; import { closeAllGlobalMessages } from '../../../store/globalMessages'; -import { isEmptyValue } from '../utils'; import { - getSettingsAppDefinition, getSettingsAppChangedValue, + getSettingsAppDefinition, Store } from '../../../store/rootReducer'; +import { isEmptyValue } from '../utils'; +import { receiveDefinitions } from './definitions'; +import { + cancelChange, + failValidation, + passValidation, + startLoading, + stopLoading +} from './settingsPage'; +import { receiveValues } from './values'; export function fetchSettings(component?: string) { return (dispatch: Dispatch) => { diff --git a/server/sonar-web/src/main/js/apps/settings/store/rootReducer.ts b/server/sonar-web/src/main/js/apps/settings/store/rootReducer.ts index c282cd847e7..4620229f05f 100644 --- a/server/sonar-web/src/main/js/apps/settings/store/rootReducer.ts +++ b/server/sonar-web/src/main/js/apps/settings/store/rootReducer.ts @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { combineReducers } from 'redux'; +import globalMessages, * as fromGlobalMessages from '../../../store/globalMessages'; import definitions, * as fromDefinitions from './definitions'; -import values, * as fromValues from './values'; import settingsPage, * as fromSettingsPage from './settingsPage'; -import globalMessages, * as fromGlobalMessages from '../../../store/globalMessages'; +import values, * as fromValues from './values'; interface State { definitions: fromDefinitions.State; diff --git a/server/sonar-web/src/main/js/apps/settings/store/values.ts b/server/sonar-web/src/main/js/apps/settings/store/values.ts index 7dfeb996fc1..50a4d77bf3d 100644 --- a/server/sonar-web/src/main/js/apps/settings/store/values.ts +++ b/server/sonar-web/src/main/js/apps/settings/store/values.ts @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { combineReducers } from 'redux'; import { keyBy } from 'lodash'; -import { ActionType } from '../../../store/utils/actions'; +import { combineReducers } from 'redux'; import { Action as AppStateAction, Actions as AppStateActions } from '../../../store/appState'; +import { ActionType } from '../../../store/utils/actions'; enum Actions { receiveValues = 'RECEIVE_VALUES' diff --git a/server/sonar-web/src/main/js/apps/settings/utils.ts b/server/sonar-web/src/main/js/apps/settings/utils.ts index 36979c5d899..997b649e124 100644 --- a/server/sonar-web/src/main/js/apps/settings/utils.ts +++ b/server/sonar-web/src/main/js/apps/settings/utils.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { sanitize } from 'dompurify'; -import { translate, hasMessage } from 'sonar-ui-common/helpers/l10n'; +import { hasMessage, translate } from 'sonar-ui-common/helpers/l10n'; export const DEFAULT_CATEGORY = 'general'; diff --git a/server/sonar-web/src/main/js/apps/system/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/system/__tests__/utils-test.ts index 22247758f54..b90fab875f1 100644 --- a/server/sonar-web/src/main/js/apps/system/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/system/__tests__/utils-test.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable sonarjs/no-duplicate-string */ -import * as u from '../utils'; import { mockClusterSysInfo, mockStandaloneSysInfo } from '../../../helpers/testMocks'; +import * as u from '../utils'; describe('parseQuery', () => { it('should correctly parse the expand array', () => { diff --git a/server/sonar-web/src/main/js/apps/system/components/App.tsx b/server/sonar-web/src/main/js/apps/system/components/App.tsx index 0c5efb86550..7f1dbf392f3 100644 --- a/server/sonar-web/src/main/js/apps/system/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/App.tsx @@ -18,26 +18,26 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { withRouter, WithRouterProps } from 'react-router'; import Helmet from 'react-helmet'; +import { withRouter, WithRouterProps } from 'react-router'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ClusterSysInfos from './ClusterSysInfos'; -import PageHeader from './PageHeader'; -import StandaloneSysInfos from './StandaloneSysInfos'; -import SystemUpgradeNotif from './system-upgrade/SystemUpgradeNotif'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import { getSystemInfo } from '../../../api/system'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import '../styles.css'; import { + getClusterVersion, getServerId, getSystemLogsLevel, + getVersion, isCluster, parseQuery, Query, - serializeQuery, - getVersion, - getClusterVersion + serializeQuery } from '../utils'; -import '../styles.css'; +import ClusterSysInfos from './ClusterSysInfos'; +import PageHeader from './PageHeader'; +import StandaloneSysInfos from './StandaloneSysInfos'; +import SystemUpgradeNotif from './system-upgrade/SystemUpgradeNotif'; type Props = WithRouterProps; diff --git a/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx b/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx index 11b2f5212ab..dce503ae928 100644 --- a/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import { LOGS_LEVELS } from '../utils'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { setLogLevel } from '../../../api/system'; +import { LOGS_LEVELS } from '../utils'; interface Props { infoMsg: string; diff --git a/server/sonar-web/src/main/js/apps/system/components/ClusterSysInfos.tsx b/server/sonar-web/src/main/js/apps/system/components/ClusterSysInfos.tsx index 3c1d6c8c117..68a049fd2e7 100644 --- a/server/sonar-web/src/main/js/apps/system/components/ClusterSysInfos.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/ClusterSysInfos.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import HealthCard from './info-items/HealthCard'; import { getAppNodes, + getClusterMainCardSection, getHealth, getHealthCauses, - getClusterMainCardSection, getNodeName, getSearchNodes, ignoreInfoFields } from '../utils'; +import HealthCard from './info-items/HealthCard'; interface Props { expandedCards: string[]; diff --git a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx index ff28b7d403c..1c1dd772866 100644 --- a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Button, EditButton } 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 { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import { EditButton, Button } from 'sonar-ui-common/components/controls/buttons'; -import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; -import ChangeLogLevelForm from './ChangeLogLevelForm'; import AdminContext from '../../../app/components/AdminContext'; import RestartButton from '../../../components/common/RestartButton'; import { getFileNameSuffix } from '../utils'; +import ChangeLogLevelForm from './ChangeLogLevelForm'; interface Props { canDownloadLogs: boolean; diff --git a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx index 938aeeafbb8..7f508bb9810 100644 --- a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import ClipboardButton from 'sonar-ui-common/components/controls/ClipboardButton'; import { toShortNotSoISOString } from 'sonar-ui-common/helpers/dates'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import ClipboardButton from 'sonar-ui-common/components/controls/ClipboardButton'; import PageActions from './PageActions'; export interface Props { diff --git a/server/sonar-web/src/main/js/apps/system/components/StandaloneSysInfos.tsx b/server/sonar-web/src/main/js/apps/system/components/StandaloneSysInfos.tsx index adb9db52ec5..80f1153f411 100644 --- a/server/sonar-web/src/main/js/apps/system/components/StandaloneSysInfos.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/StandaloneSysInfos.tsx @@ -17,9 +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 { map } from 'lodash'; -import HealthCard from './info-items/HealthCard'; +import * as React from 'react'; import { getHealth, getHealthCauses, @@ -27,6 +26,7 @@ import { getStandaloneSecondarySections, ignoreInfoFields } from '../utils'; +import HealthCard from './info-items/HealthCard'; interface Props { expandedCards: string[]; diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/ChangeLogLevelForm-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/ChangeLogLevelForm-test.tsx index 29ba32c1abb..e7218c289d3 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/ChangeLogLevelForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/ChangeLogLevelForm-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 ChangeLogLevelForm from '../ChangeLogLevelForm'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/ClusterSysInfos-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/ClusterSysInfos-test.tsx index 395f5bf30ac..9c4f23bd761 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/ClusterSysInfos-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/ClusterSysInfos-test.tsx @@ -17,10 +17,10 @@ * 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 ClusterSysInfos from '../ClusterSysInfos'; +import * as React from 'react'; import { mockClusterSysInfo } from '../../../../helpers/testMocks'; +import ClusterSysInfos from '../ClusterSysInfos'; it('should render correctly', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx index badecafb644..c54a6ded0b6 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-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 { click } from 'sonar-ui-common/helpers/testUtils'; import PageActions from '../PageActions'; diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageHeader-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageHeader-test.tsx index d284f71c7f3..85628d3e89c 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageHeader-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 PageHeader, { Props } from '../PageHeader'; jest.mock('sonar-ui-common/helpers/dates', () => ({ diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/StandaloneSysInfos-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/StandaloneSysInfos-test.tsx index e7bec64929e..cc84b4c8e09 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/StandaloneSysInfos-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/StandaloneSysInfos-test.tsx @@ -17,10 +17,10 @@ * 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 StandaloneSysInfos from '../StandaloneSysInfos'; +import * as React from 'react'; import { mockStandaloneSysInfo } from '../../../../helpers/testMocks'; +import StandaloneSysInfos from '../StandaloneSysInfos'; it('should render correctly', () => { expect(getWrapper()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx index 8deb0fe862e..ab7d36b2a57 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx @@ -17,14 +17,14 @@ * 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 { map } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import * as React from 'react'; import BoxedGroupAccordion from 'sonar-ui-common/components/controls/BoxedGroupAccordion'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getLogsLevel, groupSections, LOGS_LEVELS } from '../../utils'; import HealthItem from './HealthItem'; import Section from './Section'; -import { LOGS_LEVELS, groupSections, getLogsLevel } from '../../utils'; interface Props { biggerHealth?: boolean; diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCauseItem.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCauseItem.tsx index 60e29321155..ee5869921d8 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCauseItem.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCauseItem.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 { Alert } from 'sonar-ui-common/components/ui/Alert'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx index c1aa70aad0d..e2daa343528 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.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 * as classNames from 'classnames'; -import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import HealthCauseItem from './HealthCauseItem'; +import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import StatusIndicator from '../../../../components/common/StatusIndicator'; +import HealthCauseItem from './HealthCauseItem'; interface Props { biggerHealth?: boolean; diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx index b548e94afa9..8e9f13a8633 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/Section.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 { map } from 'lodash'; +import * as React from 'react'; import SysInfoItem from './SysInfoItem'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/SysInfoItem.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/SysInfoItem.tsx index 61560dffac6..99a87325525 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/SysInfoItem.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/SysInfoItem.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 { map } from 'lodash'; import * as React from 'react'; import AlertErrorIcon from 'sonar-ui-common/components/icons/AlertErrorIcon'; import AlertSuccessIcon from 'sonar-ui-common/components/icons/AlertSuccessIcon'; -import { map } from 'lodash'; -import HealthItem from './HealthItem'; import { HEALTH_FIELD, STATE_FIELD } from '../../utils'; +import HealthItem from './HealthItem'; export interface Props { name: string; diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthCard-test.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthCard-test.tsx index f96d0245c37..a8e9fe7381e 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthCard-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthCard-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 HealthCard from '../HealthCard'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthCauseItem-test.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthCauseItem-test.tsx index 52ca0760f4c..5dcd9f034fa 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthCauseItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthCauseItem-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 HealthCauseItem from '../HealthCauseItem'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthItem-test.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthItem-test.tsx index a17f1140b98..116a3072c00 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/HealthItem-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 HealthItem from '../HealthItem'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/Section-test.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/Section-test.tsx index d524a4c95fb..2d75d6254fa 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/Section-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/Section-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 Section from '../Section'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/SysInfoItem-test.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/SysInfoItem-test.tsx index 7d4db450fbe..80ec94bfcad 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/SysInfoItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/__tests__/SysInfoItem-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 SysInfoItem, { Props } from '../SysInfoItem'; it('should render string', () => { diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeForm.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeForm.tsx index 04aefd232d5..a6de6790b7f 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeForm.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeForm.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import SystemUpgradeItem from './SystemUpgradeItem'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx index b5009a722ef..86135043784 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import DateFormatter from '../../../../components/intl/DateFormatter'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeItem.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeItem.tsx index ed8eb1596c4..71494e0ab77 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeItem.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeItem.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import SystemUpgradeIntermediate from './SystemUpgradeIntermediate'; import DateFormatter from '../../../../components/intl/DateFormatter'; +import SystemUpgradeIntermediate from './SystemUpgradeIntermediate'; interface Props { type?: string; diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeNotif.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeNotif.tsx index ebc4edd5425..9db71aa7c22 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeNotif.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeNotif.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import SystemUpgradeForm from './SystemUpgradeForm'; -import { sortUpgrades, groupUpgrades } from '../../utils'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getSystemUpgrades } from '../../../../api/system'; +import { groupUpgrades, sortUpgrades } from '../../utils'; +import SystemUpgradeForm from './SystemUpgradeForm'; interface State { systemUpgrades: T.SystemUpgrade[][]; diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeForm-test.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeForm-test.tsx index 4d880c5ebf4..be4a15b7a33 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeForm-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 SystemUpgradeForm from '../SystemUpgradeForm'; const UPGRADES = [ diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeIntermediate-test.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeIntermediate-test.tsx index d3b8995c790..40f1bdbb861 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeIntermediate-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeIntermediate-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 { click } from 'sonar-ui-common/helpers/testUtils'; import SystemUpgradeIntermediate from '../SystemUpgradeIntermediate'; diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeItem-test.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeItem-test.tsx index 0a05f8b9bb4..ef7b7c632d2 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeItem-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 SystemUpgradeItem from '../SystemUpgradeItem'; const UPGRADES = [ diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeNotif-test.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeNotif-test.tsx index 2c630d615c2..14a9802ea4f 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeNotif-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeNotif-test.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { mount, shallow } from 'enzyme'; +import * as React from 'react'; import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import SystemUpgradeNotif from '../SystemUpgradeNotif'; diff --git a/server/sonar-web/src/main/js/apps/system/utils.ts b/server/sonar-web/src/main/js/apps/system/utils.ts index d9342adbd45..9b75c19d451 100644 --- a/server/sonar-web/src/main/js/apps/system/utils.ts +++ b/server/sonar-web/src/main/js/apps/system/utils.ts @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { each, groupBy, memoize, omit, omitBy, pickBy, sortBy } from 'lodash'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { cleanQuery, parseAsArray, parseAsString, serializeStringArray } from 'sonar-ui-common/helpers/query'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; export interface Query { expandedCards: string[]; diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorial.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorial.tsx index 41bb0bb9bcd..73048f1d145 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorial.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorial.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import AnalyzeTutorialSuggestion from './AnalyzeTutorialSuggestion'; -import ProjectAnalysisStep from '../components/ProjectAnalysisStep'; -import TokenStep from '../components/TokenStep'; -import { isVSTS } from '../../../helpers/almIntegrations'; import InstanceMessage from '../../../components/common/InstanceMessage'; +import { isVSTS } from '../../../helpers/almIntegrations'; import { isSonarCloud } from '../../../helpers/system'; +import ProjectAnalysisStep from '../components/ProjectAnalysisStep'; +import TokenStep from '../components/TokenStep'; import '../styles.css'; +import AnalyzeTutorialSuggestion from './AnalyzeTutorialSuggestion'; export enum Steps { ANALYSIS, diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSonarCloud.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSonarCloud.tsx index 314a486af40..94beebfeff4 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSonarCloud.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSonarCloud.tsx @@ -19,20 +19,31 @@ */ import * as classnames from 'classnames'; import * as React from 'react'; +import BackButton from 'sonar-ui-common/components/controls/BackButton'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { get, remove, save } from 'sonar-ui-common/helpers/storage'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import BackButton from 'sonar-ui-common/components/controls/BackButton'; +import { getGithubLanguages } from '../../../api/alm-integration'; +import { generateToken, getTokens } from '../../../api/user-tokens'; +import InstanceMessage from '../../../components/common/InstanceMessage'; +import { isBitbucket, isGithub, isVSTS } from '../../../helpers/almIntegrations'; +import { isSonarCloud } from '../../../helpers/system'; +import AnalyzeTutorialDone from '../components/AnalyzeTutorialDone'; +import ProjectAnalysisStep from '../components/ProjectAnalysisStep'; +import TokenStep from '../components/TokenStep'; +import '../styles.css'; +import { getUniqueTokenName } from '../utils'; +import './AnalyzeTutorialSonarCloud.css'; +import { TutorialSuggestionBitbucket, TutorialSuggestionVSTS } from './AnalyzeTutorialSuggestion'; import ConfigureWithAutoScan from './configurations/ConfigureWithAutoScan'; -import ConfigureWithTravis from './configurations/ConfigureWithTravis'; import ConfigureWithLocalScanner from './configurations/ConfigureWithLocalScanner'; import ConfigureOtherCI from './configurations/ConfigureWithOtherCI'; -import { TutorialSuggestionBitbucket, TutorialSuggestionVSTS } from './AnalyzeTutorialSuggestion'; +import ConfigureWithTravis from './configurations/ConfigureWithTravis'; import { Alm, - ALM_KEYS, AlmLanguagesStats, alms, + ALM_KEYS, AnalysisMode, autoScanMode, isAutoScannable, @@ -42,17 +53,6 @@ import { PROJECT_STEP_PROGRESS, TutorialProps } from './utils'; -import { getUniqueTokenName } from '../utils'; -import AnalyzeTutorialDone from '../components/AnalyzeTutorialDone'; -import InstanceMessage from '../../../components/common/InstanceMessage'; -import TokenStep from '../components/TokenStep'; -import ProjectAnalysisStep from '../components/ProjectAnalysisStep'; -import { generateToken, getTokens } from '../../../api/user-tokens'; -import { getGithubLanguages } from '../../../api/alm-integration'; -import { isBitbucket, isGithub, isVSTS } from '../../../helpers/almIntegrations'; -import { isSonarCloud } from '../../../helpers/system'; -import '../styles.css'; -import './AnalyzeTutorialSonarCloud.css'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSuggestion.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSuggestion.tsx index 722814d3207..f0f7150e5de 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSuggestion.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSuggestion.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import { isBitbucket, isGithub, isVSTS } from '../../../helpers/almIntegrations'; export function TutorialSuggestionBitbucket() { diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorial-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorial-test.tsx index 4db768b3d74..cfbeef2ff61 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorial-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorial-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 AnalyzeTutorial from '../AnalyzeTutorial'; jest.mock('../../../../helpers/system', () => ({ diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorialSonarCloud-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorialSonarCloud-test.tsx index 9ced4c62f27..bc740e1af63 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorialSonarCloud-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorialSonarCloud-test.tsx @@ -17,14 +17,14 @@ * 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 { get } from 'sonar-ui-common/helpers/storage'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import AnalyzeTutorialSonarCloud from '../AnalyzeTutorialSonarCloud'; -import { mockComponent, mockLoggedInUser } from '../../../../helpers/testMocks'; import { generateToken, getTokens } from '../../../../api/user-tokens'; +import { mockComponent, mockLoggedInUser } from '../../../../helpers/testMocks'; import { getUniqueTokenName } from '../../utils'; +import AnalyzeTutorialSonarCloud from '../AnalyzeTutorialSonarCloud'; jest.mock('sonar-ui-common/helpers/storage', () => ({ get: jest.fn(), diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorialSuggestion-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorialSuggestion-test.tsx index c6fc1992727..22f3dcedcd3 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorialSuggestion-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/AnalyzeTutorialSuggestion-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 AnalyzeTutorialSuggestion, { TutorialSuggestionBitbucket, TutorialSuggestionGithub, diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/AutoScanAlert.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/AutoScanAlert.tsx index 815e308bc8f..8b094c0db0d 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/AutoScanAlert.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/AutoScanAlert.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import DocTooltip from '../../../../components/docs/DocTooltip'; export function AutoScanAlert() { diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/ConfigureWithAutoScan.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/ConfigureWithAutoScan.tsx index 0419830ec3a..a4d7c52aa88 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/ConfigureWithAutoScan.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/ConfigureWithAutoScan.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import { AutoScanAlert } from './AutoScanAlert'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import Step from '../../components/Step'; import { TutorialProps } from '../utils'; +import { AutoScanAlert } from './AutoScanAlert'; export default function ConfigureWithAutoScan({ onDone }: TutorialProps) { const [showCustomizationOptions, setCustomizationOptions] = React.useState<boolean>(false); diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/ConfigureWithTravis.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/ConfigureWithTravis.tsx index 86b3d590038..1cdc4757850 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/ConfigureWithTravis.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/ConfigureWithTravis.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { get, save } from 'sonar-ui-common/helpers/storage'; -import EncryptYourTokenStep from '../steps/EncryptYourTokenStep'; +import { isSonarCloud } from '../../../../helpers/system'; import CreateSonarPropertiesStep from '../steps/CreateSonarPropertiesStep'; import EditTravisYmlStep from '../steps/EditTravisYmlStep'; -import { isSonarCloud } from '../../../../helpers/system'; +import EncryptYourTokenStep from '../steps/EncryptYourTokenStep'; import { PROJECT_STEP_PROGRESS, TutorialProps } from '../utils'; enum Steps { diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/AutoScanAlert-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/AutoScanAlert-test.tsx index 199befdf043..0f388ccec9b 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/AutoScanAlert-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/AutoScanAlert-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 { AutoScanAlert } from '../AutoScanAlert'; it('should renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureOtherCI-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureOtherCI-test.tsx index f236a32788d..5fd950bc579 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureOtherCI-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureOtherCI-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 { shallow } from 'enzyme'; -import ConfigureWithOtherCI from '../ConfigureWithOtherCI'; -import { TutorialProps } from '../../utils'; +import * as React from 'react'; import { mockComponent, mockLoggedInUser } from '../../../../../helpers/testMocks'; +import { TutorialProps } from '../../utils'; +import ConfigureWithOtherCI from '../ConfigureWithOtherCI'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithAutoScan-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithAutoScan-test.tsx index 55e70d552a8..6a2099f0b4a 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithAutoScan-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithAutoScan-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 { shallow } from 'enzyme'; -import ConfigureWithAutoScan from '../ConfigureWithAutoScan'; -import { TutorialProps } from '../../utils'; +import * as React from 'react'; import { mockComponent, mockLoggedInUser } from '../../../../../helpers/testMocks'; +import { TutorialProps } from '../../utils'; +import ConfigureWithAutoScan from '../ConfigureWithAutoScan'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithLocalScanner-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithLocalScanner-test.tsx index c206bfe6e89..cfcf2f0fa32 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithLocalScanner-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithLocalScanner-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 { shallow } from 'enzyme'; -import ConfigureWithLocalScanner from '../ConfigureWithLocalScanner'; -import { TutorialProps } from '../../utils'; +import * as React from 'react'; import { mockComponent, mockLoggedInUser } from '../../../../../helpers/testMocks'; +import { TutorialProps } from '../../utils'; +import ConfigureWithLocalScanner from '../ConfigureWithLocalScanner'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithTravis-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithTravis-test.tsx index cfd719e132c..d11d22d5247 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithTravis-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/configurations/__tests__/ConfigureWithTravis-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 { shallow } from 'enzyme'; -import ConfigureWithTravis from '../ConfigureWithTravis'; -import { TutorialProps } from '../../utils'; +import * as React from 'react'; import { mockComponent, mockLoggedInUser } from '../../../../../helpers/testMocks'; +import { TutorialProps } from '../../utils'; +import ConfigureWithTravis from '../ConfigureWithTravis'; jest.mock('sonar-ui-common/helpers/storage', () => ({ get: jest.fn().mockReturnValue( diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/CreateSonarPropertiesStep.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/CreateSonarPropertiesStep.tsx index 86719078fef..df5a6919320 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/CreateSonarPropertiesStep.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/CreateSonarPropertiesStep.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import Step from '../../components/Step'; import { StepProps } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EditTokenModal.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EditTokenModal.tsx index 816b3ce6bf1..313f7bbcee3 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EditTokenModal.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EditTokenModal.tsx @@ -20,13 +20,13 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button, DeleteButton } from 'sonar-ui-common/components/controls/buttons'; import ConfirmModal from 'sonar-ui-common/components/controls/ConfirmModal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { generateToken, getTokens, revokeToken } from '../../../../api/user-tokens'; -import { getUniqueTokenName } from '../../utils'; import { RenderOptions } from '../../components/RenderOptions'; +import { getUniqueTokenName } from '../../utils'; export enum TokenMode { use_existing_token = 'use_existing_token', diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EditTravisYmlStep.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EditTravisYmlStep.tsx index c9563ccc710..ebbebcd65bc 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EditTravisYmlStep.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EditTravisYmlStep.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import BuildSystemForm from '../../components/BuildSystemForm'; import AnalysisCommandTravis from '../../components/commands/AnalysisCommandTravis'; import Step from '../../components/Step'; -import BuildSystemForm from '../../components/BuildSystemForm'; import { StepProps } from '../../utils'; interface BuildProps { diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EncryptYourTokenStep.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EncryptYourTokenStep.tsx index 7208c825ba6..b4f423fa1bb 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EncryptYourTokenStep.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/EncryptYourTokenStep.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button, EditButton } from 'sonar-ui-common/components/controls/buttons'; -import EditTokenModal from './EditTokenModal'; -import Step from '../../components/Step'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CodeSnippet from '../../../../components/common/CodeSnippet'; +import Step from '../../components/Step'; +import EditTokenModal from './EditTokenModal'; export interface YourTokenProps { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/CreateSonarPropertiesStep-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/CreateSonarPropertiesStep-test.tsx index 88738c53dbd..c693a694226 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/CreateSonarPropertiesStep-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/CreateSonarPropertiesStep-test.tsx @@ -17,10 +17,10 @@ * 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 CreateSonarPropertiesStep from '../CreateSonarPropertiesStep'; +import * as React from 'react'; import { StepProps } from '../../../utils'; +import CreateSonarPropertiesStep from '../CreateSonarPropertiesStep'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EditTokenModal-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EditTokenModal-test.tsx index 4a88807c91d..bc8562968d5 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EditTokenModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EditTokenModal-test.tsx @@ -17,13 +17,13 @@ * 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 EditTokenModal, { TokenMode } from '../EditTokenModal'; -import { mockComponent, mockEvent, mockLoggedInUser } from '../../../../../helpers/testMocks'; import { generateToken, getTokens, revokeToken } from '../../../../../api/user-tokens'; +import { mockComponent, mockEvent, mockLoggedInUser } from '../../../../../helpers/testMocks'; import { getUniqueTokenName } from '../../../utils'; +import EditTokenModal, { TokenMode } from '../EditTokenModal'; jest.mock('../../../../../api/user-tokens', () => ({ generateToken: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EditTravisYmlStep-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EditTravisYmlStep-test.tsx index 2ce447bd6cb..2edd1d7a7d1 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EditTravisYmlStep-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EditTravisYmlStep-test.tsx @@ -17,10 +17,10 @@ * 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 EditTravisYmlStep from '../EditTravisYmlStep'; +import * as React from 'react'; import { StepProps } from '../../../utils'; +import EditTravisYmlStep from '../EditTravisYmlStep'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EncryptYourTokenStep-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EncryptYourTokenStep-test.tsx index 68f7c392b37..db5b9ee2ea5 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EncryptYourTokenStep-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/steps/__tests__/EncryptYourTokenStep-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 { shallow } from 'enzyme'; -import EncryptYourTokenStep from '../EncryptYourTokenStep'; -import { StepProps } from '../../../utils'; +import * as React from 'react'; import { mockComponent, mockLoggedInUser } from '../../../../../helpers/testMocks'; +import { StepProps } from '../../../utils'; +import EncryptYourTokenStep from '../EncryptYourTokenStep'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/AnalyzeTutorialDone.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/AnalyzeTutorialDone.tsx index b8d1c05aba4..3b510fb4ad3 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/AnalyzeTutorialDone.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/AnalyzeTutorialDone.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import BackButton from 'sonar-ui-common/components/controls/BackButton'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getBaseUrl } from 'sonar-ui-common/helpers/urls'; -import BackButton from 'sonar-ui-common/components/controls/BackButton'; interface Props { setTutorialDone: (done: boolean) => void; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/LanguageForm.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/LanguageForm.tsx index f3525341d7a..2385a9dcdb5 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/LanguageForm.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/LanguageForm.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import RadioToggle from 'sonar-ui-common/components/controls/RadioToggle'; -import { RenderOptions } from './RenderOptions'; -import NewProjectForm from './NewProjectForm'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { isSonarCloud } from '../../../helpers/system'; import { isLanguageConfigured, LanguageConfig } from '../utils'; +import NewProjectForm from './NewProjectForm'; +import { RenderOptions } from './RenderOptions'; interface Props { component?: T.Component; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/NewProjectForm.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/NewProjectForm.tsx index 322563f05b2..c394f5f0614 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/NewProjectForm.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/NewProjectForm.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { DeleteButton, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { createProject, deleteProject } from '../../../api/components'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/ProjectAnalysisStep.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/ProjectAnalysisStep.tsx index 6af1907638e..f6421837108 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/ProjectAnalysisStep.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/ProjectAnalysisStep.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Step from './Step'; -import LanguageForm from './LanguageForm'; -import AnalysisCommand from './commands/AnalysisCommand'; import { LanguageConfig } from '../utils'; +import AnalysisCommand from './commands/AnalysisCommand'; +import LanguageForm from './LanguageForm'; +import Step from './Step'; interface Props { component?: T.Component; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/ProjectAnalysisStepFromBuildTool.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/ProjectAnalysisStepFromBuildTool.tsx index c84000b7d64..929c2a24bd5 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/ProjectAnalysisStepFromBuildTool.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/ProjectAnalysisStepFromBuildTool.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { get, save } from 'sonar-ui-common/helpers/storage'; -import Step from './Step'; +import { PROJECT_STEP_PROGRESS } from '../analyzeProject/utils'; import BuildSystemForm from './BuildSystemForm'; import AnalysisCommandCustom from './commands/AnalysisCommandCustom'; import AnalysisCommandOtherCI from './commands/AnalysisCommandOtherCI'; -import { PROJECT_STEP_PROGRESS } from '../analyzeProject/utils'; +import Step from './Step'; export enum ProjectAnalysisModes { CI = 'CI', diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/RenderOptions.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/RenderOptions.tsx index e86607b59d7..912107e2c83 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/RenderOptions.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/RenderOptions.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import RadioToggle from 'sonar-ui-common/components/controls/RadioToggle'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface RenderOptionsProps { checked: string | undefined; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/Step.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/Step.tsx index 34e6327e0c2..4aec8956f40 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/Step.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/Step.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/no-noninteractive-tabindex */ -import * as React from 'react'; import * as classNames from 'classnames'; +import * as React from 'react'; interface Props { finished?: boolean; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/TokenStep.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/TokenStep.tsx index 15975a3e086..116a4f50c3f 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/TokenStep.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/TokenStep.tsx @@ -17,17 +17,17 @@ * 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 { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Button, DeleteButton, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import AlertErrorIcon from 'sonar-ui-common/components/icons/AlertErrorIcon'; import AlertSuccessIcon from 'sonar-ui-common/components/icons/AlertSuccessIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { DeleteButton, SubmitButton, Button } from 'sonar-ui-common/components/controls/buttons'; -import Step from './Step'; -import { getTokens, generateToken, revokeToken } from '../../../api/user-tokens'; +import { generateToken, getTokens, revokeToken } from '../../../api/user-tokens'; import { getUniqueTokenName } from '../utils'; +import Step from './Step'; interface Props { currentUser: Pick<T.LoggedInUser, 'login'>; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/AnalyzeTutorialDone-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/AnalyzeTutorialDone-test.tsx index f0dede54998..9532fcec0e5 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/AnalyzeTutorialDone-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/AnalyzeTutorialDone-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 AnalyzeTutorialDone from '../AnalyzeTutorialDone'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/BuildSystemForm-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/BuildSystemForm-test.tsx index a478875edc8..045240efcd6 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/BuildSystemForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/BuildSystemForm-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 BuildSystemForm from '../BuildSystemForm'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/LanguageForm-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/LanguageForm-test.tsx index 18af8e638b5..770ad94355b 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/LanguageForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/LanguageForm-test.tsx @@ -17,10 +17,10 @@ * 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 LanguageForm from '../LanguageForm'; +import * as React from 'react'; import { isSonarCloud } from '../../../../helpers/system'; +import LanguageForm from '../LanguageForm'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/NewProjectForm-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/NewProjectForm-test.tsx index cf91df3d1a4..c058a76c3bb 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/NewProjectForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/NewProjectForm-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 { change, submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import NewProjectForm from '../NewProjectForm'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/ProjectAnalysisStep-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/ProjectAnalysisStep-test.tsx index 45d666de5db..7916779b639 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/ProjectAnalysisStep-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/ProjectAnalysisStep-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 { mockComponent } from '../../../../helpers/testMocks'; import ProjectAnalysisStep from '../ProjectAnalysisStep'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/ProjectAnalysisStepFromBuildTool-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/ProjectAnalysisStepFromBuildTool-test.tsx index 50ea22afa34..4ddbaae5100 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/ProjectAnalysisStepFromBuildTool-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/ProjectAnalysisStepFromBuildTool-test.tsx @@ -17,13 +17,13 @@ * 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 { mockComponent, mockLoggedInUser } from '../../../../helpers/testMocks'; import ProjectAnalysisStepFromBuildTool, { ProjectAnalysisModes, Props } from '../ProjectAnalysisStepFromBuildTool'; -import { mockComponent, mockLoggedInUser } from '../../../../helpers/testMocks'; jest.mock('sonar-ui-common/helpers/storage', () => ({ get: jest.fn().mockReturnValue( diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/Step-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/Step-test.tsx index 17903a15e41..c433053af95 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/Step-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/Step-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 { click } from 'sonar-ui-common/helpers/testUtils'; import Step from '../Step'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TokenStep-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TokenStep-test.tsx index a72a95bfcb7..fa20225b33e 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TokenStep-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TokenStep-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 { change, click, submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import TokenStep from '../TokenStep'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommand.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommand.tsx index c5365be57a9..27198982071 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommand.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import { getHostUrl } from 'sonar-ui-common/helpers/urls'; -import JavaMaven from './JavaMaven'; -import JavaGradle from './JavaGradle'; +import { LanguageConfig } from '../../utils'; +import { getProjectKey } from '../ProjectAnalysisStep'; +import ClangGCC from './ClangGCC'; import DotNet from './DotNet'; +import JavaGradle from './JavaGradle'; +import JavaMaven from './JavaMaven'; import Msvc from './Msvc'; -import ClangGCC from './ClangGCC'; import Other from './Other'; -import { LanguageConfig } from '../../utils'; -import { getProjectKey } from '../ProjectAnalysisStep'; interface Props { component?: T.Component; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandCustom.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandCustom.tsx index 3e4e24c6f39..dd77b14d7c2 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandCustom.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandCustom.tsx @@ -19,15 +19,15 @@ */ import * as React from 'react'; import { getHostUrl } from 'sonar-ui-common/helpers/urls'; -import JavaMavenCustom from './Custom/JavaMavenCustom'; -import JavaGradleCustom from './Custom/JavaGradleCustom'; +import { RenderOS, RenderOSProps } from '../LanguageForm'; +import { getProjectKey } from '../ProjectAnalysisStep'; +import { ProjectAnalysisModes } from '../ProjectAnalysisStepFromBuildTool'; +import { AnalysisCommandCommon } from './AnalysisCommandOtherCI'; import ClangGCCCustom from './Custom/ClangGCCCustom'; +import JavaGradleCustom from './Custom/JavaGradleCustom'; +import JavaMavenCustom from './Custom/JavaMavenCustom'; import OtherCustom from './Custom/OtherCustom'; import { AnalysisCommandProps, AnalysisCommandRenderProps } from './utils'; -import { AnalysisCommandCommon } from './AnalysisCommandOtherCI'; -import { getProjectKey } from '../ProjectAnalysisStep'; -import { ProjectAnalysisModes } from '../ProjectAnalysisStepFromBuildTool'; -import { RenderOS, RenderOSProps } from '../LanguageForm'; export function RenderCommandForMaven({ component, diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandOtherCI.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandOtherCI.tsx index 577e9f0eb0c..fe8d1328c0a 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandOtherCI.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandOtherCI.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import { getHostUrl } from 'sonar-ui-common/helpers/urls'; -import OtherOtherCI from './OtherCI/OtherOtherCI'; -import ClangGCCOtherCI from './OtherCI/ClangGCCOtherCI'; -import { AnalysisCommandProps, AnalysisCommandRenderProps } from './utils'; -import { RenderCommandForGradle, RenderCommandForMaven } from './AnalysisCommandCustom'; -import { getProjectKey } from '../ProjectAnalysisStep'; +import EditTokenModal from '../../analyzeProject/steps/EditTokenModal'; import { RenderOS, RenderOSProps } from '../LanguageForm'; +import { getProjectKey } from '../ProjectAnalysisStep'; import { ProjectAnalysisModes } from '../ProjectAnalysisStepFromBuildTool'; -import EditTokenModal from '../../analyzeProject/steps/EditTokenModal'; +import { RenderCommandForGradle, RenderCommandForMaven } from './AnalysisCommandCustom'; +import ClangGCCOtherCI from './OtherCI/ClangGCCOtherCI'; +import OtherOtherCI from './OtherCI/OtherOtherCI'; +import { AnalysisCommandProps, AnalysisCommandRenderProps } from './utils'; export function RenderCommandForClangOrGCC({ component, diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandTravis.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandTravis.tsx index f0e2b5c17d2..e9afe60d5d1 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandTravis.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/AnalysisCommandTravis.tsx @@ -20,12 +20,12 @@ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getHostUrl } from 'sonar-ui-common/helpers/urls'; -import { JavaMavenTravisSonarCloud } from './TravisSonarCloud/JavaMavenTravisSonarCloud'; +import CodeSnippet from '../../../../components/common/CodeSnippet'; +import { getProjectKey } from '../ProjectAnalysisStep'; +import { ClangGCCTravisSonarCloud } from './TravisSonarCloud/ClangGCCTravisSonarCloud'; import { JavaGradleTravisSonarCloud } from './TravisSonarCloud/JavaGradleTravisSonarCloud'; +import { JavaMavenTravisSonarCloud } from './TravisSonarCloud/JavaMavenTravisSonarCloud'; import { OtherTravisSonarCloud } from './TravisSonarCloud/OtherTravisSonarCloud'; -import { ClangGCCTravisSonarCloud } from './TravisSonarCloud/ClangGCCTravisSonarCloud'; -import { getProjectKey } from '../ProjectAnalysisStep'; -import CodeSnippet from '../../../../components/common/CodeSnippet'; interface Props { buildType: string | undefined; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/ClangGCC.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/ClangGCC.tsx index 74b95b5b3e8..ace09fad329 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/ClangGCC.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/ClangGCC.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import SQScanner from './SQScanner'; -import BuildWrapper from './BuildWrapper'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../components/common/InstanceMessage'; import { quote } from '../../utils'; +import BuildWrapper from './BuildWrapper'; +import SQScanner from './SQScanner'; export interface Props { host: string; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/ClangGCCCustom.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/ClangGCCCustom.tsx index c73ba8e2dc2..e9509b8a2bd 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/ClangGCCCustom.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/ClangGCCCustom.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button, EditButton } from 'sonar-ui-common/components/controls/buttons'; -import { quote } from '../../../utils'; -import SQScanner from '../SQScanner'; -import BuildWrapper from '../BuildWrapper'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CodeSnippet from '../../../../../components/common/CodeSnippet'; +import { quote } from '../../../utils'; import { ProjectAnalysisModes } from '../../ProjectAnalysisStepFromBuildTool'; +import BuildWrapper from '../BuildWrapper'; +import SQScanner from '../SQScanner'; export interface Props { host: string; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/JavaGradleCustom.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/JavaGradleCustom.tsx index cd0ce89fde2..03491dd45a0 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/JavaGradleCustom.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/JavaGradleCustom.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { JavaCustomProps, RenderCustomContent } from './JavaMavenCustom'; import CodeSnippet from '../../../../../components/common/CodeSnippet'; import { ProjectAnalysisModes } from '../../ProjectAnalysisStepFromBuildTool'; +import { JavaCustomProps, RenderCustomContent } from './JavaMavenCustom'; export default function JavaGradleCustom(props: JavaCustomProps) { const suffix = props.mode === ProjectAnalysisModes.CI ? '.ci' : ''; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/JavaMavenCustom.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/JavaMavenCustom.tsx index 44546f6e842..b64c9b485e9 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/JavaMavenCustom.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/JavaMavenCustom.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button, EditButton } from 'sonar-ui-common/components/controls/buttons'; -import InstanceMessage from '../../../../../components/common/InstanceMessage'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CodeSnippet from '../../../../../components/common/CodeSnippet'; +import InstanceMessage from '../../../../../components/common/InstanceMessage'; import { ProjectAnalysisModes } from '../../ProjectAnalysisStepFromBuildTool'; export interface JavaCustomProps { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/OtherCustom.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/OtherCustom.tsx index d54a1cd1f15..aec4567a100 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/OtherCustom.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/OtherCustom.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button, EditButton } from 'sonar-ui-common/components/controls/buttons'; -import SQScanner from '../SQScanner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CodeSnippet from '../../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../../components/common/InstanceMessage'; import { quote } from '../../../utils'; import { ProjectAnalysisModes } from '../../ProjectAnalysisStepFromBuildTool'; +import SQScanner from '../SQScanner'; export interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/ClangGCCCustom-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/ClangGCCCustom-test.tsx index 37af8eddc42..ba4b8d6d511 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/ClangGCCCustom-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/ClangGCCCustom-test.tsx @@ -17,10 +17,10 @@ * 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 ClangGCCCustom, { ClangGCCCommon } from '../ClangGCCCustom'; +import * as React from 'react'; import { ProjectAnalysisModes } from '../../../ProjectAnalysisStepFromBuildTool'; +import ClangGCCCustom, { ClangGCCCommon } from '../ClangGCCCustom'; it('should render correctly', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/JavaGradleCustom-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/JavaGradleCustom-test.tsx index f86c99772ee..6ecfd14c5ba 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/JavaGradleCustom-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/JavaGradleCustom-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 { ProjectAnalysisModes } from '../../../ProjectAnalysisStepFromBuildTool'; import JavaGradleCustom from '../JavaGradleCustom'; import { RenderCustomContent } from '../JavaMavenCustom'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/JavaMavenCustom-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/JavaMavenCustom-test.tsx index 21d987eb0e1..17b2a57b101 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/JavaMavenCustom-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/JavaMavenCustom-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 { ProjectAnalysisModes } from '../../../ProjectAnalysisStepFromBuildTool'; import JavaMavenCustom, { RenderCustomContent } from '../JavaMavenCustom'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/OtherCustom-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/OtherCustom-test.tsx index e9768fd08a8..1f9dfb5c181 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/OtherCustom-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Custom/__tests__/OtherCustom-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 { shallow } from 'enzyme'; +import * as React from 'react'; +import { mockComponent, mockLoggedInUser } from '../../../../../../helpers/testMocks'; import { ProjectAnalysisModes } from '../../../ProjectAnalysisStepFromBuildTool'; import OtherCustom from '../OtherCustom'; -import { mockComponent, mockLoggedInUser } from '../../../../../../helpers/testMocks'; it('should render correctly', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/DotNet.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/DotNet.tsx index aa5643e82bd..451437059f6 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/DotNet.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/DotNet.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import MSBuildScanner from './MSBuildScanner'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../components/common/InstanceMessage'; +import MSBuildScanner from './MSBuildScanner'; export interface Props { host: string; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Msvc.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Msvc.tsx index 20679baf93f..e40f16f377f 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Msvc.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Msvc.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import MSBuildScanner from './MSBuildScanner'; -import BuildWrapper from './BuildWrapper'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../components/common/InstanceMessage'; +import BuildWrapper from './BuildWrapper'; +import MSBuildScanner from './MSBuildScanner'; interface Props { host: string; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Other.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Other.tsx index 45483b77d3e..a60028d198c 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Other.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Other.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import SQScanner from './SQScanner'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../components/common/InstanceMessage'; import { quote } from '../../utils'; +import SQScanner from './SQScanner'; export interface Props { host: string; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/ClangGCCOtherCI.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/ClangGCCOtherCI.tsx index a0d15f11428..78151a07437 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/ClangGCCOtherCI.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/ClangGCCOtherCI.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { EditButton } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import CodeSnippet from '../../../../../components/common/CodeSnippet'; import { quote } from '../../../utils'; -import SQScanner from '../SQScanner'; import BuildWrapper from '../BuildWrapper'; -import CodeSnippet from '../../../../../components/common/CodeSnippet'; import { ClangGCCCommon } from '../Custom/ClangGCCCustom'; +import SQScanner from '../SQScanner'; export interface Props { host: string; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/OtherOtherCI.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/OtherOtherCI.tsx index 5a1569f0931..41d3ae7836b 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/OtherOtherCI.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/OtherOtherCI.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button, EditButton } from 'sonar-ui-common/components/controls/buttons'; -import SQScanner from '../SQScanner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CodeSnippet from '../../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../../components/common/InstanceMessage'; import { quote } from '../../../utils'; +import SQScanner from '../SQScanner'; export interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/__tests__/ClangGCCOtherCI-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/__tests__/ClangGCCOtherCI-test.tsx index ee38c21387c..282177bb94c 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/__tests__/ClangGCCOtherCI-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/__tests__/ClangGCCOtherCI-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 ClangGCCOtherCI from '../ClangGCCOtherCI'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/__tests__/OtherOtherCI-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/__tests__/OtherOtherCI-test.tsx index 09321998252..9ef2faedb8f 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/__tests__/OtherOtherCI-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/OtherCI/__tests__/OtherOtherCI-test.tsx @@ -17,10 +17,10 @@ * 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 OtherOtherCI from '../OtherOtherCI'; +import * as React from 'react'; import { mockComponent, mockLoggedInUser } from '../../../../../../helpers/testMocks'; +import OtherOtherCI from '../OtherOtherCI'; it('should render correctly', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/ClangGCCTravisSonarCloud.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/ClangGCCTravisSonarCloud.tsx index 7a75cdcf909..79599be7879 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/ClangGCCTravisSonarCloud.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/ClangGCCTravisSonarCloud.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { CommonTravisSonarCloud } from './utils'; import { getSonarcloudAddonYml, getSonarcloudAddonYmlRender } from '../AnalysisCommandTravis'; import { Props } from '../ClangGCC'; +import { CommonTravisSonarCloud } from './utils'; export function ClangGCCTravisSonarCloud(props: Props) { const command = `${getSonarcloudAddonYml(props.organization)} diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/JavaGradleTravisSonarCloud.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/JavaGradleTravisSonarCloud.tsx index 77ab032e910..5c1d3b964cf 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/JavaGradleTravisSonarCloud.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/JavaGradleTravisSonarCloud.tsx @@ -20,13 +20,13 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import CodeSnippet from '../../../../../components/common/CodeSnippet'; import { getSonarcloudAddonYml, - RequirementJavaBuild, - getSonarcloudAddonYmlRender + getSonarcloudAddonYmlRender, + RequirementJavaBuild } from '../AnalysisCommandTravis'; import { Props } from '../JavaGradle'; -import CodeSnippet from '../../../../../components/common/CodeSnippet'; export function JavaGradleTravisSonarCloud(props: Props) { const config = `plugins { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/JavaMavenTravisSonarCloud.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/JavaMavenTravisSonarCloud.tsx index aa15d4145bc..be9ebce10ab 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/JavaMavenTravisSonarCloud.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/JavaMavenTravisSonarCloud.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Props } from '../JavaMaven'; +import CodeSnippet from '../../../../../components/common/CodeSnippet'; import { getSonarcloudAddonYml, - RequirementJavaBuild, - getSonarcloudAddonYmlRender + getSonarcloudAddonYmlRender, + RequirementJavaBuild } from '../AnalysisCommandTravis'; -import CodeSnippet from '../../../../../components/common/CodeSnippet'; +import { Props } from '../JavaMaven'; export function JavaMavenTravisSonarCloud(props: Props) { const command = `${getSonarcloudAddonYml(props.organization)} diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/OtherTravisSonarCloud.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/OtherTravisSonarCloud.tsx index 0a89214429c..dd887dcd636 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/OtherTravisSonarCloud.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/OtherTravisSonarCloud.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { CommonTravisSonarCloud } from './utils'; import { getSonarcloudAddonYml, getSonarcloudAddonYmlRender } from '../AnalysisCommandTravis'; import { Props } from '../Other'; +import { CommonTravisSonarCloud } from './utils'; export function OtherTravisSonarCloud(props: Props) { const command = `${getSonarcloudAddonYml(props.organization)} diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/ClangGCCTravisSonarCloud-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/ClangGCCTravisSonarCloud-test.tsx index 2a2094233ed..8f6417408ea 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/ClangGCCTravisSonarCloud-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/ClangGCCTravisSonarCloud-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 { ClangGCCTravisSonarCloud } from '../ClangGCCTravisSonarCloud'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/JavaGradleTravisSonarCloud-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/JavaGradleTravisSonarCloud-test.tsx index 9d107303906..47d8c953f8c 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/JavaGradleTravisSonarCloud-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/JavaGradleTravisSonarCloud-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 { JavaGradleTravisSonarCloud } from '../JavaGradleTravisSonarCloud'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/JavaMavenTravisSonarCloud-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/JavaMavenTravisSonarCloud-test.tsx index d41e247c5f9..3d758d0d8fc 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/JavaMavenTravisSonarCloud-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/JavaMavenTravisSonarCloud-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 { JavaMavenTravisSonarCloud } from '../JavaMavenTravisSonarCloud'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/OtherTravisSonarCloud-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/OtherTravisSonarCloud-test.tsx index 6f8cd9aacc7..b8658ceaaa2 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/OtherTravisSonarCloud-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/__tests__/OtherTravisSonarCloud-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 { OtherTravisSonarCloud } from '../OtherTravisSonarCloud'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/utils.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/utils.tsx index 54c953c0510..9e31caf005b 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/utils.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/TravisSonarCloud/utils.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { RequirementOtherBuild } from '../AnalysisCommandTravis'; import CodeSnippet from '../../../../../components/common/CodeSnippet'; +import { RequirementOtherBuild } from '../AnalysisCommandTravis'; interface CommonTravisSonarCloudProps { command: string; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommand-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommand-test.tsx index bf57a1bb502..f285947912c 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommand-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommand-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 AnalysisCommand from '../AnalysisCommand'; jest.mock('../../../../../helpers/system', () => ({ diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandCustom-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandCustom-test.tsx index afeec8bd0ad..7bb8e783e4b 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandCustom-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandCustom-test.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 { shallow } from 'enzyme'; +import * as React from 'react'; +import { mockComponent, mockLoggedInUser } from '../../../../../helpers/testMocks'; +import { ProjectAnalysisModes } from '../../ProjectAnalysisStepFromBuildTool'; import AnalysisCommandTravis, { RenderCommandForClangOrGCC, RenderCommandForGradle, RenderCommandForMaven, RenderCommandForOther } from '../AnalysisCommandCustom'; -import { ProjectAnalysisModes } from '../../ProjectAnalysisStepFromBuildTool'; -import { mockComponent, mockLoggedInUser } from '../../../../../helpers/testMocks'; const organization = 'org'; const token = '123'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandOtherCI-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandOtherCI-test.tsx index 899e8c345a4..474281fadef 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandOtherCI-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandOtherCI-test.tsx @@ -17,15 +17,15 @@ * 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 { mockComponent, mockLoggedInUser } from '../../../../../helpers/testMocks'; +import { ProjectAnalysisModes } from '../../ProjectAnalysisStepFromBuildTool'; import AnalysisCommandOtherCI, { AnalysisCommandCommon, RenderCommandForClangOrGCC, RenderCommandForOther } from '../AnalysisCommandOtherCI'; -import { ProjectAnalysisModes } from '../../ProjectAnalysisStepFromBuildTool'; -import { mockComponent, mockLoggedInUser } from '../../../../../helpers/testMocks'; const organization = 'org'; const token = '123'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandTravis-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandTravis-test.tsx index ad5f0bad139..0ad1bf40489 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandTravis-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/AnalysisCommandTravis-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 AnalysisCommandTravis, { getSonarcloudAddonYml, getSonarcloudAddonYmlRender, diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/BuildWrapper-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/BuildWrapper-test.tsx index 34f1b26a813..d753755141a 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/BuildWrapper-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/BuildWrapper-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 BuildWrapper from '../BuildWrapper'; it('renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/ClangGCC-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/ClangGCC-test.tsx index 67ccb52e35e..ee8a36ee259 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/ClangGCC-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/ClangGCC-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 ClangGCC from '../ClangGCC'; it('renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/DotNet-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/DotNet-test.tsx index 9729e6e12b6..c864764bc16 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/DotNet-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/DotNet-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 DotNet, { Props } from '../DotNet'; it('DotNet renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/JavaGradle-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/JavaGradle-test.tsx index c96f861c3b2..f5b6e0fa3f2 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/JavaGradle-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/JavaGradle-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 JavaGradle from '../JavaGradle'; it('renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/JavaMaven-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/JavaMaven-test.tsx index 3db2b9683ff..80dfcb15fdb 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/JavaMaven-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/JavaMaven-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 JavaMaven from '../JavaMaven'; it('renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/MSBuildScanner-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/MSBuildScanner-test.tsx index af1b2a55c38..b78bb7e09fe 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/MSBuildScanner-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/MSBuildScanner-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 MSBuildScanner from '../MSBuildScanner'; it('renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/Msvc-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/Msvc-test.tsx index ae87d25704c..5f5d6eb9e18 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/Msvc-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/Msvc-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 Msvc from '../Msvc'; it('renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/Other-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/Other-test.tsx index d73e4dd5545..947a3a2abf2 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/Other-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/Other-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 Other from '../Other'; it('renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/SQScanner-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/SQScanner-test.tsx index d0f2d8ff7ca..8e9f15bf29f 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/SQScanner-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/SQScanner-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 SQScanner from '../SQScanner'; it('renders correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx index e537bb80abd..8d694abc17c 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingModal.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import Modal from 'sonar-ui-common/components/controls/Modal'; import OnboardingProjectIcon from 'sonar-ui-common/components/icons/OnboardingProjectIcon'; import OnboardingTeamIcon from 'sonar-ui-common/components/icons/OnboardingTeamIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import Modal from 'sonar-ui-common/components/controls/Modal'; -import OrganizationsShortList from './OrganizationsShortList'; import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; import { withUserOrganizations } from '../../../components/hoc/withUserOrganizations'; import '../styles.css'; +import OrganizationsShortList from './OrganizationsShortList'; export interface Props { onClose: VoidFunction; diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingPage.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingPage.tsx index 68cbd0559f6..d0bfa1633b1 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingPage.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OnboardingPage.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import OnboardingModal from './OnboardingModal'; -import { skipOnboarding } from '../../../store/users'; import { OnboardingContext } from '../../../app/components/OnboardingContext'; import { Router } from '../../../components/hoc/withRouter'; +import { skipOnboarding } from '../../../store/users'; +import OnboardingModal from './OnboardingModal'; interface Props { router: Router; diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OrganizationsShortList.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OrganizationsShortList.tsx index daf264159d7..db80224b57f 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OrganizationsShortList.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OrganizationsShortList.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { Link } from 'react-router'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import OrganizationsShortListItem from './OrganizationsShortListItem'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OrganizationsShortListItem.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OrganizationsShortListItem.tsx index 21feb94feff..db4f3c2b4c0 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/OrganizationsShortListItem.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/OrganizationsShortListItem.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { ListButton } from 'sonar-ui-common/components/controls/buttons'; import OrganizationAvatar from '../../../components/common/OrganizationAvatar'; -import { withRouter, Router } from '../../../components/hoc/withRouter'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; import { getOrganizationUrl } from '../../../helpers/urls'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OnboardingModal-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OnboardingModal-test.tsx index 59fd7585b30..94ce7a43416 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OnboardingModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OnboardingModal-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; -import { OnboardingModal, Props } from '../OnboardingModal'; import { mockOrganization } from '../../../../helpers/testMocks'; +import { OnboardingModal, Props } from '../OnboardingModal'; it('renders correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OrganizationsShortList-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OrganizationsShortList-test.tsx index f5f46c188c7..910973b42ab 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OrganizationsShortList-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OrganizationsShortList-test.tsx @@ -17,10 +17,10 @@ * 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 OrganizationsShortList, { Props } from '../OrganizationsShortList'; +import * as React from 'react'; import { mockOrganization } from '../../../../helpers/testMocks'; +import OrganizationsShortList, { Props } from '../OrganizationsShortList'; it('should render null with no orgs', () => { expect(shallowRender().getElement()).toBe(null); diff --git a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OrganizationsShortListItem-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OrganizationsShortListItem-test.tsx index ace1cc61a37..4142ab421dd 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OrganizationsShortListItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/onboarding/__tests__/OrganizationsShortListItem-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; +import { mockOrganization, mockRouter } from '../../../../helpers/testMocks'; import { OrganizationsShortListItem } from '../OrganizationsShortListItem'; -import { mockRouter, mockOrganization } from '../../../../helpers/testMocks'; it('renders correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/users/Header.tsx b/server/sonar-web/src/main/js/apps/users/Header.tsx index 3dc772b71f1..2228bdb4f61 100644 --- a/server/sonar-web/src/main/js/apps/users/Header.tsx +++ b/server/sonar-web/src/main/js/apps/users/Header.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import UserForm from './components/UserForm'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/Search.tsx b/server/sonar-web/src/main/js/apps/users/Search.tsx index f185faf8d68..b734309d9c0 100644 --- a/server/sonar-web/src/main/js/apps/users/Search.tsx +++ b/server/sonar-web/src/main/js/apps/users/Search.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Query } from './utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/UsersApp.tsx b/server/sonar-web/src/main/js/apps/users/UsersApp.tsx index 1ff056a5b1c..6124bb9f929 100644 --- a/server/sonar-web/src/main/js/apps/users/UsersApp.tsx +++ b/server/sonar-web/src/main/js/apps/users/UsersApp.tsx @@ -19,15 +19,15 @@ */ import * as React from 'react'; import Helmet from 'react-helmet'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { getIdentityProviders, searchUsers } from '../../api/users'; +import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; +import { Location, Router, withRouter } from '../../components/hoc/withRouter'; import Header from './Header'; import Search from './Search'; import UsersList from './UsersList'; import { parseQuery, Query, serializeQuery } from './utils'; -import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; -import { getIdentityProviders, searchUsers } from '../../api/users'; -import { withRouter, Location, Router } from '../../components/hoc/withRouter'; interface Props { currentUser: { isLoggedIn: boolean; login?: string }; diff --git a/server/sonar-web/src/main/js/apps/users/UsersAppContainer.tsx b/server/sonar-web/src/main/js/apps/users/UsersAppContainer.tsx index 5c4c0a40df9..4ddd17fd074 100644 --- a/server/sonar-web/src/main/js/apps/users/UsersAppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/users/UsersAppContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import UsersApp from './UsersApp'; import { areThereCustomOrganizations, getCurrentUser, Store } from '../../store/rootReducer'; +import UsersApp from './UsersApp'; const mapStateToProps = (state: Store) => ({ currentUser: getCurrentUser(state), diff --git a/server/sonar-web/src/main/js/apps/users/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/users/__tests__/Header-test.tsx index a8f8ad22cd6..eb6f272d5d1 100644 --- a/server/sonar-web/src/main/js/apps/users/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/__tests__/Header-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 { click } from 'sonar-ui-common/helpers/testUtils'; import Header from '../Header'; diff --git a/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-test.tsx b/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-test.tsx index bf2cee17d88..8ab6df8fa8a 100644 --- a/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-test.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable import/order */ -import * as React from 'react'; import { shallow } from 'enzyme'; -import { UsersApp } from '../UsersApp'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { Location } from '../../../components/hoc/withRouter'; +import { UsersApp } from '../UsersApp'; jest.mock('../../../api/users', () => ({ getIdentityProviders: jest.fn(() => diff --git a/server/sonar-web/src/main/js/apps/users/__tests__/UsersList-test.tsx b/server/sonar-web/src/main/js/apps/users/__tests__/UsersList-test.tsx index 7004f7e4109..6200d7eb2a5 100644 --- a/server/sonar-web/src/main/js/apps/users/__tests__/UsersList-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/__tests__/UsersList-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 UsersList from '../UsersList'; const users = [ diff --git a/server/sonar-web/src/main/js/apps/users/components/DeactivateForm.tsx b/server/sonar-web/src/main/js/apps/users/components/DeactivateForm.tsx index a193e71bcce..f77b200b4ab 100644 --- a/server/sonar-web/src/main/js/apps/users/components/DeactivateForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/DeactivateForm.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { deactivateUser } from '../../../api/users'; export interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx b/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx index 3de11517160..1e4a5c59930 100644 --- a/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx @@ -17,14 +17,14 @@ * 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 { find, without } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Modal from 'sonar-ui-common/components/controls/Modal'; import SelectList, { SelectListFilter, SelectListSearchParams } from 'sonar-ui-common/components/controls/SelectList'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getUserGroups, UserGroup } from '../../../api/users'; import { addUserToGroup, removeUserFromGroup } from '../../../api/user_groups'; diff --git a/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx b/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx index 516d3102972..c0069ce4b43 100644 --- a/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { parseError } from 'sonar-ui-common/helpers/request'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { parseError } from 'sonar-ui-common/helpers/request'; import { changePassword } from '../../../api/users'; import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage'; import throwGlobalError from '../../../app/utils/throwGlobalError'; diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx index 9d5041ca957..c4589f02c87 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { generateToken, getTokens } from '../../../api/user-tokens'; import TokensFormItem, { TokenDeleteConfirmation } from './TokensFormItem'; import TokensFormNewToken from './TokensFormNewToken'; -import { getTokens, generateToken } from '../../../api/user-tokens'; interface Props { deleteConfirmation: TokenDeleteConfirmation; diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx index 52ce2002b0b..e4f2fb6fffa 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx @@ -19,15 +19,15 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { limitComponentName } from 'sonar-ui-common/helpers/path'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { limitComponentName } from 'sonar-ui-common/helpers/path'; +import { revokeToken } from '../../../api/user-tokens'; import DateFormatter from '../../../components/intl/DateFormatter'; import DateFromNowHourPrecision from '../../../components/intl/DateFromNowHourPrecision'; -import { revokeToken } from '../../../api/user-tokens'; export type TokenDeleteConfirmation = 'inline' | 'modal'; diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx index d7d0023c3f4..4018f083b27 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import TokensForm from './TokensForm'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormNewToken.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormNewToken.tsx index af8e72a9a45..359303bf8f9 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensFormNewToken.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormNewToken.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import ClipboardButton from 'sonar-ui-common/components/controls/ClipboardButton'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { token: { name: string; token: string }; diff --git a/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx b/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx index d4248014214..4f2a93793e0 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ActionsDropdown, { - ActionsDropdownItem, - ActionsDropdownDivider + ActionsDropdownDivider, + ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { isUserActive } from '../../../helpers/users'; import DeactivateForm from './DeactivateForm'; import PasswordForm from './PasswordForm'; import UserForm from './UserForm'; -import { isUserActive } from '../../../helpers/users'; interface Props { isCurrentUser: boolean; diff --git a/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx b/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx index 584095c3779..dd7a2799352 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserForm.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 { uniq } from 'lodash'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { parseError } from 'sonar-ui-common/helpers/request'; +import * as React from 'react'; import { Button, ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; -import { Alert } from 'sonar-ui-common/components/ui/Alert'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; -import UserScmAccountInput from './UserScmAccountInput'; -import throwGlobalError from '../../../app/utils/throwGlobalError'; +import { Alert } from 'sonar-ui-common/components/ui/Alert'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { parseError } from 'sonar-ui-common/helpers/request'; import { createUser, updateUser } from '../../../api/users'; +import throwGlobalError from '../../../app/utils/throwGlobalError'; +import UserScmAccountInput from './UserScmAccountInput'; export interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/users/components/UserGroups.tsx b/server/sonar-web/src/main/js/apps/users/components/UserGroups.tsx index 98a76b0459f..bd08cd9cf19 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserGroups.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserGroups.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; import BulletListIcon from 'sonar-ui-common/components/icons/BulletListIcon'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; import GroupsForm from './GroupsForm'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx b/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx index 6b5f9477ca2..11e10978bc1 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx @@ -18,16 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; import BulletListIcon from 'sonar-ui-common/components/icons/BulletListIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; +import DateFromNowHourPrecision from '../../../components/intl/DateFromNowHourPrecision'; +import Avatar from '../../../components/ui/Avatar'; import TokensFormModal from './TokensFormModal'; import UserActions from './UserActions'; import UserGroups from './UserGroups'; import UserListItemIdentity from './UserListItemIdentity'; import UserScmAccounts from './UserScmAccounts'; -import Avatar from '../../../components/ui/Avatar'; -import DateFromNowHourPrecision from '../../../components/intl/DateFromNowHourPrecision'; interface Props { identityProvider?: T.IdentityProvider; diff --git a/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx b/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx index 0f3a3778785..69c4bde7ad7 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx @@ -17,10 +17,10 @@ * 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 { debounce } from 'lodash'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Select from 'sonar-ui-common/components/controls/Select'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import Avatar from '../../../components/ui/Avatar'; interface Option { diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/GroupsForm-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/GroupsForm-test.tsx index 61c721b4ea8..ca1ce2f4bd8 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/GroupsForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/GroupsForm-test.tsx @@ -20,11 +20,11 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import SelectList, { SelectListFilter } from 'sonar-ui-common/components/controls/SelectList'; -import { waitAndUpdate, click } from 'sonar-ui-common/helpers/testUtils'; -import GroupsForm from '../GroupsForm'; +import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { getUserGroups } from '../../../../api/users'; import { addUserToGroup, removeUserFromGroup } from '../../../../api/user_groups'; import { mockUser } from '../../../../helpers/testMocks'; +import GroupsForm from '../GroupsForm'; const user = mockUser(); diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/PasswordForm-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/PasswordForm-test.tsx index f0f13f51d0f..8fed4d531df 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/PasswordForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/PasswordForm-test.tsx @@ -17,10 +17,10 @@ * 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 PasswordForm from '../PasswordForm'; +import * as React from 'react'; import { mockUser } from '../../../../helpers/testMocks'; +import PasswordForm from '../PasswordForm'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensForm-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensForm-test.tsx index 1d9ce0340a0..089663427de 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensForm-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { change, submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import TokensForm from '../TokensForm'; import { generateToken, getTokens } from '../../../../api/user-tokens'; +import TokensForm from '../TokensForm'; jest.mock('../../../../api/user-tokens', () => ({ generateToken: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormItem-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormItem-test.tsx index f655299909e..fc69fcd05cd 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormItem-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import TokensFormItem from '../TokensFormItem'; import { revokeToken } from '../../../../api/user-tokens'; +import TokensFormItem from '../TokensFormItem'; jest.mock('../../../../components/intl/DateFormatter'); jest.mock('../../../../components/intl/DateFromNow'); diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormModal-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormModal-test.tsx index 235a2a88654..9954bc23e2a 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormModal-test.tsx @@ -17,10 +17,10 @@ * 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 TokensFormModal from '../TokensFormModal'; +import * as React from 'react'; import { mockUser } from '../../../../helpers/testMocks'; +import TokensFormModal from '../TokensFormModal'; it('should render correctly', () => { expect( diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserActions-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserActions-test.tsx index 58d79168075..8e189602f3a 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserActions-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 { click } from 'sonar-ui-common/helpers/testUtils'; import UserActions from '../UserActions'; diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx index 70ebba9aedc..db97e0cd3b9 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-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 { waitAndUpdate, submit } from 'sonar-ui-common/helpers/testUtils'; -import UserForm from '../UserForm'; -import { mockUser } from '../../../../helpers/testMocks'; +import * as React from 'react'; +import { submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { createUser, updateUser } from '../../../../api/users'; +import { mockUser } from '../../../../helpers/testMocks'; +import UserForm from '../UserForm'; jest.mock('../../../../api/users', () => ({ createUser: jest.fn().mockResolvedValue({}), diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserGroups-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserGroups-test.tsx index b1302d28e3f..6867c595f72 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserGroups-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserGroups-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 { click } from 'sonar-ui-common/helpers/testUtils'; import UserGroups from '../UserGroups'; diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItem-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItem-test.tsx index 49c8d7b6f9f..c19f61257db 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItem-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 { click } from 'sonar-ui-common/helpers/testUtils'; import UserListItem from '../UserListItem'; diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItemIdentity-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItemIdentity-test.tsx index 126e2aebac5..265db7b165c 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItemIdentity-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItemIdentity-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 { shallow } from 'enzyme'; -import UserListItemIdentity, { Props, ExternalProvider } from '../UserListItemIdentity'; +import * as React from 'react'; +import UserListItemIdentity, { ExternalProvider, Props } from '../UserListItemIdentity'; describe('#UserListItemIdentity', () => { it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx index 726948dbd10..08f2b8f24f3 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UsersSelectSearch-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 UsersSelectSearch, { UsersSelectSearchOption, UsersSelectSearchValue diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx index daa069cbe3a..a625db9a2ec 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx @@ -17,17 +17,17 @@ * 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 classNames from 'classnames'; import * as React from 'react'; -import LinkIcon from 'sonar-ui-common/components/icons/LinkIcon'; import { Link } from 'react-router'; -import * as classNames from 'classnames'; +import LinkIcon from 'sonar-ui-common/components/icons/LinkIcon'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import Params from './Params'; -import ResponseExample from './ResponseExample'; +import { getActionKey, serializeQuery } from '../utils'; import ActionChangelog from './ActionChangelog'; import DeprecatedBadge from './DeprecatedBadge'; import InternalBadge from './InternalBadge'; -import { getActionKey, serializeQuery } from '../utils'; +import Params from './Params'; +import ResponseExample from './ResponseExample'; interface Props { action: T.WebApi.Action; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/DeprecatedBadge.tsx b/server/sonar-web/src/main/js/apps/web-api/components/DeprecatedBadge.tsx index a26c19a8665..1bffacec7c0 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/DeprecatedBadge.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/DeprecatedBadge.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { parseVersion } from '../utils'; export default function DeprecatedBadge({ since }: { since?: string }) { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx index d7e4ab6ee4d..dad4d65ed7d 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { actionsFilter, getActionKey, Query } from '../utils'; import Action from './Action'; import DeprecatedBadge from './DeprecatedBadge'; import InternalBadge from './InternalBadge'; -import { getActionKey, actionsFilter, Query } from '../utils'; interface Props { domain: T.WebApi.Domain; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx b/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx index 4862967a648..0259922365d 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; export default function InternalBadge() { return ( diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx index d21148ea2ea..1aaffdb3136 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Menu.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 classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; -import * as classNames from 'classnames'; +import { actionsFilter, isDomainPathActive, Query, serializeQuery } from '../utils'; import DeprecatedBadge from './DeprecatedBadge'; import InternalBadge from './InternalBadge'; -import { isDomainPathActive, actionsFilter, Query, serializeQuery } from '../utils'; interface Props { domains: T.WebApi.Domain[]; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx index a53e8f20995..7619698b7e6 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import InternalBadge from './InternalBadge'; import DeprecatedBadge from './DeprecatedBadge'; +import InternalBadge from './InternalBadge'; interface Props { params: T.WebApi.Param[]; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx index d05e016b7e6..03c294ce16a 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { Query } from '../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx index 23016e3a617..0e6e62202e9 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx @@ -17,29 +17,29 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { maxBy } from 'lodash'; import * as React from 'react'; import Helmet from 'react-helmet'; -import { maxBy } from 'lodash'; import { Link, withRouter, WithRouterProps } from 'react-router'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { addSideBarClass, removeSideBarClass } from 'sonar-ui-common/helpers/pages'; import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import Domain from './Domain'; -import Menu from './Menu'; -import Search from './Search'; +import { fetchWebApi } from '../../../api/web-api'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; -import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { fetchWebApi } from '../../../api/web-api'; +import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; +import '../styles/web-api.css'; import { getActionKey, isDomainPathActive, - Query, - serializeQuery, parseQuery, - parseVersion + parseVersion, + Query, + serializeQuery } from '../utils'; -import '../styles/web-api.css'; +import Domain from './Domain'; +import Menu from './Menu'; +import Search from './Search'; type Props = WithRouterProps; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Action-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Action-test.tsx index 22b55894439..b4faa9eda6f 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Action-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Action-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 Action from '../Action'; const ACTION = { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/ActionChangelog-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/ActionChangelog-test.tsx index c84d0b40cc3..2e6c21fcd62 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/ActionChangelog-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/ActionChangelog-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 ActionChangelog from '../ActionChangelog'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/DeprecatedBadge-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/DeprecatedBadge-test.tsx index 5440bb2dfa4..7451433191f 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/DeprecatedBadge-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/DeprecatedBadge-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 DeprecatedBadge from '../DeprecatedBadge'; it('should render with version', () => { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Domain-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Domain-test.tsx index df86df75baa..f1a7d3ad2bc 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Domain-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Domain-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 Domain from '../Domain'; const ACTION = { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Menu-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Menu-test.tsx index c4b9059c412..daf0ab47621 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Menu-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Menu-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 Menu from '../Menu'; const ACTION: T.WebApi.Action = { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Params-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Params-test.tsx index 4f2c64c8a81..7b0696c2263 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Params-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Params-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 Params from '../Params'; const DEFAULT_PARAM: T.WebApi.Param = { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/ResponseExample-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/ResponseExample-test.tsx index 9b4be916510..211da16b9d4 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/ResponseExample-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/ResponseExample-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 ResponseExample from '../ResponseExample'; const ACTION = { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Search-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Search-test.tsx index d6ba3a4a5e7..a577c63c5bb 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Search-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Search-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 Search from '../Search'; const PROPS = { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx index d08a917bdbb..d7f4cfe0b53 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx @@ -17,13 +17,13 @@ * 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 { addSideBarClass, removeSideBarClass } from 'sonar-ui-common/helpers/pages'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import { WebApiApp } from '../WebApiApp'; import { fetchWebApi } from '../../../../api/web-api'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; +import { WebApiApp } from '../WebApiApp'; jest.mock('../../../../api/web-api', () => ({ fetchWebApi: jest.fn().mockResolvedValue([ diff --git a/server/sonar-web/src/main/js/apps/web-api/utils.ts b/server/sonar-web/src/main/js/apps/web-api/utils.ts index 1640e4832fd..f15f14c577d 100644 --- a/server/sonar-web/src/main/js/apps/web-api/utils.ts +++ b/server/sonar-web/src/main/js/apps/web-api/utils.ts @@ -20,9 +20,9 @@ import { memoize } from 'lodash'; import { cleanQuery, - serializeString, parseAsOptionalBoolean, - parseAsString + parseAsString, + serializeString } from 'sonar-ui-common/helpers/query'; export interface Query { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx index 4c4b417fc6e..6ca1793da55 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import { Helmet } from 'react-helmet'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import { createWebhook, deleteWebhook, searchWebhooks, updateWebhook } from '../../../api/webhooks'; +import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import PageActions from './PageActions'; import PageHeader from './PageHeader'; import WebhooksList from './WebhooksList'; -import { createWebhook, deleteWebhook, searchWebhooks, updateWebhook } from '../../../api/webhooks'; -import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; interface Props { component?: T.LightComponent; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx index cf9162e19db..93174e9e1ce 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { isWebUri } from 'valid-url'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import InputValidationField from 'sonar-ui-common/components/controls/InputValidationField'; import ValidationModal from 'sonar-ui-common/components/controls/ValidationModal'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { isWebUri } from 'valid-url'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx index 6a5cd81de1c..9bcc12775c8 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { SubmitButton, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ResetButtonLink, SubmitButton } from 'sonar-ui-common/components/controls/buttons'; import SimpleModal from 'sonar-ui-common/components/controls/SimpleModal'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveriesForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveriesForm.tsx index d069f8b0955..3d53f59afcd 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveriesForm.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveriesForm.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import Modal from 'sonar-ui-common/components/controls/Modal'; import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; -import DeliveryAccordion from './DeliveryAccordion'; +import Modal from 'sonar-ui-common/components/controls/Modal'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { searchDeliveries } from '../../../api/webhooks'; +import DeliveryAccordion from './DeliveryAccordion'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryAccordion.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryAccordion.tsx index 02a436d216d..c3aa27799f9 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryAccordion.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryAccordion.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import BoxedGroupAccordion from 'sonar-ui-common/components/controls/BoxedGroupAccordion'; import AlertErrorIcon from 'sonar-ui-common/components/icons/AlertErrorIcon'; import AlertSuccessIcon from 'sonar-ui-common/components/icons/AlertSuccessIcon'; -import BoxedGroupAccordion from 'sonar-ui-common/components/controls/BoxedGroupAccordion'; -import DeliveryItem from './DeliveryItem'; -import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import { getDelivery } from '../../../api/webhooks'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; +import DeliveryItem from './DeliveryItem'; interface Props { delivery: T.WebhookDelivery; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryItem.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryItem.tsx index 9e17ef0ea96..535cf7d14c2 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryItem.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryItem.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import CodeSnippet from '../../../components/common/CodeSnippet'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/LatestDeliveryForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/LatestDeliveryForm.tsx index 01ffaf67470..ee3f5bd0125 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/LatestDeliveryForm.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/LatestDeliveryForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters, translate } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; -import DeliveryItem from './DeliveryItem'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getDelivery } from '../../../api/webhooks'; +import DeliveryItem from './DeliveryItem'; interface Props { delivery: T.WebhookDelivery; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx index 5b7829221cf..c31906261f3 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import CreateWebhookForm from './CreateWebhookForm'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookActions.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookActions.tsx index 490b82ba7fd..c7e546a1141 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookActions.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookActions.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import ActionsDropdown, { - ActionsDropdownItem, - ActionsDropdownDivider + ActionsDropdownDivider, + ActionsDropdownItem } from 'sonar-ui-common/components/controls/ActionsDropdown'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import CreateWebhookForm from './CreateWebhookForm'; import DeleteWebhookForm from './DeleteWebhookForm'; import DeliveriesForm from './DeliveriesForm'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItem.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItem.tsx index 18966485040..43bc5928140 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItem.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItem.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import WebhookItemLatestDelivery from './WebhookItemLatestDelivery'; import WebhookActions from './WebhookActions'; +import WebhookItemLatestDelivery from './WebhookItemLatestDelivery'; interface Props { onDelete: (webhook: string) => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItemLatestDelivery.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItemLatestDelivery.tsx index 67b6325def3..de1dfbc7841 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItemLatestDelivery.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItemLatestDelivery.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; import AlertErrorIcon from 'sonar-ui-common/components/icons/AlertErrorIcon'; import AlertSuccessIcon from 'sonar-ui-common/components/icons/AlertSuccessIcon'; import BulletListIcon from 'sonar-ui-common/components/icons/BulletListIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; -import LatestDeliveryForm from './LatestDeliveryForm'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; +import LatestDeliveryForm from './LatestDeliveryForm'; interface Props { webhook: T.Webhook; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/WebhooksList.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/WebhooksList.tsx index 5da536c0c00..fcc31533c0d 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/WebhooksList.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/WebhooksList.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 { sortBy } from 'lodash'; +import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; import WebhookItem from './WebhookItem'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-test.tsx index 570a880ebe9..a5ed4b852e0 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-test.tsx @@ -17,15 +17,15 @@ * 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 App from '../App'; +import * as React from 'react'; import { createWebhook, deleteWebhook, searchWebhooks, updateWebhook } from '../../../../api/webhooks'; +import App from '../App'; jest.mock('../../../../api/webhooks', () => ({ createWebhook: jest.fn(() => diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/CreateWebhookForm-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/CreateWebhookForm-test.tsx index 19a7d0a5f0c..fc126b6bf21 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/CreateWebhookForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/CreateWebhookForm-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 CreateWebhookForm from '../CreateWebhookForm'; const webhookWithoutSecret = { key: '1', name: 'foo', url: 'http://foo.bar' }; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveriesForm-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveriesForm-test.tsx index 971beaa4a7d..5d5d459aad5 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveriesForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveriesForm-test.tsx @@ -17,10 +17,10 @@ * 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 DeliveriesForm from '../DeliveriesForm'; +import * as React from 'react'; import { searchDeliveries } from '../../../../api/webhooks'; +import DeliveriesForm from '../DeliveriesForm'; jest.mock('../../../../api/webhooks', () => ({ searchDeliveries: jest.fn(() => diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveryAccordion-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveryAccordion-test.tsx index cab6dc959f9..384c1d20d9a 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveryAccordion-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveryAccordion-test.tsx @@ -17,10 +17,10 @@ * 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 DeliveryAccordion from '../DeliveryAccordion'; +import * as React from 'react'; import { getDelivery } from '../../../../api/webhooks'; +import DeliveryAccordion from '../DeliveryAccordion'; jest.mock('../../../../api/webhooks', () => ({ getDelivery: jest.fn(() => diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveryItem-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveryItem-test.tsx index 18e879f30e4..6c533c1068d 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveryItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/DeliveryItem-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 DeliveryItem from '../DeliveryItem'; const delivery = { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/LatestDeliveryForm-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/LatestDeliveryForm-test.tsx index fedb2de0a6f..11f7bc7f849 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/LatestDeliveryForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/LatestDeliveryForm-test.tsx @@ -17,10 +17,10 @@ * 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 LatestDeliveryForm from '../LatestDeliveryForm'; +import * as React from 'react'; import { getDelivery } from '../../../../api/webhooks'; +import LatestDeliveryForm from '../LatestDeliveryForm'; jest.mock('../../../../api/webhooks', () => ({ getDelivery: jest.fn(() => diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageActions-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageActions-test.tsx index 8174f6b49cf..a2a8033ad9e 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageActions-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 { click } from 'sonar-ui-common/helpers/testUtils'; import PageActions from '../PageActions'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageHeader-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageHeader-test.tsx index efb52ab45a1..5204f3ae181 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageHeader-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 PageHeader from '../PageHeader'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookActions-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookActions-test.tsx index 3262d61fc6d..712e656220a 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookActions-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 { click } from 'sonar-ui-common/helpers/testUtils'; import WebhookActions from '../WebhookActions'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItem-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItem-test.tsx index 0a02aba55bd..6b5519ea089 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItem-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 WebhookItem from '../WebhookItem'; const webhook = { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItemLatestDelivery-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItemLatestDelivery-test.tsx index 580944a4a1b..846071cf54e 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItemLatestDelivery-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItemLatestDelivery-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 { click } from 'sonar-ui-common/helpers/testUtils'; import WebhookItemLatestDelivery from '../WebhookItemLatestDelivery'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhooksList-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhooksList-test.tsx index e50a71115f9..22bcf703799 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhooksList-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhooksList-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 WebhooksList from '../WebhooksList'; const webhooks = [ diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx index a2c704e0a7b..381cbde0128 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx @@ -17,37 +17,37 @@ * 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 { intersection, uniqBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import SourceViewerCode from './SourceViewerCode'; -import SourceViewerHeader from './SourceViewerHeader'; -import SourceViewerHeaderSlim from './SourceViewerHeaderSlim'; -import { SourceViewerContext } from './SourceViewerContext'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { + getComponentData, + getComponentForSourceViewer, + getDuplications, + getSources +} from '../../api/components'; +import { getBranchLikeQuery, isSameBranchLike } from '../../helpers/branches'; +import { WorkspaceContext } from '../workspace/context'; import DuplicationPopup from './components/DuplicationPopup'; -import defaultLoadIssues from './helpers/loadIssues'; -import getCoverageStatus from './helpers/getCoverageStatus'; import { filterDuplicationBlocksByLine, getDuplicationBlocksForIndex, isDuplicationBlockInRemovedComponent } from './helpers/duplications'; +import getCoverageStatus from './helpers/getCoverageStatus'; import { duplicationsByLine, issuesByLine, locationsByLine, symbolsByLine } from './helpers/indexing'; -import { - getComponentData, - getComponentForSourceViewer, - getDuplications, - getSources -} from '../../api/components'; -import { isSameBranchLike, getBranchLikeQuery } from '../../helpers/branches'; -import { WorkspaceContext } from '../workspace/context'; +import defaultLoadIssues from './helpers/loadIssues'; +import SourceViewerCode from './SourceViewerCode'; +import { SourceViewerContext } from './SourceViewerContext'; +import SourceViewerHeader from './SourceViewerHeader'; +import SourceViewerHeaderSlim from './SourceViewerHeaderSlim'; import './styles.css'; // TODO react-virtualized diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx index cea4dea906f..075a44be474 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import Line from './components/Line'; import { getSecondaryIssueLocationsForLine } from './helpers/issueLocations'; import { - optimizeSelectedIssue, + optimizeHighlightedSymbols, optimizeLocationMessage, - optimizeHighlightedSymbols + optimizeSelectedIssue } from './helpers/lines'; const EMPTY_ARRAY: any[] = []; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx index bc0f2abe487..8e6d57513c5 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx @@ -20,21 +20,21 @@ import { stringify } from 'querystring'; import * as React from 'react'; import { Link } from 'react-router'; +import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; +import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import ListIcon from 'sonar-ui-common/components/icons/ListIcon'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; -import { collapsedDirFromPath, fileFromPath } from 'sonar-ui-common/helpers/path'; +import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; +import { collapsedDirFromPath, fileFromPath } from 'sonar-ui-common/helpers/path'; import { omitNil } from 'sonar-ui-common/helpers/request'; import { getBaseUrl, getPathUrlAsString } from 'sonar-ui-common/helpers/urls'; -import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; -import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; -import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; -import MeasuresOverlay from './components/MeasuresOverlay'; -import Favorite from '../controls/Favorite'; -import { WorkspaceContextShape } from '../workspace/context'; import { getBranchLikeQuery, isMainBranch } from '../../helpers/branches'; import { getBranchLikeUrl, getCodeUrl, getComponentIssuesUrl } from '../../helpers/urls'; +import Favorite from '../controls/Favorite'; +import { WorkspaceContextShape } from '../workspace/context'; +import MeasuresOverlay from './components/MeasuresOverlay'; interface Props { branchLike: T.BranchLike | undefined; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeaderSlim.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeaderSlim.tsx index 6668ac19c86..613df85a998 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeaderSlim.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeaderSlim.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 * as classNames from 'classnames'; +import * as React from 'react'; import { Link } from 'react-router'; +import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; import ExpandSnippetIcon from 'sonar-ui-common/components/icons/ExpandSnippetIcon'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { collapsedDirFromPath, fileFromPath } from 'sonar-ui-common/helpers/path'; import { getPathUrlAsString } from 'sonar-ui-common/helpers/urls'; -import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import Favorite from '../controls/Favorite'; -import { isMainBranch, getBranchLikeQuery } from '../../helpers/branches'; +import { getBranchLikeQuery, isMainBranch } from '../../helpers/branches'; import { getBranchLikeUrl, getComponentIssuesUrl } from '../../helpers/urls'; +import Favorite from '../controls/Favorite'; import './SourceViewerHeaderSlim.css'; export interface Props { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerHeader-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerHeader-test.tsx index 0d494a24e23..3a78dea570a 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerHeader-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerHeader-test.tsx @@ -17,10 +17,10 @@ * 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 { mockIssue, mockMainBranch, mockSourceViewerFile } from '../../../helpers/testMocks'; import SourceViewerHeader from '../SourceViewerHeader'; -import { mockMainBranch, mockSourceViewerFile, mockIssue } from '../../../helpers/testMocks'; it('should render correctly for a regular file', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerHeaderSlim-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerHeaderSlim-test.tsx index 2bc8557ec28..4adb4391d1c 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerHeaderSlim-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerHeaderSlim-test.tsx @@ -17,10 +17,10 @@ * 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 SourceViewerHeaderSlim, { Props } from '../SourceViewerHeaderSlim'; +import * as React from 'react'; import { mockMainBranch, mockSourceViewerFile } from '../../../helpers/testMocks'; +import SourceViewerHeaderSlim, { Props } from '../SourceViewerHeaderSlim'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx index 9df54b8899b..53b28bab2a8 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.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 { groupBy, sortBy } from 'lodash'; +import * as React from 'react'; import { Link } from 'react-router'; +import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; -import { collapsedDirFromPath, fileFromPath } from 'sonar-ui-common/helpers/path'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; -import { WorkspaceContextShape } from '../../workspace/context'; -import { isShortLivingBranch, isPullRequest } from '../../../helpers/branches'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { collapsedDirFromPath, fileFromPath } from 'sonar-ui-common/helpers/path'; +import { isPullRequest, isShortLivingBranch } from '../../../helpers/branches'; import { getProjectUrl } from '../../../helpers/urls'; +import { WorkspaceContextShape } from '../../workspace/context'; interface Props { blocks: T.DuplicationBlock[]; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx index 9dfa67cf3a0..cc86553eeb5 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx @@ -17,17 +17,17 @@ * 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 { times } from 'lodash'; -import LineNumber from './LineNumber'; -import LineSCM from './LineSCM'; +import * as React from 'react'; +import './Line.css'; +import LineCode from './LineCode'; import LineCoverage from './LineCoverage'; -import LineDuplications from './LineDuplications'; import LineDuplicationBlock from './LineDuplicationBlock'; +import LineDuplications from './LineDuplications'; import LineIssuesIndicator from './LineIssuesIndicator'; -import LineCode from './LineCode'; -import './Line.css'; +import LineNumber from './LineNumber'; +import LineSCM from './LineSCM'; interface Props { branchLike: T.BranchLike | undefined; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.tsx index ca5118377b9..14ea6fc4f78 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.tsx @@ -17,9 +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 LineIssuesList from './LineIssuesList'; +import * as React from 'react'; import LocationIndex from '../../common/LocationIndex'; import LocationMessage from '../../common/LocationMessage'; import { @@ -28,6 +27,7 @@ import { splitByTokens, Token } from '../helpers/highlight'; +import LineIssuesList from './LineIssuesList'; interface Props { branchLike: T.BranchLike | undefined; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.tsx index 4c9e4312bb7..4f831ecbd36 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { line: T.SourceLine; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.tsx index 969c76cc5c0..a16b5704f5d 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.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 { translate } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import * as React from 'react'; import Toggler from 'sonar-ui-common/components/controls/Toggler'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { duplicated: boolean; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplications.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplications.tsx index ab3e09de58e..b25b6155f6d 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplications.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplications.tsx @@ -17,10 +17,10 @@ * 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 { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { line: T.SourceLine; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx index 85f409a073b..18673a97837 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.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 IssueIcon from 'sonar-ui-common/components/icons/IssueIcon'; import { sortByType } from '../../../helpers/issues'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineOptionsPopup.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineOptionsPopup.tsx index 4c48e6181b7..4cee80b9450 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineOptionsPopup.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineOptionsPopup.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getCodeUrl } from '../../../helpers/urls'; import { SourceViewerContext } from '../SourceViewerContext'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx index 60198f81617..29fad7f5354 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx @@ -17,28 +17,28 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { groupBy, keyBy, sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; -import { keyBy, sortBy, groupBy } from 'lodash'; +import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import Modal from 'sonar-ui-common/components/controls/Modal'; import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import TagsIcon from 'sonar-ui-common/components/icons/TagsIcon'; -import { translate, getLocalizedMetricName } from 'sonar-ui-common/helpers/l10n'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import Modal from 'sonar-ui-common/components/controls/Modal'; import DuplicationsRating from 'sonar-ui-common/components/ui/DuplicationsRating'; -import MeasuresOverlayMeasure from './MeasuresOverlayMeasure'; +import { getLocalizedMetricName, translate } from 'sonar-ui-common/helpers/l10n'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { getFacets } from '../../../api/issues'; import { getMeasures } from '../../../api/measures'; import { getAllMetrics } from '../../../api/metrics'; +import { getBranchLikeQuery } from '../../../helpers/branches'; +import { ISSUE_TYPES, SEVERITIES } from '../../../helpers/constants'; +import { enhanceMeasuresWithMetrics, getDisplayMetrics } from '../../../helpers/measures'; +import { getBranchLikeUrl } from '../../../helpers/urls'; import Measure from '../../measure/Measure'; import SeverityHelper from '../../shared/SeverityHelper'; import CoverageRating from '../../ui/CoverageRating'; -import { SEVERITIES, ISSUE_TYPES } from '../../../helpers/constants'; -import { getDisplayMetrics, enhanceMeasuresWithMetrics } from '../../../helpers/measures'; -import { getBranchLikeUrl } from '../../../helpers/urls'; -import { getBranchLikeQuery } from '../../../helpers/branches'; +import MeasuresOverlayMeasure from './MeasuresOverlayMeasure'; interface Props { branchLike: T.BranchLike | undefined; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/SCMPopup.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/SCMPopup.tsx index 27168a3664c..bf4a7f7cb7c 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/SCMPopup.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/SCMPopup.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 { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; import DateFormatter from '../../intl/DateFormatter'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/Line-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/Line-test.tsx index 084cba155fa..45bfddc9169 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/Line-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/Line-test.tsx @@ -17,10 +17,10 @@ * 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 { mockIssue, mockPullRequest, mockSourceLine } from '../../../../helpers/testMocks'; import Line from '../Line'; -import { mockPullRequest, mockSourceLine, mockIssue } from '../../../../helpers/testMocks'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineCode-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineCode-test.tsx index 50a447bf0c7..36d94ea9beb 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineCode-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineCode-test.tsx @@ -17,10 +17,10 @@ * 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 { mockIssue, mockShortLivingBranch, mockSourceLine } from '../../../../helpers/testMocks'; import LineCode from '../LineCode'; -import { mockShortLivingBranch, mockIssue, mockSourceLine } from '../../../../helpers/testMocks'; it('render code', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineCoverage-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineCoverage-test.tsx index 2f45d494f39..bc01d9646e4 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineCoverage-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineCoverage-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 LineCoverage from '../LineCoverage'; it('render covered line', () => { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplicationBlock-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplicationBlock-test.tsx index 11bb3bd059b..27ad38a082e 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplicationBlock-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplicationBlock-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 { click } from 'sonar-ui-common/helpers/testUtils'; import LineDuplicationBlock from '../LineDuplicationBlock'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplications-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplications-test.tsx index f8b5dd25ddd..2b2f7ea0edb 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplications-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplications-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 { click } from 'sonar-ui-common/helpers/testUtils'; import LineDuplications from '../LineDuplications'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesIndicator-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesIndicator-test.tsx index f14eeb40849..e0c28a3661f 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesIndicator-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesIndicator-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { click } from 'sonar-ui-common/helpers/testUtils'; -import LineIssuesIndicator from '../LineIssuesIndicator'; import { mockIssue } from '../../../../helpers/testMocks'; +import LineIssuesIndicator from '../LineIssuesIndicator'; it('should render correctly', () => { const onClick = jest.fn(); diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesList-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesList-test.tsx index 435e4932d7f..39bacd64833 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesList-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesList-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 LineIssuesList from '../LineIssuesList'; const issueBase: T.Issue = { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineNumber-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineNumber-test.tsx index a5842ee9dfe..8867116abbf 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineNumber-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineNumber-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 { click } from 'sonar-ui-common/helpers/testUtils'; import LineNumber from '../LineNumber'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineOptionsPopup-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineOptionsPopup-test.tsx index 4bdb873af4f..81fc9ef1230 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineOptionsPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineOptionsPopup-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 LineOptionsPopup from '../LineOptionsPopup'; jest.mock('../../SourceViewerContext', () => ({ diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineSCM-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineSCM-test.tsx index b6ccb034820..1ea03d177bb 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineSCM-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineSCM-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 { click } from 'sonar-ui-common/helpers/testUtils'; import LineSCM from '../LineSCM'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlay-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlay-test.tsx index 938ec371dde..1c831cf717f 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlay-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlay-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 { shallow } from 'enzyme'; -import { waitAndUpdate, click } from 'sonar-ui-common/helpers/testUtils'; +import * as React from 'react'; +import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import MeasuresOverlay from '../MeasuresOverlay'; jest.mock('../../../../api/issues', () => ({ diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlayMeasure-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlayMeasure-test.tsx index 3fd4575f915..b97cd31afe2 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlayMeasure-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlayMeasure-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 MeasuresOverlayMeasure from '../MeasuresOverlayMeasure'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/SCMPopup-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/SCMPopup-test.tsx index 94ef035a2f5..ae132be50cd 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/SCMPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/SCMPopup-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 SCMPopup from '../SCMPopup'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/indexing-test.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/indexing-test.ts index 19aef66e7b9..efb250a36c7 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/indexing-test.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/indexing-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 { issuesByComponentAndLine, symbolsByLine } from '../indexing'; import { mockIssue } from '../../../../helpers/testMocks'; +import { issuesByComponentAndLine, symbolsByLine } from '../indexing'; describe('issuesByComponentAndLine', () => { it('should map issues by lines and components', () => { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/issueLocations-test.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/issueLocations-test.ts index 4096f9208d5..bee74a074e7 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/issueLocations-test.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/issueLocations-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 { getSecondaryIssueLocationsForLine, getLinearLocations } from '../issueLocations'; -import { mockSourceLine, mockFlowLocation } from '../../../../helpers/testMocks'; +import { mockFlowLocation, mockSourceLine } from '../../../../helpers/testMocks'; +import { getLinearLocations, getSecondaryIssueLocationsForLine } from '../issueLocations'; describe('getSecondaryIssueLocationsForLine', () => { it('should return secondary locations for a line', () => { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts index 932eec9688b..aebc4fe7ce1 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-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 loadIssues from '../loadIssues'; import { mockMainBranch } from '../../../../helpers/testMocks'; +import loadIssues from '../loadIssues'; jest.mock('../../../../api/issues', () => ({ searchIssues: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.tsx b/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.tsx index b2d388d38e9..f716f760805 100644 --- a/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.tsx +++ b/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.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 classNames from 'classnames'; import { ScaleLinear, ScaleOrdinal } from 'd3-scale'; +import * as React from 'react'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; import './ColorBoxLegend.css'; diff --git a/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.tsx b/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.tsx index 21f951c9548..5b3918c0c65 100644 --- a/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.tsx +++ b/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.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 { formatMeasure } from 'sonar-ui-common/helpers/measures'; import { RATING_COLORS } from '../../helpers/constants'; import './ColorBoxLegend.css'; diff --git a/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx b/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx index 900cdf57c55..cf6ea1a4a0a 100644 --- a/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx +++ b/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx @@ -17,10 +17,10 @@ * 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 { sortBy } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import Histogram from 'sonar-ui-common/components/charts/Histogram'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; interface Props { diff --git a/server/sonar-web/src/main/js/components/charts/LanguageDistributionContainer.tsx b/server/sonar-web/src/main/js/components/charts/LanguageDistributionContainer.tsx index 8c33a43cbf4..e218a0b270b 100644 --- a/server/sonar-web/src/main/js/components/charts/LanguageDistributionContainer.tsx +++ b/server/sonar-web/src/main/js/components/charts/LanguageDistributionContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import LanguageDistribution from './LanguageDistribution'; import { getLanguages, Store } from '../../store/rootReducer'; +import LanguageDistribution from './LanguageDistribution'; const mapStateToProps = (state: Store) => ({ languages: getLanguages(state) diff --git a/server/sonar-web/src/main/js/components/charts/__tests__/LanguageDistribution-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/LanguageDistribution-test.tsx index a7bf782d284..e34ccd3a5bf 100644 --- a/server/sonar-web/src/main/js/components/charts/__tests__/LanguageDistribution-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/LanguageDistribution-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 LanguageDistribution from '../LanguageDistribution'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx b/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx index 8195123b99d..0b5004b630f 100644 --- a/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx +++ b/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import WarningIcon from 'sonar-ui-common/components/icons/WarningIcon'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Modal from 'sonar-ui-common/components/controls/Modal'; +import WarningIcon from 'sonar-ui-common/components/icons/WarningIcon'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { getTask } from '../../api/ce'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/BranchStatus.tsx b/server/sonar-web/src/main/js/components/common/BranchStatus.tsx index ab9be8f8c18..3ed98bc0eb5 100644 --- a/server/sonar-web/src/main/js/components/common/BranchStatus.tsx +++ b/server/sonar-web/src/main/js/components/common/BranchStatus.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { connect } from 'react-redux'; import Level from 'sonar-ui-common/components/ui/Level'; -import { Store, getBranchStatusByBranchLike } from '../../store/rootReducer'; +import { getBranchStatusByBranchLike, Store } from '../../store/rootReducer'; interface Props { branchLike: T.BranchLike; diff --git a/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx b/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx index 50014de9392..c6b8c04646e 100644 --- a/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx +++ b/server/sonar-web/src/main/js/components/common/CodeSnippet.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 ClipboardButton from 'sonar-ui-common/components/controls/ClipboardButton'; import './CodeSnippet.css'; diff --git a/server/sonar-web/src/main/js/components/common/FiltersHeader.tsx b/server/sonar-web/src/main/js/components/common/FiltersHeader.tsx index 4fc764b7ca9..02b7cccbb8e 100644 --- a/server/sonar-web/src/main/js/components/common/FiltersHeader.tsx +++ b/server/sonar-web/src/main/js/components/common/FiltersHeader.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { displayReset: boolean; diff --git a/server/sonar-web/src/main/js/components/common/LocationIndex.tsx b/server/sonar-web/src/main/js/components/common/LocationIndex.tsx index 7f73e64fd5d..a2e945ae688 100644 --- a/server/sonar-web/src/main/js/components/common/LocationIndex.tsx +++ b/server/sonar-web/src/main/js/components/common/LocationIndex.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 './LocationIndex.css'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/LocationMessage.tsx b/server/sonar-web/src/main/js/components/common/LocationMessage.tsx index 10f1f250f06..21822e59f8c 100644 --- a/server/sonar-web/src/main/js/components/common/LocationMessage.tsx +++ b/server/sonar-web/src/main/js/components/common/LocationMessage.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 './LocationMessage.css'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/MarkdownTips.tsx b/server/sonar-web/src/main/js/components/common/MarkdownTips.tsx index 0616d4adfc4..5e316e0615e 100644 --- a/server/sonar-web/src/main/js/components/common/MarkdownTips.tsx +++ b/server/sonar-web/src/main/js/components/common/MarkdownTips.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 { translate } from 'sonar-ui-common/helpers/l10n'; import { getMarkdownHelpUrl } from '../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/components/common/MultiSelect.tsx b/server/sonar-web/src/main/js/components/common/MultiSelect.tsx index 6e51ef57f19..9a167fd29fe 100644 --- a/server/sonar-web/src/main/js/components/common/MultiSelect.tsx +++ b/server/sonar-web/src/main/js/components/common/MultiSelect.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 { difference } from 'lodash'; -import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import MultiSelectOption from './MultiSelectOption'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/MultiSelectOption.tsx b/server/sonar-web/src/main/js/components/common/MultiSelectOption.tsx index ca99dad61ca..309cdd503f4 100644 --- a/server/sonar-web/src/main/js/components/common/MultiSelectOption.tsx +++ b/server/sonar-web/src/main/js/components/common/MultiSelectOption.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'; interface Props { active?: boolean; diff --git a/server/sonar-web/src/main/js/components/common/OrganizationAvatar.tsx b/server/sonar-web/src/main/js/components/common/OrganizationAvatar.tsx index 245708408db..0ec2c5c2580 100644 --- a/server/sonar-web/src/main/js/components/common/OrganizationAvatar.tsx +++ b/server/sonar-web/src/main/js/components/common/OrganizationAvatar.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 GenericAvatar from 'sonar-ui-common/components/ui/GenericAvatar'; import './OrganizationAvatar.css'; diff --git a/server/sonar-web/src/main/js/components/common/PageCounter.tsx b/server/sonar-web/src/main/js/components/common/PageCounter.tsx index 3edbe600000..4629681e8e2 100644 --- a/server/sonar-web/src/main/js/components/common/PageCounter.tsx +++ b/server/sonar-web/src/main/js/components/common/PageCounter.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 { formatMeasure } from 'sonar-ui-common/helpers/measures'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx b/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx index 6e302873b8f..4f8235b099f 100644 --- a/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx +++ b/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.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 * as classNames from 'classnames'; -import VisibleIcon from 'sonar-ui-common/components/icons/VisibleIcon'; +import * as React from 'react'; import { connect } from 'react-redux'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import VisibleIcon from 'sonar-ui-common/components/icons/VisibleIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { colors } from '../../app/theme'; -import { isSonarCloud } from '../../helpers/system'; import { isCurrentUserMemberOf, isPaidOrganization } from '../../helpers/organizations'; +import { isSonarCloud } from '../../helpers/system'; import { getCurrentUser, - getOrganizationByKey, getMyOrganizations, + getOrganizationByKey, Store } from '../../store/rootReducer'; import DocTooltip from '../docs/DocTooltip'; diff --git a/server/sonar-web/src/main/js/components/common/RestartButton.tsx b/server/sonar-web/src/main/js/components/common/RestartButton.tsx index 68f85c783f0..9a4827298fd 100644 --- a/server/sonar-web/src/main/js/components/common/RestartButton.tsx +++ b/server/sonar-web/src/main/js/components/common/RestartButton.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 { translate } from 'sonar-ui-common/helpers/l10n'; +import * as React from 'react'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import ConfirmButton from 'sonar-ui-common/components/controls/ConfirmButton'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { restart } from '../../api/system'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx b/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx index b90f5a1d51e..c5f689e7066 100644 --- a/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx +++ b/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.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 { debounce } from 'lodash'; +import * as React from 'react'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/components/common/SelectList.tsx b/server/sonar-web/src/main/js/components/common/SelectList.tsx index 7da4754c8ac..797d939827d 100644 --- a/server/sonar-web/src/main/js/components/common/SelectList.tsx +++ b/server/sonar-web/src/main/js/components/common/SelectList.tsx @@ -17,10 +17,10 @@ * 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 classNames from 'classnames'; import * as key from 'keymaster'; import { uniqueId } from 'lodash'; -import classNames from 'classnames'; +import * as React from 'react'; import SelectListItem from './SelectListItem'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/SelectListItem.tsx b/server/sonar-web/src/main/js/components/common/SelectListItem.tsx index 3fdbc272847..17236942c19 100644 --- a/server/sonar-web/src/main/js/components/common/SelectListItem.tsx +++ b/server/sonar-web/src/main/js/components/common/SelectListItem.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 classNames from 'classnames'; +import * as React from 'react'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/StatusIndicator.tsx b/server/sonar-web/src/main/js/components/common/StatusIndicator.tsx index db9c8ad2810..1ea2e1c69e3 100644 --- a/server/sonar-web/src/main/js/components/common/StatusIndicator.tsx +++ b/server/sonar-web/src/main/js/components/common/StatusIndicator.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 './StatusIndicator.css'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx b/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx index d5d7e878075..c184969c3c1 100644 --- a/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx +++ b/server/sonar-web/src/main/js/components/common/VisibilitySelector.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 { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx index b3f4a335725..d0a3134c938 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import AnalysisWarningsModal from '../AnalysisWarningsModal'; import { getTask } from '../../../api/ce'; +import AnalysisWarningsModal from '../AnalysisWarningsModal'; jest.mock('../../../api/ce', () => ({ getTask: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/components/common/__tests__/BranchStatus-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/BranchStatus-test.tsx index 345a6ec8ae9..6c3ea98d9b7 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/BranchStatus-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/BranchStatus-test.tsx @@ -17,10 +17,10 @@ * 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 { BranchStatus } from '../BranchStatus'; +import * as React from 'react'; import { mockLongLivingBranch } from '../../../helpers/testMocks'; +import { BranchStatus } from '../BranchStatus'; it('should render correctly', () => { expect(shallowRender().type()).toBeNull(); diff --git a/server/sonar-web/src/main/js/components/common/__tests__/CodeSnippet-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/CodeSnippet-test.tsx index 35276a8bdc3..b9a6fe45a61 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/CodeSnippet-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/CodeSnippet-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 { mount } from 'enzyme'; +import * as React from 'react'; import CodeSnippet from '../CodeSnippet'; it('renders correctly', () => { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/EmptySearch-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/EmptySearch-test.tsx index 161eabb7eb7..49bd05fbbec 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/EmptySearch-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/EmptySearch-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 EmptySearch from '../EmptySearch'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/InstanceMessage-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/InstanceMessage-test.tsx index 390c0234c67..9204c4a0873 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/InstanceMessage-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/InstanceMessage-test.tsx @@ -17,10 +17,10 @@ * 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 InstanceMessage from '../InstanceMessage'; +import * as React from 'react'; import { getInstance } from '../../../helpers/system'; +import InstanceMessage from '../InstanceMessage'; jest.mock('../../../helpers/system', () => ({ getInstance: jest.fn() })); diff --git a/server/sonar-web/src/main/js/components/common/__tests__/MarkdownTips-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/MarkdownTips-test.tsx index ea911708897..392114512bb 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/MarkdownTips-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/MarkdownTips-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 MarkdownTips from '../MarkdownTips'; it('should render the tips', () => { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/MultiSelect-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/MultiSelect-test.tsx index 4985e157aa0..146a51931ab 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/MultiSelect-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/MultiSelect-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 { mount, shallow } from 'enzyme'; import * as React from 'react'; -import { shallow, mount } from 'enzyme'; import MultiSelect from '../MultiSelect'; const props = { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/MultiSelectOption-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/MultiSelectOption-test.tsx index 924e869c071..0213f79b8f6 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/MultiSelectOption-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/MultiSelectOption-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 MultiSelectOption from '../MultiSelectOption'; const props = { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/PrivacyBadgeContainer-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/PrivacyBadgeContainer-test.tsx index d770a34e538..9e49a7f1010 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/PrivacyBadgeContainer-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/PrivacyBadgeContainer-test.tsx @@ -17,10 +17,10 @@ * 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 { PrivacyBadge } from '../PrivacyBadgeContainer'; +import * as React from 'react'; import { isSonarCloud } from '../../../helpers/system'; +import { PrivacyBadge } from '../PrivacyBadgeContainer'; jest.mock('../../../helpers/system', () => ({ isSonarCloud: jest.fn().mockReturnValue(false) })); diff --git a/server/sonar-web/src/main/js/components/common/__tests__/RestartButton-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/RestartButton-test.tsx index 8cbfd883a33..1b40e5be0ab 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/RestartButton-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/RestartButton-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 RestartButton from '../RestartButton'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.tsx index f114f7ee055..0bada6c3ead 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/SelectList-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 { mount, shallow } from 'enzyme'; import * as React from 'react'; -import { shallow, mount } from 'enzyme'; import { click, keydown } from 'sonar-ui-common/helpers/testUtils'; import SelectList from '../SelectList'; import SelectListItem from '../SelectListItem'; diff --git a/server/sonar-web/src/main/js/components/common/__tests__/SelectListItem-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/SelectListItem-test.tsx index de053a1c721..263e4f199ae 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/SelectListItem-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/SelectListItem-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 SelectListItem from '../SelectListItem'; it('should render correctly without children', () => { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/VisibilitySelector-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/VisibilitySelector-test.tsx index 2e0ae3b8128..208f5336401 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/VisibilitySelector-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/VisibilitySelector-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 { click } from 'sonar-ui-common/helpers/testUtils'; import VisibilitySelector from '../VisibilitySelector'; diff --git a/server/sonar-web/src/main/js/components/controls/DateInput.tsx b/server/sonar-web/src/main/js/components/controls/DateInput.tsx index da7918c9be3..7b9a3429721 100644 --- a/server/sonar-web/src/main/js/components/controls/DateInput.tsx +++ b/server/sonar-web/src/main/js/components/controls/DateInput.tsx @@ -17,27 +17,27 @@ * 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 CalendarIcon from 'sonar-ui-common/components/icons/CalendarIcon'; -import ChevronLeftIcon from 'sonar-ui-common/components/icons/ChevronLeftIcon'; -import ChevronRightIcon from 'sonar-ui-common/components/icons/ChevronRightIcon'; -import { DayModifiers, Modifier, Modifiers } from 'react-day-picker'; -import { InjectedIntlProps, injectIntl } from 'react-intl'; -import { range } from 'lodash'; import * as addMonths from 'date-fns/add_months'; import * as setMonth from 'date-fns/set_month'; import * as setYear from 'date-fns/set_year'; import * as subMonths from 'date-fns/sub_months'; -import { - getShortMonthName, - getWeekDayName, - getShortWeekDayName -} from 'sonar-ui-common/helpers/l10n'; +import { range } from 'lodash'; +import * as React from 'react'; +import { DayModifiers, Modifier, Modifiers } from 'react-day-picker'; +import { InjectedIntlProps, injectIntl } from 'react-intl'; import { ButtonIcon, ClearButton } from 'sonar-ui-common/components/controls/buttons'; import OutsideClickHandler from 'sonar-ui-common/components/controls/OutsideClickHandler'; -import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; import Select from 'sonar-ui-common/components/controls/Select'; +import CalendarIcon from 'sonar-ui-common/components/icons/CalendarIcon'; +import ChevronLeftIcon from 'sonar-ui-common/components/icons/ChevronLeftIcon'; +import ChevronRightIcon from 'sonar-ui-common/components/icons/ChevronRightIcon'; +import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; +import { + getShortMonthName, + getShortWeekDayName, + getWeekDayName +} from 'sonar-ui-common/helpers/l10n'; import './DayPicker.css'; import './styles.css'; diff --git a/server/sonar-web/src/main/js/components/controls/DateRangeInput.tsx b/server/sonar-web/src/main/js/components/controls/DateRangeInput.tsx index 1cc3a2ee2a6..a15aa4a60b0 100644 --- a/server/sonar-web/src/main/js/components/controls/DateRangeInput.tsx +++ b/server/sonar-web/src/main/js/components/controls/DateRangeInput.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 { translate } from 'sonar-ui-common/helpers/l10n'; import DateInput from './DateInput'; diff --git a/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx b/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx index cf52da98d81..1f39256ad80 100644 --- a/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx +++ b/server/sonar-web/src/main/js/components/controls/HomePageSelect.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 React from 'react'; import { connect } from 'react-redux'; +import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import HomeIcon from 'sonar-ui-common/components/icons/HomeIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; -import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { isLoggedIn } from '../../helpers/users'; import { getCurrentUser, Store } from '../../store/rootReducer'; import { setHomePage } from '../../store/users'; -import { isLoggedIn } from '../../helpers/users'; interface StateProps { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx index 40d91a5a211..c22847c9442 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx @@ -17,13 +17,13 @@ * 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 addDays from 'date-fns/add_days'; import * as setMonth from 'date-fns/set_month'; import * as setYear from 'date-fns/set_year'; import * as subDays from 'date-fns/sub_days'; import * as subMonths from 'date-fns/sub_months'; +import { shallow } from 'enzyme'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; import DateInput from '../DateInput'; diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/DateRangeInput-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/DateRangeInput-test.tsx index f033c841e61..0fc981bb66b 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/DateRangeInput-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/DateRangeInput-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 { parseDate } from 'sonar-ui-common/helpers/dates'; import DateRangeInput from '../DateRangeInput'; diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/Favorite-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Favorite-test.tsx index 009f15f6e30..21f3af2c980 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/Favorite-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/Favorite-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 Favorite from '../Favorite'; jest.mock('../../../api/favorites', () => ({ diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/HomePageSelect-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/HomePageSelect-test.tsx index b5e563f08ed..d559e2eb858 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/HomePageSelect-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/HomePageSelect-test.tsx @@ -17,13 +17,13 @@ * 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 { click } from 'sonar-ui-common/helpers/testUtils'; -import HomePageSelect from '../HomePageSelect'; import { setHomePage } from '../../../api/users'; import rootReducer, { getCurrentUser, Store } from '../../../store/rootReducer'; import configureStore from '../../../store/utils/configureStore'; +import HomePageSelect from '../HomePageSelect'; jest.mock('../../../api/users', () => ({ setHomePage: jest.fn(() => Promise.resolve()) diff --git a/server/sonar-web/src/main/js/components/docs/DocMarkdownBlock.tsx b/server/sonar-web/src/main/js/components/docs/DocMarkdownBlock.tsx index 629ed725057..ea14c42542b 100644 --- a/server/sonar-web/src/main/js/components/docs/DocMarkdownBlock.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocMarkdownBlock.tsx @@ -17,20 +17,20 @@ * 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 remark from 'remark'; +import remarkCustomBlocks from 'remark-custom-blocks'; import reactRenderer from 'remark-react'; import slug from 'remark-slug'; -import remarkCustomBlocks from 'remark-custom-blocks'; +import 'sonar-ui-common/components/ui/Alert.css'; // eslint-disable-line import/extension import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; -import DocLink from './DocLink'; +import { filterContent, separateFrontMatter } from '../../helpers/markdown'; +import DocCollapsibleBlock from './DocCollapsibleBlock'; import DocImg from './DocImg'; +import DocLink from './DocLink'; import DocToc from './DocToc'; import DocTooltipLink from './DocTooltipLink'; -import DocCollapsibleBlock from './DocCollapsibleBlock'; -import { separateFrontMatter, filterContent } from '../../helpers/markdown'; -import 'sonar-ui-common/components/ui/Alert.css'; // eslint-disable-line import/extension interface Props { childProps?: T.Dict<string>; diff --git a/server/sonar-web/src/main/js/components/docs/DocToc.tsx b/server/sonar-web/src/main/js/components/docs/DocToc.tsx index 915feef77b2..7c4a00fb6cb 100644 --- a/server/sonar-web/src/main/js/components/docs/DocToc.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocToc.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 classNames from 'classnames'; +import { debounce, memoize } from 'lodash'; import * as React from 'react'; +import { findDOMNode } from 'react-dom'; import remark from 'remark'; import reactRenderer from 'remark-react'; -import { findDOMNode } from 'react-dom'; -import * as classNames from 'classnames'; -import { debounce, memoize } from 'lodash'; import { translate } from 'sonar-ui-common/helpers/l10n'; import onlyToc from './plugins/remark-only-toc'; diff --git a/server/sonar-web/src/main/js/components/docs/DocTooltipLink.tsx b/server/sonar-web/src/main/js/components/docs/DocTooltipLink.tsx index cd1770f7f63..c8ecab10e74 100644 --- a/server/sonar-web/src/main/js/components/docs/DocTooltipLink.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocTooltipLink.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 { forEach } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; -import { forEach } from 'lodash'; import DetachIcon from 'sonar-ui-common/components/icons/DetachIcon'; interface OwnProps { diff --git a/server/sonar-web/src/main/js/components/docs/__tests__/DocCollapsibleBlock-test.tsx b/server/sonar-web/src/main/js/components/docs/__tests__/DocCollapsibleBlock-test.tsx index a324dbf11d3..135f9742531 100644 --- a/server/sonar-web/src/main/js/components/docs/__tests__/DocCollapsibleBlock-test.tsx +++ b/server/sonar-web/src/main/js/components/docs/__tests__/DocCollapsibleBlock-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 { click } from 'sonar-ui-common/helpers/testUtils'; import DocCollapsibleBlock from '../DocCollapsibleBlock'; diff --git a/server/sonar-web/src/main/js/components/docs/__tests__/DocLink-test.tsx b/server/sonar-web/src/main/js/components/docs/__tests__/DocLink-test.tsx index dd884f19e80..95a4aacd156 100644 --- a/server/sonar-web/src/main/js/components/docs/__tests__/DocLink-test.tsx +++ b/server/sonar-web/src/main/js/components/docs/__tests__/DocLink-test.tsx @@ -17,10 +17,10 @@ * 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 { DocLink } from '../DocLink'; +import * as React from 'react'; import { isSonarCloud } from '../../../helpers/system'; +import { DocLink } from '../DocLink'; jest.mock('../../../helpers/system', () => ({ isSonarCloud: jest.fn(() => false) diff --git a/server/sonar-web/src/main/js/components/docs/__tests__/DocMarkdownBlock-test.tsx b/server/sonar-web/src/main/js/components/docs/__tests__/DocMarkdownBlock-test.tsx index 3f276e19f52..f645411a3c3 100644 --- a/server/sonar-web/src/main/js/components/docs/__tests__/DocMarkdownBlock-test.tsx +++ b/server/sonar-web/src/main/js/components/docs/__tests__/DocMarkdownBlock-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 DocMarkdownBlock from '../DocMarkdownBlock'; const CONTENT = ` diff --git a/server/sonar-web/src/main/js/components/docs/__tests__/DocToc-test.tsx b/server/sonar-web/src/main/js/components/docs/__tests__/DocToc-test.tsx index 0206ea149cb..ded48dba536 100644 --- a/server/sonar-web/src/main/js/components/docs/__tests__/DocToc-test.tsx +++ b/server/sonar-web/src/main/js/components/docs/__tests__/DocToc-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 { mount } from 'enzyme'; +import * as React from 'react'; import { click, scrollTo } from 'sonar-ui-common/helpers/testUtils'; import DocToc from '../DocToc'; diff --git a/server/sonar-web/src/main/js/components/docs/__tests__/DocTooltip-test.tsx b/server/sonar-web/src/main/js/components/docs/__tests__/DocTooltip-test.tsx index 4675f0fc87b..350cf5676f7 100644 --- a/server/sonar-web/src/main/js/components/docs/__tests__/DocTooltip-test.tsx +++ b/server/sonar-web/src/main/js/components/docs/__tests__/DocTooltip-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import DocTooltip from '../DocTooltip'; diff --git a/server/sonar-web/src/main/js/components/docs/__tests__/DocTooltipLink-test.tsx b/server/sonar-web/src/main/js/components/docs/__tests__/DocTooltipLink-test.tsx index 2c4cdcdbc13..c8ef5b12714 100644 --- a/server/sonar-web/src/main/js/components/docs/__tests__/DocTooltipLink-test.tsx +++ b/server/sonar-web/src/main/js/components/docs/__tests__/DocTooltipLink-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 DocTooltipLink from '../DocTooltipLink'; it('should render simple link', () => { diff --git a/server/sonar-web/src/main/js/components/docs/plugins/remark-only-toc.js b/server/sonar-web/src/main/js/components/docs/plugins/remark-only-toc.js index 521804fcec3..79b80d03863 100644 --- a/server/sonar-web/src/main/js/components/docs/plugins/remark-only-toc.js +++ b/server/sonar-web/src/main/js/components/docs/plugins/remark-only-toc.js @@ -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 slug from 'remark-slug'; import util from 'mdast-util-toc'; +import slug from 'remark-slug'; /** * This is a simplified version of the remark-toc plugin: https://github.com/remarkjs/remark-toc diff --git a/server/sonar-web/src/main/js/components/facet/FacetBox.tsx b/server/sonar-web/src/main/js/components/facet/FacetBox.tsx index c3dd3c65491..28473d51e18 100644 --- a/server/sonar-web/src/main/js/components/facet/FacetBox.tsx +++ b/server/sonar-web/src/main/js/components/facet/FacetBox.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'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx b/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx index 74499c71543..9b50252859f 100644 --- a/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx +++ b/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import OpenCloseIcon from 'sonar-ui-common/components/icons/OpenCloseIcon'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; +import OpenCloseIcon from 'sonar-ui-common/components/icons/OpenCloseIcon'; +import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; interface Props { children?: React.ReactNode; diff --git a/server/sonar-web/src/main/js/components/facet/FacetItem.tsx b/server/sonar-web/src/main/js/components/facet/FacetItem.tsx index e9e25e70613..1818a7be80d 100644 --- a/server/sonar-web/src/main/js/components/facet/FacetItem.tsx +++ b/server/sonar-web/src/main/js/components/facet/FacetItem.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'; export interface Props { active?: boolean; diff --git a/server/sonar-web/src/main/js/components/facet/ListStyleFacet.tsx b/server/sonar-web/src/main/js/components/facet/ListStyleFacet.tsx index 7544e444f73..f4c8a089d39 100644 --- a/server/sonar-web/src/main/js/components/facet/ListStyleFacet.tsx +++ b/server/sonar-web/src/main/js/components/facet/ListStyleFacet.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 { sortBy, without } from 'lodash'; -import { queriesEqual } from 'sonar-ui-common/helpers/query'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import { formatMeasure } from 'sonar-ui-common/helpers/measures'; +import * as React from 'react'; +import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; -import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; -import ListFooter from 'sonar-ui-common/components/controls/ListFooter'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { formatMeasure } from 'sonar-ui-common/helpers/measures'; +import { queriesEqual } from 'sonar-ui-common/helpers/query'; import FacetBox from './FacetBox'; import FacetHeader from './FacetHeader'; import FacetItem from './FacetItem'; diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/FacetBox-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/FacetBox-test.tsx index 7040a30f239..6eb266c33b0 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/FacetBox-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/FacetBox-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 FacetBox from '../FacetBox'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/FacetHeader-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/FacetHeader-test.tsx index 4f44bf99aae..667534d28c7 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/FacetHeader-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/FacetHeader-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 { click } from 'sonar-ui-common/helpers/testUtils'; import FacetHeader from '../FacetHeader'; diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/FacetItem-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/FacetItem-test.tsx index c76279e5742..603e67dbc19 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/FacetItem-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/FacetItem-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 { click } from 'sonar-ui-common/helpers/testUtils'; import FacetItem, { Props } from '../FacetItem'; diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/FacetItemsList-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/FacetItemsList-test.tsx index c8f21ca697b..64b1c38d6b1 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/FacetItemsList-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/FacetItemsList-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 FacetItemsList from '../FacetItemsList'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacet-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacet-test.tsx index 3a965d16cee..dbacb3dee34 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacet-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacet-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, ShallowWrapper } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import ListStyleFacet, { Props } from '../ListStyleFacet'; diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacetFooter-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacetFooter-test.tsx index e508ad5f168..cd13a15dba6 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacetFooter-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacetFooter-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 { click } from 'sonar-ui-common/helpers/testUtils'; import ListStyleFacetFooter from '../ListStyleFacetFooter'; diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/MultipleSelectionHint-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/MultipleSelectionHint-test.tsx index a302b866dd0..3d2bf01f5ba 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/MultipleSelectionHint-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/MultipleSelectionHint-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 MultipleSelectionHint from '../MultipleSelectionHint'; it('should render for mac', () => { diff --git a/server/sonar-web/src/main/js/components/hoc/__tests__/whenLoggedIn-test.tsx b/server/sonar-web/src/main/js/components/hoc/__tests__/whenLoggedIn-test.tsx index ddfd6fffcd1..7cb4b8e41b3 100644 --- a/server/sonar-web/src/main/js/components/hoc/__tests__/whenLoggedIn-test.tsx +++ b/server/sonar-web/src/main/js/components/hoc/__tests__/whenLoggedIn-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 { shallow, ShallowWrapper } from 'enzyme'; +import * as React from 'react'; import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; -import { whenLoggedIn } from '../whenLoggedIn'; import { mockStore } from '../../../helpers/testMocks'; +import { whenLoggedIn } from '../whenLoggedIn'; jest.mock('sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ default: jest.fn() diff --git a/server/sonar-web/src/main/js/components/hoc/__tests__/withCurrentUser-test.tsx b/server/sonar-web/src/main/js/components/hoc/__tests__/withCurrentUser-test.tsx index 2a379a3423d..3e06ec2aad2 100644 --- a/server/sonar-web/src/main/js/components/hoc/__tests__/withCurrentUser-test.tsx +++ b/server/sonar-web/src/main/js/components/hoc/__tests__/withCurrentUser-test.tsx @@ -17,10 +17,10 @@ * 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 { withCurrentUser } from '../withCurrentUser'; +import * as React from 'react'; import { mockStore } from '../../../helpers/testMocks'; +import { withCurrentUser } from '../withCurrentUser'; class X extends React.Component<{ currentUser: T.CurrentUser }> { render() { diff --git a/server/sonar-web/src/main/js/components/hoc/__tests__/withKeyboardNavigation-test.tsx b/server/sonar-web/src/main/js/components/hoc/__tests__/withKeyboardNavigation-test.tsx index 45eb9c9a15f..83b05dcbfa1 100644 --- a/server/sonar-web/src/main/js/components/hoc/__tests__/withKeyboardNavigation-test.tsx +++ b/server/sonar-web/src/main/js/components/hoc/__tests__/withKeyboardNavigation-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, shallow } from 'enzyme'; -import { keydown, KEYCODE_MAP } from 'sonar-ui-common/helpers/testUtils'; -import withKeyboardNavigation, { WithKeyboardNavigationProps } from '../withKeyboardNavigation'; +import * as React from 'react'; +import { KEYCODE_MAP, keydown } from 'sonar-ui-common/helpers/testUtils'; import { mockComponent } from '../../../helpers/testMocks'; +import withKeyboardNavigation, { WithKeyboardNavigationProps } from '../withKeyboardNavigation'; class X extends React.Component<{ components?: T.ComponentMeasure[]; diff --git a/server/sonar-web/src/main/js/components/hoc/__tests__/withUserOrganizations-test.tsx b/server/sonar-web/src/main/js/components/hoc/__tests__/withUserOrganizations-test.tsx index 72f025bad08..8b9818f67fe 100644 --- a/server/sonar-web/src/main/js/components/hoc/__tests__/withUserOrganizations-test.tsx +++ b/server/sonar-web/src/main/js/components/hoc/__tests__/withUserOrganizations-test.tsx @@ -17,10 +17,10 @@ * 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 { withUserOrganizations } from '../withUserOrganizations'; +import * as React from 'react'; import { mockStore } from '../../../helpers/testMocks'; +import { withUserOrganizations } from '../withUserOrganizations'; jest.mock('../../../api/organizations', () => ({ getOrganizations: jest.fn() })); diff --git a/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx b/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx index 800c04e5aaf..36ff7151722 100644 --- a/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx +++ b/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication'; +import { isLoggedIn } from '../../helpers/users'; import { getWrappedDisplayName } from './utils'; import { withCurrentUser } from './withCurrentUser'; -import { isLoggedIn } from '../../helpers/users'; export function whenLoggedIn<P>(WrappedComponent: React.ComponentType<P>) { class Wrapper extends React.Component<P & { currentUser: T.CurrentUser }> { diff --git a/server/sonar-web/src/main/js/components/hoc/withAppState.tsx b/server/sonar-web/src/main/js/components/hoc/withAppState.tsx index 0e6e3f251cf..c81252162d4 100644 --- a/server/sonar-web/src/main/js/components/hoc/withAppState.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withAppState.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; +import { getAppState, Store } from '../../store/rootReducer'; import { getWrappedDisplayName } from './utils'; -import { Store, getAppState } from '../../store/rootReducer'; export function withAppState<P>( WrappedComponent: React.ComponentClass<P & { appState: Partial<T.AppState> }> diff --git a/server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx b/server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx index 0ea58a41e18..04dd155bc71 100644 --- a/server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; +import { getCurrentUser, Store } from '../../store/rootReducer'; import { getWrappedDisplayName } from './utils'; -import { Store, getCurrentUser } from '../../store/rootReducer'; export function withCurrentUser<P>( WrappedComponent: React.ComponentType<P & { currentUser: T.CurrentUser }> diff --git a/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx b/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx index bc4197d76b7..2dc7012b44e 100644 --- a/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.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 key from 'keymaster'; +import * as React from 'react'; import PageActions from 'sonar-ui-common/components/ui/PageActions'; import { getWrappedDisplayName } from './utils'; diff --git a/server/sonar-web/src/main/js/components/hoc/withUserOrganizations.tsx b/server/sonar-web/src/main/js/components/hoc/withUserOrganizations.tsx index c016ce0ffa5..0e16f6f83ef 100644 --- a/server/sonar-web/src/main/js/components/hoc/withUserOrganizations.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withUserOrganizations.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import { getWrappedDisplayName } from './utils'; -import { Store, getMyOrganizations } from '../../store/rootReducer'; import { fetchMyOrganizations } from '../../apps/account/organizations/actions'; +import { getMyOrganizations, Store } from '../../store/rootReducer'; +import { getWrappedDisplayName } from './utils'; interface OwnProps { fetchMyOrganizations: () => Promise<void>; diff --git a/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx index 95cb79bb6e5..7f7794e73c8 100644 --- a/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { IconProps } from 'sonar-ui-common/components/icons/Icon'; -import ShortLivingBranchIcon from 'sonar-ui-common/components/icons/ShortLivingBranchIcon'; import LongLivingBranchIcon from 'sonar-ui-common/components/icons/LongLivingBranchIcon'; import PullRequestIcon from 'sonar-ui-common/components/icons/PullRequestIcon'; -import { isShortLivingBranch, isPullRequest } from '../../helpers/branches'; +import ShortLivingBranchIcon from 'sonar-ui-common/components/icons/ShortLivingBranchIcon'; +import { isPullRequest, isShortLivingBranch } from '../../helpers/branches'; interface Props extends IconProps { branchLike: T.BranchLike; diff --git a/server/sonar-web/src/main/js/components/intl/DateFromNowHourPrecision.tsx b/server/sonar-web/src/main/js/components/intl/DateFromNowHourPrecision.tsx index 6e8bc731499..abac48f926f 100644 --- a/server/sonar-web/src/main/js/components/intl/DateFromNowHourPrecision.tsx +++ b/server/sonar-web/src/main/js/components/intl/DateFromNowHourPrecision.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 differenceInHours from 'date-fns/difference_in_hours'; +import * as React from 'react'; import { DateSource } from 'react-intl'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import DateFromNow from './DateFromNow'; import DateTimeFormatter from './DateTimeFormatter'; diff --git a/server/sonar-web/src/main/js/components/intl/DateTooltipFormatter.tsx b/server/sonar-web/src/main/js/components/intl/DateTooltipFormatter.tsx index b47e3a6d678..bd7ee611487 100644 --- a/server/sonar-web/src/main/js/components/intl/DateTooltipFormatter.tsx +++ b/server/sonar-web/src/main/js/components/intl/DateTooltipFormatter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { parseDate } from 'sonar-ui-common/helpers/dates'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { parseDate } from 'sonar-ui-common/helpers/dates'; import DateFormatter from './DateFormatter'; import DateTimeFormatter from './DateTimeFormatter'; diff --git a/server/sonar-web/src/main/js/components/issue/Issue.tsx b/server/sonar-web/src/main/js/components/issue/Issue.tsx index 6e65095250d..54721655405 100644 --- a/server/sonar-web/src/main/js/components/issue/Issue.tsx +++ b/server/sonar-web/src/main/js/components/issue/Issue.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 * as key from 'keymaster'; -import IssueView from './IssueView'; -import { updateIssue } from './actions'; +import * as React from 'react'; import { setIssueAssignee } from '../../api/issues'; +import { updateIssue } from './actions'; import './Issue.css'; +import IssueView from './IssueView'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/components/issue/IssueView.tsx b/server/sonar-web/src/main/js/components/issue/IssueView.tsx index 9f48e8a5be7..d78f5df9e1c 100644 --- a/server/sonar-web/src/main/js/components/issue/IssueView.tsx +++ b/server/sonar-web/src/main/js/components/issue/IssueView.tsx @@ -17,14 +17,14 @@ * 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 classNames from 'classnames'; +import * as React from 'react'; import Checkbox from 'sonar-ui-common/components/controls/Checkbox'; +import { deleteIssueComment, editIssueComment } from '../../api/issues'; import { updateIssue } from './actions'; -import IssueTitleBar from './components/IssueTitleBar'; import IssueActionsBar from './components/IssueActionsBar'; import IssueCommentLine from './components/IssueCommentLine'; -import { deleteIssueComment, editIssueComment } from '../../api/issues'; +import IssueTitleBar from './components/IssueTitleBar'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/components/issue/__tests__/IssueView-test.tsx b/server/sonar-web/src/main/js/components/issue/__tests__/IssueView-test.tsx index e7470f7dbaf..0128cb1968e 100644 --- a/server/sonar-web/src/main/js/components/issue/__tests__/IssueView-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/__tests__/IssueView-test.tsx @@ -17,10 +17,10 @@ * 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 IssueView from '../IssueView'; +import * as React from 'react'; import { mockIssue } from '../../../helpers/testMocks'; +import IssueView from '../IssueView'; it('should render issues correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/components/issue/actions.ts b/server/sonar-web/src/main/js/components/issue/actions.ts index 56a1941714a..42847175fdc 100644 --- a/server/sonar-web/src/main/js/components/issue/actions.ts +++ b/server/sonar-web/src/main/js/components/issue/actions.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 { parseIssueFromResponse } from '../../helpers/issues'; import { IssueResponse } from '../../api/issues'; +import { parseIssueFromResponse } from '../../helpers/issues'; export const updateIssue = ( onChange: (issue: T.Issue) => void, diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx index 398be6a667a..15d7040f7b4 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; +import { IssueResponse } from '../../../api/issues'; +import { updateIssue } from '../actions'; import IssueAssign from './IssueAssign'; import IssueCommentAction from './IssueCommentAction'; import IssueSeverity from './IssueSeverity'; import IssueTags from './IssueTags'; import IssueTransition from './IssueTransition'; import IssueType from './IssueType'; -import { updateIssue } from '../actions'; -import { IssueResponse } from '../../../api/issues'; interface Props { issue: T.Issue; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx index 544456a265c..a021c4bd7bc 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx @@ -18,10 +18,10 @@ * 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, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Toggler from 'sonar-ui-common/components/controls/Toggler'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import Avatar from '../../ui/Avatar'; import SetAssigneePopup from '../popups/SetAssigneePopup'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueChangelog.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueChangelog.tsx index 6def0df2907..cd20a495aa6 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueChangelog.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueChangelog.tsx @@ -18,13 +18,13 @@ * 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 Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Toggler from 'sonar-ui-common/components/controls/Toggler'; -import ChangelogPopup from '../popups/ChangelogPopup'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import DateFromNow from '../../intl/DateFromNow'; import DateTimeFormatter from '../../intl/DateTimeFormatter'; +import ChangelogPopup from '../popups/ChangelogPopup'; interface Props { isOpen: boolean; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.tsx index b6347083bd5..f2e23f6e45f 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Toggler from 'sonar-ui-common/components/controls/Toggler'; -import CommentPopup from '../popups/CommentPopup'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { addIssueComment } from '../../../api/issues'; import { updateIssue } from '../actions'; +import CommentPopup from '../popups/CommentPopup'; interface Props { commentAutoTriggered?: boolean; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx index 5d351a94347..3b59d97ba23 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.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 { sanitize } from 'dompurify'; -import { EditButton, DeleteButton } from 'sonar-ui-common/components/controls/buttons'; +import * as React from 'react'; +import { DeleteButton, EditButton } from 'sonar-ui-common/components/controls/buttons'; +import Toggler from 'sonar-ui-common/components/controls/Toggler'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; import { translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import Toggler from 'sonar-ui-common/components/controls/Toggler'; +import DateFromNow from '../../intl/DateFromNow'; import Avatar from '../../ui/Avatar'; import CommentDeletePopup from '../popups/CommentDeletePopup'; import CommentPopup from '../popups/CommentPopup'; -import DateFromNow from '../../intl/DateFromNow'; interface Props { comment: T.IssueComment; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx index 08fa42b8984..dbc965ea924 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import { Button } from 'sonar-ui-common/components/controls/buttons'; +import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { WorkspaceContextShape } from '../../workspace/context'; interface Props { diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueSeverity.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueSeverity.tsx index 9ff9dc1cc4d..2efcd35a623 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueSeverity.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueSeverity.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 { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Toggler from 'sonar-ui-common/components/controls/Toggler'; -import SetSeverityPopup from '../popups/SetSeverityPopup'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; +import { IssueResponse, setIssueSeverity } from '../../../api/issues'; import SeverityHelper from '../../shared/SeverityHelper'; -import { setIssueSeverity, IssueResponse } from '../../../api/issues'; +import SetSeverityPopup from '../popups/SetSeverityPopup'; interface Props { canSetSeverity: boolean; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx index efec83f5c8f..b5aede268b6 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Toggler from 'sonar-ui-common/components/controls/Toggler'; -import SetIssueTagsPopup from '../popups/SetIssueTagsPopup'; -import TagsList from '../../tags/TagsList'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { setIssueTags } from '../../../api/issues'; +import TagsList from '../../tags/TagsList'; import { updateIssue } from '../actions'; +import SetIssueTagsPopup from '../popups/SetIssueTagsPopup'; interface Props { canSetTags: boolean; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx index 136ce3cc943..2345b65c512 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx @@ -21,12 +21,12 @@ import * as React from 'react'; import { Link } from 'react-router'; import LinkIcon from 'sonar-ui-common/components/icons/LinkIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import IssueChangelog from './IssueChangelog'; -import IssueMessage from './IssueMessage'; -import SimilarIssuesFilter from './SimilarIssuesFilter'; import { getBranchLikeQuery } from '../../../helpers/branches'; import { getComponentIssuesUrl } from '../../../helpers/urls'; import { WorkspaceContext } from '../../workspace/context'; +import IssueChangelog from './IssueChangelog'; +import IssueMessage from './IssueMessage'; +import SimilarIssuesFilter from './SimilarIssuesFilter'; interface Props { branchLike?: T.BranchLike; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx index 8ad432f35d6..56cb9b70690 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx @@ -18,13 +18,13 @@ * 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 { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Toggler from 'sonar-ui-common/components/controls/Toggler'; -import SetTransitionPopup from '../popups/SetTransitionPopup'; -import StatusHelper from '../../shared/StatusHelper'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { setIssueTransition } from '../../../api/issues'; +import StatusHelper from '../../shared/StatusHelper'; import { updateIssue } from '../actions'; +import SetTransitionPopup from '../popups/SetTransitionPopup'; interface Props { hasTransitions: boolean; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueType.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueType.tsx index 49a836b9bf5..9f277bee515 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueType.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueType.tsx @@ -18,13 +18,13 @@ * 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 { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import Toggler from 'sonar-ui-common/components/controls/Toggler'; +import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; +import { IssueResponse, setIssueType } from '../../../api/issues'; import SetTypePopup from '../popups/SetTypePopup'; -import { setIssueType, IssueResponse } from '../../../api/issues'; interface Props { canSetType: boolean; diff --git a/server/sonar-web/src/main/js/components/issue/components/SimilarIssuesFilter.tsx b/server/sonar-web/src/main/js/components/issue/components/SimilarIssuesFilter.tsx index cd4240f90c3..27b12e689a7 100644 --- a/server/sonar-web/src/main/js/components/issue/components/SimilarIssuesFilter.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/SimilarIssuesFilter.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import Toggler from 'sonar-ui-common/components/controls/Toggler'; import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import FilterIcon from 'sonar-ui-common/components/icons/FilterIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; -import Toggler from 'sonar-ui-common/components/controls/Toggler'; import SimilarIssuesPopup from '../popups/SimilarIssuesPopup'; interface Props { diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueActionsBar-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueActionsBar-test.tsx index 8de39292bac..0c9404e2af1 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueActionsBar-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueActionsBar-test.tsx @@ -17,10 +17,10 @@ * 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 IssueActionsBar from '../IssueActionsBar'; +import * as React from 'react'; import { mockIssue } from '../../../../helpers/testMocks'; +import IssueActionsBar from '../IssueActionsBar'; jest.mock('../../actions', () => ({ updateIssue: jest.fn() })); diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueAssign-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueAssign-test.tsx index fcf621c0086..1f59775d2fd 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueAssign-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueAssign-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 { click } from 'sonar-ui-common/helpers/testUtils'; import IssueAssign from '../IssueAssign'; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelog-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelog-test.tsx index fcf5125658e..7aae9989939 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelog-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelog-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 { click } from 'sonar-ui-common/helpers/testUtils'; import IssueChangelog from '../IssueChangelog'; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentAction-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentAction-test.tsx index 5509f5575c6..595ff924040 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentAction-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentAction-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 { click } from 'sonar-ui-common/helpers/testUtils'; import IssueCommentAction from '../IssueCommentAction'; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentLine-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentLine-test.tsx index b2c3ac6eddb..3d8eabbdd42 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentLine-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentLine-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 { click } from 'sonar-ui-common/helpers/testUtils'; import IssueCommentLine from '../IssueCommentLine'; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx index a13805bf100..f0e075efc60 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-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 IssueMessage from '../IssueMessage'; it('should render with the message and a link to open the rule', () => { diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueSeverity-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueSeverity-test.tsx index c15017b0cd9..8266af64ab3 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueSeverity-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueSeverity-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 { click } from 'sonar-ui-common/helpers/testUtils'; import IssueSeverity from '../IssueSeverity'; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTags-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTags-test.tsx index f9b14f5c7bc..5011f13d315 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTags-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTags-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 { click } from 'sonar-ui-common/helpers/testUtils'; import IssueTags from '../IssueTags'; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTitleBar-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTitleBar-test.tsx index 555d271d42b..0f7dcd76eb4 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTitleBar-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTitleBar-test.tsx @@ -17,10 +17,10 @@ * 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 IssueTitleBar from '../IssueTitleBar'; +import * as React from 'react'; import { mockIssue } from '../../../../helpers/testMocks'; +import IssueTitleBar from '../IssueTitleBar'; const issue: T.Issue = mockIssue(); diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx index 8e398bfe782..ace8625d0c6 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-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 { click } from 'sonar-ui-common/helpers/testUtils'; import IssueTransition from '../IssueTransition'; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueType-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueType-test.tsx index eaa221962a5..868d59d3885 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueType-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueType-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 { click } from 'sonar-ui-common/helpers/testUtils'; import IssueType from '../IssueType'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.tsx index 2393284a645..002fbe02777 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; +import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; import { getIssueChangelog } from '../../../api/issues'; -import Avatar from '../../ui/Avatar'; import DateTimeFormatter from '../../intl/DateTimeFormatter'; +import Avatar from '../../ui/Avatar'; import IssueChangelogDiff from '../components/IssueChangelogDiff'; interface Props { diff --git a/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.tsx index e6417dd06f2..28dd4b09cdf 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { onDelete: () => void; diff --git a/server/sonar-web/src/main/js/components/issue/popups/CommentPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/CommentPopup.tsx index 94bb358351d..aa5e411aa29 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/CommentPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/CommentPopup.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import MarkdownTips from '../../common/MarkdownTips'; interface Props { diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.tsx index f019d02f673..dc7d94a15bc 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.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 { map } from 'lodash'; -import { translate } from 'sonar-ui-common/helpers/l10n'; -import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import * as React from 'react'; import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; -import Avatar from '../../ui/Avatar'; -import SelectList from '../../common/SelectList'; -import SelectListItem from '../../common/SelectListItem'; -import { withCurrentUser } from '../../hoc/withCurrentUser'; +import SearchBox from 'sonar-ui-common/components/controls/SearchBox'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import { searchMembers } from '../../../api/organizations'; import { searchUsers } from '../../../api/users'; -import { isLoggedIn, isUserActive } from '../../../helpers/users'; import { isSonarCloud } from '../../../helpers/system'; +import { isLoggedIn, isUserActive } from '../../../helpers/users'; +import SelectList from '../../common/SelectList'; +import SelectListItem from '../../common/SelectListItem'; +import { withCurrentUser } from '../../hoc/withCurrentUser'; +import Avatar from '../../ui/Avatar'; interface Props { currentUser: T.CurrentUser; diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetIssueTagsPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetIssueTagsPopup.tsx index 517fd5e9b62..d9b67224347 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetIssueTagsPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetIssueTagsPopup.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 { difference, without } from 'lodash'; +import * as React from 'react'; import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; -import TagsSelector from '../../tags/TagsSelector'; import { searchIssueTags } from '../../../api/issues'; +import TagsSelector from '../../tags/TagsSelector'; interface Props { organization: string; diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.tsx index 5a1b496de71..10ffa22cb49 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import SeverityIcon from 'sonar-ui-common/components/icons/SeverityIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import SelectList from '../../common/SelectList'; import SelectListItem from '../../common/SelectListItem'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx index 7a281c6e078..019825bdb61 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, hasMessage } from 'sonar-ui-common/helpers/l10n'; import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; +import { hasMessage, translate } from 'sonar-ui-common/helpers/l10n'; import SelectList from '../../common/SelectList'; import SelectListItem from '../../common/SelectListItem'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.tsx index 6849bb69b42..070f01b0271 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; import SelectList from '../../common/SelectList'; import SelectListItem from '../../common/SelectListItem'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.tsx index baa824dedcf..b2d34c5a29e 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.tsx @@ -18,17 +18,17 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; import QualifierIcon from 'sonar-ui-common/components/icons/QualifierIcon'; import TagsIcon from 'sonar-ui-common/components/icons/TagsIcon'; -import { fileFromPath, limitComponentName } from 'sonar-ui-common/helpers/path'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; -import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown'; -import Avatar from '../../ui/Avatar'; +import { fileFromPath, limitComponentName } from 'sonar-ui-common/helpers/path'; import SelectList from '../../common/SelectList'; import SelectListItem from '../../common/SelectListItem'; import SeverityHelper from '../../shared/SeverityHelper'; import StatusHelper from '../../shared/StatusHelper'; +import Avatar from '../../ui/Avatar'; interface Props { issue: T.Issue; diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/ChangelogPopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/ChangelogPopup-test.tsx index 8045eef9d53..73d769a6686 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/ChangelogPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/ChangelogPopup-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; -import ChangelogPopup from '../ChangelogPopup'; import { getIssueChangelog } from '../../../../api/issues'; +import ChangelogPopup from '../ChangelogPopup'; jest.mock('../../../../api/issues', () => ({ getIssueChangelog: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentDeletePopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentDeletePopup-test.tsx index a4e72ca0de0..f2ac40f9544 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentDeletePopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentDeletePopup-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 { click } from 'sonar-ui-common/helpers/testUtils'; import CommentDeletePopup from '../CommentDeletePopup'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentPopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentPopup-test.tsx index 3eefe780743..bc12cb7bb44 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentPopup-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 { click } from 'sonar-ui-common/helpers/testUtils'; import CommentPopup from '../CommentPopup'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetAssigneePopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetAssigneePopup-test.tsx index 6eb8153484f..1f3265fb0e6 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetAssigneePopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetAssigneePopup-test.tsx @@ -17,14 +17,14 @@ * 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 { SetAssigneePopup } from '../SetAssigneePopup'; -import { mockLoggedInUser, mockUser } from '../../../../helpers/testMocks'; import { searchMembers } from '../../../../api/organizations'; import { searchUsers } from '../../../../api/users'; import { isSonarCloud } from '../../../../helpers/system'; +import { mockLoggedInUser, mockUser } from '../../../../helpers/testMocks'; +import { SetAssigneePopup } from '../SetAssigneePopup'; jest.mock('../../../../helpers/system', () => ({ isSonarCloud: jest.fn().mockReturnValue(false) diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetIssueTagsPopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetIssueTagsPopup-test.tsx index 6dfe965fb09..36024269c04 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetIssueTagsPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetIssueTagsPopup-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 SetIssueTagsPopup from '../SetIssueTagsPopup'; it('should render tags popup correctly', () => { diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetSeverityPopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetSeverityPopup-test.tsx index aabd45d61bf..e9604eddd4f 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetSeverityPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetSeverityPopup-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 SetSeverityPopup from '../SetSeverityPopup'; it('should render tags popup correctly', () => { diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTransitionPopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTransitionPopup-test.tsx index cd5692f876f..22a87a5e788 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTransitionPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTransitionPopup-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 { hasMessage } from 'sonar-ui-common/helpers/l10n'; import SetTransitionPopup, { Props } from '../SetTransitionPopup'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTypePopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTypePopup-test.tsx index de696a0e509..7c18c166032 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTypePopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTypePopup-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 SetTypePopup from '../SetTypePopup'; it('should render tags popup correctly', () => { diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SimilarIssuesPopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SimilarIssuesPopup-test.tsx index 962e2d0ca3a..bdb30c90a70 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SimilarIssuesPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SimilarIssuesPopup-test.tsx @@ -17,10 +17,10 @@ * 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 SimilarIssuesPopup from '../SimilarIssuesPopup'; +import * as React from 'react'; import { mockIssue } from '../../../../helpers/testMocks'; +import SimilarIssuesPopup from '../SimilarIssuesPopup'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/components/measure/__tests__/Measure-test.tsx b/server/sonar-web/src/main/js/components/measure/__tests__/Measure-test.tsx index 6610e9f9b96..8285def8470 100644 --- a/server/sonar-web/src/main/js/components/measure/__tests__/Measure-test.tsx +++ b/server/sonar-web/src/main/js/components/measure/__tests__/Measure-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 Measure from '../Measure'; jest.mock('../../../helpers/measures', () => { diff --git a/server/sonar-web/src/main/js/components/preview-graph/PreviewGraph.tsx b/server/sonar-web/src/main/js/components/preview-graph/PreviewGraph.tsx index 67f6874f8c8..6be67ae4a64 100644 --- a/server/sonar-web/src/main/js/components/preview-graph/PreviewGraph.tsx +++ b/server/sonar-web/src/main/js/components/preview-graph/PreviewGraph.tsx @@ -17,13 +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 { minBy } from 'lodash'; +import * as React from 'react'; import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; import AdvancedTimeline from 'sonar-ui-common/components/charts/AdvancedTimeline'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { formatMeasure } from 'sonar-ui-common/helpers/measures'; -import PreviewGraphTooltips from './PreviewGraphTooltips'; import { DEFAULT_GRAPH, generateSeries, @@ -34,9 +33,10 @@ import { Serie, splitSeriesInGraphs } from '../../apps/projectActivity/utils'; -import { getShortType } from '../../helpers/measures'; import { getBranchLikeQuery } from '../../helpers/branches'; -import { withRouter, Router } from '../hoc/withRouter'; +import { getShortType } from '../../helpers/measures'; +import { Router, withRouter } from '../hoc/withRouter'; +import PreviewGraphTooltips from './PreviewGraphTooltips'; interface History { [x: string]: Array<{ date: Date; value?: string }>; diff --git a/server/sonar-web/src/main/js/components/preview-graph/PreviewGraphTooltips.tsx b/server/sonar-web/src/main/js/components/preview-graph/PreviewGraphTooltips.tsx index b56c8d053ec..aa21be10a28 100644 --- a/server/sonar-web/src/main/js/components/preview-graph/PreviewGraphTooltips.tsx +++ b/server/sonar-web/src/main/js/components/preview-graph/PreviewGraphTooltips.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Popup, PopupPlacement } from 'sonar-ui-common/components/ui/popups'; -import PreviewGraphTooltipsContent from './PreviewGraphTooltipsContent'; -import DateFormatter from '../intl/DateFormatter'; import { Serie } from '../../apps/projectActivity/utils'; +import DateFormatter from '../intl/DateFormatter'; +import PreviewGraphTooltipsContent from './PreviewGraphTooltipsContent'; interface Props { formatValue: (value: number | string) => string; diff --git a/server/sonar-web/src/main/js/components/preview-graph/__tests__/PreviewGraphTooltips-test.tsx b/server/sonar-web/src/main/js/components/preview-graph/__tests__/PreviewGraphTooltips-test.tsx index ea84be8aaca..c4f34dcba39 100644 --- a/server/sonar-web/src/main/js/components/preview-graph/__tests__/PreviewGraphTooltips-test.tsx +++ b/server/sonar-web/src/main/js/components/preview-graph/__tests__/PreviewGraphTooltips-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 { shallow } from 'enzyme'; +import * as React from 'react'; import { parseDate } from 'sonar-ui-common/helpers/dates'; -import PreviewGraphTooltips from '../PreviewGraphTooltips'; import { DEFAULT_GRAPH } from '../../../apps/projectActivity/utils'; +import PreviewGraphTooltips from '../PreviewGraphTooltips'; const SERIES_ISSUES = [ { diff --git a/server/sonar-web/src/main/js/components/preview-graph/__tests__/PreviewGraphTooltipsContent-test.tsx b/server/sonar-web/src/main/js/components/preview-graph/__tests__/PreviewGraphTooltipsContent-test.tsx index 031075f24cf..31005e08d07 100644 --- a/server/sonar-web/src/main/js/components/preview-graph/__tests__/PreviewGraphTooltipsContent-test.tsx +++ b/server/sonar-web/src/main/js/components/preview-graph/__tests__/PreviewGraphTooltipsContent-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 PreviewGraphTooltipsContent from '../PreviewGraphTooltipsContent'; const DEFAULT_PROPS = { diff --git a/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx b/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx index 62a52952146..7b08d04e807 100644 --- a/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx +++ b/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { getComponentDrilldownUrl, getComponentIssuesUrl } from '../../helpers/urls'; import { getBranchLikeQuery } from '../../helpers/branches'; +import { getComponentDrilldownUrl, getComponentIssuesUrl } from '../../helpers/urls'; const ISSUE_MEASURES = [ 'violations', diff --git a/server/sonar-web/src/main/js/components/shared/Organization.tsx b/server/sonar-web/src/main/js/components/shared/Organization.tsx index 5519994157b..4bd5a8b690b 100644 --- a/server/sonar-web/src/main/js/components/shared/Organization.tsx +++ b/server/sonar-web/src/main/js/components/shared/Organization.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import { getOrganizationByKey, areThereCustomOrganizations, Store } from '../../store/rootReducer'; +import { areThereCustomOrganizations, getOrganizationByKey, Store } from '../../store/rootReducer'; import OrganizationLink from '../ui/OrganizationLink'; interface OwnProps { diff --git a/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx b/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx index b9711f2e660..8d6f0004e0f 100644 --- a/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx +++ b/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from 'sonar-ui-common/helpers/l10n'; import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; +import { translate } from 'sonar-ui-common/helpers/l10n'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/components/shared/__tests__/DrilldownLink-test.tsx b/server/sonar-web/src/main/js/components/shared/__tests__/DrilldownLink-test.tsx index 7cea95baf70..ef3a81781b1 100644 --- a/server/sonar-web/src/main/js/components/shared/__tests__/DrilldownLink-test.tsx +++ b/server/sonar-web/src/main/js/components/shared/__tests__/DrilldownLink-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 DrilldownLink from '../DrilldownLink'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/components/shared/__tests__/Organization-test.tsx b/server/sonar-web/src/main/js/components/shared/__tests__/Organization-test.tsx index d19ec567524..49388dabef5 100644 --- a/server/sonar-web/src/main/js/components/shared/__tests__/Organization-test.tsx +++ b/server/sonar-web/src/main/js/components/shared/__tests__/Organization-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 { UnconnectedOrganization } from '../Organization'; const organization = { key: 'foo', name: 'foo' }; diff --git a/server/sonar-web/src/main/js/components/tags/TagsList.tsx b/server/sonar-web/src/main/js/components/tags/TagsList.tsx index 6b796b62143..239e409f667 100644 --- a/server/sonar-web/src/main/js/components/tags/TagsList.tsx +++ b/server/sonar-web/src/main/js/components/tags/TagsList.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 DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import TagsIcon from 'sonar-ui-common/components/icons/TagsIcon'; import './TagsList.css'; diff --git a/server/sonar-web/src/main/js/components/tags/__tests__/TagsList-test.tsx b/server/sonar-web/src/main/js/components/tags/__tests__/TagsList-test.tsx index df650fc03c0..9919d2df979 100644 --- a/server/sonar-web/src/main/js/components/tags/__tests__/TagsList-test.tsx +++ b/server/sonar-web/src/main/js/components/tags/__tests__/TagsList-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 TagsList from '../TagsList'; const tags = ['foo', 'bar']; diff --git a/server/sonar-web/src/main/js/components/tags/__tests__/TagsSelector-test.tsx b/server/sonar-web/src/main/js/components/tags/__tests__/TagsSelector-test.tsx index 98879fbaeda..65cbf899602 100644 --- a/server/sonar-web/src/main/js/components/tags/__tests__/TagsSelector-test.tsx +++ b/server/sonar-web/src/main/js/components/tags/__tests__/TagsSelector-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 TagsSelector, { validateTag } from '../TagsSelector'; const props = { diff --git a/server/sonar-web/src/main/js/components/ui/Avatar.tsx b/server/sonar-web/src/main/js/components/ui/Avatar.tsx index 31333e11c1b..71294d2b423 100644 --- a/server/sonar-web/src/main/js/components/ui/Avatar.tsx +++ b/server/sonar-web/src/main/js/components/ui/Avatar.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 classNames from 'classnames'; import * as React from 'react'; import { connect } from 'react-redux'; -import * as classNames from 'classnames'; import GenericAvatar from 'sonar-ui-common/components/ui/GenericAvatar'; import { getGlobalSettingValue, Store } from '../../store/rootReducer'; diff --git a/server/sonar-web/src/main/js/components/ui/OrganizationListItem.tsx b/server/sonar-web/src/main/js/components/ui/OrganizationListItem.tsx index d07c51f54e7..53285415dea 100644 --- a/server/sonar-web/src/main/js/components/ui/OrganizationListItem.tsx +++ b/server/sonar-web/src/main/js/components/ui/OrganizationListItem.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import OrganizationLink from './OrganizationLink'; import OrganizationAvatar from '../common/OrganizationAvatar'; +import OrganizationLink from './OrganizationLink'; interface Props { organization: T.Organization; diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.tsx index a40d311efd9..d0430faace7 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-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 { unconnectedAvatar as Avatar } from '../Avatar'; const gravatarServerUrl = 'http://example.com/{EMAIL_MD5}.jpg?s={SIZE}'; diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/OrganizationLink-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/OrganizationLink-test.tsx index 5da06778b70..6da51bfc988 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/OrganizationLink-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/OrganizationLink-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 OrganizationLink from '../OrganizationLink'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/OrganizationListItem-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/OrganizationListItem-test.tsx index d31e49d808b..19a2284c80f 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/OrganizationListItem-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/OrganizationListItem-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 OrganizationListItem from '../OrganizationListItem'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/components/workspace/Workspace.tsx b/server/sonar-web/src/main/js/components/workspace/Workspace.tsx index 938fdd4b138..3bd52e0cb33 100644 --- a/server/sonar-web/src/main/js/components/workspace/Workspace.tsx +++ b/server/sonar-web/src/main/js/components/workspace/Workspace.tsx @@ -17,13 +17,13 @@ * 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 { omit, uniqBy } from 'lodash'; +import * as React from 'react'; import { lazyLoad } from 'sonar-ui-common/components/lazyLoad'; import { get, save } from 'sonar-ui-common/helpers/storage'; -import { WorkspaceContext, ComponentDescriptor, RuleDescriptor } from './context'; -import WorkspacePortal from './WorkspacePortal'; +import { ComponentDescriptor, RuleDescriptor, WorkspaceContext } from './context'; import './styles.css'; +import WorkspacePortal from './WorkspacePortal'; const WORKSPACE = 'sonarqube-workspace'; const WorkspaceNav = lazyLoad(() => import('./WorkspaceNav')); diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx index a12d22fd256..23f0ab0d42d 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx @@ -20,13 +20,13 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { scrollToElement } from 'sonar-ui-common/helpers/scrolling'; -import { ComponentDescriptor } from './context'; -import WorkspaceHeader, { Props as WorkspaceHeaderProps } from './WorkspaceHeader'; -import WorkspaceComponentTitle from './WorkspaceComponentTitle'; -import SourceViewer from '../SourceViewer/SourceViewer'; +import { getParents } from '../../api/components'; import { isPullRequest, isShortLivingBranch } from '../../helpers/branches'; import { fetchBranchStatus } from '../../store/rootActions'; -import { getParents } from '../../api/components'; +import SourceViewer from '../SourceViewer/SourceViewer'; +import { ComponentDescriptor } from './context'; +import WorkspaceComponentTitle from './WorkspaceComponentTitle'; +import WorkspaceHeader, { Props as WorkspaceHeaderProps } from './WorkspaceHeader'; export interface Props extends T.Omit<WorkspaceHeaderProps, 'children' | 'onClose'> { component: ComponentDescriptor; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx index 5641f01b7d2..93dbd88a341 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { DraggableCore, DraggableData } from 'react-draggable'; -import { IconProps } from 'sonar-ui-common/components/icons/Icon'; +import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; import ClearIcon from 'sonar-ui-common/components/icons/ClearIcon'; import CollapseIcon from 'sonar-ui-common/components/icons/CollapseIcon'; import ExpandIcon from 'sonar-ui-common/components/icons/ExpandIcon'; +import { IconProps } from 'sonar-ui-common/components/icons/Icon'; import MinimizeIcon from 'sonar-ui-common/components/icons/MinimizeIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { ButtonIcon } from 'sonar-ui-common/components/controls/buttons'; export interface Props { children: React.ReactNode; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleDetails.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleDetails.tsx index dfeb97645aa..fa35a6274ec 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleDetails.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleDetails.tsx @@ -17,14 +17,14 @@ * 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 { keyBy } from 'lodash'; +import * as React from 'react'; import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner'; -import { withAppState } from '../hoc/withAppState'; -import RuleDetailsMeta from '../../apps/coding-rules/components/RuleDetailsMeta'; -import RuleDetailsDescription from '../../apps/coding-rules/components/RuleDetailsDescription'; import { getRuleDetails, getRulesApp } from '../../api/rules'; +import RuleDetailsDescription from '../../apps/coding-rules/components/RuleDetailsDescription'; +import RuleDetailsMeta from '../../apps/coding-rules/components/RuleDetailsMeta'; import '../../apps/coding-rules/styles.css'; +import { withAppState } from '../hoc/withAppState'; interface Props { appState: Pick<T.AppState, 'organizationsEnabled'>; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx index b65e1bf0e97..62f5d27a649 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import LightBulbIcon from 'sonar-ui-common/components/icons/LightBulbIcon'; -import { RuleDescriptor } from './context'; import { colors } from '../../app/theme'; +import { RuleDescriptor } from './context'; interface Props { limited?: boolean; diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentTitle-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentTitle-test.tsx index 955d414e303..dc41fd78d41 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentTitle-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentTitle-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 WorkspaceComponentTitle from '../WorkspaceComponentTitle'; it('should render component', () => { diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentViewer-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentViewer-test.tsx index 1780054d98b..c2a35daf318 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentViewer-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentViewer-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 { WorkspaceComponentViewer, Props } from '../WorkspaceComponentViewer'; -import { mockPullRequest, mockIssue } from '../../../helpers/testMocks'; import { getParents } from '../../../api/components'; +import { mockIssue, mockPullRequest } from '../../../helpers/testMocks'; +import { Props, WorkspaceComponentViewer } from '../WorkspaceComponentViewer'; jest.mock('../../../api/components', () => ({ getParents: jest.fn().mockResolvedValue([{ key: 'bar' }]) diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceHeader-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceHeader-test.tsx index 0172da1e9ed..0ad74db2c3d 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceHeader-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceHeader-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 WorkspaceHeader, { Props } from '../WorkspaceHeader'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNav-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNav-test.tsx index 24bb04b0e6f..a4654cf7a8e 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNav-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNav-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 WorkspaceNav, { Props } from '../WorkspaceNav'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavComponent-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavComponent-test.tsx index bc9cfa4323c..65c691f0530 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavComponent-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavComponent-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 WorkspaceNavComponent, { Props } from '../WorkspaceNavComponent'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavItem-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavItem-test.tsx index 3568a8ddfc9..19aff5391f0 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavItem-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavItem-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 { click } from 'sonar-ui-common/helpers/testUtils'; import WorkspaceNavItem, { Props } from '../WorkspaceNavItem'; diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavRule-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavRule-test.tsx index 2ec2eccc408..0a196d274de 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavRule-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavRule-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 WorkspaceNavRule, { Props } from '../WorkspaceNavRule'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspacePortal-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspacePortal-test.tsx index 8dc5fd9fd18..644e25576a1 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspacePortal-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspacePortal-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 WorkspacePortal from '../WorkspacePortal'; it('should create portal element', () => { diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleDetails-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleDetails-test.tsx index 82d6e06bad9..d50013bb746 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleDetails-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleDetails-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 { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { WorkspaceRuleDetails } from '../WorkspaceRuleDetails'; diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleTitle-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleTitle-test.tsx index 88788217009..a22966d224a 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleTitle-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleTitle-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 WorkspaceRuleTitle from '../WorkspaceRuleTitle'; it('should render rule', () => { diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleViewer-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleViewer-test.tsx index 62d39d710e4..244b79ebd51 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleViewer-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleViewer-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 WorkspaceRuleViewer, { Props } from '../WorkspaceRuleViewer'; jest.useFakeTimers(); diff --git a/server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts index 8d36e055253..62ae329732a 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { + getAlmMembersUrl, + getUserAlmKey, isBitbucket, isGithub, isVSTS, - sanitizeAlmId, - getAlmMembersUrl, - getUserAlmKey + sanitizeAlmId } from '../almIntegrations'; import { mockCurrentUser, mockLoggedInUser } from '../testMocks'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/branches-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/branches-test.ts index d84f430be0c..34f7dbf42a4 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/branches-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/branches-test.ts @@ -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 { sortBranchesAsTree, isSameBranchLike } from '../branches'; +import { isSameBranchLike, sortBranchesAsTree } from '../branches'; import { - mockShortLivingBranch, mockLongLivingBranch, + mockMainBranch, mockPullRequest, - mockMainBranch + mockShortLivingBranch } from '../testMocks'; describe('#sortBranchesAsTree', () => { diff --git a/server/sonar-web/src/main/js/helpers/__tests__/extensions-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/extensions-test.ts index 182fa0e54d6..7fc9525f817 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/extensions-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/extensions-test.ts @@ -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 exposeLibraries from '../../app/components/extensions/exposeLibraries'; import { getExtensionStart, installScript } from '../extensions'; import { installExtensionsHandler } from '../extensionsHandler'; -import exposeLibraries from '../../app/components/extensions/exposeLibraries'; jest.mock('../../app/components/extensions/exposeLibraries', () => ({ default: jest.fn() diff --git a/server/sonar-web/src/main/js/helpers/__tests__/markdown-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/markdown-test.ts index b292f321cf3..2711e5f3f36 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/markdown-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/markdown-test.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 { getFrontMatter, separateFrontMatter, filterContent } from '../markdown'; +import { filterContent, getFrontMatter, separateFrontMatter } from '../markdown'; import { isSonarCloud } from '../system'; jest.mock('../system', () => ({ diff --git a/server/sonar-web/src/main/js/helpers/__tests__/qualityGates-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/qualityGates-test.ts index 1b440f03edf..340f158919c 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/qualityGates-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/qualityGates-test.ts @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { - isSameStatusConditionList, - extractStatusConditionsFromProjectStatus + extractStatusConditionsFromProjectStatus, + isSameStatusConditionList } from '../qualityGates'; -import { mockQualityGateStatusCondition, mockQualityGateProjectStatus } from '../testMocks'; +import { mockQualityGateProjectStatus, mockQualityGateStatusCondition } from '../testMocks'; describe('extractStatusConditionsFromProjectStatus', () => { it('should correclty extract the conditions for the project status', () => { diff --git a/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts index be61813112b..f4d217588ab 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { - getComponentIssuesUrl, getComponentDrilldownUrl, + getComponentIssuesUrl, getQualityGatesUrl, getQualityGateUrl } from '../urls'; diff --git a/server/sonar-web/src/main/js/helpers/testMocks.ts b/server/sonar-web/src/main/js/helpers/testMocks.ts index a9b33558b36..fcf39a2124d 100644 --- a/server/sonar-web/src/main/js/helpers/testMocks.ts +++ b/server/sonar-web/src/main/js/helpers/testMocks.ts @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* eslint-disable sonarjs/no-duplicate-string */ -import { InjectedRouter } from 'react-router'; -import { Store, createStore } from 'redux'; import { Location } from 'history'; +import { InjectedRouter } from 'react-router'; +import { createStore, Store } from 'redux'; +import { DocumentationEntry } from '../apps/documentation/utils'; import { ParsedAnalysis } from '../apps/projectActivity/utils'; import { Profile } from '../apps/quality-profiles/types'; -import { DocumentationEntry } from '../apps/documentation/utils'; export function mockAlmApplication(overrides: Partial<T.AlmApplication> = {}): T.AlmApplication { return { diff --git a/server/sonar-web/src/main/js/helpers/urls.ts b/server/sonar-web/src/main/js/helpers/urls.ts index 10634b81496..73afb0e5053 100644 --- a/server/sonar-web/src/main/js/helpers/urls.ts +++ b/server/sonar-web/src/main/js/helpers/urls.ts @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { getBaseUrl, Location } from 'sonar-ui-common/helpers/urls'; +import { getProfilePath } from '../apps/quality-profiles/utils'; import { - isShortLivingBranch, - isPullRequest, + getBranchLikeQuery, isLongLivingBranch, - getBranchLikeQuery + isPullRequest, + isShortLivingBranch } from './branches'; -import { getProfilePath } from '../apps/quality-profiles/utils'; type Query = Location['query']; diff --git a/server/sonar-web/src/main/js/store/__tests__/branches-test.ts b/server/sonar-web/src/main/js/store/__tests__/branches-test.ts index 69f97631b04..875736d7a63 100644 --- a/server/sonar-web/src/main/js/store/__tests__/branches-test.ts +++ b/server/sonar-web/src/main/js/store/__tests__/branches-test.ts @@ -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 { getBranchLikeKey } from '../../helpers/branches'; +import { + mockLongLivingBranch, + mockPullRequest, + mockQualityGateStatusCondition, + mockShortLivingBranch +} from '../../helpers/testMocks'; import reducer, { - registerBranchStatusAction, getBranchStatusByBranchLike, + registerBranchStatusAction, State } from '../branches'; -import { - mockPullRequest, - mockLongLivingBranch, - mockShortLivingBranch, - mockQualityGateStatusCondition -} from '../../helpers/testMocks'; -import { getBranchLikeKey } from '../../helpers/branches'; type TestArgs = [T.BranchLike, string, T.Status, T.QualityGateStatusCondition[], boolean?]; diff --git a/server/sonar-web/src/main/js/store/__tests__/organizations-test.ts b/server/sonar-web/src/main/js/store/__tests__/organizations-test.ts index 716b37ef355..0fc3bef90f3 100644 --- a/server/sonar-web/src/main/js/store/__tests__/organizations-test.ts +++ b/server/sonar-web/src/main/js/store/__tests__/organizations-test.ts @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import reducer, { - getOrganizationByKey, areThereCustomOrganizations, + createOrganization, + deleteOrganization, getMyOrganizations, - State, - receiveOrganizations, + getOrganizationByKey, receiveMyOrganizations, - createOrganization, - updateOrganization, - deleteOrganization + receiveOrganizations, + State, + updateOrganization } from '../organizations'; const state0: State = { byKey: {}, my: [] }; diff --git a/server/sonar-web/src/main/js/store/__tests__/rootActions-test.tsx b/server/sonar-web/src/main/js/store/__tests__/rootActions-test.tsx index 42e05bac729..4828f7559f0 100644 --- a/server/sonar-web/src/main/js/store/__tests__/rootActions-test.tsx +++ b/server/sonar-web/src/main/js/store/__tests__/rootActions-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 { registerBranchStatus, fetchBranchStatus } from '../rootActions'; import { mockLongLivingBranch, mockQualityGateStatusCondition } from '../../helpers/testMocks'; import { registerBranchStatusAction } from '../branches'; +import { fetchBranchStatus, registerBranchStatus } from '../rootActions'; jest.useFakeTimers(); diff --git a/server/sonar-web/src/main/js/store/__tests__/rootReducers-test.tsx b/server/sonar-web/src/main/js/store/__tests__/rootReducers-test.tsx index e31f34625b8..e55d671c55e 100644 --- a/server/sonar-web/src/main/js/store/__tests__/rootReducers-test.tsx +++ b/server/sonar-web/src/main/js/store/__tests__/rootReducers-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 { getBranchStatusByBranchLike, Store } from '../rootReducer'; -import * as fromBranches from '../branches'; import { mockPullRequest } from '../../helpers/testMocks'; +import * as fromBranches from '../branches'; +import { getBranchStatusByBranchLike, Store } from '../rootReducer'; jest.mock('../branches', () => { return { diff --git a/server/sonar-web/src/main/js/store/appState.ts b/server/sonar-web/src/main/js/store/appState.ts index 18b42bba90e..844fe669c22 100644 --- a/server/sonar-web/src/main/js/store/appState.ts +++ b/server/sonar-web/src/main/js/store/appState.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 { ActionType } from './utils/actions'; import { EditionKey } from '../apps/marketplace/utils'; +import { ActionType } from './utils/actions'; export const enum Actions { SetAppState = 'SET_APP_STATE', diff --git a/server/sonar-web/src/main/js/store/branches.ts b/server/sonar-web/src/main/js/store/branches.ts index ede17adbb7f..fee3975287b 100644 --- a/server/sonar-web/src/main/js/store/branches.ts +++ b/server/sonar-web/src/main/js/store/branches.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 { ActionType } from './utils/actions'; import { getBranchLikeKey } from '../helpers/branches'; +import { ActionType } from './utils/actions'; export interface BranchStatusData { conditions?: T.QualityGateStatusCondition[]; diff --git a/server/sonar-web/src/main/js/store/organizations.ts b/server/sonar-web/src/main/js/store/organizations.ts index e1f870d23bd..3e939267bf8 100644 --- a/server/sonar-web/src/main/js/store/organizations.ts +++ b/server/sonar-web/src/main/js/store/organizations.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 { combineReducers } from 'redux'; import { omit, uniq, without } from 'lodash'; +import { combineReducers } from 'redux'; import { ActionType } from './utils/actions'; type ReceiveOrganizationsAction = diff --git a/server/sonar-web/src/main/js/store/rootActions.ts b/server/sonar-web/src/main/js/store/rootActions.ts index aeeabcaf31d..f7ffb9022cb 100644 --- a/server/sonar-web/src/main/js/store/rootActions.ts +++ b/server/sonar-web/src/main/js/store/rootActions.ts @@ -17,22 +17,22 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Dispatch } from 'redux'; -import { InjectedRouter } from 'react-router'; import { debounce } from 'lodash'; -import { requireAuthorization as requireAuthorizationAction } from './appState'; -import { registerBranchStatusAction } from './branches'; -import { addGlobalErrorMessage } from './globalMessages'; -import { receiveLanguages } from './languages'; -import { receiveMetrics } from './metrics'; -import { receiveOrganizations } from './organizations'; +import { InjectedRouter } from 'react-router'; +import { Dispatch } from 'redux'; import * as auth from '../api/auth'; import { getLanguages } from '../api/languages'; import { getAllMetrics } from '../api/metrics'; -import { getOrganizations, getOrganization, getOrganizationNavigation } from '../api/organizations'; +import { getOrganization, getOrganizationNavigation, getOrganizations } from '../api/organizations'; import { getQualityGateProjectStatus } from '../api/quality-gates'; import { getBranchLikeQuery } from '../helpers/branches'; import { extractStatusConditionsFromProjectStatus } from '../helpers/qualityGates'; +import { requireAuthorization as requireAuthorizationAction } from './appState'; +import { registerBranchStatusAction } from './branches'; +import { addGlobalErrorMessage } from './globalMessages'; +import { receiveLanguages } from './languages'; +import { receiveMetrics } from './metrics'; +import { receiveOrganizations } from './organizations'; export function fetchLanguages() { return (dispatch: Dispatch) => { diff --git a/server/sonar-web/src/main/js/store/rootReducer.ts b/server/sonar-web/src/main/js/store/rootReducer.ts index c1b94e09bba..8f846110260 100644 --- a/server/sonar-web/src/main/js/store/rootReducer.ts +++ b/server/sonar-web/src/main/js/store/rootReducer.ts @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { combineReducers } from 'redux'; +import settingsApp, * as fromSettingsApp from '../apps/settings/store/rootReducer'; import appState from './appState'; import branches, * as fromBranches from './branches'; import globalMessages, * as fromGlobalMessages from './globalMessages'; @@ -25,7 +26,6 @@ import languages, * as fromLanguages from './languages'; import metrics, * as fromMetrics from './metrics'; import organizations, * as fromOrganizations from './organizations'; import users, * as fromUsers from './users'; -import settingsApp, * as fromSettingsApp from '../apps/settings/store/rootReducer'; export type Store = { appState: T.AppState; diff --git a/server/sonar-web/src/main/js/store/users.ts b/server/sonar-web/src/main/js/store/users.ts index 3075ff565bd..d03d6390ea7 100644 --- a/server/sonar-web/src/main/js/store/users.ts +++ b/server/sonar-web/src/main/js/store/users.ts @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { uniq } from 'lodash'; -import { Dispatch, combineReducers } from 'redux'; -import { ActionType } from './utils/actions'; -import { isLoggedIn } from '../helpers/users'; +import { combineReducers, Dispatch } from 'redux'; import * as api from '../api/users'; +import { isLoggedIn } from '../helpers/users'; +import { ActionType } from './utils/actions'; const enum Actions { ReceiveCurrentUser = 'RECEIVE_CURRENT_USER', diff --git a/server/sonar-web/src/main/js/store/utils/configureStore.ts b/server/sonar-web/src/main/js/store/utils/configureStore.ts index f163fd5f1e1..c3442937514 100644 --- a/server/sonar-web/src/main/js/store/utils/configureStore.ts +++ b/server/sonar-web/src/main/js/store/utils/configureStore.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 { createStore, applyMiddleware, compose } from 'redux'; +import { applyMiddleware, compose, createStore } from 'redux'; import thunk, { ThunkMiddleware } from 'redux-thunk'; type RootReducer = typeof import('../rootReducer').default; |