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

web-interface.assets.bb8c8232-3969.2e61a8c0208670a8a632.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"bb8c8232-3969.2e61a8c0208670a8a632.js","mappings":"wgBA6BA,MAAMA,EAAS,UAAO;AAAA;AAAA;AAAA,EAKhBC,EAA6BC,GAC7BA,IAAU,EACL,oDAGF,gBAAC,cAAO,cAAY,IAAQA,CAAK,EAAE,OAAO,KAAK,EAAE,iDAA+C,EAGzG,MAAMC,UAAiC,WAAgB,CACrD,YAAYC,EAAO,CACjB,MAAMA,CAAK,EAab,gCAAyB,IACvB,gBAAC,QAAK,CAAC,QAAS,KAAK,MAAM,QAAU,EAAI,UAAY,UAClDH,EAA0B,KAAK,MAAM,KAAK,EAE3C,gBAAC,IAAa,CAAC,GAAI,KAAO,OAAO,QAAQ,UACvC,gBAAC,SAAM,CAAC,QAAQ,OAAO,OAAO,KAAK,UAAU,cAAa,aAE1D,CACF,CACF,GApBA,KAAK,MAAQ,CAAC,CAChB,CAEA,mBAAoB,CAClB,MAAMI,EAAQ,IAAO,EAAE,SAAS,GAAI,OAAO,EAE3C,IAAqB,MAAMA,CAAK,EAAE,KAAMC,GAAa,CACnD,KAAK,SAAS,CAAE,MAAOA,EAAS,KAAM,CAAC,CACzC,CAAC,CACH,CAcA,QAAS,CACP,IAAIC,EAEJ,OAAI,KAAK,MAAM,QAAU,OACvBA,EAAU,gBAAC,KAAO,IAAC,EAEnBA,EAAU,KAAK,uBAAuB,EAItC,gBAAC,MAAG,CAAC,UAAU,WACb,gBAAC,MAAG,CAAC,GAAI,IACP,gBAACP,EAAA,KACC,gBAAC,UAAG,kBAAgB,EACpB,gBAAC,IAAiB,CAAC,KAAM,IAAW,MAAM,iBAAkB,KAAK,iCAAiC,YAAW,GAAC,CAChH,EACA,gBAAC,KAAE,UAAU,eAAc,uFAE3B,EACCO,CACH,CACF,CAEJ,CACF,CAEA,QAAeJ,C,sQC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U,OACV,aAAc,CACZ,QAAS,OACT,cAAe,MACjB,CACF,EAsIF,WAAec,EAAA,MACbC,EAAA,GAAWf,CAAY,EACvB,CACE,UAAWgB,EAAA,GACX,gBAAiBtB,EACjB,QAASuB,EAAA,EACX,EACA,CAAC,CAAE,UAAAC,EAAW,gBAAAd,EAAiB,QAAAH,CAAQ,KAAO,CAE5C,SAAUiB,EAAYA,EAAU,SAAW,OAE3C,gBAAiBd,GAAmBA,EAAgB,gBAEpD,qBAAsBA,GAAmBA,EAAgB,qBACzD,aAAcH,CAChB,EACF,C,0EC3NA,QANiDkB,GAAgGzE,GAAU,CACzJ,MAAM0E,KAAS,aAAU,EAEzB,OAAO,gBAACD,EAAA,CAAW,GAAGzE,EAAgB,OAAA0E,CAAA,CAAgB,CACxD,C,4JCLO,MAAMC,KAAuB,MAClC,uBACA,IAAM,gBAAmB,CACvB,YAAa,CAAC,EAEd,KAAKC,EAAOC,EAAQ,CAClB,MAAMpE,EAAM,KAAoB,IAAU,6BAA6B,KAAKmE,EAAOC,CAAM,EAAE,GAAG,EAE9F,SAAO,MAAM,MAAOpE,CAAG,CACzB,EAEA,MAAMR,EAAO,CAEX,MAAM6E,GADc7E,EAAM,OAASA,EAAQ,IAAOA,CAAK,GAC1B,OAAO,yBAAyB,EACvDQ,EAAM,KAAoB,IAAU,6BAA6B,MAAMqE,CAAQ,EAAE,GAAG,EAE1F,SAAO,MAAM,MAAOrE,CAAG,CACzB,CACF,CAAC,CACH,C","sources":["webpack://graylog-web-interface/./src/components/indexers/IndexerFailuresComponent.jsx","webpack://graylog-web-interface/./src/components/indexers/IndexerClusterHealthError.tsx","webpack://graylog-web-interface/./src/components/indexers/IndexerClusterHealth.tsx","webpack://graylog-web-interface/./src/components/indexers/IndexerClusterHealthSummary.tsx","webpack://graylog-web-interface/./src/components/indexers/IndexerFailure.jsx","webpack://graylog-web-interface/./src/components/indexers/IndexerFailuresList.jsx","webpack://graylog-web-interface/./src/stores/indexers/IndexerOverviewStore.ts","webpack://graylog-web-interface/./src/pages/IndexSetPage.tsx","webpack://graylog-web-interface/./src/routing/withParams.tsx","webpack://graylog-web-interface/./src/stores/indexers/IndexerFailuresStore.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 React from 'react';\nimport numeral from 'numeral';\nimport moment from 'moment';\nimport styled from 'styled-components';\n\nimport { LinkContainer } from 'components/common/router';\nimport { Alert, Col, Row, Button } from 'components/bootstrap';\nimport { Spinner } from 'components/common';\nimport DocsHelper from 'util/DocsHelper';\nimport Routes from 'routing/Routes';\nimport { DocumentationLink } from 'components/support';\nimport { IndexerFailuresStore } from 'stores/indexers/IndexerFailuresStore';\n\nconst Header = styled.div`\n  display: flex;\n  justify-content: space-between;\n`;\n\nconst formatTextForFailureCount = (count) => {\n  if (count === 0) {\n    return 'No failed indexing attempts in the last 24 hours.';\n  }\n\n  return There were {numeral(count).format('0,0')} failed indexing attempts in the last 24 hours.;\n};\n\nclass IndexerFailuresComponent extends React.Component {\n  constructor(props) {\n    super(props);\n\n    this.state = {};\n  }\n\n  componentDidMount() {\n    const since = moment().subtract(24, 'hours');\n\n    IndexerFailuresStore.count(since).then((response) => {\n      this.setState({ total: response.count });\n    });\n  }\n\n  _formatFailuresSummary = () => (\n    \n      {formatTextForFailureCount(this.state.total)}\n\n      \n        \n      \n    \n  );\n\n  render() {\n    let content;\n\n    if (this.state.total === undefined) {\n      content = ;\n    } else {\n      content = this._formatFailuresSummary();\n    }\n\n    return (\n      \n        \n          
\n

Indexer failures

\n \n
\n

\n Every message that was not successfully indexed will be logged as an indexer failure.\n

\n {content}\n \n
\n );\n }\n}\n\nexport default IndexerFailuresComponent;\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 from 'react';\nimport styled from 'styled-components';\n\nimport { Alert } from 'components/bootstrap';\nimport type FetchError from 'logic/errors/FetchError';\n\nconst ESClusterError = styled(Alert)`\n margin-top: 10px;\n margin-bottom: 5px;\n`;\n\nconst IndexerClusterHealthError = ({ error }: { error: FetchError }) => (\n \n Could not retrieve Elasticsearch cluster health. Fetching Elasticsearch cluster health failed: {error.message}\n \n);\n\nexport default IndexerClusterHealthError;\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 from 'react';\nimport { useQueries } from '@tanstack/react-query';\nimport styled from 'styled-components';\n\nimport { isPermitted } from 'util/PermissionsMixin';\nimport { Spinner } from 'components/common';\nimport { Row, Col } from 'components/bootstrap';\nimport { DocumentationLink } from 'components/support';\nimport DocsHelper from 'util/DocsHelper';\nimport { IndexerClusterHealthSummary } from 'components/indexers';\nimport type FetchError from 'logic/errors/FetchError';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport { fetchPeriodically } from 'logic/rest/FetchProvider';\nimport * as URLUtils from 'util/URLUtils';\nimport useCurrentUser from 'hooks/useCurrentUser';\n\nimport IndexerClusterHealthError from './IndexerClusterHealthError';\n\nconst Header = styled.div`\n display: flex;\n justify-content: space-between;\n`;\n\nconst GET_INDEXER_CLUSTER_HEALTH = 'indexerCluster.health';\nconst GET_INDEXER_CLUSTER_NAME = 'indexerCluster.name';\n\nconst getIndexerClusterHealth = () => {\n const url = URLUtils.qualifyUrl(ApiRoutes.IndexerClusterApiController.health().url);\n\n return fetchPeriodically('GET', url);\n};\n\nconst getIndexerClusterName = () => {\n const url = URLUtils.qualifyUrl(ApiRoutes.IndexerClusterApiController.name().url);\n\n return fetchPeriodically('GET', url);\n};\n\nconst useLoadHealthAndName = (enabled: boolean) => {\n const options = { refetchInterval: 5000, retry: 0, enabled };\n const [\n { data: healthData, isFetching: healthIsFetching, error: healthError, isSuccess: healthIsSuccess, isRefetching: healthIsRefetching },\n { data: nameData, isFetching: nameIsFetching, error: nameError, isSuccess: nameIsSuccess, isRefetching: nameIsRefetching },\n ] = useQueries({\n queries: [\n { queryKey: [GET_INDEXER_CLUSTER_HEALTH], queryFn: getIndexerClusterHealth, ...options },\n { queryKey: [GET_INDEXER_CLUSTER_NAME], queryFn: getIndexerClusterName, ...options },\n ],\n });\n\n return ({\n health: healthData,\n name: nameData,\n error: (healthError || nameError) as FetchError,\n loading: (healthIsFetching || nameIsFetching) && !healthIsRefetching && !nameIsRefetching,\n isSuccess: healthIsSuccess && nameIsSuccess,\n });\n};\n\ntype Props = {\n minimal?: boolean,\n};\n\nconst IndexerClusterHealth = ({ minimal }: Props) => {\n const currentUser = useCurrentUser();\n const userHasRequiredPermissions = isPermitted(currentUser.permissions, 'indexercluster:read');\n const { health, name, loading, error, isSuccess } = useLoadHealthAndName(userHasRequiredPermissions);\n\n if (!userHasRequiredPermissions) {\n return null;\n }\n\n return (\n \n \n {!minimal && (\n
\n

Elasticsearch cluster

\n \n
\n )}\n\n {isSuccess && }\n {loading &&

}\n {error && }\n \n
\n );\n};\n\nIndexerClusterHealth.defaultProps = {\n minimal: false,\n};\n\nexport default IndexerClusterHealth;\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 PropTypes from 'prop-types';\nimport React, { useMemo } from 'react';\nimport styled from 'styled-components';\n\nimport { Alert } from 'components/bootstrap';\nimport { DocumentationLink } from 'components/support';\nimport DocsHelper from 'util/DocsHelper';\n\nconst ESClusterStatus = styled(Alert)`\n margin-top: 10px;\n margin-bottom: 5px;\n`;\n\nconst IndexerClusterHealthSummary = ({ health, name }: {\n health: {\n status: string,\n shards: {\n active: string,\n initializing: string,\n relocating: string,\n unassigned: string\n }\n },\n name?: {\n name: string\n }\n}) => {\n const formattedHealthStatus = health.status.toLowerCase();\n\n const alertClassForHealth = () => {\n switch (formattedHealthStatus) {\n case 'green': return 'success';\n case 'yellow': return 'warning';\n case 'red': return 'danger';\n default: return 'success';\n }\n };\n\n const formattedTextForHealth = useMemo(() => {\n const text = `Elasticsearch cluster ${name?.name || ''} is ${formattedHealthStatus}.`;\n\n switch (formattedHealthStatus) {\n case 'green': return text;\n case 'yellow':\n case 'red': return {text};\n default: return text;\n }\n }, [formattedHealthStatus, name]);\n\n return (\n \n {formattedTextForHealth}{' '}\n Shards:{' '}\n {health.shards.active} active,{' '}\n {health.shards.initializing} initializing,{' '}\n {health.shards.relocating} relocating,{' '}\n {health.shards.unassigned} unassigned,{' '}\n \n \n );\n};\n\nIndexerClusterHealthSummary.defaultProps = {\n name: undefined,\n};\n\nIndexerClusterHealthSummary.propTypes = {\n health: PropTypes.object.isRequired,\n name: PropTypes.object,\n};\n\nexport default IndexerClusterHealthSummary;\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 PropTypes from 'prop-types';\nimport React from 'react';\n\nimport RelativeTime from 'components/common/RelativeTime';\n\nclass IndexerFailure extends React.Component {\n static propTypes = {\n failure: PropTypes.object.isRequired,\n };\n\n render() {\n const { failure } = this.props;\n\n return (\n \n \n {failure.index}\n {failure.letter_id}\n {failure.message}\n \n );\n }\n}\n\nexport default IndexerFailure;\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 PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { Alert, Table } from 'components/bootstrap';\nimport { Icon } from 'components/common';\nimport { IndexerFailure } from 'components/indexers';\n\nclass IndexerFailuresList extends React.Component {\n static propTypes = {\n failures: PropTypes.arrayOf(PropTypes.object).isRequired,\n };\n\n render() {\n if (this.props.failures.length === 0) {\n return (\n Hurray! There are not any indexer failures.\n );\n }\n\n return (\n
\n \n \n \n \n \n \n \n \n \n \n {this.props.failures.map((failure) => )}\n \n
TimestampIndexLetter IDError message
\n
\n );\n }\n}\n\nexport default IndexerFailuresList;\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 Reflux from 'reflux';\n\nimport { qualifyUrl } from 'util/URLUtils';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport { fetchPeriodically } from 'logic/rest/FetchProvider';\nimport { singletonStore, singletonActions } from 'logic/singleton';\n\ntype IndexerOverviewActionsType = {\n list: (indexSetId: string) => Promise,\n}\nexport const IndexerOverviewActions = singletonActions(\n 'core.IndexerOverview',\n () => Reflux.createActions({\n list: { asyncResult: true },\n }),\n);\n\nexport type IndexSummary = {\n size: {\n events: number,\n deleted: number,\n bytes: number,\n },\n range: {\n index_name: string,\n begin: string,\n end: string,\n calculated_at: string,\n took_ms: number,\n },\n is_deflector: boolean,\n is_closed: boolean,\n is_reopened: boolean,\n};\n\nexport type IndexerOverview = {\n deflector: {\n current_target: string,\n is_up: boolean,\n },\n indexer_cluster: {\n health: {\n status: string,\n name: string,\n shards: {\n active: number,\n initializing: number,\n relocating: number,\n unassigned: number,\n },\n },\n },\n counts: {\n [key: string]: number,\n },\n indices: Array,\n};\n\nexport const IndexerOverviewStore = singletonStore(\n 'core.IndexerOverview',\n () => Reflux.createStore({\n listenables: [IndexerOverviewActions],\n indexerOverview: undefined,\n indexerOverviewError: undefined,\n\n getInitialState() {\n return {\n indexerOverview: this.indexerOverview,\n indexerOverviewError: this.indexerOverviewError,\n };\n },\n\n list(indexSetId: string) {\n const url = qualifyUrl(ApiRoutes.IndexerOverviewApiResource.list(indexSetId).url);\n const promise = fetchPeriodically('GET', url);\n\n promise.then(\n (response: IndexerOverview) => {\n this.trigger({ indexerOverview: response, indexerOverviewError: undefined });\n },\n (error) => {\n if (error.additional && error.additional.status === 503) {\n const errorMessage = (error.additional.body && error.additional.body.message\n ? error.additional.body.message\n : 'Elasticsearch is unavailable. Check your configuration and logs for more information.');\n\n this.trigger({ indexerOverviewError: errorMessage });\n }\n },\n );\n\n IndexerOverviewActions.list.promise(promise);\n\n return promise;\n },\n }),\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 from 'react';\nimport PropTypes from 'prop-types';\nimport numeral from 'numeral';\n\nimport HideOnCloud from 'util/conditional/HideOnCloud';\nimport { LinkContainer } from 'components/common/router';\nimport { Alert, Row, Col, Panel, Button, ButtonToolbar } from 'components/bootstrap';\nimport { DocumentTitle, PageHeader, Spinner, Icon } from 'components/common';\nimport {\n IndicesConfigurationDropdown,\n IndicesMaintenanceDropdown,\n IndicesOverview,\n IndexSetDetails,\n IndicesPageNavigation,\n} from 'components/indices';\nimport { IndexerClusterHealthSummary } from 'components/indexers';\nimport DocsHelper from 'util/DocsHelper';\nimport Routes from 'routing/Routes';\nimport withParams from 'routing/withParams';\nimport connect from 'stores/connect';\nimport type { IndexSet } from 'stores/indices/IndexSetsStore';\nimport type { IndexerOverview } from 'stores/indexers/IndexerOverviewStore';\nimport type { Indices } from 'stores/indices/IndicesStore';\nimport { IndexerOverviewActions, IndexerOverviewStore } from 'stores/indexers/IndexerOverviewStore';\nimport { IndexSetsActions, IndexSetsStore } from 'stores/indices/IndexSetsStore';\nimport { IndicesActions, IndicesStore } from 'stores/indices/IndicesStore';\n\nconst REFRESH_INTERVAL = 2000;\n\nconst ElasticsearchUnavailableInformation = () => (\n \n \n
\n Indices overview unavailable}>\n

\n We could not get the indices overview information. This usually means there was a problem\n connecting to Elasticsearch, and you should ensure Elasticsearch is up and reachable from Graylog.\n

\n

\n Graylog will continue storing your messages in its journal, but you will not be able to search on them\n until Elasticsearch is reachable again.\n

\n
\n
\n \n
\n);\n\ntype Props = {\n params: {\n indexSetId?: string,\n },\n indexSet?: IndexSet,\n indexerOverview?: IndexerOverview,\n indexerOverviewError?: string,\n indexDetails: {\n closedIndices?: Indices,\n indices?: Indices,\n },\n};\n\ntype State = {\n timerId?: NodeJS.Timeout,\n};\n\nclass IndexSetPage extends React.Component {\n static propTypes = {\n params: PropTypes.shape({\n indexSetId: PropTypes.string,\n }).isRequired,\n indexSet: PropTypes.object,\n indexerOverview: PropTypes.object,\n indexerOverviewError: PropTypes.object,\n indexDetails: PropTypes.object,\n };\n\n static defaultProps = {\n indexerOverview: undefined,\n indexerOverviewError: undefined,\n indexSet: undefined,\n indexDetails: {\n indices: undefined,\n closedIndices: undefined,\n },\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n timerId: undefined,\n };\n }\n\n componentDidMount() {\n const { params: { indexSetId } } = this.props;\n IndexSetsActions.get(indexSetId);\n IndicesActions.list(indexSetId);\n\n const timerId = setInterval(() => {\n IndicesActions.multiple();\n IndexerOverviewActions.list(indexSetId);\n }, REFRESH_INTERVAL);\n this.setState({ timerId: timerId });\n }\n\n componentWillUnmount() {\n const { timerId } = this.state;\n\n if (timerId) {\n clearInterval(timerId);\n }\n }\n\n _totalIndexCount = () => {\n const { indexerOverview: { indices = [] } } = this.props;\n\n return indices.length;\n };\n\n _isLoading = () => {\n const { indexSet } = this.props;\n\n return !indexSet;\n };\n\n render() {\n if (this._isLoading()) {\n return ;\n }\n\n const { indexSet, indexerOverview, indexerOverviewError, params: { indexSetId }, indexDetails: { indices: indexDetailsIndices, closedIndices: indexDetailsClosedIndices } } = this.props;\n\n const pageHeader = indexSet && (\n \n \n \n \n \n \n \n )}>\n \n This is an overview of all indices (message stores) in this index set Graylog is currently taking in account\n for searches and analysis.\n \n \n );\n\n if (indexerOverviewError) {\n return (\n \n {pageHeader}\n \n \n );\n }\n\n let indicesInfo;\n let indicesOverview;\n\n if (indexerOverview && indexDetailsClosedIndices) {\n const deflectorInfo = indexerOverview.deflector;\n\n indicesInfo = (\n \n \n {this._totalIndexCount()} indices with a total of{' '}\n {numeral(indexerOverview.counts.events).format('0,0')} messages under management,\n current write-active index is {deflectorInfo.current_target}.\n \n \n \n \n \n );\n\n indicesOverview = (\n \n );\n } else {\n indicesInfo = ;\n indicesOverview = ;\n }\n\n return (\n \n \n
\n {pageHeader}\n\n \n \n \n \n \n\n \n \n {indicesInfo}\n \n \n\n {indicesOverview}\n
\n
\n );\n }\n}\n\nexport default connect(\n withParams(IndexSetPage),\n {\n indexSets: IndexSetsStore,\n indexerOverview: IndexerOverviewStore,\n indices: IndicesStore,\n },\n ({ indexSets, indexerOverview, indices }) => ({\n // @ts-ignore\n indexSet: indexSets ? indexSets.indexSet : undefined,\n // @ts-ignore\n indexerOverview: indexerOverview && indexerOverview.indexerOverview,\n // @ts-ignore\n indexerOverviewError: indexerOverview && indexerOverview.indexerOverviewError,\n indexDetails: indices,\n }),\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 * as React from 'react';\nimport { useParams } from 'react-router-dom';\nimport type { Subtract } from 'utility-types';\n\ntype ParamsContext = {\n params: {\n [key: string]: string | null | undefined;\n };\n};\n\nconst withParams = (Component: React.ComponentType): React.ComponentType> => (props) => {\n const params = useParams();\n\n return ;\n};\n\nexport default withParams;\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 Reflux from 'reflux';\nimport moment from 'moment';\n\nimport * as URLUtils from 'util/URLUtils';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport fetch from 'logic/rest/FetchProvider';\nimport { singletonStore } from 'logic/singleton';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const IndexerFailuresStore = singletonStore(\n 'core.IndexerFailures',\n () => Reflux.createStore({\n listenables: [],\n\n list(limit, offset) {\n const url = URLUtils.qualifyUrl(ApiRoutes.IndexerFailuresApiController.list(limit, offset).url);\n\n return fetch('GET', url);\n },\n\n count(since) {\n const momentSince = since.format ? since : moment(since);\n const isoSince = momentSince.format('YYYY-MM-DDTHH:mm:ss.SSS');\n const url = URLUtils.qualifyUrl(ApiRoutes.IndexerFailuresApiController.count(isoSince).url);\n\n return fetch('GET', url);\n },\n }),\n);\n"],"names":["Header","formatTextForFailureCount","count","IndexerFailuresComponent","props","since","response","content","ESClusterError","error","GET_INDEXER_CLUSTER_HEALTH","GET_INDEXER_CLUSTER_NAME","getIndexerClusterHealth","url","URLUtils","ApiRoutes","getIndexerClusterName","useLoadHealthAndName","enabled","options","healthData","healthIsFetching","healthError","healthIsSuccess","healthIsRefetching","nameData","nameIsFetching","nameError","nameIsSuccess","nameIsRefetching","IndexerClusterHealth","minimal","currentUser","useCurrentUser","userHasRequiredPermissions","health","name","loading","isSuccess","DocsHelper","ESClusterStatus","IndexerClusterHealthSummary","formattedHealthStatus","alertClassForHealth","formattedTextForHealth","text","IndexerFailure","failure","RelativeTime","IndexerFailuresList","IndexerOverviewActions","singleton","IndexerOverviewStore","indexSetId","promise","errorMessage","REFRESH_INTERVAL","ElasticsearchUnavailableInformation","IndexSetPage","indices","indexSet","timerId","indexerOverview","indexerOverviewError","indexDetailsIndices","indexDetailsClosedIndices","pageHeader","Routes","indicesInfo","indicesOverview","deflectorInfo","HideOnCloud","connect","withParams","IndexSetsStore","IndicesStore","indexSets","Component","params","IndexerFailuresStore","limit","offset","isoSince"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy