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

web-interface.assets.bb8c8232-5260.277d142133566768ba73.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"bb8c8232-5260.277d142133566768ba73.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,MAAO,QAAAF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U,WACb,gBAAC,MAAG,CAAC,GAAI,IACLwC,EAA8C,gBAAC,KAAO,IAAC,EAA1C,gBAAC,EAAW,CAAC,QAASxC,CAAA,CAAM,CAC7C,CACF,CACF,CAEJ,C,qBC9DA,IAAI6C,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/EditProfile.tsx","webpack://graylog-web-interface/./src/pages/IndexSetFieldTypeProfileEditPage.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