aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/system
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2021-08-19 12:49:11 +0200
committersonartech <sonartech@sonarsource.com>2021-08-20 20:03:09 +0000
commit6f17541395dcedb52fe54e7755be95f2e5941086 (patch)
treece3d742aee2af87e018c193c97eea5e7fc81a4e5 /server/sonar-web/src/main/js/apps/system
parent4ce76b5cde3ee915a6c45bfa452e0c7c61c642a5 (diff)
downloadsonarqube-6f17541395dcedb52fe54e7755be95f2e5941086.tar.gz
sonarqube-6f17541395dcedb52fe54e7755be95f2e5941086.zip
SONAR-15297 Move all code from sonar-ui-common back to respective sonar-web folders
Diffstat (limited to 'server/sonar-web/src/main/js/apps/system')
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/App.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx11
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/ClusterSysInfos.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/PageActions.tsx10
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/__tests__/App-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/__tests__/PageHeader-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/info-items/HealthCauseItem.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/info-items/SysInfoItem.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeForm.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeItem.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeNotif.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeIntermediate-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeNotif-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/system/routes.ts2
-rw-r--r--server/sonar-web/src/main/js/apps/system/utils.ts9
20 files changed, 41 insertions, 49 deletions
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 7de833ce33d..6df2047788c 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
@@ -22,7 +22,7 @@ import { Helmet } from 'react-helmet-async';
import { withRouter, WithRouterProps } from 'react-router';
import { getSystemInfo } from '../../../api/system';
import Suggestions from '../../../app/components/embed-docs-modal/Suggestions';
-import { translate } from '../../../sonar-ui-common/helpers/l10n';
+import { translate } from '../../../helpers/l10n';
import '../styles.css';
import {
getClusterVersion,
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 ef5d423ffd8..a79936d6b3d 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
@@ -19,13 +19,10 @@
*/
import * as React from 'react';
import { setLogLevel } from '../../../api/system';
-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 { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';
+import Modal from '../../../components/controls/Modal';
+import { Alert } from '../../../components/ui/Alert';
+import { translate } from '../../../helpers/l10n';
import { LOGS_LEVELS } from '../utils';
interface Props {
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 858d434b304..28b52667d18 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
@@ -19,7 +19,7 @@
*/
import { sortBy } from 'lodash';
import * as React from 'react';
-import { translate } from '../../../sonar-ui-common/helpers/l10n';
+import { translate } from '../../../helpers/l10n';
import {
getAppNodes,
getClusterMainCardSection,
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 72ca8e89938..5f3e0887fe9 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
@@ -20,11 +20,11 @@
import * as React from 'react';
import AdminContext from '../../../app/components/AdminContext';
import RestartButton from '../../../components/common/RestartButton';
-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 { Button, EditButton } from '../../../components/controls/buttons';
+import Dropdown from '../../../components/controls/Dropdown';
+import DropdownIcon from '../../../components/icons/DropdownIcon';
+import { translate } from '../../../helpers/l10n';
+import { getBaseUrl } from '../../../helpers/urls';
import { getFileNameSuffix } from '../utils';
import ChangeLogLevelForm from './ChangeLogLevelForm';
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 61a883e6491..0aab72a96ad 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/clipboard';
-import { toShortNotSoISOString } from '../../../sonar-ui-common/helpers/dates';
-import { translate } from '../../../sonar-ui-common/helpers/l10n';
+import { ClipboardButton } from '../../../components/controls/clipboard';
+import { toShortNotSoISOString } from '../../../helpers/dates';
+import { translate } from '../../../helpers/l10n';
import PageActions from './PageActions';
export interface Props {
diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/App-test.tsx
index 57f68f7204a..dbeec9dabbd 100644
--- a/server/sonar-web/src/main/js/apps/system/components/__tests__/App-test.tsx
+++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/App-test.tsx
@@ -26,7 +26,7 @@ import {
mockRouter,
mockStandaloneSysInfo
} from '../../../../helpers/testMocks';
-import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils';
+import { waitAndUpdate } from '../../../../helpers/testUtils';
import { App } from '../App';
jest.mock('../../../../api/system', () => ({
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 35d745f404c..02aacf5d4ba 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
@@ -19,7 +19,7 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { click } from '../../../../sonar-ui-common/helpers/testUtils';
+import { click } from '../../../../helpers/testUtils';
import PageActions from '../PageActions';
jest.mock('../../utils', () => ({
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 7d143597513..32c07327d72 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
@@ -21,7 +21,7 @@ import { shallow } from 'enzyme';
import * as React from 'react';
import PageHeader, { Props } from '../PageHeader';
-jest.mock('../../../../sonar-ui-common/helpers/dates', () => ({
+jest.mock('../../../../helpers/dates', () => ({
toShortNotSoISOString: () => '2019-01-01'
}));
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 c03ad6e1270..5c403aadf4f 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
@@ -19,9 +19,9 @@
*/
import { map } from 'lodash';
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 BoxedGroupAccordion from '../../../../components/controls/BoxedGroupAccordion';
+import { Alert } from '../../../../components/ui/Alert';
+import { translate } from '../../../../helpers/l10n';
import { getLogsLevel, groupSections, LOGS_LEVELS } from '../../utils';
import HealthItem from './HealthItem';
import Section from './Section';
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 f764c9fc0c8..49cd480e91d 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
@@ -19,7 +19,7 @@
*/
import * as classNames from 'classnames';
import * as React from 'react';
-import { Alert } from '../../../../sonar-ui-common/components/ui/Alert';
+import { Alert } from '../../../../components/ui/Alert';
interface Props {
className?: string;
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 4571978f6e4..f445caf6d0a 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
@@ -20,8 +20,8 @@
import * as classNames from 'classnames';
import * as React from 'react';
import StatusIndicator from '../../../../components/common/StatusIndicator';
-import Tooltip from '../../../../sonar-ui-common/components/controls/Tooltip';
-import { translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n';
+import Tooltip from '../../../../components/controls/Tooltip';
+import { translateWithParameters } from '../../../../helpers/l10n';
import HealthCauseItem from './HealthCauseItem';
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 8a6ab950f38..4cd91ec7c53 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
@@ -19,7 +19,7 @@
*/
import { map } from 'lodash';
import * as React from 'react';
-import { translate } from '../../../../sonar-ui-common/helpers/l10n';
+import { translate } from '../../../../helpers/l10n';
import { HEALTH_FIELD, STATE_FIELD } from '../../utils';
import HealthItem from './HealthItem';
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 e32b51f73d2..b4a25a71963 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,10 +18,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { ResetButtonLink } from '../../../../components/controls/buttons';
+import Modal from '../../../../components/controls/Modal';
import { withAppState } from '../../../../components/hoc/withAppState';
-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 { translate } from '../../../../helpers/l10n';
import { EditionKey } from '../../../../types/editions';
import { SystemUpgrade } from '../../../../types/system';
import SystemUpgradeItem from './SystemUpgradeItem';
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 4442791ab58..b059fe41805 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,10 +18,10 @@
* 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 DateFormatter from '../../../../sonar-ui-common/components/intl/DateFormatter';
-import { translate } from '../../../../sonar-ui-common/helpers/l10n';
+import { ButtonLink } from '../../../../components/controls/buttons';
+import DropdownIcon from '../../../../components/icons/DropdownIcon';
+import DateFormatter from '../../../../components/intl/DateFormatter';
+import { translate } from '../../../../helpers/l10n';
import { SystemUpgrade } from '../../../../types/system';
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 06487ebb3fd..d5c605cbc4b 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
@@ -19,13 +19,13 @@
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
+import DateFormatter from '../../../../components/intl/DateFormatter';
import {
getEdition,
getEditionDownloadFilename,
getEditionDownloadUrl
} from '../../../../helpers/editions';
-import DateFormatter from '../../../../sonar-ui-common/components/intl/DateFormatter';
-import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n';
+import { translate, translateWithParameters } from '../../../../helpers/l10n';
import { EditionKey } from '../../../../types/editions';
import { SystemUpgrade } from '../../../../types/system';
import SystemUpgradeIntermediate from './SystemUpgradeIntermediate';
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 f332bc0a98f..5655488d6d8 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
@@ -19,9 +19,9 @@
*/
import * as React from 'react';
import { getSystemUpgrades } from '../../../../api/system';
-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 { Button } from '../../../../components/controls/buttons';
+import { Alert } from '../../../../components/ui/Alert';
+import { translate } from '../../../../helpers/l10n';
import { SystemUpgrade } from '../../../../types/system';
import { groupUpgrades, sortUpgrades } from '../../utils';
import SystemUpgradeForm from './SystemUpgradeForm';
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 1d16b436a19..c2d05b1853f 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
@@ -19,7 +19,7 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { click } from '../../../../../sonar-ui-common/helpers/testUtils';
+import { click } from '../../../../../helpers/testUtils';
import SystemUpgradeIntermediate from '../SystemUpgradeIntermediate';
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 181e892cbca..7ad1e031157 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
@@ -20,7 +20,7 @@
import { shallow } from 'enzyme';
import * as React from 'react';
import { getSystemUpgrades } from '../../../../../api/system';
-import { click, waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils';
+import { click, waitAndUpdate } from '../../../../../helpers/testUtils';
import SystemUpgradeNotif from '../SystemUpgradeNotif';
jest.mock('../../../../../api/system', () => ({
diff --git a/server/sonar-web/src/main/js/apps/system/routes.ts b/server/sonar-web/src/main/js/apps/system/routes.ts
index f57b5528d59..3056655f8ba 100644
--- a/server/sonar-web/src/main/js/apps/system/routes.ts
+++ b/server/sonar-web/src/main/js/apps/system/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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent';
+import { lazyLoadComponent } from '../../components/lazyLoadComponent';
const routes = [
{
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 7727bfeb690..4a4c7f28242 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,8 @@
* 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 '../../helpers/measures';
+import { cleanQuery, parseAsArray, parseAsString, serializeStringArray } from '../../helpers/query';
import { SystemUpgrade } from '../../types/system';
export interface Query {