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

web-interface.assets.1255d548-3848.1148bc2aaad4f5308986.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"1255d548-3848.1148bc2aaad4f5308986.js","mappings":"4NAGIA,EAA0B,IAA4B,GAAqC,EAE/FA,EAAwB,KAAK,CAACC,EAAO,GAAI;AAAA;AAAA;AAAA,GAGrC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,sDAAsD,EAAE,MAAQ,CAAC,EAAE,SAAW,iCAAiC,eAAiB,CAAC;AAAA;AAAA;AAAA,EAAwE,EAAE,WAAa,EAAE,CAAC,CAAC,EAE3PD,EAAwB,OAAS,CAChC,kBAAqB,sBACtB,EACA,QAAeA,C,6ICGf,MAAME,EAAkB,IAAO,GAM/B,MAAMC,CAAuB,CAC3B,aAAc,CACZ,KAAK,WAAa,IACpB,CAMA,SAASC,EAAcC,EAAS,CAC1B,KAAK,aAIT,KAAK,WAAa,WAAW,IAAM,CACjC,KAAK,WAAa,KAClBD,EAAa,CACf,EAAGC,GAAWH,CAAe,EAC/B,CACF,CAEA,QAAeC,E,6ICRR,MAAMG,KAAwBC,EAAA,IACnC,sBACA,IAAM,kBAAgD,CACpD,WAAY,CAAE,YAAa,EAAK,CAClC,CAAC,CACH,EAEaC,KAAsBD,EAAA,IACjC,sBACA,IAAM,gBAA6C,CACjD,YAAa,CAACD,CAAqB,EACnC,QAAS,OAET,iBAAkB,CAChB,MAAO,CAAE,QAAS,KAAK,OAAQ,CACjC,EAEA,WAAWG,EAAc,CACvB,MAAMC,KAAU,MAAM,MAAOC,EAAA,GAAoB,gCAAgCF,CAAI,cAAc,CAAC,EAEpG,OAAAC,EAAQ,KAAME,GAAa,CACzB,KAAK,QAAQ,CAAE,QAASA,CAAS,CAAC,CACpC,CAAC,EAEMF,CACT,CACF,CAAC,CACH,E,qJCpCO,MAAMG,EAAqBC,GAAqB,CAIrD,MAAMC,EAHM,IAAY,IAAID,EAAS,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,cAAY,EAAwB,GAC7F,CACF,EAEA,gBAAC,IAAsB,CAAC,OAAO,WAC7B,gBAAC,EAAU,IAAC,CACd,EACA,gBAAC4C,EAAA,EAAW,KACV,gBAAC,MAAG,CAAC,UAAU,WACb,gBAAC,MAAG,CAAC,GAAI,GACP,gBAACF,EAAA,KAAwB,oBAAkB,EAC3C,gBAAC,SAAE,yTAKH,EACA,gBAACC,EAAA,CAAqB,KAAK,qDAAqD,UAAAzC,CAAA,EAAsB,aAEtG,CACF,EACA,gBAAC,MAAG,CAAC,GAAI,GACP,gBAACwC,EAAA,KAAwB,kBAAgB,EACzC,gBAAC,SAAE,oSAKH,EACA,gBAACC,EAAA,CAAqB,KAAK,mDAAmD,eAAe,oBAAoB,UAAAzC,CAAA,EAAsB,aAEvI,CACF,CACF,CACF,CACF,CACF,CAEJ,C","sources":["webpack://graylog-web-interface/./src/components/enterprise/PluginList.css","webpack://graylog-web-interface/./src/util/EventHandlersThrottler.js","webpack://graylog-web-interface/./src/stores/cluster/ClusterTrafficStore.ts","webpack://graylog-web-interface/./src/util/TrafficUtils.ts","webpack://graylog-web-interface/./src/components/cluster/TrafficGraph.tsx","webpack://graylog-web-interface/./src/components/cluster/GraylogClusterOverview.tsx","webpack://graylog-web-interface/./src/components/enterprise/PluginList.css?b5bf","webpack://graylog-web-interface/./src/components/enterprise/PluginList.jsx","webpack://graylog-web-interface/./src/components/enterprise/EnterpriseProductLink.tsx","webpack://graylog-web-interface/./src/components/enterprise/ProductLink.tsx","webpack://graylog-web-interface/./src/pages/EnterprisePage.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.cjdTbV1r05BfMiQpw0HR {\n  margin-left: 0;\n  padding-left: 0;\n}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/enterprise/PluginList.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,cAAc;EACd,eAAe;AACjB\",\"sourcesContent\":[\":local(.enterprisePlugins) {\\n  margin-left: 0;\\n  padding-left: 0;\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"enterprisePlugins\": `cjdTbV1r05BfMiQpw0HR`\n};\nexport default ___CSS_LOADER_EXPORT___;\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 */\nconst DEFAULT_TIMEOUT = 1000 / 10; // 10 fps\n\n/**\n * Use when an event handler should be called after a timeout, instead of every time the event is triggered.\n * This is specially useful for handling window resize callbacks that may be expensive.\n */\nclass EventHandlersThrottler {\n  constructor() {\n    this.eventMutex = null;\n  }\n\n  /**\n   * @param eventHandler Callback actually handling the event\n   * @param timeout (optional) Time to wait before calling the callback\n   */\n  throttle(eventHandler, timeout) {\n    if (this.eventMutex) {\n      return;\n    }\n\n    this.eventMutex = setTimeout(() => {\n      this.eventMutex = null;\n      eventHandler();\n    }, timeout || DEFAULT_TIMEOUT);\n  }\n}\n\nexport default EventHandlersThrottler;\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 * as URLUtils from 'util/URLUtils';\nimport fetch from 'logic/rest/FetchProvider';\nimport { singletonStore, singletonActions } from 'logic/singleton';\n\ntype ClusterTrafficStoreState = {\n  traffic: {\n    from: string,\n    to: string,\n    output: Record,\n    input: Record,\n    decoded: Record,\n  },\n};\ntype ClusterTrafficActionsType = {\n  getTraffic: (days: number) => Promise,\n};\n\nexport const ClusterTrafficActions = singletonActions(\n  'core.ClusterTraffic',\n  () => Reflux.createActions({\n    getTraffic: { asyncResult: true },\n  }),\n);\n\nexport const ClusterTrafficStore = singletonStore(\n  'core.ClusterTraffic',\n  () => Reflux.createStore({\n    listenables: [ClusterTrafficActions],\n    traffic: undefined,\n\n    getInitialState() {\n      return { traffic: this.traffic };\n    },\n\n    getTraffic(days: number) {\n      const promise = fetch('GET', URLUtils.qualifyUrl(`/system/cluster/traffic?days=${days}&daily=false`));\n\n      promise.then((response) => {\n        this.trigger({ traffic: response });\n      });\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 map from 'lodash/map';\nimport mapKeys from 'lodash/mapKeys';\nimport mapValues from 'lodash/mapValues';\nimport moment from 'moment';\nimport crossfilter from 'crossfilter';\n\ntype Traffic = {\n   [key: string]: number,\n}\n\nexport const formatTrafficData = (traffic: Traffic) => {\n  const ndx = crossfilter(map(traffic, (value, key) => ({ ts: key, bytes: value })));\n  const dailyTraffic = ndx.dimension((d) => moment(d.ts).format('YYYY-MM-DD'));\n\n  const dailySums = dailyTraffic.group().reduceSum((d) => d.bytes);\n  const t = mapKeys(dailySums.all(), (entry) => moment.utc(entry.key, 'YYYY-MM-DD').toISOString());\n\n  return mapValues(t, (val) => val.value);\n};\n\nexport default {\n  formatTrafficData,\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';\n\nimport { Spinner } from 'components/common';\nimport GenericPlot from 'views/components/visualizations/GenericPlot';\n\ntype Props = {\n  traffic: { [key: string]: number },\n  width: number,\n  layoutExtension?: {},\n};\n\nconst TrafficGraph = ({ width, traffic, layoutExtension }: Props) => {\n  if (!traffic) {\n    return ;\n  }\n\n  const chartData = [{\n    type: 'bar',\n    x: Object.keys(traffic),\n    y: Object.values(traffic),\n  }];\n  const layout = {\n    showlegend: false,\n    margin: {\n      l: 60,\n    },\n    xaxis: {\n      type: 'date',\n      title: {\n        text: 'Time',\n      },\n    },\n    hovermode: 'x',\n    hoverlabel: {\n      namelength: -1,\n    },\n    yaxis: {\n      title: {\n        text: 'Bytes',\n      },\n      rangemode: 'tozero',\n      hoverformat: '.4s',\n      tickformat: 's',\n    },\n    ...layoutExtension,\n  };\n\n  return (\n    
\n \n
\n );\n};\n\nTrafficGraph.propTypes = {\n traffic: PropTypes.object.isRequired, // traffic is: {\"2017-11-15T15:00:00.000Z\": 68287229, ...}\n width: PropTypes.number.isRequired,\n layoutExtension: PropTypes.object,\n};\n\nTrafficGraph.defaultProps = {\n layoutExtension: {},\n};\n\nexport default TrafficGraph;\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 */\n\nimport * as React from 'react';\nimport { useState, useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport reduce from 'lodash/reduce';\nimport styled, { css } from 'styled-components';\nimport { PluginStore } from 'graylog-web-plugin/plugin';\n\nimport EventHandlersThrottler from 'util/EventHandlersThrottler';\nimport NumberUtils from 'util/NumberUtils';\nimport { useStore } from 'stores/connect';\nimport { Col, Row, Input } from 'components/bootstrap';\nimport { Spinner } from 'components/common';\nimport { ClusterTrafficActions, ClusterTrafficStore } from 'stores/cluster/ClusterTrafficStore';\nimport { NodesStore } from 'stores/nodes/NodesStore';\nimport { formatTrafficData } from 'util/TrafficUtils';\nimport { isPermitted } from 'util/PermissionsMixin';\nimport useCurrentUser from 'hooks/useCurrentUser';\nimport useSendTelemetry from 'logic/telemetry/useSendTelemetry';\nimport { TELEMETRY_EVENT_TYPE } from 'logic/telemetry/Constants';\n\nimport TrafficGraph from './TrafficGraph';\n\nconst DAYS = [\n 30,\n 90,\n 180,\n 365,\n];\n\nconst Wrapper = styled.div`\n margin-bottom: 5px;\n\n .control-label {\n padding-top: 0;\n }\n\n .graph-days-select {\n display: flex;\n align-items: baseline;\n\n select {\n padding-top: 3px;\n height: 28px;\n }\n }\n`;\n\nconst StyledDl = styled.dl`\n margin-bottom: 0;\n`;\nconst StyledH2 = styled.h2(({ theme }) => css`\n margin-bottom: ${theme.spacings.sm};\n`);\nconst StyledH3 = styled.h3(({ theme }) => css`\n margin-bottom: ${theme.spacings.sm};\n`);\n\nconst Header = () => Graylog cluster;\n\nconst ClusterInfo = () => {\n const nodes = useStore(NodesStore);\n\n if (!nodes) {\n return ;\n }\n\n const { clusterId, nodeCount } = nodes;\n\n return (\n \n
Cluster ID:
\n
{clusterId || 'Not available'}
\n
Number of nodes:
\n
{nodeCount}
\n
\n );\n};\n\nconst GraylogClusterTrafficGraph = () => {\n const { traffic } = useStore(ClusterTrafficStore);\n const [graphDays, setGraphDays] = useState(DAYS[0]);\n const [graphWidth, setGraphWidth] = useState(600);\n const eventThrottler = useRef(new EventHandlersThrottler());\n const containerRef = useRef(null);\n const licensePlugin = PluginStore.exports('license');\n const currentUser = useCurrentUser();\n const sendTelemetry = useSendTelemetry();\n\n const onGraphDaysChange = (event: React.ChangeEvent): void => {\n event.preventDefault();\n const newDays = Number(event.target.value);\n\n setGraphDays(newDays);\n\n sendTelemetry(TELEMETRY_EVENT_TYPE.SYSTEM_OVERVIEW_OUTGOING_TRAFFIC_DAYS_CHANGED, {\n app_pathname: 'system-overview',\n app_section: 'outgoing-traffic',\n app_action_value: 'trafficgraph-days-button',\n event_details: { value: newDays },\n });\n };\n\n useEffect(() => {\n ClusterTrafficActions.getTraffic(graphDays);\n }, [graphDays]);\n\n useEffect(() => {\n const _resizeGraphs = () => {\n const { clientWidth } = containerRef.current;\n\n setGraphWidth(clientWidth);\n };\n\n const _onResize = () => {\n eventThrottler.current.throttle(() => _resizeGraphs());\n };\n\n window.addEventListener('resize', _onResize);\n\n if (containerRef.current) {\n _resizeGraphs();\n }\n\n return () => {\n window.removeEventListener('resize', _onResize);\n };\n }, []);\n\n const TrafficGraphComponent = (isPermitted(currentUser.permissions, ['licenses:read']) && licensePlugin[0]?.EnterpriseTrafficGraph) || TrafficGraph;\n let sumOutput = null;\n let trafficGraph = ;\n\n if (traffic) {\n const bytesOut = reduce(traffic.output, (result, value) => result + value);\n\n sumOutput = Last {graphDays} days: {NumberUtils.formatBytes(bytesOut)};\n\n const unixTraffic = formatTrafficData(traffic.output);\n\n trafficGraph = (\n \n );\n }\n\n return (\n <>\n \n \n {DAYS.map((size) => )}\n \n \n\n Outgoing traffic {sumOutput}\n {trafficGraph}\n \n );\n};\n\ntype Props = {\n layout?: 'default' | 'compact',\n children: React.ReactNode\n}\n\nconst GraylogClusterOverview = ({ layout, children }: Props) => {\n if (layout === 'compact') {\n return (\n \n \n
\n \n \n \n
\n {children}\n \n \n \n \n
\n \n \n );\n }\n\n return (\n \n \n
\n \n
\n {children}\n \n \n \n \n \n \n \n );\n};\n\nGraylogClusterOverview.propTypes = {\n layout: PropTypes.oneOf(['default', 'compact']),\n children: PropTypes.node,\n};\n\nGraylogClusterOverview.defaultProps = {\n layout: 'default',\n children: null,\n};\n\nexport default GraylogClusterOverview;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./PluginList.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./PluginList.css\";\n export default content && content.locals ? content.locals : undefined;\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 createReactClass from 'create-react-class';\nimport { PluginStore } from 'graylog-web-plugin/plugin';\n\nimport { Icon } from 'components/common';\n\nimport style from './PluginList.css';\n\nconst PluginList = createReactClass({\n displayName: 'PluginList',\n\n ENTERPRISE_PLUGINS: {\n 'graylog-plugin-enterprise': 'Graylog Plugin Enterprise',\n },\n\n _formatPlugin(pluginName) {\n const plugin = PluginStore.get().filter((p) => p.metadata.name === pluginName)[0];\n\n return (\n
  • \n  \n {this.ENTERPRISE_PLUGINS[pluginName]} is {plugin ? 'installed' : 'not installed'}\n
  • \n );\n },\n\n render() {\n const enterprisePluginList = Object.keys(this.ENTERPRISE_PLUGINS).map((pluginName) => this._formatPlugin(pluginName));\n\n return (\n <>\n

    This is the status of Graylog Enterprise modules in this cluster:

    \n
      \n {enterprisePluginList}\n
    \n \n );\n },\n});\n\nexport default PluginList;\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';\n\ntype Props = {\n children: React.ReactNode,\n}\n\nconst EnterpriseProductLink = ({ children }: Props) => (\n \n {children}\n \n);\n\nEnterpriseProductLink.propTypes = {\n children: PropTypes.node,\n};\n\nEnterpriseProductLink.defaultProps = {\n children: null,\n};\n\nexport default EnterpriseProductLink;\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';\n\nimport { ExternalLinkButton } from 'components/common';\nimport { ButtonToolbar } from 'components/bootstrap';\n\ntype Props = {\n href: string,\n clusterId?: string,\n children: React.ReactNode,\n}\n\nconst ProductLink = ({ href, clusterId, children } : Props) => {\n let hrefWithParam = href;\n\n if (clusterId) {\n hrefWithParam = `${hrefWithParam}?cluster_id=${clusterId}`;\n }\n\n return (\n \n \n {children}\n \n \n );\n};\n\nProductLink.propTypes = {\n href: PropTypes.string,\n clusterId: PropTypes.string,\n children: PropTypes.node,\n};\n\nProductLink.defaultProps = {\n href: '',\n clusterId: undefined,\n children: undefined,\n};\n\nexport default ProductLink;\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';\nimport { PluginStore } from 'graylog-web-plugin/plugin';\n\nimport { useStore } from 'stores/connect';\nimport { NodesStore } from 'stores/nodes/NodesStore';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport { Col, Row } from 'components/bootstrap';\nimport { GraylogClusterOverview } from 'components/cluster';\nimport PluginList from 'components/enterprise/PluginList';\nimport EnterpriseProductLink from 'components/enterprise/EnterpriseProductLink';\nimport ProductLink from 'components/enterprise/ProductLink';\nimport HideOnCloud from 'util/conditional/HideOnCloud';\n\nconst GraylogEnterpriseHeader = styled.h2`\n margin-bottom: 10px;\n`;\n\nconst EnterprisePage = () => {\n const nodes = useStore(NodesStore);\n const licensePlugin = PluginStore.exports('license');\n const ProductLinkComponent = licensePlugin[0]?.EnterpriseProductLink || ProductLink;\n\n if (!nodes) {\n return ;\n }\n\n const { clusterId } = nodes;\n\n return (\n \n
    \n \n \n Graylog Enterprise adds commercial functionality to the Open Source Graylog core. You can learn more\n about Graylog Enterprise on the product page.\n \n \n\n \n \n \n \n \n \n Graylog Operations\n

    \n Designed to meet the needs of resource-constrained IT Operations and Software Engineering teams,\n Graylog Operations provides numerous productivity enhancements that will save you thousands of\n hours per year in collecting and analyzing log data to uncover the root cause of performance,\n outage, and error issues.\n

    \n \n Request now\n \n \n \n Graylog Security\n

    \n Extend Graylog Open’s capabilities for detecting, investigating, and responding to cybersecurity\n threats with security-specific dashboards and alerts, anomaly detection AI/ML engine,\n integrations with other security tools, SOAR capabilities, and numerous compliance reporting\n features.\n

    \n \n Request now\n \n \n
    \n
    \n
    \n
    \n );\n};\n\nexport default EnterprisePage;\n"],"names":["___CSS_LOADER_EXPORT___","module","DEFAULT_TIMEOUT","EventHandlersThrottler","eventHandler","timeout","ClusterTrafficActions","singleton","ClusterTrafficStore","days","promise","URLUtils","response","formatTrafficData","traffic","dailySums","value","key","d","t","entry","val","TrafficGraph","width","layoutExtension","chartData","layout","GenericPlot","DAYS","Wrapper","StyledDl","StyledH2","theme","StyledH3","Header","ClusterInfo","nodes","NodesStore","clusterId","nodeCount","GraylogClusterTrafficGraph","graphDays","setGraphDays","graphWidth","setGraphWidth","eventThrottler","containerRef","licensePlugin","currentUser","useCurrentUser","sendTelemetry","useSendTelemetry","onGraphDaysChange","event","newDays","_resizeGraphs","clientWidth","_onResize","TrafficGraphComponent","sumOutput","trafficGraph","bytesOut","result","NumberUtils","unixTraffic","size","GraylogClusterOverview","children","options","update","pluginName","plugin","p","enterprisePluginList","EnterpriseProductLink","ProductLink","href","hrefWithParam","GraylogEnterpriseHeader","ProductLinkComponent","HideOnCloud"],"sourceRoot":""}




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy