All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.bb8c8232-2340.5f288bc3bf486f8aa033.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"bb8c8232-2340.5f288bc3bf486f8aa033.js","mappings":"mVA8BA,MAAMA,EAAkB,SAAO;AAAA;AAAA,EAIzBC,EAAc,SAAO;AAAA;AAAA;AAAA;AAAA,EAKrBC,EAAO,SAAO;AAAA;AAAA;AAAA,EAIdC,EAAc,SAAO;AAAA;AAAA;AAAA,EAKrBC,EAAO,SAAO;AAAA;AAAA;AAAA,EAKdC,KAAmB,UAAO,IAAU;AAAA;AAAA,EAWpCC,EAAgB,CAACC,EAAeC,IAAwB,CAC5D,GAAI,CAACD,EAAO,MAAO,oBACnB,MAAI,KAAgBA,CAAK,EAAG,MAAO,oBACnC,GAAIC,EAAc,EAAG,MAAO,iCAG9B,EAEMC,EAAYC,GAA6C,CAC7D,MAAMC,EAA2F,CAAC,EAE7FD,EAAW,OACdC,EAAO,KAAO,4BAGhB,MAAMC,EAAoB,IAAQF,EAAW,oBAAqB,OAAO,EAEnEG,EAA8DH,EACjE,oBACA,IAAI,CAAC,CAAE,MAAAH,EAAO,KAAAO,CAAK,IAAM,CACxB,GAAI,EAAAP,GAASO,GAASF,EAAkBL,CAAK,IAAM,GAEnD,MAAQ,CACN,MAAOD,EAAcC,EAAOK,EAAkBL,CAAK,CAAC,EACpD,KAAOO,EAA4B,OAArB,kBAChB,CACF,CAAC,EAEH,OAAID,EAAoB,OAAQE,GAASA,CAAI,EAAE,OAAS,IACtDJ,EAAO,oBAAsBE,GAGxBF,CACT,EAYMK,EAAoB,CAAC,CAAE,SAAAC,EAAU,QAAAC,EAAS,MAAAC,EAAO,KAAAC,EAAM,MAAAC,EAAO,YAAAC,EAAa,YAAAC,CAAY,IAC3F,gBAACvB,EAAA,KACC,gBAAC,QAAK,CAAC,MAAAmB,EAAc,KAAAC,EAAY,GAAIA,CAAA,EACnC,gBAAC,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,EAAa,IAAC,CACjB,CACF,CACF,CAEJ,C,qBC1DA,IAAIC,EAAkB,EAAQ,UAAoB,EAC9CC,EAAmB,EAAQ,UAAqB,EAGhDC,EAAc,OAAO,UAGrBC,EAAiBD,EAAY,eAwB7BE,EAAUH,EAAiB,SAASI,EAAQ5D,EAAO6D,EAAK,CACtDH,EAAe,KAAKE,EAAQC,CAAG,EACjC,EAAED,EAAOC,CAAG,EAEZN,EAAgBK,EAAQC,EAAK,CAAC,CAElC,CAAC,EAEDC,EAAO,QAAUH,C","sources":["webpack://graylog-web-interface/./src/components/indices/IndexSetFieldTypeProfiles/ProfileForm.tsx","webpack://graylog-web-interface/./src/components/indices/IndexSetFieldTypeProfiles/hooks/useProfileMutations.ts","webpack://graylog-web-interface/./src/components/indices/IndexSetFieldTypeProfiles/CreateProfile.tsx","webpack://graylog-web-interface/./src/pages/IndexSetFieldTypeProfileCreatePage.tsx","webpack://graylog-web-interface/./node_modules/lodash/countBy.js"],"sourcesContent":["/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n\nimport { styled } from 'styled-components';\nimport React, { useMemo } from 'react';\nimport { Formik, Form, FieldArray, Field } from 'formik';\nimport countBy from 'lodash/countBy';\n\nimport type { IndexSetFieldTypeProfileForm } from 'components/indices/IndexSetFieldTypeProfiles/types';\nimport { FormikInput, IconButton, Select, FormSubmit, Spinner, InputOptionalInfo } from 'components/common';\nimport { Button, Col, HelpBlock, Input } from 'components/bootstrap';\nimport useFieldTypes from 'views/logic/fieldtypes/useFieldTypes';\nimport useFieldTypesForMapping from 'views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings';\nimport { defaultCompare } from 'logic/DefaultCompare';\nimport isReservedField from 'views/logic/IsReservedField';\n\nconst SelectContainer = styled.div`\n  flex-basis: 100%;\n`;\n\nconst SelectGroup = styled.div`\n  flex-grow: 1;\n  display: flex;\n  gap: 5px;\n`;\nconst List = styled.div`\n  display: flex;\n  flex-direction: column;\n`;\nconst StyledLabel = styled.h5`\n  font-weight: bold;\n  margin-bottom: 5px;\n`;\n\nconst Item = styled.div`\n  display: flex;\n  gap: 5px;\n`;\n\nconst StyledFormSubmit = styled(FormSubmit)`\n  margin-top: 30px;\n`;\ntype Props = {\n  initialValues?: IndexSetFieldTypeProfileForm,\n  submitButtonText: string,\n  submitLoadingText: string,\n  onCancel: () => void,\n  onSubmit: (profile: IndexSetFieldTypeProfileForm) => void\n}\n\nconst getFieldError = (field: string, occurrences: number) => {\n  if (!field) return 'Field is required';\n  if (isReservedField(field)) return 'Field is reserved';\n  if (occurrences > 1) return 'This field occurs several times';\n\n  return undefined;\n};\n\nconst validate = (formValues: IndexSetFieldTypeProfileForm) => {\n  const errors: { name?: string, customFieldMappings?: Array<{ field?: string, type?: string }>} = {};\n\n  if (!formValues.name) {\n    errors.name = 'Profile name is required';\n  }\n\n  const fieldsOccurrences = countBy(formValues.customFieldMappings, 'field');\n\n  const customFieldMappings: Array<{ field: string, type: string }> = formValues\n    .customFieldMappings\n    .map(({ field, type }) => {\n      if (field && type && (fieldsOccurrences[field] === 1)) return undefined;\n\n      return ({\n        field: getFieldError(field, fieldsOccurrences[field]),\n        type: !type ? 'Type is required' : undefined,\n      });\n    });\n\n  if (customFieldMappings.filter((item) => item).length > 0) {\n    errors.customFieldMappings = customFieldMappings;\n  }\n\n  return errors;\n};\n\ntype ProfileFormSelectProps = {\n  onChange: (param: { target: { value: string, name: string } }) => void,\n  options: Array<{ value: string, label: string, disabled?: boolean }>,\n  error: string,\n  name: string,\n  value: string | undefined | null,\n  placeholder: string,\n  allowCreate: boolean,\n}\n\nconst ProfileFormSelect = ({ onChange, options, error, name, value, placeholder, allowCreate }: ProfileFormSelectProps) => (\n  \n    \n