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

web-interface.assets.57e33c6c-98.11b9f72925818240e61d.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
{"version":3,"sources":["webpack:///./src/components/indices/Types.ts","webpack:///./src/pages/IndexSetCreationPage.tsx"],"names":["SizeBasedRotationStrategyConfigPropType","PropTypes","exact","type","string","isRequired","max_size","number","MessageCountRotationStrategyConfigPropType","max_docs_per_index","TimeBasedRotationStrategyConfigPropType","rotation_period","max_rotation_period","RotationStrategyConfigPropType","oneOfType","RetentionStrategyConfigPropType","max_number_of_indices","index_action","JsonSchemaStringPropertyTypePropType","JsonSchemaIndexActionPropertyTypePropType","enum","arrayOf","RotationPropertiesPropType","RotationJsonSchemaPropType","id","properties","RetentionPropertiesPropType","RetentionJsonSchemaPropType","RotationStrategyPropType","default_config","json_schema","RetentionStrategyPropType","IndexSetPropType","shape","can_be_default","bool","title","description","index_prefix","shards","replicas","rotation_strategy_class","rotation_strategy","retention_strategy_class","retention_strategy","creation_date","index_analyzer","index_optimization_max_num_segments","index_optimization_disabled","field_type_refresh_interval","index_template_type","writable","default","CombinedProvider","get","IndexSetsActions","IndexSetsStore","IndicesConfigurationActions","IndicesConfigurationStore","IndexSetCreationPage","retentionStrategies","rotationStrategies","indexSet","useEffect","loadRotationStrategies","loadRetentionStrategies","defaultIndexSet","page","DocsHelper","PAGES","INDEX_MODEL","text","to","Routes","SYSTEM","INDICES","LIST","bsStyle","className","md","create","cancelLink","onUpdate","indexSetItem","copy","DateTime","now","toISOString","then","history","push","propTypes","defaultProps","undefined","connect","indexSets","indicesConfigurations"],"mappings":"wVA8FaA,EAA0CC,IAAUC,MAAM,CACrEC,KAAMF,IAAUG,OAAOC,WACvBC,SAAUL,IAAUM,OAAOF,aAEhBG,EAA6CP,IAAUC,MAAM,CACxEC,KAAMF,IAAUG,OAAOC,WACvBI,mBAAoBR,IAAUM,OAAOF,aAE1BK,EAA0CT,IAAUC,MAAM,CACrEC,KAAMF,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A,EACpBD,oBAAqBA,EACrBoB,QAAM,EACNC,WAAYR,IAAOC,OAAOC,QAAQC,KAClCM,SAlDV,SAACC,GAC1B,IAAMC,EAAOD,EAEbC,EAAKvC,cAAgBwC,IAASC,MAAMC,cAEpChC,EAAiByB,OAAOI,GAAMI,MAAK,WACjCC,IAAQC,KAAKjB,IAAOC,OAAOC,QAAQC,iBAoDzCjB,EAAqBgC,UAAY,CAC/B/B,oBAAqB3D,IAAUoB,QAAQU,GACvC8B,mBAAoB5D,IAAUoB,QAAQO,GACtCkC,SAAU9B,GAGZ2B,EAAqBiC,aAAe,CAClChC,yBAAqBiC,EACrBhC,wBAAoBgC,EACpB/B,SAAU,CACR1B,MAAO,GACPC,YAAa,GACbC,aAAc,GACda,UAAU,EACVjB,gBAAgB,EAChBK,OAAQ,EACRC,SAAU,EACVG,yBAA0B,sEAC1BC,mBAAoB,CAClB5B,sBAAuB,GACvBb,KAAM,6EAERsC,wBAAyB,8EACzBC,kBAAmB,CACjBjC,mBAAoB,IACpBN,KAAM,+EAER2C,eAAgB,WAChBC,oCAAqC,EACrCC,6BAA6B,EAC7BC,4BAA6B,MAIlB6C,sBACbnC,EACA,CACEoC,UAAWvC,EACXwC,sBAAuBtC,IAEzB,gBAAGqC,EAAH,EAAGA,UAAWC,EAAd,EAAcA,sBAAd,MAA2C,CACzClC,SAAUiC,EAAUjC,SACpBD,mBAAoBmC,EAAsBnC,mBAC1CD,oBAAqBoC,EAAsBpC","file":"57e33c6c-98.11b9f72925818240e61d.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 */\nimport PropTypes from 'prop-types';\n\nexport type IndicesConfigurationActionsType = {\n  loadRotationStrategies: () => Promise,\n  loadRetentionStrategies: () => Promise,\n};\nexport type IndicesConfigurationStoreState = {\n  activeRotationConfig: any,\n  rotationStrategies: any,\n  activeRetentionConfig: any,\n  retentionStrategies: any,\n}\nexport type SizeBasedRotationStrategyConfig = {\n  type: string,\n  max_size: number,\n}\nexport type MessageCountRotationStrategyConfig = {\n  type: string,\n  max_docs_per_index: number,\n}\nexport type TimeBasedRotationStrategyConfig = {\n  type: string,\n  rotation_period: string,\n  max_rotation_period: string,\n}\nexport type RotationStrategyConfig = SizeBasedRotationStrategyConfig | MessageCountRotationStrategyConfig| TimeBasedRotationStrategyConfig;\nexport type RetentionStrategyConfig = {\n  type: string,\n  max_number_of_indices?: number,\n  index_action?: string,\n}\nexport interface JsonSchemaStringPropertyType {\n  type: string,\n}\nexport interface JsonSchemaIndexActionPropertyType {\n  type: string,\n  enum: Array,\n}\nexport interface RotationProperties {\n  rotation_period?: JsonSchemaStringPropertyType,\n  max_rotation_period?: JsonSchemaStringPropertyType,\n  type: JsonSchemaStringPropertyType,\n  max_size?: JsonSchemaStringPropertyType,\n}\nexport interface RotationJsonSchema {\n  type: string,\n  id: string,\n  properties: RotationProperties,\n}\nexport interface RetentionProperties {\n  max_number_of_indices: JsonSchemaStringPropertyType,\n  type: JsonSchemaStringPropertyType,\n  index_action?: JsonSchemaIndexActionPropertyType,\n}\nexport interface RetentionJsonSchema {\n  type: string,\n  id: string,\n  properties: RetentionProperties,\n}\nexport interface RotationStrategy {\n  type: string,\n  default_config: RotationStrategyConfig,\n  json_schema: RotationJsonSchema,\n}\nexport interface RetentionStrategy {\n  type: string,\n  default_config: RetentionStrategyConfig,\n  json_schema: RetentionJsonSchema,\n}\nexport interface RotationStrategyResponse {\n  total: number,\n  strategies: Array,\n}\nexport interface RetentionStrategyResponse {\n  total: number,\n  strategies: Array,\n}\n\nexport const SizeBasedRotationStrategyConfigPropType = PropTypes.exact({\n  type: PropTypes.string.isRequired,\n  max_size: PropTypes.number.isRequired,\n});\nexport const MessageCountRotationStrategyConfigPropType = PropTypes.exact({\n  type: PropTypes.string.isRequired,\n  max_docs_per_index: PropTypes.number.isRequired,\n});\nexport const TimeBasedRotationStrategyConfigPropType = PropTypes.exact({\n  type: PropTypes.string.isRequired,\n  rotation_period: PropTypes.string.isRequired,\n  max_rotation_period: PropTypes.string,\n});\n\nexport const RotationStrategyConfigPropType = PropTypes.oneOfType([\n  SizeBasedRotationStrategyConfigPropType,\n  MessageCountRotationStrategyConfigPropType,\n  TimeBasedRotationStrategyConfigPropType,\n]);\n\nexport const IndexActionPropType = PropTypes.string;\nexport const RetentionStrategyConfigPropType = PropTypes.exact({\n  type: PropTypes.string.isRequired,\n  max_number_of_indices: PropTypes.number,\n  index_action: PropTypes.string,\n});\n\nexport const JsonSchemaStringPropertyTypePropType = PropTypes.exact({\n  type: PropTypes.string.isRequired,\n});\nexport const JsonSchemaIndexActionPropertyTypePropType = PropTypes.exact({\n  type: PropTypes.string.isRequired,\n  enum: PropTypes.arrayOf(PropTypes.string).isRequired,\n});\nexport const RotationPropertiesPropType = PropTypes.exact({\n  rotation_period: JsonSchemaStringPropertyTypePropType,\n  max_rotation_period: JsonSchemaStringPropertyTypePropType,\n  type: JsonSchemaStringPropertyTypePropType.isRequired,\n  max_size: JsonSchemaStringPropertyTypePropType,\n});\nexport const RotationJsonSchemaPropType = PropTypes.exact({\n  type: PropTypes.string,\n  id: PropTypes.string,\n  properties: RotationPropertiesPropType.isRequired,\n});\nexport const RetentionPropertiesPropType = PropTypes.exact({\n  max_number_of_indices: JsonSchemaStringPropertyTypePropType.isRequired,\n  type: JsonSchemaStringPropertyTypePropType.isRequired,\n  index_action: JsonSchemaIndexActionPropertyTypePropType,\n});\nexport const RetentionJsonSchemaPropType = PropTypes.exact({\n  type: PropTypes.string,\n  id: PropTypes.string,\n  properties: RetentionPropertiesPropType,\n});\nexport const RotationStrategyPropType = PropTypes.exact({\n  type: PropTypes.string.isRequired,\n  default_config: RotationStrategyConfigPropType.isRequired,\n  json_schema: RotationJsonSchemaPropType.isRequired,\n});\nexport const RetentionStrategyPropType = PropTypes.exact({\n  type: PropTypes.string.isRequired,\n  default_config: RetentionStrategyConfigPropType.isRequired,\n  json_schema: RetentionJsonSchemaPropType.isRequired,\n});\nexport const IndexSetPropType = PropTypes.shape({\n  can_be_default: PropTypes.bool,\n  id: PropTypes.string,\n  title: PropTypes.string,\n  description: PropTypes.string.isRequired,\n  index_prefix: PropTypes.string.isRequired,\n  shards: PropTypes.number.isRequired,\n  replicas: PropTypes.number.isRequired,\n  rotation_strategy_class: PropTypes.string.isRequired,\n  rotation_strategy: RotationStrategyConfigPropType.isRequired,\n  retention_strategy_class: PropTypes.string.isRequired,\n  retention_strategy: RetentionStrategyConfigPropType.isRequired,\n  creation_date: PropTypes.string,\n  index_analyzer: PropTypes.string.isRequired,\n  index_optimization_max_num_segments: PropTypes.number.isRequired,\n  index_optimization_disabled: PropTypes.bool.isRequired,\n  field_type_refresh_interval: PropTypes.number.isRequired,\n  index_template_type: PropTypes.string,\n  writable: PropTypes.bool.isRequired,\n  default: PropTypes.bool,\n});\nexport type IndexSet = {\n  can_be_default?: boolean,\n  id?: string,\n  title: string,\n  description: string,\n  index_prefix: string,\n  shards: number,\n  replicas: number,\n  rotation_strategy_class: string,\n  rotation_strategy: RotationStrategyConfig,\n  retention_strategy_class: string,\n  retention_strategy: RetentionStrategyConfig\n  creation_date?: string,\n  index_analyzer: string,\n  index_optimization_max_num_segments: number,\n  index_optimization_disabled: boolean,\n  field_type_refresh_interval: number,\n  index_template_type?: string,\n  writable: boolean,\n  default?: boolean,\n};\n\nexport type IndexSetStats = {\n  [key: string]: {\n    documents: number,\n    indices: number,\n    size: number,\n  },\n}\nexport type IndexSetsResponseType = {\n  total: number,\n  index_sets: Array,\n  stats: IndexSetStats,\n};\nexport type IndexSetsStoreState = {\n  indexSetsCount: number,\n  indexSets: Array,\n  indexSetStats: IndexSetStats,\n  indexSet: IndexSet,\n}\n","/*\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 */\nimport React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { LinkContainer } from 'components/graylog/router';\nimport { Row, Col, Button } from 'components/graylog';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport { IndexSetConfigurationForm } from 'components/indices';\nimport { DocumentationLink } from 'components/support';\nimport DateTime from 'logic/datetimes/DateTime';\nimport history from 'util/History';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport DocsHelper from 'util/DocsHelper';\nimport Routes from 'routing/Routes';\nimport connect from 'stores/connect';\nimport {\n  IndexSet,\n  RetentionStrategy,\n  RotationStrategy,\n  IndicesConfigurationStoreState,\n  RetentionStrategyPropType,\n  RotationStrategyPropType,\n  IndexSetsStoreState,\n  IndexSetPropType,\n} from 'components/indices/Types';\nimport { Store } from 'stores/StoreTypes';\n\nconst { IndexSetsActions, IndexSetsStore } = CombinedProvider.get('IndexSets');\nconst { IndicesConfigurationActions, IndicesConfigurationStore } = CombinedProvider.get('IndicesConfiguration');\ntype Props = {\n  indexSet: Partial | null | undefined,\n  retentionStrategies?: Array | null | undefined,\n  rotationStrategies?: Array | null | undefined,\n}\n\nconst IndexSetCreationPage = ({ retentionStrategies, rotationStrategies, indexSet }: Props) => {\n  useEffect(() => {\n    IndicesConfigurationActions.loadRotationStrategies();\n    IndicesConfigurationActions.loadRetentionStrategies();\n  }, []);\n\n  const _saveConfiguration = (indexSetItem: IndexSet) => {\n    const copy = indexSetItem;\n\n    copy.creation_date = DateTime.now().toISOString();\n\n    IndexSetsActions.create(copy).then(() => {\n      history.push(Routes.SYSTEM.INDICES.LIST);\n    });\n  };\n\n  const _isLoading = () => {\n    return !rotationStrategies || !retentionStrategies;\n  };\n\n  if (_isLoading()) {\n    return ;\n  }\n\n  const defaultIndexSet = {\n    ...indexSet,\n    rotation_strategy_class: rotationStrategies[0].type,\n    rotation_strategy: rotationStrategies[0].default_config,\n  };\n\n  return (\n    \n      
\n \n \n Create a new index set that will let you configure the retention, sharding, and replication of messages\n coming from one or more streams.\n \n \n You can learn more about the index model in the{' '}\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n
\n
\n );\n};\n\nIndexSetCreationPage.propTypes = {\n retentionStrategies: PropTypes.arrayOf(RetentionStrategyPropType),\n rotationStrategies: PropTypes.arrayOf(RotationStrategyPropType),\n indexSet: IndexSetPropType,\n};\n\nIndexSetCreationPage.defaultProps = {\n retentionStrategies: undefined,\n rotationStrategies: undefined,\n indexSet: {\n title: '',\n description: '',\n index_prefix: '',\n writable: true,\n can_be_default: true,\n shards: 4,\n replicas: 0,\n retention_strategy_class: 'org.graylog2.indexer.retention.strategies.DeletionRetentionStrategy',\n retention_strategy: {\n max_number_of_indices: 20,\n type: 'org.graylog2.indexer.retention.strategies.DeletionRetentionStrategyConfig',\n },\n rotation_strategy_class: 'org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategyConfig',\n rotation_strategy: {\n max_docs_per_index: 20000000,\n type: 'org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategyConfig',\n },\n index_analyzer: 'standard',\n index_optimization_max_num_segments: 1,\n index_optimization_disabled: false,\n field_type_refresh_interval: 5 * 1000, // 5 seconds\n },\n};\n\nexport default connect(\n IndexSetCreationPage,\n {\n indexSets: IndexSetsStore as Store,\n indicesConfigurations: IndicesConfigurationStore as Store,\n },\n ({ indexSets, indicesConfigurations }) => ({\n indexSet: indexSets.indexSet,\n rotationStrategies: indicesConfigurations.rotationStrategies,\n retentionStrategies: indicesConfigurations.retentionStrategies,\n }),\n);\n"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy