From 03bb045cca26245804592602c7ff0c6e477f3b8d Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Tue, 16 Jul 2019 13:12:16 +0200 Subject: SC-704 Extract more components (#1921) * Extract BoxedGroupAccordion * Extract Select and SearchSelect * Extract Validation controls * Update sonar-ui-common --- .../src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx | 2 +- .../src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/home') 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 { return null; } - const options: Option[] = languages.map(language => ({ + const options = languages.map(language => ({ label: language.name, value: language.key })); -- cgit v1.2.3