diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2019-07-16 13:12:16 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-07-16 20:21:10 +0200 |
commit | 03bb045cca26245804592602c7ff0c6e477f3b8d (patch) | |
tree | 0d2e536a64eb136b5eafb77955794e0244e5169a /server/sonar-web/src/main/js/apps/quality-profiles | |
parent | 5ed20116d427b617b04e93bb4f2937ad6692803a (diff) | |
download | sonarqube-03bb045cca26245804592602c7ff0c6e477f3b8d.tar.gz sonarqube-03bb045cca26245804592602c7ff0c6e477f3b8d.zip |
SC-704 Extract more components (#1921)
* Extract BoxedGroupAccordion
* Extract Select and SearchSelect
* Extract Validation controls
* Update sonar-ui-common
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles')
5 files changed, 6 insertions, 7 deletions
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 96fdf73db3b..fde6c0583ad 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import Select from '../../../components/controls/Select'; +import Select from 'sonar-ui-common/components/controls/Select'; import { Profile } from '../types'; interface Props { 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 30c2837000d..d50bba64ee8 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 @@ -22,9 +22,9 @@ import { sortBy } from 'lodash'; import { translate } 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 Select from 'sonar-ui-common/components/controls/Select'; import { Profile } from '../types'; import { changeProfileParent } from '../../../api/quality-profiles'; -import Select from '../../../components/controls/Select'; interface Props { onChange: () => 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 7d3ef0b6a1d..f663611028a 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 @@ -21,8 +21,8 @@ import * as React from 'react'; 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 Select from '../../../components/controls/Select'; import Avatar from '../../../components/ui/Avatar'; type Option = T.UserSelected | Group; 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 1cc35ee27fe..89fb516f665 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 @@ -22,12 +22,12 @@ import { sortBy } from 'lodash'; import { translate } 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 Select from 'sonar-ui-common/components/controls/Select'; import { changeProfileParent, createQualityProfile, getImporters } from '../../../api/quality-profiles'; -import Select from '../../../components/controls/Select'; import { Profile } from '../types'; interface Props { 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 7c94219266e..b9a2f6b18fc 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,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Option } from 'react-select'; import { translate } from 'sonar-ui-common/helpers/l10n'; +import Select from 'sonar-ui-common/components/controls/Select'; import { getProfilesPath, getProfilesForLanguagePath } from '../utils'; -import Select from '../../../components/controls/Select'; import { withRouter, Router } from '../../../components/hoc/withRouter'; interface Props { @@ -48,7 +47,7 @@ export class ProfilesListHeader extends React.PureComponent<Props> { return null; } - const options: Option[] = languages.map(language => ({ + const options = languages.map(language => ({ label: language.name, value: language.key })); |