aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-12-05 17:32:18 +0100
committerSonarTech <sonartech@sonarsource.com>2018-12-05 20:20:59 +0100
commit41c98779d38bda9fdfdca182a5f20c73fcff9a84 (patch)
treed895a9f8bfd0276aee5ffacf7bb33a0109436cbd /server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx
parenta9c22c1185c5fd8c8dc4c9388f4a3b967e3f463d (diff)
downloadsonarqube-41c98779d38bda9fdfdca182a5f20c73fcff9a84.tar.gz
sonarqube-41c98779d38bda9fdfdca182a5f20c73fcff9a84.zip
create global type definitions (#1017)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx19
1 files changed, 9 insertions, 10 deletions
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx
index 7f611e1e1a0..274cb51551b 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx
@@ -30,20 +30,19 @@ import {
DefaultInputProps,
DefaultSpecializedInputProps
} from '../../utils';
-import { SettingType } from '../../../../app/types';
const typeMapping: {
- [type in SettingType]?:
+ [type in T.SettingType]?:
| React.ComponentClass<DefaultSpecializedInputProps>
| React.StatelessComponent<DefaultSpecializedInputProps>
} = {
- [SettingType.String]: InputForString,
- [SettingType.Text]: InputForText,
- [SettingType.Password]: InputForPassword,
- [SettingType.Boolean]: InputForBoolean,
- [SettingType.Integer]: InputForNumber,
- [SettingType.Long]: InputForNumber,
- [SettingType.Float]: InputForNumber
+ STRING: InputForString,
+ TEXT: InputForText,
+ PASSWORD: InputForPassword,
+ BOOLEAN: InputForBoolean,
+ INTEGER: InputForNumber,
+ LONG: InputForNumber,
+ FLOAT: InputForNumber
};
interface Props extends DefaultInputProps {
@@ -57,7 +56,7 @@ export default class PrimitiveInput extends React.PureComponent<Props> {
const name = this.props.name || getUniqueName(definition);
- if (definition.type === SettingType.SingleSelectList) {
+ if (definition.type === 'SINGLE_SELECT_LIST') {
return (
<InputForSingleSelectList
isDefault={isDefaultOrInherited(setting)}