aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx
diff options
context:
space:
mode:
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)}