aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/groups
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2021-08-17 15:50:55 +0200
committersonartech <sonartech@sonarsource.com>2021-08-20 20:03:08 +0000
commit6ef7ca151ecd602ca8e9cea21743a895a81e89ba (patch)
tree40d7a97a8075b416901a4078638e4cde9ee15942 /server/sonar-web/src/main/js/apps/groups
parent2454e077b1d77d70508dcce6a5b015d4a69f41fa (diff)
downloadsonarqube-6ef7ca151ecd602ca8e9cea21743a895a81e89ba.tar.gz
sonarqube-6ef7ca151ecd602ca8e9cea21743a895a81e89ba.zip
SONAR-15297 Move sonar-ui-common code to sonar-web
Diffstat (limited to 'server/sonar-web/src/main/js/apps/groups')
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/App.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/DeleteForm.tsx11
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/EditMembers.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx10
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/Form.tsx15
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/Header.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/List.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/ListItem.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/__tests__/App-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembersModal-test.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/__tests__/Form-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/__tests__/Header-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/groups/routes.ts2
14 files changed, 42 insertions, 34 deletions
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 fc779853d14..01eb3dada9f 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,12 +19,12 @@
*/
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
-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 { omitNil } from 'sonar-ui-common/helpers/request';
import { createGroup, deleteGroup, searchUsersGroups, updateGroup } from '../../../api/user_groups';
import Suggestions from '../../../app/components/embed-docs-modal/Suggestions';
+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 { omitNil } from '../../../sonar-ui-common/helpers/request';
import DeleteForm from './DeleteForm';
import Form from './Form';
import Header from './Header';
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 52d6cf39527..4ba75a1e023 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,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
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 { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
+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 c1f3b50a848..dd8dc1cd57d 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,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 } from 'sonar-ui-common/helpers/l10n';
+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 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 e98b2ab3e6a..462aac441ab 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
@@ -19,14 +19,14 @@
*/
import { find, without } from 'lodash';
import * as React from 'react';
-import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons';
-import Modal from 'sonar-ui-common/components/controls/Modal';
+import { addUserToGroup, getUsersInGroup, removeUserFromGroup } from '../../../api/user_groups';
+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';
+} from '../../../sonar-ui-common/components/controls/SelectList';
+import { translate } from '../../../sonar-ui-common/helpers/l10n';
interface Props {
group: T.Group;
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 978b7ce181f..2796e308e59 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,12 +18,15 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
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 MandatoryFieldMarker from 'sonar-ui-common/components/ui/MandatoryFieldMarker';
-import MandatoryFieldsExplanation from 'sonar-ui-common/components/ui/MandatoryFieldsExplanation';
-import { translate } from 'sonar-ui-common/helpers/l10n';
+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 MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker';
+import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation';
+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 063e44b1443..6aba69becfb 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,8 +18,8 @@
* 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 { 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/groups/components/List.tsx b/server/sonar-web/src/main/js/apps/groups/components/List.tsx
index 72a61dda277..7ad06d1d1ee 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
@@ -19,7 +19,7 @@
*/
import { sortBy } from 'lodash';
import * as React from 'react';
-import { translate } from 'sonar-ui-common/helpers/l10n';
+import { translate } from '../../../sonar-ui-common/helpers/l10n';
import ListItem from './ListItem';
interface Props {
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 3b8d3caecdf..59ceb8493b4 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
@@ -21,8 +21,8 @@ import * as React from 'react';
import ActionsDropdown, {
ActionsDropdownDivider,
ActionsDropdownItem
-} from 'sonar-ui-common/components/controls/ActionsDropdown';
-import { translate } from 'sonar-ui-common/helpers/l10n';
+} from '../../../sonar-ui-common/components/controls/ActionsDropdown';
+import { translate } from '../../../sonar-ui-common/helpers/l10n';
import EditMembers from './EditMembers';
export interface ListItemProps {
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 c53f617af20..efeed575ab9 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
@@ -19,7 +19,6 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils';
import {
createGroup,
deleteGroup,
@@ -27,6 +26,7 @@ import {
updateGroup
} from '../../../../api/user_groups';
import { mockGroup } from '../../../../helpers/testMocks';
+import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils';
import App from '../App';
jest.mock('../../../../api/user_groups', () => ({
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 e45404bb50c..f27db315de8 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
@@ -19,7 +19,7 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { click } from 'sonar-ui-common/helpers/testUtils';
+import { click } from '../../../../sonar-ui-common/helpers/testUtils';
import EditMembers from '../EditMembers';
it('should edit members', () => {
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 9d102432714..d6e7096c8a6 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
@@ -19,9 +19,11 @@
*/
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 SelectList, {
+ SelectListFilter
+} from '../../../../sonar-ui-common/components/controls/SelectList';
+import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils';
import EditMembersModal from '../EditMembersModal';
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 6cb22e537d0..65c62164219 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
@@ -19,7 +19,7 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { change, click, submit } from 'sonar-ui-common/helpers/testUtils';
+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 8b9c4963097..e22d914d748 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
@@ -19,7 +19,7 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { click } from 'sonar-ui-common/helpers/testUtils';
+import { click } from '../../../../sonar-ui-common/helpers/testUtils';
import Header from '../Header';
it('should create new group', () => {
diff --git a/server/sonar-web/src/main/js/apps/groups/routes.ts b/server/sonar-web/src/main/js/apps/groups/routes.ts
index 854cd1ef120..f57b5528d59 100644
--- a/server/sonar-web/src/main/js/apps/groups/routes.ts
+++ b/server/sonar-web/src/main/js/apps/groups/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 '../../sonar-ui-common/components/lazyLoadComponent';
const routes = [
{