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

web-interface.assets.bb8c8232-132.187803040eada3f837b3.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"bb8c8232-132.187803040eada3f837b3.js","mappings":"sVA8BA,MAAMA,EAAmB,IAAa,UAEhCC,EAAaC,GAAoC,CAhCvD,MAiCE,KAAM,CAAE,OAAAC,CAAO,KAAI,KAAU,EAG7B,GAAIA,IAAW,UAAYA,IAAW,SAAU,CAC9C,GAAID,IAAU,OACZ,OAGF,MAAME,EAAU,OAAO,KAAKF,CAAK,EAGjC,OAAO,EAFaE,EAAQ,OAAQC,GAAWH,EAAMG,CAAM,EAAE,SAAS,EAEnD,CAAC,IAAb,OAAkBD,EAAQ,CAAC,CACpC,CAEA,OAAOD,CACT,EAoCA,EAlCwB,IAAM,CAC5B,MAAMD,KAAQ,KAAS,IAAaI,GAAUA,EAAM,KAAK,EACnDH,EAASF,EAAUC,CAAK,EACxB,CAAE,KAAMK,EAAO,UAAAC,CAAU,KAAI,YACjC,CAAC,UAAW,QAASL,CAAM,EAC3B,IAAM,iBAA+BA,EAAQH,CAAgB,EAAE,KAAK,CAAC,CAAE,QAAAS,CAAQ,IAAMA,CAAmB,EACxG,CAAE,QAASN,IAAW,MAAU,CAAC,EAE7B,CAAE,OAAAO,CAAO,KAAI,KAAmB,EAEtC,GAAI,CAACR,GAASM,EACZ,OAAO,gBAAC,KAAO,IAAC,EAGlB,MAAMG,EAAOT,EAAMC,CAAM,EACnBS,EAAQ,gBAAC,YAAK,mBAAiBD,EAAK,cAAc,MAAIA,EAAK,QAAS,EAE1E,OACE,gBAAC,KAAa,CAAC,MAAO,mBAAmBA,EAAK,aAAa,MAAMA,EAAK,QAAQ,IAC5E,gBAAC,YACC,gBAAC,KAAU,CAAC,MAAAC,CAAA,EACV,gBAAC,YAAK,kJAEqB,gBAAC,SAAG,EAAE,sCACKL,GAAS,CAAC,GAAG,OAAO,WAC1D,CACF,EAEA,gBAAC,KAAgB,CAAC,MAAAA,EAAc,UAAWP,EAAkB,OAAAG,EAAgB,OAAAO,CAAA,CAAgB,CAC/F,CACF,CAEJ,C","sources":["webpack://graylog-web-interface/./src/pages/ShowMetricsPage.tsx"],"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 * as React from 'react';\nimport { useQuery } from '@tanstack/react-query';\n\nimport { ClusterNodeMetrics } from '@graylog/server-api';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport { MetricsComponent } from 'components/metrics';\nimport type { Metric } from 'stores/metrics/MetricsStore';\nimport { MetricsStore } from 'stores/metrics/MetricsStore';\nimport type { NodesStoreState } from 'stores/nodes/NodesStore';\nimport { NodesStore } from 'stores/nodes/NodesStore';\nimport { useStore } from 'stores/connect';\nimport useQueryParameters from 'routing/useQuery';\nimport useParams from 'routing/useParams';\n\nconst metricsNamespace = MetricsStore.namespace;\n\nconst useNodeId = (nodes: NodesStoreState['nodes']) => {\n  const { nodeId } = useParams();\n\n  // \"leader\" node ID is a placeholder for leader node, get first leader node ID\n  if (nodeId === 'leader' || nodeId === 'master') { // `master` is deprecated but we still support it here\n    if (nodes === undefined) {\n      return undefined;\n    }\n\n    const nodeIDs = Object.keys(nodes);\n    const leaderNodes = nodeIDs.filter((nodeID) => nodes[nodeID].is_leader);\n\n    return leaderNodes[0] ?? nodeIDs[0];\n  }\n\n  return nodeId;\n};\n\nconst ShowMetricsPage = () => {\n  const nodes = useStore(NodesStore, (state) => state.nodes);\n  const nodeId = useNodeId(nodes);\n  const { data: names, isLoading } = useQuery(\n    ['metrics', 'names', nodeId],\n    () => ClusterNodeMetrics.byNamespace(nodeId, metricsNamespace).then(({ metrics }) => metrics as Metric[]),\n    { enabled: nodeId !== undefined });\n\n  const { filter } = useQueryParameters() as { filter: string };\n\n  if (!nodes || isLoading) {\n    return ;\n  }\n\n  const node = nodes[nodeId];\n  const title = Metrics of node {node.short_node_id} / {node.hostname};\n\n  return (\n    \n      \n        \n          \n            All Graylog nodes provide a set of internal metrics for diagnosis, debugging and monitoring. Note that you can access\n            all metrics via JMX, too.
\n This node is reporting a total of {(names || []).length} metrics.\n
\n
\n\n \n
\n
\n );\n};\n\nexport default ShowMetricsPage;\n"],"names":["metricsNamespace","useNodeId","nodes","nodeId","nodeIDs","nodeID","state","names","isLoading","metrics","filter","node","title"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy