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

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

There is a newer version: 6.0.1
Show newest version
{"version":3,"sources":["webpack:///./src/logic/metrics/MetricsExtractor.ts","webpack:///./src/components/metrics/CounterDetails.jsx","webpack:///./src/components/metrics/CounterRate.jsx","webpack:///./src/components/metrics/GaugeDetails.jsx","webpack:///./src/components/metrics/HistogramDetails.jsx","webpack:///./src/components/metrics/MeterDetails.jsx","webpack:///./src/components/metrics/Metric.jsx","webpack:///./src/components/metrics/MetricContainer.tsx","webpack:///./src/components/metrics/MetricDetails.jsx","webpack:///./src/components/metrics/MetricsComponent.jsx","webpack:///./src/components/metrics/MetricsFilterInput.jsx","webpack:///./src/components/metrics/MetricsList.jsx","webpack:///./src/components/metrics/MetricsMapper.jsx","webpack:///./src/components/metrics/TimerDetails.jsx","webpack:///./src/util/TimeHelper.js"],"names":["MetricsExtractor","getValuesForNode","nodeMetrics","metricNames","Object","keys","length","metrics","forEach","metricShortName","metricFullName","metricObject","type","metric","value","count","rate","total","CounterDetails","this","props","className","numeral","format","React","Component","PropTypes","object","isRequired","CounterRate","prevMetric","prevTs","nowTs","TimeHelper","nowInSeconds","state","undefined","hideOnZero","_prefix","prefix","suffix","setState","hideOnMissing","_checkPrevMetric","_placeholder","rateNum","key","_suffix","showTotal","bool","string","GaugeDetails","gauge","HistogramDetails","histogram","time","std_dev","mean","min","max","MeterDetails","meter","rate_unit","one_minute","five_minute","fifteen_minute","Metric","createReactClass","displayName","propTypes","namespace","nodeId","getInitialState","expanded","iconMapping","timer","counter","unknown","_formatIcon","icon","_formatName","metricName","unqualifiedMetricName","split","slice","join","_showDetails","event","preventDefault","render","details","name","href","onClick","full_name","CombinedProvider","get","MetricsStore","MetricsActions","MetricContainer","addGlobal","nextProps","metricsUpdatedAt","removeGlobal","children","fullName","zeroOnMissing","throughput","map","reduce","accumulator","currentMetric","child","number","connect","metricsStore","StyledMetricDetail","styled","div","MetricDetails","add","remove","lodash","capitalize","_formatDetailsForType","StyledWarningDiv","theme","colors","variant","dark","danger","MetricsComponent","filter","nextFilter","filteredNames","names","error","md","bsStyle","responseMessage","status","filterRegex","RegExp","String","match","e","onChange","onFilterChange","arrayOf","shape","MetricsFilterInput","target","bsSize","placeholder","handleChange","func","MetricListWrap","ul","css","gray","fonts","size","body","family","monospace","MetricsList","sort","m1","m2","localeCompare","_formatMetric","MetricsMapper","computeValue","mixins","Reflux","getDefaultProps","UNSAFE_componentWillMount","shouldComponentUpdate","_","nextState","componentWillUnmount","metricsMap","TimerDetails","timing","Math","floor","Date","now"],"mappings":"0GAkBA,IAAMA,EAAmB,CAMvBC,iBANuB,SAMNC,EAAyBC,GACxC,GAAID,SAAyF,IAApCE,OAAOC,KAAKH,GAAaI,OAChF,MAAO,GAGT,IAAMC,EAAU,GAqBhB,OAnBAH,OAAOC,KAAKF,GAAaK,SAAQ,SAACC,GAChC,IAAMC,EAAiBP,EAAYM,GAC7BE,EAAeT,EAAYQ,GAE7BC,IACwB,UAAtBA,EAAaC,KACfL,EAAQE,GAAmBE,EAAaE,OAAOC,MAChB,YAAtBH,EAAaC,KACtBL,EAAQE,GAAmBE,EAAaE,OAAOE,MAChB,UAAtBJ,EAAaC,MAES,UAAtBD,EAAaC,KADtBL,EAAQE,GAAmBE,EAAaE,OAAOG,KAAKC,MAIpDV,EAAQE,GAAmB,SAK1BF,IAIIP,O,g3DClCTkB,E,+VAKJ,WAAS,IACCL,EAAWM,KAAKC,MAAMP,OAAtBA,OAER,OACE,wBAAIQ,UAAU,6BACZ,sCACA,4BAAI,0BAAMA,UAAU,iBAAiBC,IAAQT,EAAOE,OAAOQ,OAAO,e,8BAX7CC,IAAMC,W,EAA7BP,E,gBACe,CACjBL,OAAQa,IAAUC,OAAOC,Y,6FAedV,Q,27CCfTW,E,kaAkBI,CACNC,WAAY,KACZC,OAAQ,KACRC,MAAOC,IAAWC,iB,2BAWD,WACjB,OAAO,EAAKC,MAA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ACA,4BAAI,8BAAOD,IAAQiK,EAAO5H,KAAKpC,OAAO,aAAtC,Y,gCA7BmBC,IAAMC,Y,8GAA3B6J,G,YACe,CACjBzK,OAAQa,IAAUC,OAAOC,aAiCd0J,W,sCCvCf,IAAMrJ,EAAa,CACjBC,aADiB,WAEf,OAAOsJ,KAAKC,MAAMC,KAAKC,MAAQ,OAIpB1J","file":"57e33c6c-4.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 type { NodeMetric } from 'stores/metrics/MetricsStore';\n\nconst MetricsExtractor = {\n  /*\n   * Returns an object containing a short name and the metric value for it.\n   * Short names are the keys of the metricNames object, which should look like:\n   * { shortName: \"metricFullName\" }\n   */\n  getValuesForNode(nodeMetrics: NodeMetric, metricNames: { [key: string]: string }): { [key: string]: number | undefined | null } {\n    if (nodeMetrics === null || nodeMetrics === undefined || Object.keys(nodeMetrics).length === 0) {\n      return {};\n    }\n\n    const metrics = {};\n\n    Object.keys(metricNames).forEach((metricShortName) => {\n      const metricFullName = metricNames[metricShortName];\n      const metricObject = nodeMetrics[metricFullName];\n\n      if (metricObject) {\n        if (metricObject.type === 'gauge') {\n          metrics[metricShortName] = metricObject.metric.value;\n        } else if (metricObject.type === 'counter') {\n          metrics[metricShortName] = metricObject.metric.count;\n        } else if (metricObject.type === 'meter') {\n          metrics[metricShortName] = metricObject.metric.rate.total;\n        } else if (metricObject.type === 'timer') {\n          metrics[metricShortName] = metricObject.metric.rate.total;\n        } else {\n          metrics[metricShortName] = null;\n        }\n      }\n    });\n\n    return metrics;\n  },\n};\n\nexport default MetricsExtractor;\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';\nimport numeral from 'numeral';\n\nclass CounterDetails extends React.Component {\n  static propTypes = {\n    metric: PropTypes.object.isRequired,\n  };\n\n  render() {\n    const { metric } = this.props.metric;\n\n    return (\n      
\n
Value:
\n
{numeral(metric.count).format('0,0')}
\n
\n );\n }\n}\n\nexport default CounterDetails;\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';\nimport numeral from 'numeral';\n\nimport TimeHelper from 'util/TimeHelper';\n\nclass CounterRate extends React.Component {\n static propTypes = {\n metric: PropTypes.object,\n showTotal: PropTypes.bool,\n prefix: PropTypes.string,\n suffix: PropTypes.string,\n hideOnZero: PropTypes.bool,\n hideOnMissing: PropTypes.bool,\n };\n\n static defaultProps = {\n showTotal: false,\n prefix: null,\n suffix: 'per second',\n hideOnZero: false,\n hideOnMissing: false,\n };\n\n state = {\n prevMetric: null,\n prevTs: null,\n nowTs: TimeHelper.nowInSeconds(),\n };\n\n UNSAFE_componentWillReceiveProps() {\n this.setState({\n prevMetric: this.props.metric,\n prevTs: this.state.nowTs,\n nowTs: TimeHelper.nowInSeconds(),\n });\n }\n\n _checkPrevMetric = () => {\n return this.state.prevMetric && this.state.prevMetric.count !== undefined && this.state.prevTs;\n };\n\n _placeholder = () => {\n if (this.props.hideOnZero) {\n return null;\n }\n\n return ({this._prefix()}Calculating...);\n };\n\n _prefix = () => {\n if (this.props.prefix) {\n return `${this.props.prefix} `;\n }\n\n return null;\n };\n\n _suffix = () => {\n if (this.props.suffix) {\n return ` ${this.props.suffix}`;\n }\n\n return null;\n };\n\n render() {\n if (!(this.props.metric && this.props.metric.count !== undefined)) {\n if (this.props.hideOnMissing) {\n return null;\n }\n\n if (!this._checkPrevMetric()) {\n return this._placeholder();\n }\n }\n\n const { count } = this.props.metric;\n\n let rate = null;\n\n if (this._checkPrevMetric()) {\n const rateNum = (count - this.state.prevMetric.count) / (this.state.nowTs - this.state.prevTs);\n\n rate = ({this._prefix()}{numeral(rateNum).format('0,0')}{this._suffix()});\n } else {\n return this._placeholder();\n }\n\n if (this.props.hideOnMissing && !rate) {\n return null;\n }\n\n return (\n \n {rate}\n {this.props.showTotal && ({numeral(count).format('0')} total)}\n \n );\n }\n}\n\nexport default CounterRate;\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';\nimport numeral from 'numeral';\n\nclass GaugeDetails extends React.Component {\n static propTypes = {\n metric: PropTypes.object.isRequired,\n };\n\n render() {\n const gauge = this.props.metric.metric;\n\n return (\n
\n
Value:
\n
{numeral(gauge.value).format('0,0')}
\n
\n );\n }\n}\n\nexport default GaugeDetails;\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';\nimport numeral from 'numeral';\n\nclass HistogramDetails extends React.Component {\n static propTypes = {\n metric: PropTypes.object.isRequired,\n };\n\n render() {\n const histogram = this.props.metric.metric;\n\n return (\n
\n
95th percentile:
\n
{numeral(histogram.time['95th_percentile']).format('0,0.[00]')}
\n
98th percentile:
\n
{numeral(histogram.time['98th_percentile']).format('0,0.[00]')}
\n
99th percentile:
\n
{numeral(histogram.time['99th_percentile']).format('0,0.[00]')}
\n
Standard deviation:
\n
{numeral(histogram.time.std_dev).format('0,0.[00]')}
\n
Mean:
\n
{numeral(histogram.time.mean).format('0,0.[00]')}
\n
Minimum:
\n
{numeral(histogram.time.min).format('0,0.[00]')}
\n
Maximum:
\n
{numeral(histogram.time.max).format('0,0.[00]')}
\n
Count:
\n
{numeral(histogram.count).format('0,0')}
\n
\n );\n }\n}\n\nexport default HistogramDetails;\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';\nimport numeral from 'numeral';\n\nclass MeterDetails extends React.Component {\n static propTypes = {\n metric: PropTypes.object.isRequired,\n };\n\n render() {\n const meter = this.props.metric.metric;\n\n return (\n
\n
Total:
\n
{numeral(meter.rate.total).format('0,0')} events
\n
Mean:
\n
{numeral(meter.rate.mean).format('0,0.[00]')} {meter.rate_unit}
\n
1 minute avg:
\n
{numeral(meter.rate.one_minute).format('0,0.[00]')} {meter.rate_unit}
\n
5 minute avg:
\n
{numeral(meter.rate.five_minute).format('0,0.[00]')} {meter.rate_unit}
\n
15 minute avg:
\n
{numeral(meter.rate.fifteen_minute).format('0,0.[00]')} {meter.rate_unit}
\n
\n );\n }\n}\n\nexport default MeterDetails;\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';\nimport createReactClass from 'create-react-class';\n\nimport { MetricDetails } from 'components/metrics';\nimport { Icon } from 'components/common';\n\nconst Metric = createReactClass({\n displayName: 'Metric',\n\n propTypes: {\n metric: PropTypes.object.isRequired,\n namespace: PropTypes.string.isRequired,\n nodeId: PropTypes.string.isRequired,\n },\n\n getInitialState() {\n return {\n expanded: false,\n };\n },\n\n iconMapping: {\n timer: 'clock',\n histogram: 'signal',\n meter: 'play-circle',\n gauge: 'tachometer-alt',\n counter: 'circle',\n unknown: 'question-circle',\n },\n\n _formatIcon(type) {\n const icon = this.iconMapping[type];\n\n if (icon) {\n return icon;\n }\n\n return this.iconMapping.unknown;\n },\n\n _formatName(metricName) {\n const { namespace } = this.props;\n const split = metricName.split(namespace);\n const unqualifiedMetricName = split.slice(1).join(namespace);\n\n return (\n \n {namespace}\n {unqualifiedMetricName}\n \n );\n },\n\n _showDetails(event) {\n event.preventDefault();\n this.setState({ expanded: !this.state.expanded });\n },\n\n render() {\n const { metric } = this.props;\n const details = this.state.expanded ? : null;\n\n return (\n \n \n {details}\n \n );\n },\n});\n\nexport default Metric;\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 * as React from 'react';\n\nimport TimeHelper from 'util/TimeHelper';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport connect from 'stores/connect';\nimport MetricsExtractor from 'logic/metrics/MetricsExtractor';\nimport type { ClusterMetric } from 'stores/metrics/MetricsStore';\nimport { Store } from 'stores/StoreTypes';\n\nconst { MetricsStore, MetricsActions } = CombinedProvider.get('Metrics');\n\ntype Props = {\n metrics: ClusterMetric,\n metricsUpdatedAt: number,\n name: string,\n zeroOnMissing: boolean,\n children: React.ReactElement[],\n};\n\nclass MetricContainer extends React.Component {\n static propTypes = {\n metricsUpdatedAt: PropTypes.number,\n name: PropTypes.string.isRequired,\n zeroOnMissing: PropTypes.bool,\n };\n\n static defaultProps = {\n metricsUpdatedAt: TimeHelper.nowInSeconds(),\n zeroOnMissing: true,\n };\n\n componentDidMount() {\n const { name } = this.props;\n\n MetricsActions.addGlobal(name);\n }\n\n shouldComponentUpdate(nextProps) {\n // Do not render this component and it's children when no metric data has changed.\n // This component and the CounterRate component expect to be rendered every second or less often. When using\n // these components on a page that triggers a re-render more often - e.g. by having another setInterval - the\n // calculation in CounterRate will break.\n const { metricsUpdatedAt } = this.props;\n\n if (metricsUpdatedAt !== null && nextProps.metricsUpdatedAt) {\n return nextProps.metricsUpdatedAt > metricsUpdatedAt;\n }\n\n return true;\n }\n\n componentWillUnmount() {\n const { name } = this.props;\n\n MetricsActions.removeGlobal(name);\n }\n\n render() {\n const { children, metrics, name: fullName, zeroOnMissing } = this.props;\n\n if (!metrics) {\n return (Loading...);\n }\n\n let throughput = Object.keys(metrics)\n .map((nodeId) => MetricsExtractor.getValuesForNode(metrics[nodeId], { throughput: fullName }))\n .reduce((accumulator: { throughput?: number }, currentMetric: { throughput: number | undefined | null }): { throughput?: number } => {\n return { throughput: (accumulator.throughput || 0) + (currentMetric.throughput || 0) };\n }, {});\n\n if (zeroOnMissing && (!throughput || !throughput.throughput)) {\n throughput = { throughput: 0 };\n }\n\n return (\n
\n {\n React.Children.map(children, (child) => {\n return React.cloneElement(child, { metric: { full_name: fullName, count: throughput.throughput } });\n })\n }\n
\n );\n }\n}\n\ntype MetricsStoreState = {\n metrics: ClusterMetric,\n metricsUpdatedAt: number,\n};\n\nexport default connect(MetricContainer,\n { metricsStore: MetricsStore as Store },\n ({ metricsStore, ...otherProps }) => ({\n ...otherProps,\n metrics: metricsStore.metrics,\n metricsUpdatedAt: metricsStore.metricsUpdatedAt,\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 PropTypes from 'prop-types';\nimport React from 'react';\nimport lodash from 'lodash';\nimport styled from 'styled-components';\n\nimport { CounterDetails, GaugeDetails, HistogramDetails, MeterDetails, TimerDetails } from 'components/metrics';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport connect from 'stores/connect';\n\nconst { MetricsStore, MetricsActions } = CombinedProvider.get('Metrics');\nconst StyledMetricDetail = styled.div`\n dl {\n > dt {\n float: left;\n }\n\n &.metric-timer > dd {\n margin-left: 145px;\n }\n\n &.metric-meter > dd {\n margin-left: 115px;\n }\n\n &.metric-gauge > dd {\n margin-left: 90px;\n }\n\n &.metric-counter > dd {\n margin-left: 90px;\n }\n\n &.metric-histogram > dd {\n margin-left: 145px;\n }\n }\n`;\n\nclass MetricDetails extends React.Component {\n static propTypes = {\n metrics: PropTypes.object,\n metric: PropTypes.object.isRequired,\n nodeId: PropTypes.string.isRequired,\n };\n\n static defaultProps = {\n metrics: undefined,\n }\n\n componentDidMount() {\n const { nodeId, metric: { full_name: fullName } } = this.props;\n MetricsActions.add(nodeId, fullName);\n }\n\n componentWillUnmount() {\n const { nodeId, metric: { full_name: fullName } } = this.props;\n MetricsActions.remove(nodeId, fullName);\n }\n\n _formatDetailsForType = (type, metric) => {\n switch (type) {\n case 'Counter':\n return ;\n case 'Gauge':\n return ;\n case 'Histogram':\n return ;\n case 'Meter':\n return ;\n case 'Timer':\n return ;\n default:\n return Invalid metric type: {type};\n }\n }\n\n render() {\n const { nodeId, metric, metric: { full_name: metricName }, metrics } = this.props;\n const currentMetric = metrics?.[nodeId]?.[metricName] ?? metric;\n const type = lodash.capitalize(currentMetric.type);\n const details = this._formatDetailsForType(type, currentMetric);\n\n return (\n
\n

{type}

\n \n {details}\n \n
\n );\n }\n}\n\nexport default connect(\n MetricDetails,\n { metricsStore: MetricsStore },\n ({ metricsStore, ...otherProps }) => ({\n ...otherProps,\n metrics: metricsStore.metrics,\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 PropTypes from 'prop-types';\nimport React from 'react';\nimport styled from 'styled-components';\n\nimport { Alert, Col, Row } from 'components/graylog';\nimport { Icon } from 'components/common';\nimport { MetricsFilterInput, MetricsList } from 'components/metrics';\n\nconst StyledWarningDiv = styled.div(({ theme }) => `\n height: 20px;\n margin-bottom: 5px;\n color: ${theme.colors.variant.dark.danger};\n`);\n\nclass MetricsComponent extends React.Component {\n static propTypes = {\n names: PropTypes.arrayOf(PropTypes.object),\n namespace: PropTypes.string.isRequired,\n nodeId: PropTypes.string.isRequired,\n filter: PropTypes.string,\n error: PropTypes.shape({\n responseMessage: PropTypes.string,\n status: PropTypes.number,\n }),\n };\n\n static defaultProps = {\n names: undefined,\n filter: '',\n error: undefined,\n };\n\n state = { filter: this.props.filter };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.filter !== this.props.filter) {\n this.setState({ filter: nextProps.filter });\n }\n }\n\n onFilterChange = (nextFilter) => {\n this.setState({ filter: nextFilter });\n };\n\n render() {\n const { filter } = this.state;\n const { names, error } = this.props;\n\n if (!names) {\n return (\n \n \n \n  \n {error ? (\n \n Could not fetch metrics from node: server returned {error.responseMessage || ''}{' '}\n with a {error.status} status code.\n \n ) : (\n There was a problem fetching node metrics.\n )}\n {' '}Graylog will keep trying to get them in the background.\n \n \n \n );\n }\n\n let filteredNames;\n\n try {\n const filterRegex = new RegExp(filter, 'i');\n\n filteredNames = names.filter((metric) => String(metric.full_name).match(filterRegex));\n } catch (e) {\n filteredNames = [];\n }\n\n return (\n \n \n \n {error && (\n <>\n  \n Could not fetch metrics from node: server returned {error.responseMessage || ''}{' '}\n with a {error.status} status code. Displaying last metrics available.\n \n )}\n \n \n \n \n \n );\n }\n}\n\nexport default MetricsComponent;\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 { FormControl } from 'components/graylog';\n\nclass MetricsFilterInput extends React.Component {\n static propTypes = {\n filter: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n };\n\n handleChange = (event) => {\n this.props.onChange(event.target.value);\n };\n\n render() {\n const { filter } = this.props;\n\n return (\n \n );\n }\n}\n\nexport default MetricsFilterInput;\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';\nimport styled, { css } from 'styled-components';\n\nimport { Metric } from 'components/metrics';\n\nconst MetricListWrap = styled.ul(({ theme }) => css`\n padding: 0;\n\n li {\n margin-bottom: 5px;\n\n .prefix {\n color: ${theme.colors.gray[70]};\n }\n\n .name {\n font-size: ${theme.fonts.size.body};\n font-family: ${theme.fonts.family.monospace};\n word-break: break-all;\n\n .open:hover {\n text-decoration: none;\n }\n }\n\n .metric {\n margin-left: 10px;\n padding: 10px;\n\n h3 {\n margin-bottom: 5px;\n }\n }\n }\n\n dl {\n margin-top: 0;\n margin-bottom: 0;\n }\n`);\n\nclass MetricsList extends React.Component {\n static propTypes = {\n names: PropTypes.arrayOf(PropTypes.object).isRequired,\n namespace: PropTypes.string.isRequired,\n nodeId: PropTypes.string.isRequired,\n };\n\n _formatMetric = (metric) => {\n const { namespace, nodeId } = this.props;\n\n return (\n
  • \n \n
  • \n );\n };\n\n render() {\n const { names } = this.props;\n const metrics = names\n .sort((m1, m2) => m1.full_name.localeCompare(m2.full_name))\n .map((metric) => this._formatMetric(metric));\n\n return (\n \n {metrics.length > 0 ? metrics :
  • No metrics match the given filter. Please ensure you use a valid regular expression
  • }\n
    \n );\n }\n}\n\nexport default MetricsList;\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';\nimport createReactClass from 'create-react-class';\nimport Reflux from 'reflux';\n\nimport CombinedProvider from 'injection/CombinedProvider';\n\nconst { MetricsActions, MetricsStore } = CombinedProvider.get('Metrics');\n\nconst MetricsMapper = createReactClass({\n displayName: 'MetricsMapper',\n\n propTypes: {\n map: PropTypes.object.isRequired,\n computeValue: PropTypes.func.isRequired,\n },\n\n mixins: [Reflux.connect(MetricsStore)],\n\n getDefaultProps() {\n return {\n };\n },\n\n getInitialState() {\n return {};\n },\n\n UNSAFE_componentWillMount() {\n Object.keys(this.props.map).forEach((name) => MetricsActions.addGlobal(this.props.map[name]));\n },\n\n shouldComponentUpdate(_, nextState) {\n // Only re-render this component if the metric data has changed\n if (this.state.metricsUpdatedAt && nextState.metricsUpdatedAt) {\n return nextState.metricsUpdatedAt > this.state.metricsUpdatedAt;\n }\n\n return true;\n },\n\n componentWillUnmount() {\n Object.keys(this.props.map).forEach((name) => MetricsActions.removeGlobal(this.props.map[name]));\n },\n\n render() {\n if (!this.state.metrics) {\n return null;\n }\n\n const metricsMap = {};\n\n Object.keys(this.state.metrics).forEach((nodeId) => {\n Object.keys(this.props.map).forEach((key) => {\n const metricName = this.props.map[key];\n\n if (this.state.metrics[nodeId][metricName]) {\n // Only create the node entry if we actually have data\n if (!metricsMap[nodeId]) {\n metricsMap[nodeId] = {};\n }\n\n metricsMap[nodeId][key] = this.state.metrics[nodeId][metricName];\n }\n });\n });\n\n const value = this.props.computeValue(metricsMap);\n\n return (\n \n {value}\n \n );\n },\n});\n\nexport default MetricsMapper;\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';\nimport numeral from 'numeral';\n\nclass TimerDetails extends React.Component {\n static propTypes = {\n metric: PropTypes.object.isRequired,\n };\n\n render() {\n const timing = this.props.metric.metric.time;\n\n return (\n
    \n
    95th percentile:
    \n
    {numeral(timing['95th_percentile']).format('0,0.[00]')}μs
    \n\n
    98th percentile:
    \n
    {numeral(timing['98th_percentile']).format('0,0.[00]')}μs
    \n\n
    99th percentile:
    \n
    {numeral(timing['99th_percentile']).format('0,0.[00]')}μs
    \n\n
    Standard deviation:
    \n
    {numeral(timing.std_dev).format('0,0.[00]')}μs
    \n\n
    Mean:
    \n
    {numeral(timing.mean).format('0,0.[00]')}μs
    \n\n
    Minimum:
    \n
    {numeral(timing.min).format('0,0.[00]')}μs
    \n\n
    Maximum:
    \n
    {numeral(timing.max).format('0,0.[00]')}μs
    \n
    \n );\n }\n}\n\nexport default TimerDetails;\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 TimeHelper = {\n nowInSeconds() {\n return Math.floor(Date.now() / 1000);\n },\n};\n\nexport default TimeHelper;\n"],"sourceRoot":""}




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy