diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-12-05 17:32:18 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-12-05 20:20:59 +0100 |
commit | 41c98779d38bda9fdfdca182a5f20c73fcff9a84 (patch) | |
tree | d895a9f8bfd0276aee5ffacf7bb33a0109436cbd /server/sonar-web/src/main/js/apps/groups | |
parent | a9c22c1185c5fd8c8dc4c9388f4a3b967e3f463d (diff) | |
download | sonarqube-41c98779d38bda9fdfdca182a5f20c73fcff9a84.tar.gz sonarqube-41c98779d38bda9fdfdca182a5f20c73fcff9a84.zip |
create global type definitions (#1017)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/groups')
7 files changed, 8 insertions, 15 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 3742549abdb..78af399e5a5 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 @@ -24,7 +24,6 @@ import List from './List'; import forSingleOrganization from '../../organizations/forSingleOrganization'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import { searchUsersGroups, deleteGroup, updateGroup, createGroup } from '../../../api/user_groups'; -import { Group, Paging } from '../../../app/types'; import ListFooter from '../../../components/controls/ListFooter'; import SearchBox from '../../../components/controls/SearchBox'; import { translate } from '../../../helpers/l10n'; @@ -34,9 +33,9 @@ interface Props { } interface State { - groups?: Group[]; + groups?: T.Group[]; loading: boolean; - paging?: Paging; + paging?: T.Paging; query: string; } 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 a1a3a495677..27510f29e35 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,14 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Group } from '../../../app/types'; import SimpleModal from '../../../components/controls/SimpleModal'; import DeferredSpinner from '../../../components/common/DeferredSpinner'; import { SubmitButton, ResetButtonLink } from '../../../components/ui/buttons'; import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Props { - group: Group; + group: T.Group; onClose: () => void; onSubmit: () => Promise<void>; } 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 b149628988d..f9ba6d44efc 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 @@ -19,12 +19,11 @@ */ import * as React from 'react'; import EditMembersModal from './EditMembersModal'; -import { Group } from '../../../app/types'; import BulletListIcon from '../../../components/icons-components/BulletListIcon'; import { ButtonIcon } from '../../../components/ui/buttons'; interface Props { - group: Group; + group: T.Group; onEdit: () => void; organization: string | undefined; } 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 097ff47354b..0118f637394 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 @@ -29,11 +29,10 @@ import { addUserToGroup, getUsersInGroup } from '../../../api/user_groups'; -import { Group } from '../../../app/types'; import DeferredSpinner from '../../../components/common/DeferredSpinner'; interface Props { - group: Group; + group: T.Group; onClose: () => void; organization: string | undefined; } 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 8d1e4fc8434..b17b6d86d98 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,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Group } from '../../../app/types'; import DeferredSpinner from '../../../components/common/DeferredSpinner'; import SimpleModal from '../../../components/controls/SimpleModal'; import { ResetButtonLink, SubmitButton } from '../../../components/ui/buttons'; @@ -26,7 +25,7 @@ import { translate } from '../../../helpers/l10n'; interface Props { confirmButtonText: string; - group?: Group; + group?: T.Group; header: string; onClose: () => void; onSubmit: (data: { description: string; name: string }) => Promise<void>; 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 1971e243c15..ba46b2a2844 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 @@ -20,11 +20,10 @@ import * as React from 'react'; import { sortBy } from 'lodash'; import ListItem from './ListItem'; -import { Group } from '../../../app/types'; import { translate } from '../../../helpers/l10n'; interface Props { - groups: Group[]; + groups: T.Group[]; onDelete: (name: string) => Promise<void>; onEdit: (data: { description?: string; id: number; name?: string }) => Promise<void>; onEditMembers: () => void; 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 a1f2f8ba611..c6275faa960 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,7 +21,6 @@ import * as React from 'react'; import DeleteForm from './DeleteForm'; import EditMembers from './EditMembers'; import Form from './Form'; -import { Group } from '../../../app/types'; import ActionsDropdown, { ActionsDropdownItem, ActionsDropdownDivider @@ -30,7 +29,7 @@ import { translate } from '../../../helpers/l10n'; import { omitNil } from '../../../helpers/request'; interface Props { - group: Group; + group: T.Group; onDelete: (name: string) => Promise<void>; onEdit: (data: { description?: string; id: number; name?: string }) => Promise<void>; onEditMembers: () => void; |