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b,EACLc,QAASR,EACThK,QAAS0J,EACTe,YAAaf,EACbgB,WAAYV,EACZhlC,KAAM0kC,EACNiB,SAAUX,EACVY,MAAOZ,EACPvK,UAAWuK,EACXrK,MAAOqK,EACPa,MAAOb,EAEPc,eAAgBtB,EAChBC,kBAAmBF,GAKrB,OAFAW,EAAea,UAAYb,EAEpBA,I,uHC9CPtK,EAAOzB,QAAU,EAAQ,gIAAR,I,iJCNnByB,EAAOzB,QAFoB,gD,4HCR3ByB,EAAOzB,QAAU,WACf,IAAIoH,EAAY3xC,SAAS+xC,eACzB,IAAKJ,EAAUyF,WACb,OAAO,aAKT,IAHA,IAAIC,EAASr3C,SAASs3C,cAElB/P,EAAS,GACJjsC,EAAI,EAAGA,EAAIq2C,EAAUyF,WAAY97C,IACxCisC,EAAOn8B,KAAKumC,EAAU4F,WAAWj8C,IAGnC,OAAQ+7C,EAAOvG,QAAQ0G,eACrB,IAAK,QACL,IAAK,WACHH,EAAOI,OACP,MAEF,QACEJ,EAAS,KAKb,OADA1F,EAAU0B,kBACH,WACc,UAAnB1B,EAAU3yC,MACV2yC,EAAU0B,kBAEL1B,EAAUyF,YACb7P,EAAOpqC,SAAQ,SAASsqC,GACtBkK,EAAUmB,SAASrL,MAIvB4P,GACAA,EAAOK","sources":["webpack://grafana/./.yarn/__virtual__/@emotion-css-virtual-15ef12e38d/3/opt/drone/yarncache/@emotion-css-npm-11.7.1-25ff8755a7-ac1f56656f.zip/node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js","webpack://grafana/./.yarn/__virtual__/@emotion-css-virtual-15ef12e38d/3/opt/drone/yarncache/@emotion-css-npm-11.7.1-25ff8755a7-ac1f56656f.zip/node_modules/@emotion/css/dist/emotion-css.esm.js","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineCollapser.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/DraggableManager/EUpdateTypes.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/DraggableManager/DraggableManager.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineColumnResizer.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/date.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/number.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/utils.tsx","webpack://grafana/./packages/jaeger-ui-components/src/Theme.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/Ticks.tsx","webpack://grafana/./packages/jaeger-ui-components/src/uberUtilityStyles.ts","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineRow.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineHeaderRow.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/Positions.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/NewWindowIcon.tsx","webpack://grafana/./packages/jaeger-ui-components/src/uiElementsContext.tsx","webpack://grafana/./packages/jaeger-ui-components/src/url/externalLinkContext.tsx","webpack://grafana/./packages/jaeger-ui-components/src/url/ReferenceLink.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/ReferencesButton.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/span-ancestor-ids.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/CopyIcon.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/KeyValuesTable.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.markers.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianLogs.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/LabeledList.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianReferences.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetailRow.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/color-generator.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/VirtualizedTraceView.tsx","webpack://grafana/./packages/jaeger-ui-components/src/constants/tag-keys.tsx","webpack://grafana/./packages/jaeger-ui-components/src/keyboard-mappings.tsx","webpack://grafana/./packages/jaeger-ui-components/src/keyboard-shortcuts.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/CanvasSpanGraph.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/render-into-canvas.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/TickLabels.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/GraphTicks.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/Scrubber.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/ViewingLayer.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/UiFindInput.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.markers.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/BreakableText.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/LoadingIndicator.tsx","webpack://grafana/./packages/jaeger-ui-components/src/constants/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/TraceName.tsx","webpack://grafana/./packages/jaeger-ui-components/src/model/trace-viewer.ts","webpack://grafana/../../opt/drone/yarncache/lru-memoize-npm-1.1.0-281b40912f-cc0c8f8427.zip/node_modules/lru-memoize/dist/lru-memoize.es.js","webpack://grafana/./packages/jaeger-ui-components/src/constants/default-config.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/config/get-config.tsx","webpack://grafana/./packages/jaeger-ui-components/src/model/span.tsx","webpack://grafana/./packages/jaeger-ui-components/src/model/link-patterns.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/ExternalLinks.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/TracePageHeader.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/DetailState.tsx","webpack://grafana/./packages/jaeger-ui-components/src/selectors/process.js","webpack://grafana/./packages/jaeger-ui-components/src/selectors/span.js","webpack://grafana/./packages/jaeger-ui-components/src/utils/TreeNode.js","webpack://grafana/./packages/jaeger-ui-components/src/selectors/trace.js","webpack://grafana/./packages/jaeger-ui-components/src/utils/sort.js","webpack://grafana/./packages/jaeger-ui-components/src/model/transform-trace-data.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/filter-spans.tsx","webpack://grafana/./public/app/core/utils/tracing.ts","webpack://grafana/./public/app/plugins/datasource/jaeger/responseTransform.ts","webpack://grafana/./.yarn/__virtual__/react-icon-base-virtual-e209b164a7/3/opt/drone/yarncache/react-icon-base-npm-2.1.0-caadf8254e-62b6bfe486.zip/node_modules/react-icon-base/lib/index.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/alert.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/android-locate.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/android-open.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/arrow-right-a.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/chevron-right.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/ios-arrow-down.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/ios-arrow-right.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/link.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/network.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/md/file-upload.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/md/keyboard-arrow-right.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/index.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/addEvents.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/bind.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/bindMultiple.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/bindSequence.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/bindSingle.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/detach.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/dom-event.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/fireCallback.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/getKeyInfo.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/getMatches.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/getReverseMap.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/handleKey.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/handleKeyEvent.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/modifiersMatch.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/pickBestAction.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/reset.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/resetSequenceTimer.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/resetSequences.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/stopCallback.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/trigger.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/unbind.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/reset.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/characterFromEvent.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/eventModifiers.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/isModifier.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/keysFromString.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/preventDefault.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/shift-map.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/special-aliases.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/special-characters-map.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/special-keys-map.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/stopPropagation.js","webpack://grafana/../../opt/drone/yarncache/copy-to-clipboard-npm-3.3.1-18029bce99-3c7b1c333d.zip/node_modules/copy-to-clipboard/index.js","webpack://grafana/../../opt/drone/yarncache/deep-freeze-npm-0.0.1-12d684fc1a-1e43c98e44.zip/node_modules/deep-freeze/index.js","webpack://grafana/../../opt/drone/yarncache/fuzzy-npm-0.1.3-a0dfe08bd0-acc09c6173.zip/node_modules/fuzzy/lib/fuzzy.js","webpack://grafana/../../opt/drone/yarncache/json-markup-npm-1.1.3-2762e9da70-aa4e1935fc.zip/node_modules/json-markup/index.js","webpack://grafana/../../opt/drone/yarncache/prop-types-npm-15.8.1-17c71ee7ee-c056d3f1c0.zip/node_modules/prop-types/factoryWithThrowingShims.js","webpack://grafana/../../opt/drone/yarncache/prop-types-npm-15.8.1-17c71ee7ee-c056d3f1c0.zip/node_modules/prop-types/index.js","webpack://grafana/../../opt/drone/yarncache/prop-types-npm-15.8.1-17c71ee7ee-c056d3f1c0.zip/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://grafana/../../opt/drone/yarncache/toggle-selection-npm-1.0.6-c506b73005-a90dc80ed1.zip/node_modules/toggle-selection/index.js"],"sourcesContent":["import createCache from '@emotion/cache';\nimport { serializeStyles } from '@emotion/serialize';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\n\nfunction insertWithoutScoping(cache, serialized) {\n if (cache.inserted[serialized.name] === undefined) {\n return cache.insert('', serialized, cache.sheet, true);\n }\n}\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar createEmotion = function createEmotion(options) {\n var cache = createCache(options); // $FlowFixMe\n\n cache.sheet.speedy = function (value) {\n if (process.env.NODE_ENV !== 'production' && this.ctr !== 0) {\n throw new Error('speedy must be changed before any rules are inserted');\n }\n\n this.isSpeedy = value;\n };\n\n cache.compat = true;\n\n var css = function css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered, undefined);\n insertStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var keyframes = function keyframes() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n var animation = \"animation-\" + serialized.name;\n insertWithoutScoping(cache, {\n name: serialized.name,\n styles: \"@keyframes \" + animation + \"{\" + serialized.styles + \"}\"\n });\n return animation;\n };\n\n var injectGlobal = function injectGlobal() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n insertWithoutScoping(cache, serialized);\n };\n\n var cx = function cx() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n return {\n css: css,\n cx: cx,\n injectGlobal: injectGlobal,\n keyframes: keyframes,\n hydrate: function hydrate(ids) {\n ids.forEach(function (key) {\n cache.inserted[key] = true;\n });\n },\n flush: function flush() {\n cache.registered = {};\n cache.inserted = {};\n cache.sheet.flush();\n },\n // $FlowFixMe\n sheet: cache.sheet,\n cache: cache,\n getRegisteredStyles: getRegisteredStyles.bind(null, cache.registered),\n merge: merge.bind(null, cache.registered, css)\n };\n};\n\nvar classnames = function classnames(args) {\n var cls = '';\n\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nexport default createEmotion;\n","import '@emotion/cache';\nimport '@emotion/serialize';\nimport '@emotion/utils';\nimport createEmotion from '../create-instance/dist/emotion-css-create-instance.esm.js';\n\nvar _createEmotion = createEmotion({\n key: 'css'\n}),\n flush = _createEmotion.flush,\n hydrate = _createEmotion.hydrate,\n cx = _createEmotion.cx,\n merge = _createEmotion.merge,\n getRegisteredStyles = _createEmotion.getRegisteredStyles,\n injectGlobal = _createEmotion.injectGlobal,\n keyframes = _createEmotion.keyframes,\n css = _createEmotion.css,\n sheet = _createEmotion.sheet,\n cache = _createEmotion.cache;\n\nexport { cache, css, cx, flush, getRegisteredStyles, hydrate, injectGlobal, keyframes, merge, sheet };\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { IconButton, useStyles2 } from '@grafana/ui';\nimport { css } from '@emotion/css';\nimport React from 'react';\n\nconst getStyles = () => {\n return {\n TimelineCollapser: css`\n align-items: center;\n display: flex;\n flex: none;\n justify-content: center;\n margin-right: 0.5rem;\n `,\n };\n};\n\ntype CollapserProps = {\n onCollapseAll: () => void;\n onCollapseOne: () => void;\n onExpandOne: () => void;\n onExpandAll: () => void;\n};\n\nexport function TimelineCollapser(props: CollapserProps) {\n const { onExpandAll, onExpandOne, onCollapseAll, onCollapseOne } = props;\n const styles = useStyles2(getStyles);\n return (\n
\n \n \n \n \n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// // export default {\n// const updateTypes = {\n// DRAG_END: 'DRAG_END',\n// DRAG_MOVE: 'DRAG_MOVE',\n// DRAG_START: 'DRAG_START',\n// MOUSE_ENTER: 'MOUSE_ENTER',\n// MOUSE_LEAVE: 'MOUSE_LEAVE',\n// MOUSE_MOVE: 'MOUSE_MOVE',\n// };\n\n// const typeUpdateTypes = updateTypes as { [K in keyof typeof updateTypes]: K };\n\nenum EUpdateTypes {\n DragEnd = 'DragEnd',\n DragMove = 'DragMove',\n DragStart = 'DragStart',\n MouseEnter = 'MouseEnter',\n MouseLeave = 'MouseLeave',\n MouseMove = 'MouseMove',\n}\n\nexport default EUpdateTypes;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { get as _get } from 'lodash';\n\nimport EUpdateTypes from './EUpdateTypes';\nimport { DraggableBounds, DraggingUpdate } from './types';\nimport { TNil } from '../../types';\n\nconst LEFT_MOUSE_BUTTON = 0;\n\ntype DraggableManagerOptions = {\n getBounds: (tag: string | TNil) => DraggableBounds;\n onMouseEnter?: (update: DraggingUpdate) => void;\n onMouseLeave?: (update: DraggingUpdate) => void;\n onMouseMove?: (update: DraggingUpdate) => void;\n onDragStart?: (update: DraggingUpdate) => void;\n onDragMove?: (update: DraggingUpdate) => void;\n onDragEnd?: (update: DraggingUpdate) => void;\n resetBoundsOnResize?: boolean;\n tag?: string;\n};\n\nexport default class DraggableManager {\n // cache the last known DraggableBounds (invalidate via `#resetBounds())\n _bounds: DraggableBounds | TNil;\n _isDragging: boolean;\n // optional callbacks for various dragging events\n _onMouseEnter: ((update: DraggingUpdate) => void) | TNil;\n _onMouseLeave: ((update: DraggingUpdate) => void) | TNil;\n _onMouseMove: ((update: DraggingUpdate) => void) | TNil;\n _onDragStart: ((update: DraggingUpdate) => void) | TNil;\n _onDragMove: ((update: DraggingUpdate) => void) | TNil;\n _onDragEnd: ((update: DraggingUpdate) => void) | TNil;\n // whether to reset the bounds on window resize\n _resetBoundsOnResize: boolean;\n\n /**\n * Get the `DraggableBounds` for the current drag. The returned value is\n * cached until either `#resetBounds()` is called or the window is resized\n * (assuming `_resetBoundsOnResize` is `true`). The `DraggableBounds` defines\n * the range the current drag can span to. It also establishes the left offset\n * to adjust `clientX` by (from the `MouseEvent`s).\n */\n getBounds: (tag: string | TNil) => DraggableBounds;\n\n // convenience data\n tag: string | TNil;\n\n // handlers for integration with DOM elements\n handleMouseEnter: (event: React.MouseEvent) => void;\n handleMouseMove: (event: React.MouseEvent) => void;\n handleMouseLeave: (event: React.MouseEvent) => void;\n handleMouseDown: (event: React.MouseEvent) => void;\n\n constructor({ getBounds, tag, resetBoundsOnResize = true, ...rest }: DraggableManagerOptions) {\n this.handleMouseDown = this._handleDragEvent;\n this.handleMouseEnter = this._handleMinorMouseEvent;\n this.handleMouseMove = this._handleMinorMouseEvent;\n this.handleMouseLeave = this._handleMinorMouseEvent;\n\n this.getBounds = getBounds;\n this.tag = tag;\n this._isDragging = false;\n this._bounds = undefined;\n this._resetBoundsOnResize = Boolean(resetBoundsOnResize);\n if (this._resetBoundsOnResize) {\n window.addEventListener('resize', this.resetBounds);\n }\n this._onMouseEnter = rest.onMouseEnter;\n this._onMouseLeave = rest.onMouseLeave;\n this._onMouseMove = rest.onMouseMove;\n this._onDragStart = rest.onDragStart;\n this._onDragMove = rest.onDragMove;\n this._onDragEnd = rest.onDragEnd;\n }\n\n _getBounds(): DraggableBounds {\n if (!this._bounds) {\n this._bounds = this.getBounds(this.tag);\n }\n return this._bounds;\n }\n\n _getPosition(clientX: number) {\n const { clientXLeft, maxValue, minValue, width } = this._getBounds();\n let x = clientX - clientXLeft;\n let value = x / width;\n if (minValue != null && value < minValue) {\n value = minValue;\n x = minValue * width;\n } else if (maxValue != null && value > maxValue) {\n value = maxValue;\n x = maxValue * width;\n }\n return { value, x };\n }\n\n _stopDragging() {\n window.removeEventListener('mousemove', this._handleDragEvent);\n window.removeEventListener('mouseup', this._handleDragEvent);\n const style = _get(document, 'body.style');\n if (style) {\n style.userSelect = null;\n }\n this._isDragging = false;\n }\n\n isDragging() {\n return this._isDragging;\n }\n\n dispose() {\n if (this._isDragging) {\n this._stopDragging();\n }\n if (this._resetBoundsOnResize) {\n window.removeEventListener('resize', this.resetBounds);\n }\n this._bounds = undefined;\n this._onMouseEnter = undefined;\n this._onMouseLeave = undefined;\n this._onMouseMove = undefined;\n this._onDragStart = undefined;\n this._onDragMove = undefined;\n this._onDragEnd = undefined;\n }\n\n resetBounds = () => {\n this._bounds = undefined;\n };\n\n _handleMinorMouseEvent = (event: React.MouseEvent) => {\n const { button, clientX, type: eventType } = event;\n if (this._isDragging || button !== LEFT_MOUSE_BUTTON) {\n return;\n }\n let type: EUpdateTypes | null = null;\n let handler: ((update: DraggingUpdate) => void) | TNil;\n if (eventType === 'mouseenter') {\n type = EUpdateTypes.MouseEnter;\n handler = this._onMouseEnter;\n } else if (eventType === 'mouseleave') {\n type = EUpdateTypes.MouseLeave;\n handler = this._onMouseLeave;\n } else if (eventType === 'mousemove') {\n type = EUpdateTypes.MouseMove;\n handler = this._onMouseMove;\n } else {\n throw new Error(`invalid event type: ${eventType}`);\n }\n if (!handler) {\n return;\n }\n const { value, x } = this._getPosition(clientX);\n handler({\n event,\n type,\n value,\n x,\n manager: this,\n tag: this.tag,\n });\n };\n\n _handleDragEvent = (event: MouseEvent | React.MouseEvent) => {\n const { button, clientX, type: eventType } = event;\n let type: EUpdateTypes | null = null;\n let handler: ((update: DraggingUpdate) => void) | TNil;\n if (eventType === 'mousedown') {\n if (this._isDragging || button !== LEFT_MOUSE_BUTTON) {\n return;\n }\n window.addEventListener('mousemove', this._handleDragEvent);\n window.addEventListener('mouseup', this._handleDragEvent);\n const style = _get(document, 'body.style');\n if (style) {\n style.userSelect = 'none';\n }\n this._isDragging = true;\n\n type = EUpdateTypes.DragStart;\n handler = this._onDragStart;\n } else if (eventType === 'mousemove') {\n if (!this._isDragging) {\n return;\n }\n type = EUpdateTypes.DragMove;\n handler = this._onDragMove;\n } else if (eventType === 'mouseup') {\n if (!this._isDragging) {\n return;\n }\n this._stopDragging();\n type = EUpdateTypes.DragEnd;\n handler = this._onDragEnd;\n } else {\n throw new Error(`invalid event type: ${eventType}`);\n }\n if (!handler) {\n return;\n }\n const { value, x } = this._getPosition(clientX);\n handler({\n event,\n type,\n value,\n x,\n manager: this,\n tag: this.tag,\n });\n };\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { stylesFactory } from '@grafana/ui';\n\nimport { TNil } from '../../types';\nimport DraggableManager, { DraggableBounds, DraggingUpdate } from '../../utils/DraggableManager';\n\nexport const getStyles = stylesFactory(() => {\n return {\n TimelineColumnResizer: css`\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n `,\n wrapper: css`\n bottom: 0;\n position: absolute;\n top: 0;\n `,\n dragger: css`\n border-left: 2px solid transparent;\n cursor: col-resize;\n height: 5000px;\n margin-left: -1px;\n position: absolute;\n top: 0;\n width: 1px;\n z-index: 10;\n &:hover {\n border-left: 2px solid rgba(0, 0, 0, 0.3);\n }\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -8px;\n right: 0;\n content: ' ';\n }\n `,\n draggerDragging: css`\n background: rgba(136, 0, 136, 0.05);\n width: unset;\n &::before {\n left: -2000px;\n right: -2000px;\n }\n `,\n draggerDraggingLeft: css`\n border-left: 2px solid #808;\n border-right: 1px solid #999;\n `,\n draggerDraggingRight: css`\n border-left: 1px solid #999;\n border-right: 2px solid #808;\n `,\n gripIcon: css`\n position: absolute;\n top: 0;\n bottom: 0;\n &::before,\n &::after {\n border-right: 1px solid #ccc;\n content: ' ';\n height: 9px;\n position: absolute;\n right: 9px;\n top: 25px;\n }\n &::after {\n right: 5px;\n }\n `,\n gripIconDragging: css`\n &::before,\n &::after {\n border-right: 1px solid rgba(136, 0, 136, 0.5);\n }\n `,\n };\n});\n\ntype TimelineColumnResizerProps = {\n min: number;\n max: number;\n onChange: (newSize: number) => void;\n position: number;\n columnResizeHandleHeight: number;\n};\n\ntype TimelineColumnResizerState = {\n dragPosition: number | TNil;\n};\n\nexport default class TimelineColumnResizer extends React.PureComponent<\n TimelineColumnResizerProps,\n TimelineColumnResizerState\n> {\n state: TimelineColumnResizerState;\n\n _dragManager: DraggableManager;\n _rootElm: Element | TNil;\n\n constructor(props: TimelineColumnResizerProps) {\n super(props);\n this._dragManager = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleDragEnd,\n onDragMove: this._handleDragUpdate,\n onDragStart: this._handleDragUpdate,\n });\n this._rootElm = undefined;\n this.state = {\n dragPosition: null,\n };\n }\n\n componentWillUnmount() {\n this._dragManager.dispose();\n }\n\n _setRootElm = (elm: Element | TNil) => {\n this._rootElm = elm;\n };\n\n _getDraggingBounds = (): DraggableBounds => {\n if (!this._rootElm) {\n throw new Error('invalid state');\n }\n const { left: clientXLeft, width } = this._rootElm.getBoundingClientRect();\n const { min, max } = this.props;\n return {\n clientXLeft,\n width,\n maxValue: max,\n minValue: min,\n };\n };\n\n _handleDragUpdate = ({ value }: DraggingUpdate) => {\n this.setState({ dragPosition: value });\n };\n\n _handleDragEnd = ({ manager, value }: DraggingUpdate) => {\n manager.resetBounds();\n this.setState({ dragPosition: null });\n this.props.onChange(value);\n };\n\n render() {\n let left;\n let draggerStyle: React.CSSProperties;\n const { position, columnResizeHandleHeight } = this.props;\n const { dragPosition } = this.state;\n left = `${position * 100}%`;\n const gripStyle = { left };\n let isDraggingLeft = false;\n let isDraggingRight = false;\n const styles = getStyles();\n\n if (this._dragManager.isDragging() && this._rootElm && dragPosition != null) {\n isDraggingLeft = dragPosition < position;\n isDraggingRight = dragPosition > position;\n left = `${dragPosition * 100}%`;\n // Draw a highlight from the current dragged position back to the original\n // position, e.g. highlight the change. Draw the highlight via `left` and\n // `right` css styles (simpler than using `width`).\n const draggerLeft = `${Math.min(position, dragPosition) * 100}%`;\n // subtract 1px for draggerRight to deal with the right border being off\n // by 1px when dragging left\n const draggerRight = `calc(${(1 - Math.max(position, dragPosition)) * 100}% - 1px)`;\n draggerStyle = { left: draggerLeft, right: draggerRight };\n } else {\n draggerStyle = gripStyle;\n }\n draggerStyle.height = columnResizeHandleHeight;\n\n const isDragging = isDraggingLeft || isDraggingRight;\n return (\n
\n \n \n
\n );\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css, cx } from '@emotion/css';\nimport { stylesFactory } from '@grafana/ui';\nimport { TUpdateViewRangeTimeFunction, ViewRangeTime, ViewRangeTimeUpdate } from '../types';\nimport { TNil } from '../../types';\nimport DraggableManager, { DraggableBounds, DraggingUpdate } from '../../utils/DraggableManager';\n\n// exported for testing\nexport const getStyles = stylesFactory(() => {\n return {\n TimelineViewingLayer: css`\n label: TimelineViewingLayer;\n bottom: 0;\n cursor: vertical-text;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n `,\n TimelineViewingLayerCursorGuide: css`\n label: TimelineViewingLayerCursorGuide;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 1px;\n background-color: red;\n `,\n TimelineViewingLayerDragged: css`\n label: TimelineViewingLayerDragged;\n position: absolute;\n top: 0;\n bottom: 0;\n `,\n TimelineViewingLayerDraggedDraggingLeft: css`\n label: TimelineViewingLayerDraggedDraggingLeft;\n border-left: 1px solid;\n `,\n TimelineViewingLayerDraggedDraggingRight: css`\n label: TimelineViewingLayerDraggedDraggingRight;\n border-right: 1px solid;\n `,\n TimelineViewingLayerDraggedShiftDrag: css`\n label: TimelineViewingLayerDraggedShiftDrag;\n background-color: rgba(68, 68, 255, 0.2);\n border-color: #44f;\n `,\n TimelineViewingLayerDraggedReframeDrag: css`\n label: TimelineViewingLayerDraggedReframeDrag;\n background-color: rgba(255, 68, 68, 0.2);\n border-color: #f44;\n `,\n TimelineViewingLayerFullOverlay: css`\n label: TimelineViewingLayerFullOverlay;\n bottom: 0;\n cursor: col-resize;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n user-select: none;\n `,\n };\n});\n\ntype TimelineViewingLayerProps = {\n /**\n * `boundsInvalidator` is an arbitrary prop that lets the component know the\n * bounds for dragging need to be recalculated. In practice, the name column\n * width serves fine for this.\n */\n boundsInvalidator: any | null | undefined;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n viewRangeTime: ViewRangeTime;\n};\n\ntype TDraggingLeftLayout = {\n isDraggingLeft: boolean;\n left: string;\n width: string;\n};\n\ntype TOutOfViewLayout = {\n isOutOfView: true;\n};\n\nfunction isOutOfView(layout: TDraggingLeftLayout | TOutOfViewLayout): layout is TOutOfViewLayout {\n return Reflect.has(layout, 'isOutOfView');\n}\n\n/**\n * Map from a sub range to the greater view range, e.g, when the view range is\n * the middle half ([0.25, 0.75]), a value of 0.25 befomes 3/8.\n * @returns {number}\n */\nfunction mapFromViewSubRange(viewStart: number, viewEnd: number, value: number) {\n return viewStart + value * (viewEnd - viewStart);\n}\n\n/**\n * Map a value from the view ([0, 1]) to a sub-range, e.g, when the view range is\n * the middle half ([0.25, 0.75]), a value of 3/8 becomes 1/4.\n * @returns {number}\n */\nfunction mapToViewSubRange(viewStart: number, viewEnd: number, value: number) {\n return (value - viewStart) / (viewEnd - viewStart);\n}\n\n/**\n * Get the layout for the \"next\" view range time, e.g. the difference from the\n * drag start and the drag end. This is driven by `shiftStart`, `shiftEnd` or\n * `reframe` on `props.viewRangeTime`, not by the current state of the\n * component. So, it reflects in-progress dragging from the span minimap.\n */\nfunction getNextViewLayout(start: number, position: number): TDraggingLeftLayout | TOutOfViewLayout {\n let [left, right] = start < position ? [start, position] : [position, start];\n if (left >= 1 || right <= 0) {\n return { isOutOfView: true };\n }\n if (left < 0) {\n left = 0;\n }\n if (right > 1) {\n right = 1;\n }\n return {\n isDraggingLeft: start > position,\n left: `${left * 100}%`,\n width: `${(right - left) * 100}%`,\n };\n}\n\n/**\n * Render the visual indication of the \"next\" view range.\n */\nfunction getMarkers(viewStart: number, viewEnd: number, from: number, to: number, isShift: boolean): React.ReactNode {\n const mappedFrom = mapToViewSubRange(viewStart, viewEnd, from);\n const mappedTo = mapToViewSubRange(viewStart, viewEnd, to);\n const layout = getNextViewLayout(mappedFrom, mappedTo);\n if (isOutOfView(layout)) {\n return null;\n }\n const { isDraggingLeft, left, width } = layout;\n const styles = getStyles();\n const cls = cx({\n [styles.TimelineViewingLayerDraggedDraggingRight]: !isDraggingLeft,\n [styles.TimelineViewingLayerDraggedReframeDrag]: !isShift,\n [styles.TimelineViewingLayerDraggedShiftDrag]: isShift,\n });\n return (\n \n );\n}\n\n/**\n * `TimelineViewingLayer` is rendered on top of the TimelineHeaderRow time\n * labels; it handles showing the current view range and handles mouse UX for\n * modifying it.\n */\nexport default class TimelineViewingLayer extends React.PureComponent {\n _draggerReframe: DraggableManager;\n _root: Element | TNil;\n\n constructor(props: TimelineViewingLayerProps) {\n super(props);\n this._draggerReframe = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleReframeDragEnd,\n onDragMove: this._handleReframeDragUpdate,\n onDragStart: this._handleReframeDragUpdate,\n onMouseLeave: this._handleReframeMouseLeave,\n onMouseMove: this._handleReframeMouseMove,\n });\n this._root = undefined;\n }\n\n UNSAFE_componentWillReceiveProps(nextProps: TimelineViewingLayerProps) {\n const { boundsInvalidator } = this.props;\n if (boundsInvalidator !== nextProps.boundsInvalidator) {\n this._draggerReframe.resetBounds();\n }\n }\n\n componentWillUnmount() {\n this._draggerReframe.dispose();\n }\n\n _setRoot = (elm: Element | TNil) => {\n this._root = elm;\n };\n\n _getDraggingBounds = (): DraggableBounds => {\n if (!this._root) {\n throw new Error('invalid state');\n }\n const { left: clientXLeft, width } = this._root.getBoundingClientRect();\n return { clientXLeft, width };\n };\n\n _handleReframeMouseMove = ({ value }: DraggingUpdate) => {\n const [viewStart, viewEnd] = this.props.viewRangeTime.current;\n const cursor = mapFromViewSubRange(viewStart, viewEnd, value);\n this.props.updateNextViewRangeTime({ cursor });\n };\n\n _handleReframeMouseLeave = () => {\n this.props.updateNextViewRangeTime({ cursor: undefined });\n };\n\n _handleReframeDragUpdate = ({ value }: DraggingUpdate) => {\n const { current, reframe } = this.props.viewRangeTime;\n const [viewStart, viewEnd] = current;\n const shift = mapFromViewSubRange(viewStart, viewEnd, value);\n const anchor = reframe ? reframe.anchor : shift;\n const update = { reframe: { anchor, shift } };\n this.props.updateNextViewRangeTime(update);\n };\n\n _handleReframeDragEnd = ({ manager, value }: DraggingUpdate) => {\n const { current, reframe } = this.props.viewRangeTime;\n const [viewStart, viewEnd] = current;\n const shift = mapFromViewSubRange(viewStart, viewEnd, value);\n const anchor = reframe ? reframe.anchor : shift;\n const [start, end] = shift < anchor ? [shift, anchor] : [anchor, shift];\n manager.resetBounds();\n this.props.updateViewRangeTime(start, end, 'timeline-header');\n };\n\n render() {\n const { viewRangeTime } = this.props;\n const { current, cursor, reframe, shiftEnd, shiftStart } = viewRangeTime;\n const [viewStart, viewEnd] = current;\n const haveNextTimeRange = reframe != null || shiftEnd != null || shiftStart != null;\n let cusrorPosition: string | TNil;\n if (!haveNextTimeRange && cursor != null && cursor >= viewStart && cursor <= viewEnd) {\n cusrorPosition = `${mapToViewSubRange(viewStart, viewEnd, cursor) * 100}%`;\n }\n const styles = getStyles();\n return (\n \n {cusrorPosition != null && (\n \n )}\n {reframe != null && getMarkers(viewStart, viewEnd, reframe.anchor, reframe.shift, false)}\n {shiftEnd != null && getMarkers(viewStart, viewEnd, viewEnd, shiftEnd, true)}\n {shiftStart != null && getMarkers(viewStart, viewEnd, viewStart, shiftStart, true)}\n \n );\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport moment from 'moment-timezone';\nimport { round as _round, dropWhile as _dropWhile } from 'lodash';\n\nimport { toFloatPrecision } from './number';\n\nconst TODAY = 'Today';\nconst YESTERDAY = 'Yesterday';\n\nexport const STANDARD_DATE_FORMAT = 'YYYY-MM-DD';\nexport const STANDARD_TIME_FORMAT = 'HH:mm';\nexport const STANDARD_DATETIME_FORMAT = 'MMMM D YYYY, HH:mm:ss.SSS';\nexport const ONE_MILLISECOND = 1000;\nexport const ONE_SECOND = 1000 * ONE_MILLISECOND;\nexport const ONE_MINUTE = 60 * ONE_SECOND;\nexport const ONE_HOUR = 60 * ONE_MINUTE;\nexport const ONE_DAY = 24 * ONE_HOUR;\nexport const DEFAULT_MS_PRECISION = Math.log10(ONE_MILLISECOND);\n\nconst UNIT_STEPS: Array<{ unit: string; microseconds: number; ofPrevious: number }> = [\n { unit: 'd', microseconds: ONE_DAY, ofPrevious: 24 },\n { unit: 'h', microseconds: ONE_HOUR, ofPrevious: 60 },\n { unit: 'm', microseconds: ONE_MINUTE, ofPrevious: 60 },\n { unit: 's', microseconds: ONE_SECOND, ofPrevious: 1000 },\n { unit: 'ms', microseconds: ONE_MILLISECOND, ofPrevious: 1000 },\n { unit: 'μs', microseconds: 1, ofPrevious: 1000 },\n];\n\n/**\n * @param {number} timestamp\n * @param {number} initialTimestamp\n * @param {number} totalDuration\n * @returns {number} 0-100 percentage\n */\nexport function getPercentageOfDuration(duration: number, totalDuration: number) {\n return (duration / totalDuration) * 100;\n}\n\nconst quantizeDuration = (duration: number, floatPrecision: number, conversionFactor: number) =>\n toFloatPrecision(duration / conversionFactor, floatPrecision) * conversionFactor;\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in milliseconds\n */\nexport function formatDate(duration: number) {\n return moment(duration / ONE_MILLISECOND).format(STANDARD_DATE_FORMAT);\n}\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in milliseconds\n */\nexport function formatTime(duration: number) {\n return moment(duration / ONE_MILLISECOND).format(STANDARD_TIME_FORMAT);\n}\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in milliseconds\n */\nexport function formatDatetime(duration: number) {\n return moment(duration / ONE_MILLISECOND).format(STANDARD_DATETIME_FORMAT);\n}\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in milliseconds\n */\nexport function formatMillisecondTime(duration: number) {\n const targetDuration = quantizeDuration(duration, DEFAULT_MS_PRECISION, ONE_MILLISECOND);\n return `${moment.duration(targetDuration / ONE_MILLISECOND).asMilliseconds()}ms`;\n}\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in seconds\n */\nexport function formatSecondTime(duration: number) {\n const targetDuration = quantizeDuration(duration, DEFAULT_MS_PRECISION, ONE_SECOND);\n return `${moment.duration(targetDuration / ONE_MILLISECOND).asSeconds()}s`;\n}\n\n/**\n * Humanizes the duration for display.\n *\n * Example:\n * 5000ms => 5s\n * 1000μs => 1ms\n * 183840s => 2d 3h\n *\n * @param {number} duration (in microseconds)\n * @return {string} formatted duration\n */\nexport function formatDuration(duration: number): string {\n // Drop all units that are too large except the last one\n const [primaryUnit, secondaryUnit] = _dropWhile(\n UNIT_STEPS,\n ({ microseconds }, index) => index < UNIT_STEPS.length - 1 && microseconds > duration\n );\n\n if (primaryUnit.ofPrevious === 1000) {\n // If the unit is decimal based, display as a decimal\n return `${_round(duration / primaryUnit.microseconds, 2)}${primaryUnit.unit}`;\n }\n\n const primaryValue = Math.floor(duration / primaryUnit.microseconds);\n const primaryUnitString = `${primaryValue}${primaryUnit.unit}`;\n const secondaryValue = Math.round((duration / secondaryUnit.microseconds) % primaryUnit.ofPrevious);\n const secondaryUnitString = `${secondaryValue}${secondaryUnit.unit}`;\n return secondaryValue === 0 ? primaryUnitString : `${primaryUnitString} ${secondaryUnitString}`;\n}\n\nexport function formatRelativeDate(value: any, fullMonthName = false) {\n const m = moment.isMoment(value) ? value : moment(value);\n const monthFormat = fullMonthName ? 'MMMM' : 'MMM';\n const dt = new Date();\n if (dt.getFullYear() !== m.year()) {\n return m.format(`${monthFormat} D, YYYY`);\n }\n const mMonth = m.month();\n const mDate = m.date();\n const date = dt.getDate();\n if (mMonth === dt.getMonth() && mDate === date) {\n return TODAY;\n }\n dt.setDate(date - 1);\n if (mMonth === dt.getMonth() && mDate === dt.getDate()) {\n return YESTERDAY;\n }\n return m.format(`${monthFormat} D`);\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * given a number and a desired precision for the floating\n * side, return the number at the new precision.\n *\n * toFloatPrecision(3.55, 1) // 3.5\n * toFloatPrecision(0.04422, 2) // 0.04\n * toFloatPrecision(6.24e6, 2) // 6240000.00\n *\n * does not support numbers that use \"e\" notation on toString.\n *\n * @param {number} number\n * @param {number} precision\n * @returns {number} number at new floating precision\n */\nexport function toFloatPrecision(number: number, precision: number): number {\n const log10Length = Math.floor(Math.log10(Math.abs(number))) + 1;\n const targetPrecision = precision + log10Length;\n\n if (targetPrecision <= 0) {\n return Math.trunc(number);\n }\n\n return Number(number.toPrecision(targetPrecision));\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TraceSpan } from '../types/trace';\n\nexport type ViewedBoundsFunctionType = (start: number, end: number) => { start: number; end: number };\n/**\n * Given a range (`min`, `max`) and factoring in a zoom (`viewStart`, `viewEnd`)\n * a function is created that will find the position of a sub-range (`start`, `end`).\n * The calling the generated method will return the result as a `{ start, end }`\n * object with values ranging in [0, 1].\n *\n * @param {number} min The start of the outer range.\n * @param {number} max The end of the outer range.\n * @param {number} viewStart The start of the zoom, on a range of [0, 1],\n * relative to the `min`, `max`.\n * @param {number} viewEnd The end of the zoom, on a range of [0, 1],\n * relative to the `min`, `max`.\n * @returns {(number, number) => Object} Created view bounds function\n */\nexport function createViewedBoundsFunc(viewRange: { min: number; max: number; viewStart: number; viewEnd: number }) {\n const { min, max, viewStart, viewEnd } = viewRange;\n const duration = max - min;\n const viewMin = min + viewStart * duration;\n const viewMax = max - (1 - viewEnd) * duration;\n const viewWindow = viewMax - viewMin;\n\n /**\n * View bounds function\n * @param {number} start The start of the sub-range.\n * @param {number} end The end of the sub-range.\n * @returns {Object} The resultant range.\n */\n return (start: number, end: number) => ({\n start: (start - viewMin) / viewWindow,\n end: (end - viewMin) / viewWindow,\n });\n}\n\n/**\n * Returns `true` if the `span` has a tag matching `key` = `value`.\n *\n * @param {string} key The tag key to match on.\n * @param {any} value The tag value to match.\n * @param {{tags}} span An object with a `tags` property of { key, value }\n * items.\n * @returns {boolean} True if a match was found.\n */\nexport function spanHasTag(key: string, value: any, span: TraceSpan) {\n if (!Array.isArray(span.tags) || !span.tags.length) {\n return false;\n }\n return span.tags.some((tag) => tag.key === key && tag.value === value);\n}\n\nexport const isClientSpan = spanHasTag.bind(null, 'span.kind', 'client');\nexport const isServerSpan = spanHasTag.bind(null, 'span.kind', 'server');\n\nconst isErrorBool = spanHasTag.bind(null, 'error', true);\nconst isErrorStr = spanHasTag.bind(null, 'error', 'true');\nexport const isErrorSpan = (span: TraceSpan) => isErrorBool(span) || isErrorStr(span);\n\n/**\n * Returns `true` if at least one of the descendants of the `parentSpanIndex`\n * span contains an error tag.\n *\n * @param {TraceSpan[]} spans The spans for a trace - should be\n * sorted with children following parents.\n * @param {number} parentSpanIndex The index of the parent span - only\n * subsequent spans with depth less than\n * the parent span will be checked.\n * @returns {boolean} Returns `true` if a descendant contains an error tag.\n */\nexport function spanContainsErredSpan(spans: TraceSpan[], parentSpanIndex: number) {\n const { depth } = spans[parentSpanIndex];\n let i = parentSpanIndex + 1;\n for (; i < spans.length && spans[i].depth > depth; i++) {\n if (isErrorSpan(spans[i])) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Expects the first span to be the parent span.\n */\nexport function findServerChildSpan(spans: TraceSpan[]) {\n if (spans.length <= 1 || !isClientSpan(spans[0])) {\n return false;\n }\n const span = spans[0];\n const spanChildDepth = span.depth + 1;\n let i = 1;\n while (i < spans.length && spans[i].depth === spanChildDepth) {\n if (isServerSpan(spans[i])) {\n return spans[i];\n }\n i++;\n }\n return null;\n}\n\nexport const isKindClient = (span: TraceSpan): Boolean =>\n span.tags.some(({ key, value }) => key === 'span.kind' && value === 'client');\n\nexport { formatDuration } from '../utils/date';\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport tinycolor from 'tinycolor2';\nimport { GrafanaTheme2 } from '@grafana/data';\n\n/**\n * Tries to get a dark variant color. Either by simply inverting the luminosity and darkening or lightening the color\n * a bit, or if base is provided, tries 2 variants of lighter and darker colors and checks which is more readable with\n * the base.\n * @param theme\n * @param hex\n * @param base\n */\nexport function autoColor(theme: GrafanaTheme2, hex: string, base?: string) {\n if (theme.isLight) {\n return hex;\n } else {\n if (base) {\n const color = tinycolor(hex);\n return tinycolor\n .mostReadable(\n base,\n [\n color.clone().lighten(25),\n color.clone().lighten(10),\n color,\n color.clone().darken(10),\n color.clone().darken(25),\n ],\n {\n includeFallbackColors: false,\n }\n )\n .toHex8String();\n }\n const color = tinycolor(hex).toHsl();\n color.l = 1 - color.l;\n const newColor = tinycolor(color);\n return newColor.isLight() ? newColor.darken(5).toHex8String() : newColor.lighten(5).toHex8String();\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport { formatDuration } from './utils';\nimport { TNil } from '../types';\nimport { autoColor } from '../Theme';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n Ticks: css`\n label: Ticks;\n pointer-events: none;\n `,\n TicksTick: css`\n label: TicksTick;\n position: absolute;\n height: 100%;\n width: 1px;\n background: ${autoColor(theme, '#d8d8d8')};\n &:last-child {\n width: 0;\n }\n `,\n TicksTickLabel: css`\n label: TicksTickLabel;\n left: 0.25rem;\n position: absolute;\n `,\n TicksTickLabelEndAnchor: css`\n label: TicksTickLabelEndAnchor;\n left: initial;\n right: 0.25rem;\n `,\n };\n};\n\ntype TicksProps = {\n endTime?: number | TNil;\n numTicks: number;\n showLabels?: boolean | TNil;\n startTime?: number | TNil;\n};\n\nexport default function Ticks(props: TicksProps) {\n const { endTime, numTicks, showLabels, startTime } = props;\n\n let labels: undefined | string[];\n if (showLabels) {\n labels = [];\n const viewingDuration = (endTime || 0) - (startTime || 0);\n for (let i = 0; i < numTicks; i++) {\n const durationAtTick = (startTime || 0) + (i / (numTicks - 1)) * viewingDuration;\n labels.push(formatDuration(durationAtTick));\n }\n }\n const styles = useStyles2(getStyles);\n const ticks: React.ReactNode[] = [];\n for (let i = 0; i < numTicks; i++) {\n const portion = i / (numTicks - 1);\n ticks.push(\n \n {labels && (\n = 1 })}>\n {labels[i]}\n \n )}\n \n );\n }\n return
{ticks}
;\n}\n\nTicks.defaultProps = {\n endTime: null,\n showLabels: null,\n startTime: null,\n};\n","import { css } from '@emotion/css';\n\nexport const ubRelative = css`\n position: relative;\n`;\n\nexport const ubMb1 = css`\n margin-bottom: 0.25rem;\n`;\n\nexport const ubMy1 = css`\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n`;\n\nexport const ubM0 = css`\n margin: 0;\n`;\n\nexport const ubPx2 = css`\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n`;\n\nexport const ubPb2 = css`\n padding-bottom: 0.5rem;\n`;\n\nexport const ubFlex = css`\n display: flex;\n`;\n\nexport const ubItemsCenter = css`\n align-items: center;\n`;\n\nexport const ubFlexAuto = css`\n flex: 1 1 auto;\n min-width: 0; /* 1 */\n min-height: 0; /* 1 */\n`;\n\nexport const ubTxRightAlign = css`\n text-align: right;\n`;\n\nexport const ubInlineBlock = css`\n display: inline-block;\n`;\n\nexport const uAlignIcon = css`\n margin: -0.2rem 0.25rem 0 0;\n`;\n\nexport const uTxEllipsis = css`\n text-overflow: ellipsis;\n`;\n\nexport const uWidth100 = css`\n width: 100%;\n`;\n\nexport const uTxMuted = css`\n color: #aaa;\n`;\n\nexport const ubJustifyEnd = css`\n justify-content: flex-end;\n`;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { ubRelative } from '../uberUtilityStyles';\n\nconst getStyles = () => {\n return {\n flexRow: css`\n display: flex;\n flex: 0 1 auto;\n flex-direction: row;\n `,\n };\n};\n\ntype TTimelineRowProps = {\n children: React.ReactNode;\n className?: string;\n};\n\ninterface TimelineRowCellProps extends React.HTMLAttributes {\n children: React.ReactNode;\n className?: string;\n width: number;\n style?: {};\n}\n\nexport default function TimelineRow(props: TTimelineRowProps) {\n const { children, className = '', ...rest } = props;\n const styles = useStyles2(getStyles);\n return (\n
\n {children}\n
\n );\n}\n\nTimelineRow.defaultProps = {\n className: '',\n};\n\nexport function TimelineRowCell(props: TimelineRowCellProps) {\n const { children, className = '', width, style, ...rest } = props;\n const widthPercent = `${width * 100}%`;\n const mergedStyle = { ...style, flexBasis: widthPercent, maxWidth: widthPercent };\n return (\n
\n {children}\n
\n );\n}\n\nTimelineRowCell.defaultProps = { className: '', style: {} };\n\nTimelineRow.Cell = TimelineRowCell;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport { TimelineCollapser } from './TimelineCollapser';\nimport TimelineColumnResizer from './TimelineColumnResizer';\nimport TimelineViewingLayer from './TimelineViewingLayer';\nimport Ticks from '../Ticks';\nimport TimelineRow from '../TimelineRow';\nimport { TUpdateViewRangeTimeFunction, ViewRangeTime, ViewRangeTimeUpdate } from '../types';\nimport { autoColor } from '../../Theme';\nimport { ubFlex, ubPx2 } from '../../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n TimelineHeaderRow: css`\n label: TimelineHeaderRow;\n background: ${autoColor(theme, '#ececec')};\n border-bottom: 1px solid ${autoColor(theme, '#ccc')};\n height: 38px;\n line-height: 38px;\n width: 100%;\n z-index: 4;\n position: relative;\n `,\n TimelineHeaderRowTitle: css`\n label: TimelineHeaderRowTitle;\n flex: 1;\n overflow: hidden;\n margin: 0;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n TimelineHeaderWrapper: css`\n label: TimelineHeaderWrapper;\n align-items: center;\n `,\n };\n};\n\ntype TimelineHeaderRowProps = {\n duration: number;\n nameColumnWidth: number;\n numTicks: number;\n onCollapseAll: () => void;\n onCollapseOne: () => void;\n onColummWidthChange: (width: number) => void;\n onExpandAll: () => void;\n onExpandOne: () => void;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n viewRangeTime: ViewRangeTime;\n columnResizeHandleHeight: number;\n};\n\nexport default function TimelineHeaderRow(props: TimelineHeaderRowProps) {\n const {\n duration,\n nameColumnWidth,\n numTicks,\n onCollapseAll,\n onCollapseOne,\n onColummWidthChange,\n onExpandAll,\n onExpandOne,\n updateViewRangeTime,\n updateNextViewRangeTime,\n viewRangeTime,\n columnResizeHandleHeight,\n } = props;\n const [viewStart, viewEnd] = viewRangeTime.current;\n const styles = useStyles2(getStyles);\n return (\n \n \n

Service & Operation

\n \n
\n \n \n \n \n \n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntype THeightGetter = (index: number) => number;\n\n/**\n * Keeps track of the height and y-position for anything sequenctial where\n * y-positions follow one-after-another and can be derived from the height of\n * the prior entries. The height is known from an accessor function parameter\n * to the methods that require new knowledge the heights.\n *\n * @export\n * @class Positions\n */\nexport default class Positions {\n /**\n * Indicates how far past the explicitly required height or y-values should\n * checked.\n */\n bufferLen: number;\n dataLen: number;\n heights: number[];\n /**\n * `lastI` keeps track of which values have already been visited. In many\n * scenarios, values do not need to be revisited. But, revisiting is required\n * when heights have changed, so `lastI` can be forced.\n */\n lastI: number;\n ys: number[];\n\n constructor(bufferLen: number) {\n this.ys = [];\n this.heights = [];\n this.bufferLen = bufferLen;\n this.dataLen = -1;\n this.lastI = -1;\n }\n\n /**\n * Used to make sure the length of y-values and heights is consistent with\n * the context; in particular `lastI` needs to remain valid.\n */\n profileData(dataLength: number) {\n if (dataLength !== this.dataLen) {\n this.dataLen = dataLength;\n this.ys.length = dataLength;\n this.heights.length = dataLength;\n if (this.lastI >= dataLength) {\n this.lastI = dataLength - 1;\n }\n }\n }\n\n /**\n * Calculate and save the heights and y-values, based on `heightGetter`, from\n * `lastI` until the`max` index; the starting point (`lastI`) can be forced\n * via the `forcedLastI` parameter.\n * @param {number=} forcedLastI\n */\n calcHeights(max: number, heightGetter: THeightGetter, forcedLastI?: number) {\n if (forcedLastI != null) {\n this.lastI = forcedLastI;\n }\n let _max = max + this.bufferLen;\n if (_max <= this.lastI) {\n return;\n }\n if (_max >= this.heights.length) {\n _max = this.heights.length - 1;\n }\n let i = this.lastI;\n if (this.lastI === -1) {\n i = 0;\n this.ys[0] = 0;\n }\n while (i <= _max) {\n // eslint-disable-next-line no-multi-assign\n const h = (this.heights[i] = heightGetter(i));\n this.ys[i + 1] = this.ys[i] + h;\n i++;\n }\n this.lastI = _max;\n }\n\n /**\n * Verify the height and y-values from `lastI` up to `yValue`.\n */\n calcYs(yValue: number, heightGetter: THeightGetter) {\n while ((this.ys[this.lastI] == null || yValue > this.ys[this.lastI]) && this.lastI < this.dataLen - 1) {\n this.calcHeights(this.lastI, heightGetter);\n }\n }\n\n /**\n * Get the latest height for index `_i`. If it's in new terretory\n * (_i > lastI), find the heights (and y-values) leading up to it. If it's in\n * known territory (_i <= lastI) and the height is different than what is\n * known, recalculate subsequent y values, but don't confirm the heights of\n * those items, just update based on the difference.\n */\n confirmHeight(_i: number, heightGetter: THeightGetter) {\n let i = _i;\n if (i > this.lastI) {\n this.calcHeights(i, heightGetter);\n return;\n }\n const h = heightGetter(i);\n if (h === this.heights[i]) {\n return;\n }\n const chg = h - this.heights[i];\n this.heights[i] = h;\n // shift the y positions by `chg` for all known y positions\n while (++i <= this.lastI) {\n this.ys[i] += chg;\n }\n if (this.ys[this.lastI + 1] != null) {\n this.ys[this.lastI + 1] += chg;\n }\n }\n\n /**\n * Given a target y-value (`yValue`), find the closest index (in the `.ys`\n * array) that is prior to the y-value; e.g. map from y-value to index in\n * `.ys`.\n */\n findFloorIndex(yValue: number, heightGetter: THeightGetter): number {\n this.calcYs(yValue, heightGetter);\n\n let imin = 0;\n let imax = this.lastI;\n\n if (this.ys.length < 2 || yValue < this.ys[1]) {\n return 0;\n }\n if (yValue > this.ys[imax]) {\n return imax;\n }\n let i;\n while (imin < imax) {\n // eslint-disable-next-line no-bitwise\n i = (imin + 0.5 * (imax - imin)) | 0;\n if (yValue > this.ys[i]) {\n if (yValue <= this.ys[i + 1]) {\n return i;\n }\n imin = i;\n } else if (yValue < this.ys[i]) {\n if (yValue >= this.ys[i - 1]) {\n return i - 1;\n }\n imax = i;\n } else {\n return i;\n }\n }\n throw new Error(`unable to find floor index for y=${yValue}`);\n }\n\n /**\n * Get the `y` and `height` for a given row.\n *\n * @returns {{ height: number, y: number }}\n */\n getRowPosition(index: number, heightGetter: THeightGetter) {\n this.confirmHeight(index, heightGetter);\n return {\n height: this.heights[index],\n y: this.ys[index],\n };\n }\n\n /**\n * Get the estimated height of the whole shebang by extrapolating based on\n * the average known height.\n */\n getEstimatedHeight(): number {\n const known = this.ys[this.lastI] + this.heights[this.lastI];\n if (this.lastI >= this.dataLen - 1) {\n // eslint-disable-next-line no-bitwise\n return known | 0;\n }\n // eslint-disable-next-line no-bitwise\n return ((known / (this.lastI + 1)) * this.heights.length) | 0;\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\n\nimport Positions from './Positions';\nimport { TNil } from '../../types';\n\ntype TWrapperProps = {\n style: React.CSSProperties;\n ref: (elm: HTMLDivElement) => void;\n onScroll?: () => void;\n};\n\n/**\n * @typedef\n */\ntype TListViewProps = {\n /**\n * Number of elements in the list.\n */\n dataLength: number;\n /**\n * Convert item index (number) to the key (string). ListView uses both indexes\n * and keys to handle the addition of new rows.\n */\n getIndexFromKey: (key: string) => number;\n /**\n * Convert item key (string) to the index (number). ListView uses both indexes\n * and keys to handle the addition of new rows.\n */\n getKeyFromIndex: (index: number) => string;\n /**\n * Number of items to draw and add to the DOM, initially.\n */\n initialDraw?: number;\n /**\n * The parent provides fallback height measurements when there is not a\n * rendered element to measure.\n */\n itemHeightGetter: (index: number, key: string) => number;\n /**\n * Function that renders an item; rendered items are added directly to the\n * DOM, they are not wrapped in list item wrapper HTMLElement.\n */\n // itemRenderer(itemKey, style, i, attrs)\n itemRenderer: (\n itemKey: string,\n style: Record,\n index: number,\n attributes: Record\n ) => React.ReactNode;\n /**\n * `className` for the HTMLElement that holds the items.\n */\n itemsWrapperClassName?: string;\n /**\n * When adding new items to the DOM, this is the number of items to add above\n * and below the current view. E.g. if list is 100 items and is scrolled\n * halfway down (so items [46, 55] are in view), then when a new range of\n * items is rendered, it will render items `46 - viewBuffer` to\n * `55 + viewBuffer`.\n */\n viewBuffer: number;\n /**\n * The minimum number of items offscreen in either direction; e.g. at least\n * `viewBuffer` number of items must be off screen above and below the\n * current view, or more items will be rendered.\n */\n viewBufferMin: number;\n /**\n * When `true`, expect `_wrapperElm` to have `overflow: visible` and to,\n * essentially, be tall to the point the entire page will will end up\n * scrolling as a result of the ListView. Similar to react-virtualized\n * window scroller.\n *\n * - Ref: https://bvaughn.github.io/react-virtualized/#/components/WindowScroller\n * - Ref:https://github.com/bvaughn/react-virtualized/blob/497e2a1942529560681d65a9ef9f5e9c9c9a49ba/docs/WindowScroller.md\n */\n windowScroller?: boolean;\n /**\n * You need to pass in scrollElement when windowScroller is set to false.\n * This element is responsible for tracking scrolling for lazy loading.\n */\n scrollElement?: Element;\n};\n\nconst DEFAULT_INITIAL_DRAW = 100;\n\n/**\n * Virtualized list view component, for the most part, only renders the window\n * of items that are in-view with some buffer before and after. Listens for\n * scroll events and updates which items are rendered. See react-virtualized\n * for a suite of components with similar, but generalized, functionality.\n * https://github.com/bvaughn/react-virtualized\n *\n * Note: Presently, ListView cannot be a PureComponent. This is because ListView\n * is sensitive to the underlying state that drives the list items, but it\n * doesn't actually receive that state. So, a render may still be required even\n * if ListView's props are unchanged.\n *\n * @export\n * @class ListView\n */\nexport default class ListView extends React.Component {\n /**\n * Keeps track of the height and y-value of items, by item index, in the\n * ListView.\n */\n _yPositions: Positions;\n /**\n * Keep track of the known / measured heights of the rendered items; populated\n * with values through observation and keyed on the item key, not the item\n * index.\n */\n _knownHeights: Map;\n /**\n * The start index of the items currently drawn.\n */\n _startIndexDrawn: number;\n /**\n * The end index of the items currently drawn.\n */\n _endIndexDrawn: number;\n /**\n * The start index of the items currently in view.\n */\n _startIndex: number;\n /**\n * The end index of the items currently in view.\n */\n _endIndex: number;\n /**\n * Height of the visual window, e.g. height of the scroller element.\n */\n _viewHeight: number;\n /**\n * `scrollTop` of the current scroll position.\n */\n _scrollTop: number;\n /**\n * Used to keep track of whether or not a re-calculation of what should be\n * drawn / viewable has been scheduled.\n */\n _isScrolledOrResized: boolean;\n /**\n * If `windowScroller` is true, this notes how far down the page the scroller\n * is located. (Note: repositioning and below-the-fold views are untested)\n */\n _htmlTopOffset: number;\n _windowScrollListenerAdded: boolean;\n _htmlElm: HTMLElement;\n /**\n * Element holding the scroller.\n */\n _wrapperElm: Element | TNil;\n /**\n * HTMLElement holding the rendered items.\n */\n _itemHolderElm: HTMLElement | TNil;\n\n static defaultProps = {\n initialDraw: DEFAULT_INITIAL_DRAW,\n itemsWrapperClassName: '',\n windowScroller: false,\n };\n\n constructor(props: TListViewProps) {\n super(props);\n\n this._yPositions = new Positions(200);\n // _knownHeights is (item-key -> observed height) of list items\n this._knownHeights = new Map();\n\n this._startIndexDrawn = 2 ** 20;\n this._endIndexDrawn = -(2 ** 20);\n this._startIndex = 0;\n this._endIndex = 0;\n this._viewHeight = -1;\n this._scrollTop = -1;\n this._isScrolledOrResized = false;\n\n this._htmlTopOffset = -1;\n this._windowScrollListenerAdded = false;\n // _htmlElm is only relevant if props.windowScroller is true\n this._htmlElm = document.documentElement as any;\n this._wrapperElm = undefined;\n this._itemHolderElm = undefined;\n }\n\n componentDidMount() {\n if (this.props.windowScroller) {\n if (this._wrapperElm) {\n const { top } = this._wrapperElm.getBoundingClientRect();\n this._htmlTopOffset = top + this._htmlElm.scrollTop;\n }\n window.addEventListener('scroll', this._onScroll);\n this._windowScrollListenerAdded = true;\n } else {\n // The wrapper element should be the one that handles the scrolling. Once we are not using scroll-canvas we can remove this.\n this._wrapperElm = this.props.scrollElement;\n this._wrapperElm?.addEventListener('scroll', this._onScroll);\n }\n }\n\n componentDidUpdate() {\n if (this._itemHolderElm) {\n this._scanItemHeights();\n }\n }\n\n componentWillUnmount() {\n if (this._windowScrollListenerAdded) {\n window.removeEventListener('scroll', this._onScroll);\n } else {\n this._wrapperElm?.removeEventListener('scroll', this._onScroll);\n }\n }\n\n getViewHeight = () => this._viewHeight;\n\n /**\n * Get the index of the item at the bottom of the current view.\n */\n getBottomVisibleIndex = (): number => {\n const bottomY = this._scrollTop + this._viewHeight;\n return this._yPositions.findFloorIndex(bottomY, this._getHeight);\n };\n\n /**\n * Get the index of the item at the top of the current view.\n */\n getTopVisibleIndex = (): number => this._yPositions.findFloorIndex(this._scrollTop, this._getHeight);\n\n getRowPosition = (index: number): { height: number; y: number } =>\n this._yPositions.getRowPosition(index, this._getHeight);\n\n scrollToIndex = (index: number) => {\n // calculate the position of the list view relative to the scroll parent\n const { scrollElement } = this.props;\n const scrollElementTop = scrollElement?.getBoundingClientRect().top || 0;\n const listViewTop = (scrollElement?.scrollTop || 0) + (this._itemHolderElm?.getBoundingClientRect().top || 0);\n const listViewOffset = listViewTop - scrollElementTop;\n\n const itemOffset = this.getRowPosition(index).y;\n\n // hard code a small offset to leave a little bit of space above the focused span, so it is visually clear\n // that there is content above\n this.props.scrollElement?.scrollTo({ top: itemOffset + listViewOffset - 80 });\n };\n\n /**\n * Scroll event listener that schedules a remeasuring of which items should be\n * rendered.\n */\n _onScroll = () => {\n if (!this._isScrolledOrResized) {\n this._isScrolledOrResized = true;\n window.requestAnimationFrame(this._positionList);\n }\n };\n\n /**\n * Returns true is the view height (scroll window) or scroll position have\n * changed.\n */\n _isViewChanged() {\n if (!this._wrapperElm) {\n return false;\n }\n const useRoot = this.props.windowScroller;\n const clientHeight = useRoot ? this._htmlElm.clientHeight : this._wrapperElm.clientHeight;\n const scrollTop = useRoot ? this._htmlElm.scrollTop : this._wrapperElm.scrollTop;\n return clientHeight !== this._viewHeight || scrollTop !== this._scrollTop;\n }\n\n /**\n * Recalculate _startIndex and _endIndex, e.g. which items are in view.\n */\n _calcViewIndexes() {\n const useRoot = this.props.windowScroller;\n // funky if statement is to satisfy flow\n if (!useRoot) {\n /* istanbul ignore next */\n if (!this._wrapperElm) {\n this._viewHeight = -1;\n this._startIndex = 0;\n this._endIndex = 0;\n return;\n }\n this._viewHeight = this._wrapperElm.clientHeight;\n this._scrollTop = this._wrapperElm.scrollTop;\n } else {\n this._viewHeight = window.innerHeight - this._htmlTopOffset;\n this._scrollTop = window.scrollY;\n }\n const yStart = this._scrollTop;\n const yEnd = this._scrollTop + this._viewHeight;\n this._startIndex = this._yPositions.findFloorIndex(yStart, this._getHeight);\n this._endIndex = this._yPositions.findFloorIndex(yEnd, this._getHeight);\n }\n\n /**\n * Checked to see if the currently rendered items are sufficient, if not,\n * force an update to trigger more items to be rendered.\n */\n _positionList = () => {\n this._isScrolledOrResized = false;\n if (!this._wrapperElm) {\n return;\n }\n this._calcViewIndexes();\n // indexes drawn should be padded by at least props.viewBufferMin\n const maxStart = this.props.viewBufferMin > this._startIndex ? 0 : this._startIndex - this.props.viewBufferMin;\n const minEnd =\n this.props.viewBufferMin < this.props.dataLength - this._endIndex\n ? this._endIndex + this.props.viewBufferMin\n : this.props.dataLength - 1;\n if (maxStart < this._startIndexDrawn || minEnd > this._endIndexDrawn) {\n this.forceUpdate();\n }\n };\n\n _initWrapper = (elm: HTMLElement | TNil) => {\n if (!this.props.windowScroller) {\n return;\n }\n this._wrapperElm = elm;\n if (elm) {\n this._viewHeight = elm.clientHeight;\n }\n };\n\n _initItemHolder = (elm: HTMLElement | TNil) => {\n this._itemHolderElm = elm;\n this._scanItemHeights();\n };\n\n /**\n * Go through all items that are rendered and save their height based on their\n * item-key (which is on a data-* attribute). If any new or adjusted heights\n * are found, re-measure the current known y-positions (via .yPositions).\n */\n _scanItemHeights = () => {\n const getIndexFromKey = this.props.getIndexFromKey;\n if (!this._itemHolderElm) {\n return;\n }\n // note the keys for the first and last altered heights, the `yPositions`\n // needs to be updated\n let lowDirtyKey = null;\n let highDirtyKey = null;\n let isDirty = false;\n // iterating childNodes is faster than children\n // https://jsperf.com/large-htmlcollection-vs-large-nodelist\n const nodes = this._itemHolderElm.childNodes;\n const max = nodes.length;\n for (let i = 0; i < max; i++) {\n const node: HTMLElement = nodes[i] as any;\n // use `.getAttribute(...)` instead of `.dataset` for jest / JSDOM\n const itemKey = node.getAttribute('data-item-key');\n if (!itemKey) {\n // eslint-disable-next-line no-console\n console.warn('itemKey not found');\n continue;\n }\n // measure the first child, if it's available, otherwise the node itself\n // (likely not transferable to other contexts, and instead is specific to\n // how we have the items rendered)\n const measureSrc: Element = node.firstElementChild || node;\n const observed = measureSrc.clientHeight;\n const known = this._knownHeights.get(itemKey);\n if (observed !== known) {\n this._knownHeights.set(itemKey, observed);\n if (!isDirty) {\n isDirty = true;\n // eslint-disable-next-line no-multi-assign\n lowDirtyKey = highDirtyKey = itemKey;\n } else {\n highDirtyKey = itemKey;\n }\n }\n }\n if (lowDirtyKey != null && highDirtyKey != null) {\n // update yPositions, then redraw\n const imin = getIndexFromKey(lowDirtyKey);\n const imax = highDirtyKey === lowDirtyKey ? imin : getIndexFromKey(highDirtyKey);\n this._yPositions.calcHeights(imax, this._getHeight, imin);\n this.forceUpdate();\n }\n };\n\n /**\n * Get the height of the element at index `i`; first check the known heights,\n * fallback to `.props.itemHeightGetter(...)`.\n */\n _getHeight = (i: number) => {\n const key = this.props.getKeyFromIndex(i);\n const known = this._knownHeights.get(key);\n // known !== known iff known is NaN\n // eslint-disable-next-line no-self-compare\n if (known != null && known === known) {\n return known;\n }\n return this.props.itemHeightGetter(i, key);\n };\n\n render() {\n const {\n dataLength,\n getKeyFromIndex,\n initialDraw = DEFAULT_INITIAL_DRAW,\n itemRenderer,\n viewBuffer,\n viewBufferMin,\n } = this.props;\n const heightGetter = this._getHeight;\n const items = [];\n let start;\n let end;\n\n this._yPositions.profileData(dataLength);\n\n if (!this._wrapperElm) {\n start = 0;\n end = (initialDraw < dataLength ? initialDraw : dataLength) - 1;\n } else {\n if (this._isViewChanged()) {\n this._calcViewIndexes();\n }\n const maxStart = viewBufferMin > this._startIndex ? 0 : this._startIndex - viewBufferMin;\n const minEnd = viewBufferMin < dataLength - this._endIndex ? this._endIndex + viewBufferMin : dataLength - 1;\n if (maxStart < this._startIndexDrawn || minEnd > this._endIndexDrawn) {\n start = viewBuffer > this._startIndex ? 0 : this._startIndex - viewBuffer;\n end = this._endIndex + viewBuffer;\n if (end >= dataLength) {\n end = dataLength - 1;\n }\n } else {\n start = this._startIndexDrawn;\n end = this._endIndexDrawn > dataLength - 1 ? dataLength - 1 : this._endIndexDrawn;\n }\n }\n\n this._yPositions.calcHeights(end, heightGetter, start || -1);\n this._startIndexDrawn = start;\n this._endIndexDrawn = end;\n\n items.length = end - start + 1;\n for (let i = start; i <= end; i++) {\n const { y: top, height } = this._yPositions.getRowPosition(i, heightGetter);\n const style = {\n height,\n top,\n position: 'absolute',\n };\n const itemKey = getKeyFromIndex(i);\n const attrs = { 'data-item-key': itemKey };\n items.push(itemRenderer(itemKey, style, i, attrs));\n }\n const wrapperProps: TWrapperProps = {\n style: { position: 'relative' },\n ref: this._initWrapper,\n };\n if (!this.props.windowScroller) {\n wrapperProps.onScroll = this._onScroll;\n wrapperProps.style.height = '100%';\n wrapperProps.style.overflowY = 'auto';\n }\n const scrollerStyle = {\n position: 'relative' as 'relative',\n height: this._yPositions.getEstimatedHeight(),\n };\n return (\n
\n
\n \n {items}\n
\n
\n \n );\n }\n}\n","// Copyright (c) 2018 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport cx from 'classnames';\nimport IoAndroidOpen from 'react-icons/lib/io/android-open';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nexport const getStyles = () => {\n return {\n NewWindowIconLarge: css`\n label: NewWindowIconLarge;\n font-size: 1.5em;\n `,\n };\n};\n\ntype Props = {\n isLarge?: boolean;\n className?: string;\n};\n\nexport default function NewWindowIcon(props: Props) {\n const { isLarge, className, ...rest } = props;\n const styles = useStyles2(getStyles);\n const cls = cx({ [styles.NewWindowIconLarge]: isLarge }, className);\n return ;\n}\n\nNewWindowIcon.defaultProps = {\n isLarge: false,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { ReactElement } from 'react';\n\nexport type TooltipPlacement =\n | 'top'\n | 'left'\n | 'right'\n | 'bottom'\n | 'topLeft'\n | 'topRight'\n | 'bottomLeft'\n | 'bottomRight'\n | 'leftTop'\n | 'leftBottom'\n | 'rightTop'\n | 'rightBottom';\nexport type PopoverProps = {\n children: ReactElement;\n content: ReactElement;\n arrowPointAtCenter?: boolean;\n overlayClassName?: string;\n placement?: TooltipPlacement;\n};\n\nexport const UIPopover: React.ComponentType = function UIPopover(props: PopoverProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type TooltipProps = {\n title: string | ReactElement;\n getPopupContainer?: (triggerNode: Element) => HTMLElement;\n overlayClassName?: string;\n children: ReactElement;\n placement?: TooltipPlacement;\n mouseLeaveDelay?: number;\n arrowPointAtCenter?: boolean;\n onVisibleChange?: (visible: boolean) => void;\n};\n\nexport const UITooltip: React.ComponentType = function UITooltip(props: TooltipProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type IconProps = {\n type: string;\n className?: string;\n onClick?: React.MouseEventHandler;\n};\n\nexport const UIIcon: React.ComponentType = function UIIcon(props: IconProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type DropdownProps = {\n overlay: React.ReactNode;\n placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';\n trigger?: Array<'click' | 'hover' | 'contextMenu'>;\n children?: React.ReactNode;\n};\n\nexport const UIDropdown = function UIDropdown(props: DropdownProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type MenuProps = {\n children?: React.ReactNode;\n};\n\nexport const UIMenu = function UIMenu(props: MenuProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type MenuItemProps = {\n children?: React.ReactNode;\n};\n\nexport const UIMenuItem = function UIMenuItem(props: MenuItemProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type ButtonHTMLType = 'submit' | 'button' | 'reset';\nexport type ButtonProps = {\n children?: React.ReactNode;\n className?: string;\n htmlType?: ButtonHTMLType;\n icon?: string;\n onClick?: React.MouseEventHandler;\n disabled?: boolean;\n};\n\nexport const UIButton = function UIButton(props: ButtonProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type DividerProps = {\n className?: string;\n type?: 'vertical' | 'horizontal';\n};\n\nexport const UIDivider = function UIDivider(props: DividerProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type InputProps = {\n autosize?: boolean | null;\n placeholder?: string;\n onChange: (value: React.ChangeEvent) => void;\n suffix: React.ReactNode;\n value?: string;\n};\n\nexport const UIInput: React.FC = function UIInput(props: InputProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type InputGroupProps = {\n className?: string;\n compact?: boolean;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n};\n\nexport const UIInputGroup = function UIInputGroup(props: InputGroupProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type Elements = {\n Popover: React.ComponentType;\n Tooltip: React.ComponentType;\n Icon: React.ComponentType;\n Dropdown: React.ComponentType;\n Menu: React.ComponentType;\n MenuItem: React.ComponentType;\n Button: React.ComponentType;\n Divider: React.ComponentType;\n Input: React.ComponentType;\n InputGroup: React.ComponentType;\n};\n\n/**\n * Allows for injecting custom UI elements that will be used. Mainly for styling and removing dependency on\n * any specific UI library but can also inject specific behaviour.\n */\nconst UIElementsContext = React.createContext(undefined);\nUIElementsContext.displayName = 'UIElementsContext';\nexport default UIElementsContext;\n\ntype GetElementsContextProps = {\n children: (elements: Elements) => React.ReactNode;\n};\n\n/**\n * Convenience render prop style component to handle error state when elements are not defined.\n */\nexport function GetElementsContext(props: GetElementsContextProps) {\n return (\n \n {(value: Elements | undefined) => {\n if (!value) {\n throw new Error('Elements context is required. You probably forget to use UIElementsContext.Provider');\n }\n return props.children(value);\n }}\n \n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\n\n/**\n * There are several places where external links to spans are created. The url layout though is something\n * that should be decided on the application level and not on the component level but at the same time\n * propagating the factory function everywhere could be cumbersome so we use this context for that.\n */\nconst ExternalLinkContext = React.createContext<((traceID: string, spanID: string) => string) | undefined>(undefined);\nExternalLinkContext.displayName = 'ExternalLinkContext';\nexport default ExternalLinkContext;\n","// Copyright (c) 2019 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { TraceSpanReference } from '../types/trace';\nimport ExternalLinkContext from './externalLinkContext';\n\ntype ReferenceLinkProps = {\n reference: TraceSpanReference;\n children: React.ReactNode;\n className?: string;\n focusSpan: (spanID: string) => void;\n onClick?: () => void;\n};\n\nexport default function ReferenceLink(props: ReferenceLinkProps) {\n const { reference, children, className, focusSpan, ...otherProps } = props;\n delete otherProps.onClick;\n if (reference.span) {\n return (\n focusSpan(reference.spanID)} className={className} {...otherProps}>\n {children}\n \n );\n }\n\n return (\n \n {(createLinkToExternalSpan) => {\n if (!createLinkToExternalSpan) {\n throw new Error(\"ExternalLinkContext does not have a value, you probably forgot to setup it's provider\");\n }\n return (\n \n {children}\n \n );\n }}\n \n );\n}\n","// Copyright (c) 2019 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport { stylesFactory } from '@grafana/ui';\n\nimport NewWindowIcon from '../common/NewWindowIcon';\nimport { TraceSpanReference } from '../types/trace';\nimport { UITooltip, UIDropdown, UIMenuItem, UIMenu, TooltipPlacement } from '../uiElementsContext';\nimport ReferenceLink from '../url/ReferenceLink';\n\nexport const getStyles = stylesFactory(() => {\n return {\n MultiParent: css`\n padding: 0 5px;\n color: #000;\n & ~ & {\n margin-left: 5px;\n }\n `,\n TraceRefLink: css`\n display: flex;\n justify-content: space-between;\n `,\n NewWindowIcon: css`\n margin: 0.2em 0 0;\n `,\n tooltip: css`\n max-width: none;\n `,\n };\n});\n\ntype TReferencesButtonProps = {\n references: TraceSpanReference[];\n children: React.ReactNode;\n tooltipText: string;\n focusSpan: (spanID: string) => void;\n};\n\nexport default class ReferencesButton extends React.PureComponent {\n referencesList = (references: TraceSpanReference[]) => {\n const styles = getStyles();\n return (\n \n {references.map((ref) => {\n const { span, spanID } = ref;\n return (\n \n \n {span\n ? `${span.process.serviceName}:${span.operationName} - ${ref.spanID}`\n : `(another trace) - ${ref.spanID}`}\n {!span && }\n \n \n );\n })}\n \n );\n };\n\n render() {\n const { references, children, tooltipText, focusSpan } = this.props;\n const styles = getStyles();\n\n const tooltipProps = {\n arrowPointAtCenter: true,\n mouseLeaveDelay: 0.5,\n placement: 'bottom' as TooltipPlacement,\n title: tooltipText,\n overlayClassName: styles.tooltip,\n };\n\n if (references.length > 1) {\n return (\n \n \n {children}\n \n \n );\n }\n const ref = references[0];\n return (\n \n \n {children}\n \n \n );\n }\n}\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { find as _find, get as _get } from 'lodash';\n\nimport { TNil } from '../types';\nimport { TraceSpan } from '../types/trace';\n\nfunction getFirstAncestor(span: TraceSpan): TraceSpan | TNil {\n return _get(\n _find(\n span.references,\n ({ span: ref, refType }) => ref && ref.spanID && (refType === 'CHILD_OF' || refType === 'FOLLOWS_FROM')\n ),\n 'span'\n );\n}\n\nexport default function spanAncestorIds(span: TraceSpan | TNil): string[] {\n const ancestorIDs: string[] = [];\n if (!span) {\n return ancestorIDs;\n }\n let ref = getFirstAncestor(span);\n while (ref) {\n ancestorIDs.push(ref.spanID);\n ref = getFirstAncestor(ref);\n }\n return ancestorIDs;\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { get as _get } from 'lodash';\nimport IoChevronRight from 'react-icons/lib/io/chevron-right';\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\n\nimport { TraceSpan } from '../types/trace';\nimport spanAncestorIds from '../utils/span-ancestor-ids';\nimport { autoColor } from '../Theme';\n\nexport const getStyles = stylesFactory((theme: GrafanaTheme2) => {\n return {\n SpanTreeOffset: css`\n label: SpanTreeOffset;\n color: ${autoColor(theme, '#000')};\n position: relative;\n `,\n SpanTreeOffsetParent: css`\n label: SpanTreeOffsetParent;\n &:hover {\n cursor: pointer;\n }\n `,\n indentGuide: css`\n label: indentGuide;\n /* The size of the indentGuide is based off of the iconWrapper */\n padding-right: calc(0.5rem + 12px);\n height: 100%;\n border-left: 3px solid transparent;\n display: inline-flex;\n &::before {\n content: '';\n padding-left: 1px;\n background-color: ${autoColor(theme, 'lightgrey')};\n }\n `,\n indentGuideActive: css`\n label: indentGuideActive;\n border-color: ${autoColor(theme, 'darkgrey')};\n &::before {\n background-color: transparent;\n }\n `,\n iconWrapper: css`\n label: iconWrapper;\n position: absolute;\n right: 0.25rem;\n `,\n };\n});\n\ntype TProps = {\n childrenVisible?: boolean;\n onClick?: () => void;\n span: TraceSpan;\n showChildrenIcon?: boolean;\n\n hoverIndentGuideIds: Set;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n theme: GrafanaTheme2;\n};\n\nexport class UnthemedSpanTreeOffset extends React.PureComponent {\n static displayName = 'UnthemedSpanTreeOffset';\n\n ancestorIds: string[];\n\n static defaultProps = {\n childrenVisible: false,\n showChildrenIcon: true,\n };\n\n constructor(props: TProps) {\n super(props);\n\n this.ancestorIds = spanAncestorIds(props.span);\n // Some traces have multiple root-level spans, this connects them all under one guideline and adds the\n // necessary padding for the collapse icon on root-level spans.\n this.ancestorIds.push('root');\n\n this.ancestorIds.reverse();\n }\n\n /**\n * If the mouse leaves to anywhere except another span with the same ancestor id, this span's ancestor id is\n * removed from the set of hoverIndentGuideIds.\n *\n * @param {Object} event - React Synthetic event tied to mouseleave. Includes the related target which is\n * the element the user is now hovering.\n * @param {string} ancestorId - The span id that the user was hovering over.\n */\n handleMouseLeave = (event: React.MouseEvent, ancestorId: string) => {\n if (\n !(event.relatedTarget instanceof HTMLSpanElement) ||\n _get(event, 'relatedTarget.dataset.ancestorId') !== ancestorId\n ) {\n this.props.removeHoverIndentGuideId(ancestorId);\n }\n };\n\n /**\n * If the mouse entered this span from anywhere except another span with the same ancestor id, this span's\n * ancestorId is added to the set of hoverIndentGuideIds.\n *\n * @param {Object} event - React Synthetic event tied to mouseenter. Includes the related target which is\n * the last element the user was hovering.\n * @param {string} ancestorId - The span id that the user is now hovering over.\n */\n handleMouseEnter = (event: React.MouseEvent, ancestorId: string) => {\n if (\n !(event.relatedTarget instanceof HTMLSpanElement) ||\n _get(event, 'relatedTarget.dataset.ancestorId') !== ancestorId\n ) {\n this.props.addHoverIndentGuideId(ancestorId);\n }\n };\n\n render() {\n const { childrenVisible, onClick, showChildrenIcon, span, theme } = this.props;\n const { hasChildren, spanID } = span;\n const wrapperProps = hasChildren ? { onClick, role: 'switch', 'aria-checked': childrenVisible } : null;\n const icon = showChildrenIcon && hasChildren && (childrenVisible ? : );\n const styles = getStyles(theme);\n return (\n \n {this.ancestorIds.map((ancestorId) => (\n this.handleMouseEnter(event, ancestorId)}\n onMouseLeave={(event) => this.handleMouseLeave(event, ancestorId)}\n />\n ))}\n {icon && (\n this.handleMouseEnter(event, spanID)}\n onMouseLeave={(event) => this.handleMouseLeave(event, spanID)}\n data-test-id=\"icon-wrapper\"\n >\n {icon}\n \n )}\n \n );\n }\n}\n\nexport default withTheme2(UnthemedSpanTreeOffset);\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport copy from 'copy-to-clipboard';\nimport { stylesFactory } from '@grafana/ui';\n\nimport { UITooltip, TooltipPlacement, UIButton } from '../uiElementsContext';\n\nconst getStyles = stylesFactory(() => {\n return {\n CopyIcon: css`\n background-color: transparent;\n border: none;\n color: inherit;\n height: 100%;\n overflow: hidden;\n padding: 0px;\n &:focus {\n background-color: rgba(255, 255, 255, 0.25);\n color: inherit;\n }\n `,\n };\n});\n\ntype PropsType = {\n className?: string;\n copyText: string;\n icon?: string;\n placement?: TooltipPlacement;\n tooltipTitle: string;\n};\n\ntype StateType = {\n hasCopied: boolean;\n};\n\nexport default class CopyIcon extends React.PureComponent {\n static defaultProps: Partial = {\n className: undefined,\n icon: 'copy',\n placement: 'left',\n };\n\n state = {\n hasCopied: false,\n };\n\n handleClick = () => {\n this.setState({\n hasCopied: true,\n });\n copy(this.props.copyText);\n };\n\n handleTooltipVisibilityChange = (visible: boolean) => {\n if (!visible && this.state.hasCopied) {\n this.setState({\n hasCopied: false,\n });\n }\n };\n\n render() {\n const styles = getStyles();\n return (\n \n \n \n );\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport jsonMarkup from 'json-markup';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport CopyIcon from '../../common/CopyIcon';\nimport { TNil } from '../../types';\nimport { TraceKeyValuePair, TraceLink } from '../../types/trace';\nimport { UIDropdown, UIIcon, UIMenu, UIMenuItem } from '../../uiElementsContext';\nimport { autoColor } from '../../Theme';\nimport { ubInlineBlock, uWidth100 } from '../../uberUtilityStyles';\n\nconst copyIconClassName = 'copyIcon';\n\nexport const getStyles = (theme: GrafanaTheme2) => {\n return {\n KeyValueTable: css`\n label: KeyValueTable;\n background: ${autoColor(theme, '#fff')};\n border: 1px solid ${autoColor(theme, '#ddd')};\n margin-bottom: 0.5rem;\n max-height: 450px;\n overflow: auto;\n `,\n body: css`\n label: body;\n vertical-align: baseline;\n `,\n row: css`\n label: row;\n & > td {\n padding: 0rem 0.5rem;\n }\n &:nth-child(2n) > td {\n background: ${autoColor(theme, '#f5f5f5')};\n }\n &:not(:hover) .${copyIconClassName} {\n visibility: hidden;\n }\n `,\n keyColumn: css`\n label: keyColumn;\n color: ${autoColor(theme, '#888')};\n white-space: pre;\n width: 125px;\n `,\n copyColumn: css`\n label: copyColumn;\n text-align: right;\n `,\n linkIcon: css`\n label: linkIcon;\n vertical-align: middle;\n font-weight: bold;\n `,\n };\n};\n\nconst jsonObjectOrArrayStartRegex = /^(\\[|\\{)/;\n\nfunction parseIfComplexJson(value: any) {\n // if the value is a string representing actual json object or array, then use json-markup\n if (typeof value === 'string' && jsonObjectOrArrayStartRegex.test(value)) {\n // otherwise just return as is\n try {\n return JSON.parse(value);\n // eslint-disable-next-line no-empty\n } catch (_) {}\n }\n return value;\n}\n\nexport const LinkValue = (props: { href: string; title?: string; children: React.ReactNode }) => {\n const styles = useStyles2(getStyles);\n return (\n \n {props.children} \n \n );\n};\n\nLinkValue.defaultProps = {\n title: '',\n};\n\nconst linkValueList = (links: TraceLink[]) => (\n \n {links.map(({ text, url }, index) => (\n // `index` is necessary in the key because url can repeat\n \n {text}\n \n ))}\n \n);\n\ntype KeyValuesTableProps = {\n data: TraceKeyValuePair[];\n linksGetter: ((pairs: TraceKeyValuePair[], index: number) => TraceLink[]) | TNil;\n};\n\nexport default function KeyValuesTable(props: KeyValuesTableProps) {\n const { data, linksGetter } = props;\n const styles = useStyles2(getStyles);\n return (\n
\n \n \n {data.map((row, i) => {\n const markup = {\n __html: jsonMarkup(parseIfComplexJson(row.value)),\n };\n const jsonTable =
;\n const links = linksGetter ? linksGetter(data, i) : null;\n let valueMarkup;\n if (links && links.length === 1) {\n valueMarkup = (\n
\n \n {jsonTable}\n \n
\n );\n } else if (links && links.length > 1) {\n valueMarkup = (\n
\n \n \n {jsonTable} \n \n \n
\n );\n } else {\n valueMarkup = jsonTable;\n }\n return (\n // `i` is necessary in the key because row.key can repeat\n
\n \n \n \n \n );\n })}\n \n
\n {row.key}\n {valueMarkup}\n \n
\n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport IoIosArrowRight from 'react-icons/lib/io/ios-arrow-right';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\n\nimport * as markers from './AccordianKeyValues.markers';\nimport KeyValuesTable from './KeyValuesTable';\nimport { TNil } from '../../types';\nimport { TraceKeyValuePair, TraceLink } from '../../types/trace';\nimport { autoColor } from '../../Theme';\nimport { uAlignIcon, uTxEllipsis } from '../../uberUtilityStyles';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nexport const getStyles = (theme: GrafanaTheme2) => {\n return {\n header: css`\n label: header;\n cursor: pointer;\n overflow: hidden;\n padding: 0.25em 0.1em;\n text-overflow: ellipsis;\n white-space: nowrap;\n &:hover {\n background: ${autoColor(theme, '#e8e8e8')};\n }\n `,\n headerEmpty: css`\n label: headerEmpty;\n background: none;\n cursor: initial;\n `,\n headerHighContrast: css`\n label: headerHighContrast;\n &:hover {\n background: ${autoColor(theme, '#ddd')};\n }\n `,\n emptyIcon: css`\n label: emptyIcon;\n color: ${autoColor(theme, '#aaa')};\n `,\n summary: css`\n label: summary;\n display: inline;\n list-style: none;\n padding: 0;\n `,\n summaryItem: css`\n label: summaryItem;\n display: inline;\n margin-left: 0.7em;\n padding-right: 0.5rem;\n border-right: 1px solid ${autoColor(theme, '#ddd')};\n &:last-child {\n padding-right: 0;\n border-right: none;\n }\n `,\n summaryLabel: css`\n label: summaryLabel;\n color: ${autoColor(theme, '#777')};\n `,\n summaryDelim: css`\n label: summaryDelim;\n color: ${autoColor(theme, '#bbb')};\n padding: 0 0.2em;\n `,\n };\n};\n\ntype AccordianKeyValuesProps = {\n className?: string | TNil;\n data: TraceKeyValuePair[];\n highContrast?: boolean;\n interactive?: boolean;\n isOpen: boolean;\n label: string;\n linksGetter: ((pairs: TraceKeyValuePair[], index: number) => TraceLink[]) | TNil;\n onToggle?: null | (() => void);\n};\n\n// export for tests\nexport function KeyValuesSummary(props: { data?: TraceKeyValuePair[] }) {\n const { data } = props;\n const styles = useStyles2(getStyles);\n\n if (!Array.isArray(data) || !data.length) {\n return null;\n }\n\n return (\n
    \n {data.map((item, i) => (\n // `i` is necessary in the key because item.key can repeat\n
  • \n {item.key}\n =\n {String(item.value)}\n
  • \n ))}\n
\n );\n}\n\nKeyValuesSummary.defaultProps = {\n data: null,\n};\n\nexport default function AccordianKeyValues(props: AccordianKeyValuesProps) {\n const { className, data, highContrast, interactive, isOpen, label, linksGetter, onToggle } = props;\n const isEmpty = !Array.isArray(data) || !data.length;\n const styles = useStyles2(getStyles);\n const iconCls = cx(uAlignIcon, { [styles.emptyIcon]: isEmpty });\n let arrow: React.ReactNode | null = null;\n let headerProps: {} | null = null;\n if (interactive) {\n arrow = isOpen ? : ;\n headerProps = {\n 'aria-checked': isOpen,\n onClick: isEmpty ? null : onToggle,\n role: 'switch',\n };\n }\n\n return (\n
\n \n {arrow}\n \n {label}\n {isOpen || ':'}\n \n {!isOpen && }\n
\n {isOpen && }\n \n );\n}\n\nAccordianKeyValues.defaultProps = {\n className: null,\n highContrast: false,\n interactive: true,\n onToggle: null,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const LABEL = 'label';\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { sortBy as _sortBy } from 'lodash';\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport IoIosArrowRight from 'react-icons/lib/io/ios-arrow-right';\nimport { css } from '@emotion/css';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\n\nimport AccordianKeyValues from './AccordianKeyValues';\nimport { formatDuration } from '../utils';\nimport { TNil } from '../../types';\nimport { TraceLog, TraceKeyValuePair, TraceLink } from '../../types/trace';\nimport { autoColor } from '../../Theme';\nimport { uAlignIcon, ubMb1 } from '../../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n AccordianLogs: css`\n label: AccordianLogs;\n border: 1px solid ${autoColor(theme, '#d8d8d8')};\n position: relative;\n margin-bottom: 0.25rem;\n `,\n AccordianLogsHeader: css`\n label: AccordianLogsHeader;\n background: ${autoColor(theme, '#e4e4e4')};\n color: inherit;\n display: block;\n padding: 0.25rem 0.5rem;\n &:hover {\n background: ${autoColor(theme, '#dadada')};\n }\n `,\n AccordianLogsContent: css`\n label: AccordianLogsContent;\n background: ${autoColor(theme, '#f0f0f0')};\n border-top: 1px solid ${autoColor(theme, '#d8d8d8')};\n padding: 0.5rem 0.5rem 0.25rem 0.5rem;\n `,\n AccordianLogsFooter: css`\n label: AccordianLogsFooter;\n color: ${autoColor(theme, '#999')};\n `,\n };\n};\n\ntype AccordianLogsProps = {\n interactive?: boolean;\n isOpen: boolean;\n linksGetter: ((pairs: TraceKeyValuePair[], index: number) => TraceLink[]) | TNil;\n logs: TraceLog[];\n onItemToggle?: (log: TraceLog) => void;\n onToggle?: () => void;\n openedItems?: Set;\n timestamp: number;\n};\n\nexport default function AccordianLogs(props: AccordianLogsProps) {\n const { interactive, isOpen, linksGetter, logs, openedItems, onItemToggle, onToggle, timestamp } = props;\n let arrow: React.ReactNode | null = null;\n let HeaderComponent: 'span' | 'a' = 'span';\n let headerProps: {} | null = null;\n if (interactive) {\n arrow = isOpen ? : ;\n HeaderComponent = 'a';\n headerProps = {\n 'aria-checked': isOpen,\n onClick: onToggle,\n role: 'switch',\n };\n }\n\n const styles = useStyles2(getStyles);\n return (\n
\n \n {arrow} Logs ({logs.length})\n \n {isOpen && (\n
\n {_sortBy(logs, 'timestamp').map((log, i) => (\n onItemToggle(log) : null}\n />\n ))}\n \n Log timestamps are relative to the start time of the full trace.\n \n
\n )}\n
\n );\n}\n\nAccordianLogs.defaultProps = {\n interactive: true,\n linksGetter: undefined,\n onItemToggle: undefined,\n onToggle: undefined,\n openedItems: undefined,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport cx from 'classnames';\nimport { css } from '@emotion/css';\nimport { groupBy as _groupBy } from 'lodash';\nimport React, { useState } from 'react';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\nimport { autoColor } from '../Theme';\nimport { TraceSpan } from '../types/trace';\nimport { TNil } from '../types';\nimport { UIPopover } from '../uiElementsContext';\nimport AccordianLogs from './SpanDetail/AccordianLogs';\nimport { ViewedBoundsFunctionType } from './utils';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n wrapper: css`\n label: wrapper;\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n overflow: hidden;\n z-index: 0;\n `,\n bar: css`\n label: bar;\n border-radius: 3px;\n min-width: 2px;\n position: absolute;\n height: 36%;\n top: 32%;\n `,\n rpc: css`\n label: rpc;\n position: absolute;\n top: 35%;\n bottom: 35%;\n z-index: 1;\n `,\n label: css`\n label: label;\n color: #aaa;\n font-size: 12px;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n line-height: 1em;\n white-space: nowrap;\n padding: 0 0.5em;\n position: absolute;\n `,\n logMarker: css`\n label: logMarker;\n background-color: ${autoColor(theme, '#2c3235')};\n cursor: pointer;\n height: 60%;\n min-width: 1px;\n position: absolute;\n top: 20%;\n &:hover {\n background-color: ${autoColor(theme, '#464c54')};\n }\n &::before,\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n border: 1px solid transparent;\n }\n &::after {\n left: 0;\n }\n `,\n };\n};\n\ntype Props = {\n color: string;\n onClick?: (evt: React.MouseEvent) => void;\n viewEnd: number;\n viewStart: number;\n getViewedBounds: ViewedBoundsFunctionType;\n rpc:\n | {\n viewStart: number;\n viewEnd: number;\n color: string;\n }\n | TNil;\n traceStartTime: number;\n span: TraceSpan;\n className?: string;\n labelClassName?: string;\n longLabel: string;\n shortLabel: string;\n};\n\nfunction toPercent(value: number) {\n return `${(value * 100).toFixed(1)}%`;\n}\n\nfunction SpanBar({\n viewEnd,\n viewStart,\n getViewedBounds,\n color,\n shortLabel,\n longLabel,\n onClick,\n rpc,\n traceStartTime,\n span,\n className,\n labelClassName,\n}: Props) {\n const [label, setLabel] = useState(shortLabel);\n const setShortLabel = () => setLabel(shortLabel);\n const setLongLabel = () => setLabel(longLabel);\n\n // group logs based on timestamps\n const logGroups = _groupBy(span.logs, (log) => {\n const posPercent = getViewedBounds(log.timestamp, log.timestamp).start;\n // round to the nearest 0.2%\n return toPercent(Math.round(posPercent * 500) / 500);\n });\n const styles = useStyles2(getStyles);\n\n return (\n \n \n
\n {label}\n
\n \n
\n {Object.keys(logGroups).map((positionKey) => (\n \n }\n >\n
\n \n ))}\n
\n {rpc && (\n \n )}\n
\n );\n}\n\nexport default React.memo(SpanBar);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport IoAlert from 'react-icons/lib/io/alert';\nimport IoArrowRightA from 'react-icons/lib/io/arrow-right-a';\nimport IoNetwork from 'react-icons/lib/io/network';\nimport MdFileUpload from 'react-icons/lib/md/file-upload';\nimport { css, keyframes } from '@emotion/css';\nimport cx from 'classnames';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport ReferencesButton from './ReferencesButton';\nimport TimelineRow from './TimelineRow';\nimport { formatDuration, ViewedBoundsFunctionType } from './utils';\nimport SpanTreeOffset from './SpanTreeOffset';\nimport SpanBar from './SpanBar';\nimport Ticks from './Ticks';\n\nimport { SpanLinkFunc, TNil } from '../types';\nimport { TraceSpan } from '../types/trace';\nimport { autoColor } from '../Theme';\n\nconst spanBarClassName = 'spanBar';\nconst spanBarLabelClassName = 'spanBarLabel';\nconst nameWrapperClassName = 'nameWrapper';\nconst nameWrapperMatchingFilterClassName = 'nameWrapperMatchingFilter';\nconst viewClassName = 'jaegerView';\nconst nameColumnClassName = 'nameColumn';\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n const animations = {\n flash: keyframes`\n label: flash;\n from {\n background-color: ${autoColor(theme, '#68b9ff')};\n }\n to {\n background-color: default;\n }\n `,\n };\n\n return {\n nameWrapper: css`\n label: nameWrapper;\n line-height: 27px;\n overflow: hidden;\n display: flex;\n `,\n nameWrapperMatchingFilter: css`\n label: nameWrapperMatchingFilter;\n background-color: ${autoColor(theme, '#fffce4')};\n `,\n nameColumn: css`\n label: nameColumn;\n position: relative;\n white-space: nowrap;\n z-index: 1;\n &:hover {\n z-index: 1;\n }\n `,\n endpointName: css`\n label: endpointName;\n color: ${autoColor(theme, '#808080')};\n `,\n view: css`\n label: view;\n position: relative;\n `,\n viewExpanded: css`\n label: viewExpanded;\n background: ${autoColor(theme, '#f8f8f8')};\n outline: 1px solid ${autoColor(theme, '#ddd')};\n `,\n viewExpandedAndMatchingFilter: css`\n label: viewExpandedAndMatchingFilter;\n background: ${autoColor(theme, '#fff3d7')};\n outline: 1px solid ${autoColor(theme, '#ddd')};\n `,\n row: css`\n label: row;\n &:hover .${spanBarClassName} {\n opacity: 1;\n }\n &:hover .${spanBarLabelClassName} {\n color: ${autoColor(theme, '#000')};\n }\n &:hover .${nameWrapperClassName} {\n background: #f8f8f8;\n background: linear-gradient(\n 90deg,\n ${autoColor(theme, '#fafafa')},\n ${autoColor(theme, '#f8f8f8')} 75%,\n ${autoColor(theme, '#eee')}\n );\n }\n &:hover .${viewClassName} {\n background-color: ${autoColor(theme, '#f5f5f5')};\n outline: 1px solid ${autoColor(theme, '#ddd')};\n }\n `,\n rowClippingLeft: css`\n label: rowClippingLeft;\n & .${nameColumnClassName}::before {\n content: ' ';\n height: 100%;\n position: absolute;\n width: 6px;\n background-image: linear-gradient(\n to right,\n ${autoColor(theme, 'rgba(25, 25, 25, 0.25)')},\n ${autoColor(theme, 'rgba(32, 32, 32, 0)')}\n );\n left: 100%;\n z-index: -1;\n }\n `,\n rowClippingRight: css`\n label: rowClippingRight;\n & .${viewClassName}::before {\n content: ' ';\n height: 100%;\n position: absolute;\n width: 6px;\n background-image: linear-gradient(\n to left,\n ${autoColor(theme, 'rgba(25, 25, 25, 0.25)')},\n ${autoColor(theme, 'rgba(25, 25, 25, 0.25)')}\n );\n right: 0%;\n z-index: 1;\n }\n `,\n rowExpanded: css`\n label: rowExpanded;\n & .${spanBarClassName} {\n opacity: 1;\n }\n & .${spanBarLabelClassName} {\n color: ${autoColor(theme, '#000')};\n }\n & .${nameWrapperClassName}, &:hover .${nameWrapperClassName} {\n background: ${autoColor(theme, '#f0f0f0')};\n box-shadow: 0 1px 0 ${autoColor(theme, '#ddd')};\n }\n & .${nameWrapperMatchingFilterClassName} {\n background: ${autoColor(theme, '#fff3d7')};\n }\n &:hover .${viewClassName} {\n background: ${autoColor(theme, '#eee')};\n }\n `,\n rowMatchingFilter: css`\n label: rowMatchingFilter;\n background-color: ${autoColor(theme, '#fffce4')};\n &:hover .${nameWrapperClassName} {\n background: linear-gradient(\n 90deg,\n ${autoColor(theme, '#fff5e1')},\n ${autoColor(theme, '#fff5e1')} 75%,\n ${autoColor(theme, '#ffe6c9')}\n );\n }\n &:hover .${viewClassName} {\n background-color: ${autoColor(theme, '#fff3d7')};\n outline: 1px solid ${autoColor(theme, '#ddd')};\n }\n `,\n rowFocused: css`\n label: rowFocused;\n background-color: ${autoColor(theme, '#cbe7ff')};\n animation: ${animations.flash} 1s cubic-bezier(0.12, 0, 0.39, 0);\n & .${nameWrapperClassName}, .${viewClassName}, .${nameWrapperMatchingFilterClassName} {\n background-color: ${autoColor(theme, '#cbe7ff')};\n animation: ${animations.flash} 1s cubic-bezier(0.12, 0, 0.39, 0);\n }\n & .${spanBarClassName} {\n opacity: 1;\n }\n & .${spanBarLabelClassName} {\n color: ${autoColor(theme, '#000')};\n }\n &:hover .${nameWrapperClassName}, :hover .${viewClassName} {\n background: ${autoColor(theme, '#d5ebff')};\n box-shadow: 0 1px 0 ${autoColor(theme, '#ddd')};\n }\n `,\n\n rowExpandedAndMatchingFilter: css`\n label: rowExpandedAndMatchingFilter;\n &:hover .${viewClassName} {\n background: ${autoColor(theme, '#ffeccf')};\n }\n `,\n\n name: css`\n label: name;\n color: ${autoColor(theme, '#000')};\n cursor: pointer;\n flex: 1 1 auto;\n outline: none;\n overflow: hidden;\n padding-left: 4px;\n padding-right: 0.25em;\n position: relative;\n text-overflow: ellipsis;\n &::before {\n content: ' ';\n position: absolute;\n top: 4px;\n bottom: 4px;\n left: 0;\n border-left: 4px solid;\n border-left-color: inherit;\n }\n\n /* This is so the hit area of the span-name extends the rest of the width of the span-name column */\n &::after {\n background: transparent;\n bottom: 0;\n content: ' ';\n left: 0;\n position: absolute;\n top: 0;\n width: 1000px;\n }\n &:focus {\n text-decoration: none;\n }\n &:hover > small {\n color: ${autoColor(theme, '#000')};\n }\n `,\n nameDetailExpanded: css`\n label: nameDetailExpanded;\n &::before {\n bottom: 0;\n }\n `,\n svcName: css`\n label: svcName;\n padding: 0 0.25rem 0 0.5rem;\n font-size: 1.05em;\n `,\n svcNameChildrenCollapsed: css`\n label: svcNameChildrenCollapsed;\n font-weight: bold;\n font-style: italic;\n `,\n errorIcon: css`\n label: errorIcon;\n border-radius: 6.5px;\n color: ${autoColor(theme, '#fff')};\n font-size: 0.85em;\n margin-right: 0.25rem;\n padding: 1px;\n `,\n rpcColorMarker: css`\n label: rpcColorMarker;\n border-radius: 6.5px;\n display: inline-block;\n font-size: 0.85em;\n height: 1em;\n margin-right: 0.25rem;\n padding: 1px;\n width: 1em;\n vertical-align: middle;\n `,\n labelRight: css`\n label: labelRight;\n left: 100%;\n `,\n labelLeft: css`\n label: labelLeft;\n right: 100%;\n `,\n };\n});\n\ntype SpanBarRowProps = {\n className?: string;\n theme: GrafanaTheme2;\n color: string;\n columnDivision: number;\n isChildrenExpanded: boolean;\n isDetailExpanded: boolean;\n isMatchingFilter: boolean;\n isFocused: boolean;\n onDetailToggled: (spanID: string) => void;\n onChildrenToggled: (spanID: string) => void;\n numTicks: number;\n rpc?:\n | {\n viewStart: number;\n viewEnd: number;\n color: string;\n operationName: string;\n serviceName: string;\n }\n | TNil;\n noInstrumentedServer?:\n | {\n color: string;\n serviceName: string;\n }\n | TNil;\n showErrorIcon: boolean;\n getViewedBounds: ViewedBoundsFunctionType;\n traceStartTime: number;\n span: TraceSpan;\n focusSpan: (spanID: string) => void;\n hoverIndentGuideIds: Set;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n clippingLeft?: boolean;\n clippingRight?: boolean;\n createSpanLink?: SpanLinkFunc;\n};\n\n/**\n * This was originally a stateless function, but changing to a PureComponent\n * reduced the render time of expanding a span row detail by ~50%. This is\n * even true in the case where the stateless function has the same prop types as\n * this class and arrow functions are created in the stateless function as\n * handlers to the onClick props. E.g. for now, the PureComponent is more\n * performance than the stateless function.\n */\nexport class UnthemedSpanBarRow extends React.PureComponent {\n static displayName = 'UnthemedSpanBarRow';\n static defaultProps: Partial = {\n className: '',\n rpc: null,\n };\n\n _detailToggle = () => {\n this.props.onDetailToggled(this.props.span.spanID);\n };\n\n _childrenToggle = () => {\n this.props.onChildrenToggled(this.props.span.spanID);\n };\n\n render() {\n const {\n className,\n color,\n columnDivision,\n isChildrenExpanded,\n isDetailExpanded,\n isMatchingFilter,\n isFocused,\n numTicks,\n rpc,\n noInstrumentedServer,\n showErrorIcon,\n getViewedBounds,\n traceStartTime,\n span,\n focusSpan,\n hoverIndentGuideIds,\n addHoverIndentGuideId,\n removeHoverIndentGuideId,\n clippingLeft,\n clippingRight,\n theme,\n createSpanLink,\n } = this.props;\n const {\n duration,\n hasChildren: isParent,\n operationName,\n process: { serviceName },\n } = span;\n const label = formatDuration(duration);\n const viewBounds = getViewedBounds(span.startTime, span.startTime + span.duration);\n const viewStart = viewBounds.start;\n const viewEnd = viewBounds.end;\n const styles = getStyles(theme);\n\n const labelDetail = `${serviceName}::${operationName}`;\n let longLabel;\n let hintClassName;\n if (viewStart > 1 - viewEnd) {\n longLabel = `${labelDetail} | ${label}`;\n hintClassName = styles.labelLeft;\n } else {\n longLabel = `${label} | ${labelDetail}`;\n hintClassName = styles.labelRight;\n }\n\n return (\n \n \n \n \n \n \n {showErrorIcon && (\n \n )}\n {serviceName}{' '}\n {rpc && (\n \n \n {rpc.serviceName}\n \n )}\n {noInstrumentedServer && (\n \n {' '}\n \n {noInstrumentedServer.serviceName}\n \n )}\n \n {rpc ? rpc.operationName : operationName}\n | {label}\n \n {createSpanLink &&\n (() => {\n const link = createSpanLink(span);\n if (link) {\n return (\n {\n if (!(event.ctrlKey || event.metaKey || event.shiftKey) && link.onClick) {\n event.preventDefault();\n link.onClick(event);\n }\n }\n : undefined\n }\n >\n {link.content}\n \n );\n } else {\n return null;\n }\n })()}\n\n {span.references && span.references.length > 1 && (\n \n \n \n )}\n {span.subsidiarilyReferencedBy && span.subsidiarilyReferencedBy.length > 0 && (\n \n \n \n )}\n \n \n \n \n \n \n \n );\n }\n}\n\nexport default withTheme2(UnthemedSpanBarRow);\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\n\nconst getStyles = () => {\n return {\n TextList: css`\n max-height: 450px;\n overflow: auto;\n `,\n List: css`\n width: 100%;\n list-style: none;\n padding: 0;\n margin: 0;\n `,\n item: css`\n padding: 0.25rem 0.5rem;\n vertical-align: top;\n &:nth-child(2n) {\n background: #f5f5f5;\n }\n `,\n };\n};\n\ntype TextListProps = {\n data: string[];\n};\n\nexport default function TextList(props: TextListProps) {\n const { data } = props;\n const styles = useStyles2(getStyles);\n return (\n
\n
    \n {data.map((row, i) => {\n return (\n // `i` is necessary in the key because row.key can repeat\n
  • \n {row}\n
  • \n );\n })}\n
\n
\n );\n}\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport IoIosArrowRight from 'react-icons/lib/io/ios-arrow-right';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport TextList from './TextList';\nimport { TNil } from '../../types';\nimport { getStyles as getAccordianKeyValuesStyles } from './AccordianKeyValues';\nimport { autoColor } from '../../Theme';\nimport { uAlignIcon } from '../../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n header: css`\n cursor: pointer;\n overflow: hidden;\n padding: 0.25em 0.1em;\n text-overflow: ellipsis;\n white-space: nowrap;\n &:hover {\n background: ${autoColor(theme, '#e8e8e8')};\n }\n `,\n };\n};\n\ntype AccordianTextProps = {\n className?: string | TNil;\n headerClassName?: string | TNil;\n data: string[];\n highContrast?: boolean;\n interactive?: boolean;\n isOpen: boolean;\n label: React.ReactNode | string;\n onToggle?: null | (() => void);\n TextComponent?: React.ElementType<{ data: string[] }>;\n};\n\nfunction DefaultTextComponent({ data }: { data: string[] }) {\n return ;\n}\n\nexport default function AccordianText(props: AccordianTextProps) {\n const {\n className,\n data,\n headerClassName,\n interactive,\n isOpen,\n label,\n onToggle,\n TextComponent = DefaultTextComponent,\n } = props;\n const isEmpty = !Array.isArray(data) || !data.length;\n const accordianKeyValuesStyles = useStyles2(getAccordianKeyValuesStyles);\n const iconCls = cx(uAlignIcon, { [accordianKeyValuesStyles.emptyIcon]: isEmpty });\n let arrow: React.ReactNode | null = null;\n let headerProps: {} | null = null;\n if (interactive) {\n arrow = isOpen ? : ;\n headerProps = {\n 'aria-checked': isOpen,\n onClick: isEmpty ? null : onToggle,\n role: 'switch',\n };\n }\n const styles = useStyles2(getStyles);\n return (\n
\n
\n {arrow}\n {label} ({data.length})\n
\n {isOpen && }\n
\n );\n}\n\nAccordianText.defaultProps = {\n className: null,\n highContrast: false,\n interactive: true,\n onToggle: null,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport { UIDivider } from '../uiElementsContext';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n LabeledList: css`\n label: LabeledList;\n list-style: none;\n margin: 0;\n padding: 0;\n `,\n LabeledListItem: css`\n label: LabeledListItem;\n display: inline-block;\n `,\n LabeledListLabel: css`\n label: LabeledListLabel;\n color: ${theme.isLight ? '#999' : '#666'};\n margin-right: 0.25rem;\n `,\n };\n};\n\ntype LabeledListProps = {\n className?: string;\n dividerClassName?: string;\n items: Array<{ key: string; label: React.ReactNode; value: React.ReactNode }>;\n};\n\nexport default function LabeledList(props: LabeledListProps) {\n const { className, dividerClassName, items } = props;\n const styles = useStyles2(getStyles);\n return (\n
    \n {items.map(({ key, label, value }, i) => {\n const divider = i < items.length - 1 && (\n
  • \n \n
  • \n );\n return [\n
  • \n {label}\n {value}\n
  • ,\n divider,\n ];\n })}\n
\n );\n}\n","// Copyright (c) 2019 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\n\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport IoIosArrowRight from 'react-icons/lib/io/ios-arrow-right';\nimport { TraceSpanReference } from '../../types/trace';\nimport ReferenceLink from '../../url/ReferenceLink';\nimport { uAlignIcon } from '../../uberUtilityStyles';\n\nconst getStyles = () => {\n return {\n ReferencesList: css`\n background: #fff;\n border: 1px solid #ddd;\n margin-bottom: 0.7em;\n max-height: 450px;\n overflow: auto;\n `,\n list: css`\n width: 100%;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n `,\n itemContent: css`\n padding: 0.25rem 0.5rem;\n display: flex;\n width: 100%;\n justify-content: space-between;\n `,\n item: css`\n &:nth-child(2n) {\n background: #f5f5f5;\n }\n `,\n debugInfo: css`\n letter-spacing: 0.25px;\n margin: 0.5em 0 0;\n `,\n debugLabel: css`\n margin: 0 5px 0 5px;\n &::before {\n color: #bbb;\n content: attr(data-label);\n }\n `,\n };\n};\n\ntype AccordianReferencesProps = {\n data: TraceSpanReference[];\n highContrast?: boolean;\n interactive?: boolean;\n isOpen: boolean;\n onToggle?: null | (() => void);\n focusSpan: (uiFind: string) => void;\n};\n\ntype ReferenceItemProps = {\n data: TraceSpanReference[];\n focusSpan: (uiFind: string) => void;\n};\n\n// export for test\nexport function References(props: ReferenceItemProps) {\n const { data, focusSpan } = props;\n const styles = useStyles2(getStyles);\n\n return (\n
\n
    \n {data.map((reference) => {\n return (\n
  • \n \n \n {reference.span ? (\n \n {reference.span.process.serviceName}\n {reference.span.operationName}\n \n ) : (\n < span in another trace >\n )}\n \n \n {reference.refType}\n \n \n {reference.spanID}\n \n \n \n \n
  • \n );\n })}\n
\n
\n );\n}\n\nexport default class AccordianReferences extends React.PureComponent {\n static defaultProps: Partial = {\n highContrast: false,\n interactive: true,\n onToggle: null,\n };\n\n render() {\n const { data, interactive, isOpen, onToggle, focusSpan } = this.props;\n const isEmpty = !Array.isArray(data) || !data.length;\n const iconCls = uAlignIcon;\n let arrow: React.ReactNode | null = null;\n let headerProps: {} | null = null;\n if (interactive) {\n arrow = isOpen ? : ;\n headerProps = {\n 'aria-checked': isOpen,\n onClick: isEmpty ? null : onToggle,\n role: 'switch',\n };\n }\n return (\n
\n
\n {arrow}\n \n References\n {' '}\n ({data.length})\n
\n {isOpen && }\n
\n );\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { DataLinkButton, TextArea, useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2, LinkModel } from '@grafana/data';\nimport IoLink from 'react-icons/lib/io/link';\n\nimport AccordianKeyValues from './AccordianKeyValues';\nimport AccordianLogs from './AccordianLogs';\nimport AccordianText from './AccordianText';\nimport DetailState from './DetailState';\nimport { formatDuration } from '../utils';\nimport LabeledList from '../../common/LabeledList';\nimport { SpanLinkFunc, TNil } from '../../types';\nimport { TraceKeyValuePair, TraceLink, TraceLog, TraceSpan } from '../../types/trace';\nimport AccordianReferences from './AccordianReferences';\nimport { autoColor } from '../../Theme';\nimport { UIDivider } from '../../uiElementsContext';\nimport {\n uAlignIcon,\n ubFlex,\n ubFlexAuto,\n ubItemsCenter,\n ubM0,\n ubMb1,\n ubMy1,\n ubTxRightAlign,\n} from '../../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n divider: css`\n label: divider;\n background: ${autoColor(theme, '#ddd')};\n `,\n dividerVertical: css`\n label: dividerVertical;\n display: block;\n height: 1px;\n width: 100%;\n margin: 24px 0;\n clear: both;\n vertical-align: middle;\n position: relative;\n top: -0.06em;\n `,\n debugInfo: css`\n label: debugInfo;\n display: block;\n letter-spacing: 0.25px;\n margin: 0.5em 0 -0.75em;\n text-align: right;\n `,\n debugLabel: css`\n label: debugLabel;\n &::before {\n color: ${autoColor(theme, '#bbb')};\n content: attr(data-label);\n }\n `,\n debugValue: css`\n label: debugValue;\n background-color: inherit;\n border: none;\n color: ${autoColor(theme, '#888')};\n cursor: pointer;\n &:hover {\n color: ${autoColor(theme, '#333')};\n }\n `,\n AccordianWarnings: css`\n label: AccordianWarnings;\n background: ${autoColor(theme, '#fafafa')};\n border: 1px solid ${autoColor(theme, '#e4e4e4')};\n margin-bottom: 0.25rem;\n `,\n AccordianWarningsHeader: css`\n label: AccordianWarningsHeader;\n background: ${autoColor(theme, '#fff7e6')};\n padding: 0.25rem 0.5rem;\n &:hover {\n background: ${autoColor(theme, '#ffe7ba')};\n }\n `,\n AccordianWarningsHeaderOpen: css`\n label: AccordianWarningsHeaderOpen;\n border-bottom: 1px solid ${autoColor(theme, '#e8e8e8')};\n `,\n AccordianWarningsLabel: css`\n label: AccordianWarningsLabel;\n color: ${autoColor(theme, '#d36c08')};\n `,\n Textarea: css`\n word-break: break-all;\n white-space: pre;\n `,\n LinkIcon: css`\n font-size: 1.5em;\n `,\n };\n};\n\ntype SpanDetailProps = {\n detailState: DetailState;\n linksGetter: ((links: TraceKeyValuePair[], index: number) => TraceLink[]) | TNil;\n logItemToggle: (spanID: string, log: TraceLog) => void;\n logsToggle: (spanID: string) => void;\n processToggle: (spanID: string) => void;\n span: TraceSpan;\n tagsToggle: (spanID: string) => void;\n traceStartTime: number;\n warningsToggle: (spanID: string) => void;\n stackTracesToggle: (spanID: string) => void;\n referencesToggle: (spanID: string) => void;\n focusSpan: (uiFind: string) => void;\n createSpanLink?: SpanLinkFunc;\n focusedSpanId?: string;\n createFocusSpanLink: (traceId: string, spanId: string) => LinkModel;\n};\n\nexport default function SpanDetail(props: SpanDetailProps) {\n const {\n detailState,\n linksGetter,\n logItemToggle,\n logsToggle,\n processToggle,\n span,\n tagsToggle,\n traceStartTime,\n warningsToggle,\n stackTracesToggle,\n referencesToggle,\n focusSpan,\n createSpanLink,\n createFocusSpanLink,\n } = props;\n const {\n isTagsOpen,\n isProcessOpen,\n logs: logsState,\n isWarningsOpen,\n isReferencesOpen,\n isStackTracesOpen,\n } = detailState;\n const {\n operationName,\n process,\n duration,\n relativeStartTime,\n traceID,\n spanID,\n logs,\n tags,\n warnings,\n references,\n stackTraces,\n } = span;\n const overviewItems = [\n {\n key: 'svc',\n label: 'Service:',\n value: process.serviceName,\n },\n {\n key: 'duration',\n label: 'Duration:',\n value: formatDuration(duration),\n },\n {\n key: 'start',\n label: 'Start Time:',\n value: formatDuration(relativeStartTime),\n },\n ];\n const styles = useStyles2(getStyles);\n const link = createSpanLink?.(span);\n const focusSpanLink = createFocusSpanLink(traceID, spanID);\n\n return (\n
\n
\n

{operationName}

\n \n
\n {link ? (\n \n ) : null}\n \n
\n
\n tagsToggle(spanID)}\n />\n {process.tags && (\n processToggle(spanID)}\n />\n )}\n
\n {logs && logs.length > 0 && (\n logsToggle(spanID)}\n onItemToggle={(logItem) => logItemToggle(spanID, logItem)}\n timestamp={traceStartTime}\n />\n )}\n {warnings && warnings.length > 0 && (\n Warnings}\n data={warnings}\n isOpen={isWarningsOpen}\n onToggle={() => warningsToggle(spanID)}\n />\n )}\n {stackTraces && stackTraces.length && (\n {\n let text;\n if (textComponentProps.data?.length > 1) {\n text = textComponentProps.data\n .map((stackTrace, index) => `StackTrace ${index + 1}:\\n${stackTrace}`)\n .join('\\n');\n } else {\n text = textComponentProps.data?.[0];\n }\n return (\n \n );\n }}\n onToggle={() => stackTracesToggle(spanID)}\n />\n )}\n {references && references.length > 0 && (references.length > 1 || references[0].refType !== 'CHILD_OF') && (\n referencesToggle(spanID)}\n focusSpan={focusSpan}\n />\n )}\n \n {\n // click handling logic copied from react router:\n // https://github.com/remix-run/react-router/blob/997b4d67e506d39ac6571cb369d6d2d6b3dda557/packages/react-router-dom/index.tsx#L392-L394s\n if (\n focusSpanLink.onClick &&\n e.button === 0 && // Ignore everything but left clicks\n (!e.currentTarget.target || e.currentTarget.target === '_self') && // Let browser handle \"target=_blank\" etc.\n !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) // Ignore clicks with modifier keys\n ) {\n e.preventDefault();\n focusSpanLink.onClick(e);\n }\n }}\n >\n \n \n {spanID}\n \n
\n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\n\nimport SpanDetail from './SpanDetail';\nimport DetailState from './SpanDetail/DetailState';\nimport SpanTreeOffset from './SpanTreeOffset';\nimport TimelineRow from './TimelineRow';\nimport { autoColor } from '../Theme';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\nimport { GrafanaTheme2, LinkModel } from '@grafana/data';\n\nimport { TraceLog, TraceSpan, TraceKeyValuePair, TraceLink } from '../types/trace';\nimport { SpanLinkFunc } from '../types';\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n return {\n expandedAccent: css`\n cursor: pointer;\n height: 100%;\n overflow: hidden;\n position: absolute;\n width: 100%;\n &::before {\n border-left: 4px solid;\n pointer-events: none;\n width: 1000px;\n }\n &::after {\n border-right: 1000px solid;\n border-color: inherit;\n cursor: pointer;\n opacity: 0.2;\n }\n\n /* border-color inherit must come AFTER other border declarations for accent */\n &::before,\n &::after {\n border-color: inherit;\n content: ' ';\n position: absolute;\n height: 100%;\n }\n\n &:hover::after {\n opacity: 0.35;\n }\n `,\n infoWrapper: css`\n label: infoWrapper;\n border: 1px solid ${autoColor(theme, '#d3d3d3')};\n border-top: 3px solid;\n padding: 0.75rem;\n `,\n };\n});\n\ntype SpanDetailRowProps = {\n color: string;\n columnDivision: number;\n detailState: DetailState;\n onDetailToggled: (spanID: string) => void;\n linksGetter: (span: TraceSpan, links: TraceKeyValuePair[], index: number) => TraceLink[];\n logItemToggle: (spanID: string, log: TraceLog) => void;\n logsToggle: (spanID: string) => void;\n processToggle: (spanID: string) => void;\n referencesToggle: (spanID: string) => void;\n warningsToggle: (spanID: string) => void;\n stackTracesToggle: (spanID: string) => void;\n span: TraceSpan;\n tagsToggle: (spanID: string) => void;\n traceStartTime: number;\n focusSpan: (uiFind: string) => void;\n hoverIndentGuideIds: Set;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n theme: GrafanaTheme2;\n createSpanLink?: SpanLinkFunc;\n focusedSpanId?: string;\n createFocusSpanLink: (traceId: string, spanId: string) => LinkModel;\n};\n\nexport class UnthemedSpanDetailRow extends React.PureComponent {\n _detailToggle = () => {\n this.props.onDetailToggled(this.props.span.spanID);\n };\n\n _linksGetter = (items: TraceKeyValuePair[], itemIndex: number) => {\n const { linksGetter, span } = this.props;\n return linksGetter(span, items, itemIndex);\n };\n\n render() {\n const {\n color,\n columnDivision,\n detailState,\n logItemToggle,\n logsToggle,\n processToggle,\n referencesToggle,\n warningsToggle,\n stackTracesToggle,\n span,\n tagsToggle,\n traceStartTime,\n focusSpan,\n hoverIndentGuideIds,\n addHoverIndentGuideId,\n removeHoverIndentGuideId,\n theme,\n createSpanLink,\n focusedSpanId,\n createFocusSpanLink,\n } = this.props;\n const styles = getStyles(theme);\n return (\n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n );\n }\n}\n\nexport default withTheme2(UnthemedSpanDetailRow);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport memoizeOne from 'memoize-one';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { colors } from '@grafana/ui';\n\n// TS needs the precise return type\nfunction strToRgb(s: string): [number, number, number] {\n if (s.length !== 7) {\n return [0, 0, 0];\n }\n const r = s.slice(1, 3);\n const g = s.slice(3, 5);\n const b = s.slice(5);\n return [parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)];\n}\n\nclass ColorGenerator {\n colorsHex: string[];\n colorsRgb: Array<[number, number, number]>;\n cache: Map;\n currentIdx: number;\n\n constructor(colorsHex: string[]) {\n this.colorsHex = colorsHex;\n this.colorsRgb = colorsHex.map(strToRgb);\n this.cache = new Map();\n this.currentIdx = 0;\n }\n\n _getColorIndex(key: string): number {\n let i = this.cache.get(key);\n if (i == null) {\n i = this.currentIdx;\n this.cache.set(key, this.currentIdx);\n this.currentIdx = ++this.currentIdx % this.colorsHex.length;\n }\n return i;\n }\n\n /**\n * Will assign a color to an arbitrary key.\n * If the key has been used already, it will\n * use the same color.\n */\n getColorByKey(key: string) {\n const i = this._getColorIndex(key);\n return this.colorsHex[i];\n }\n\n /**\n * Retrieve the RGB values associated with a key. Adds the key and associates\n * it with a color if the key is not recognized.\n * @returns {number[]} An array of three ints [0, 255] representing a color.\n */\n getRgbColorByKey(key: string): [number, number, number] {\n const i = this._getColorIndex(key);\n return this.colorsRgb[i];\n }\n\n clear() {\n this.cache.clear();\n this.currentIdx = 0;\n }\n}\n\nconst getGenerator = memoizeOne((colors: string[]) => {\n return new ColorGenerator(colors);\n});\n\nexport function clear() {\n getGenerator([]);\n}\n\nexport function getColorByKey(key: string, theme: GrafanaTheme2) {\n return getGenerator(colors).getColorByKey(key);\n}\n\nexport function getRgbColorByKey(key: string, theme: GrafanaTheme2): [number, number, number] {\n return getGenerator(colors).getRgbColorByKey(key);\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\n\nimport { isEqual } from 'lodash';\nimport memoizeOne from 'memoize-one';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\nimport { GrafanaTheme2, LinkModel } from '@grafana/data';\n\nimport ListView from './ListView';\nimport SpanBarRow from './SpanBarRow';\nimport DetailState from './SpanDetail/DetailState';\nimport SpanDetailRow from './SpanDetailRow';\nimport {\n createViewedBoundsFunc,\n findServerChildSpan,\n isErrorSpan,\n isKindClient,\n spanContainsErredSpan,\n ViewedBoundsFunctionType,\n} from './utils';\nimport { Accessors } from '../ScrollManager';\nimport { getColorByKey } from '../utils/color-generator';\nimport { SpanLinkFunc, TNil } from '../types';\nimport { TraceLog, TraceSpan, Trace, TraceKeyValuePair, TraceLink } from '../types/trace';\nimport TTraceTimeline from '../types/TTraceTimeline';\nimport { PEER_SERVICE } from '../constants/tag-keys';\n\ntype TExtractUiFindFromStateReturn = {\n uiFind: string | undefined;\n};\n\nconst getStyles = stylesFactory(() => {\n return {\n rowsWrapper: css`\n width: 100%;\n `,\n row: css`\n width: 100%;\n `,\n };\n});\n\ntype RowState = {\n isDetail: boolean;\n span: TraceSpan;\n spanIndex: number;\n};\n\ntype TVirtualizedTraceViewOwnProps = {\n currentViewRangeTime: [number, number];\n findMatchesIDs: Set | TNil;\n scrollToFirstVisibleSpan: () => void;\n registerAccessors: (accesors: Accessors) => void;\n trace: Trace;\n focusSpan: (uiFind: string) => void;\n linksGetter: (span: TraceSpan, items: TraceKeyValuePair[], itemIndex: number) => TraceLink[];\n childrenToggle: (spanID: string) => void;\n clearShouldScrollToFirstUiFindMatch: () => void;\n detailLogItemToggle: (spanID: string, log: TraceLog) => void;\n detailLogsToggle: (spanID: string) => void;\n detailWarningsToggle: (spanID: string) => void;\n detailStackTracesToggle: (spanID: string) => void;\n detailReferencesToggle: (spanID: string) => void;\n detailProcessToggle: (spanID: string) => void;\n detailTagsToggle: (spanID: string) => void;\n detailToggle: (spanID: string) => void;\n setSpanNameColumnWidth: (width: number) => void;\n setTrace: (trace: Trace | TNil, uiFind: string | TNil) => void;\n hoverIndentGuideIds: Set;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n theme: GrafanaTheme2;\n createSpanLink?: SpanLinkFunc;\n scrollElement?: Element;\n focusedSpanId?: string;\n createFocusSpanLink: (traceId: string, spanId: string) => LinkModel;\n};\n\ntype VirtualizedTraceViewProps = TVirtualizedTraceViewOwnProps & TExtractUiFindFromStateReturn & TTraceTimeline;\n\n// export for tests\nexport const DEFAULT_HEIGHTS = {\n bar: 28,\n detail: 161,\n detailWithLogs: 197,\n};\n\nconst NUM_TICKS = 5;\n\nfunction generateRowStates(\n spans: TraceSpan[] | TNil,\n childrenHiddenIDs: Set,\n detailStates: Map\n): RowState[] {\n if (!spans) {\n return [];\n }\n let collapseDepth = null;\n const rowStates = [];\n for (let i = 0; i < spans.length; i++) {\n const span = spans[i];\n const { spanID, depth } = span;\n let hidden = false;\n if (collapseDepth != null) {\n if (depth >= collapseDepth) {\n hidden = true;\n } else {\n collapseDepth = null;\n }\n }\n if (hidden) {\n continue;\n }\n if (childrenHiddenIDs.has(spanID)) {\n collapseDepth = depth + 1;\n }\n rowStates.push({\n span,\n isDetail: false,\n spanIndex: i,\n });\n if (detailStates.has(spanID)) {\n rowStates.push({\n span,\n isDetail: true,\n spanIndex: i,\n });\n }\n }\n return rowStates;\n}\n\nfunction getClipping(currentViewRange: [number, number]) {\n const [zoomStart, zoomEnd] = currentViewRange;\n return {\n left: zoomStart > 0,\n right: zoomEnd < 1,\n };\n}\n\nfunction generateRowStatesFromTrace(\n trace: Trace | TNil,\n childrenHiddenIDs: Set,\n detailStates: Map\n): RowState[] {\n return trace ? generateRowStates(trace.spans, childrenHiddenIDs, detailStates) : [];\n}\n\nconst memoizedGenerateRowStates = memoizeOne(generateRowStatesFromTrace);\nconst memoizedViewBoundsFunc = memoizeOne(createViewedBoundsFunc, isEqual);\nconst memoizedGetClipping = memoizeOne(getClipping, isEqual);\n\n// export from tests\nexport class UnthemedVirtualizedTraceView extends React.Component {\n listView: ListView | TNil;\n\n constructor(props: VirtualizedTraceViewProps) {\n super(props);\n const { setTrace, trace, uiFind } = props;\n setTrace(trace, uiFind);\n }\n\n componentDidMount() {\n this.scrollToSpan(this.props.focusedSpanId);\n }\n\n shouldComponentUpdate(nextProps: VirtualizedTraceViewProps) {\n // If any prop updates, VirtualizedTraceViewImpl should update.\n const nextPropKeys = Object.keys(nextProps) as Array;\n for (let i = 0; i < nextPropKeys.length; i += 1) {\n if (nextProps[nextPropKeys[i]] !== this.props[nextPropKeys[i]]) {\n // Unless the only change was props.shouldScrollToFirstUiFindMatch changing to false.\n if (nextPropKeys[i] === 'shouldScrollToFirstUiFindMatch') {\n if (nextProps[nextPropKeys[i]]) {\n return true;\n }\n } else {\n return true;\n }\n }\n }\n return false;\n }\n\n componentDidUpdate(prevProps: Readonly) {\n const { registerAccessors, trace } = prevProps;\n const {\n shouldScrollToFirstUiFindMatch,\n clearShouldScrollToFirstUiFindMatch,\n scrollToFirstVisibleSpan,\n registerAccessors: nextRegisterAccessors,\n setTrace,\n trace: nextTrace,\n uiFind,\n focusedSpanId,\n } = this.props;\n\n if (trace !== nextTrace) {\n setTrace(nextTrace, uiFind);\n }\n\n if (this.listView && registerAccessors !== nextRegisterAccessors) {\n nextRegisterAccessors(this.getAccessors());\n }\n\n if (shouldScrollToFirstUiFindMatch) {\n scrollToFirstVisibleSpan();\n clearShouldScrollToFirstUiFindMatch();\n }\n\n if (focusedSpanId !== prevProps.focusedSpanId) {\n this.scrollToSpan(focusedSpanId);\n }\n }\n\n getRowStates(): RowState[] {\n const { childrenHiddenIDs, detailStates, trace } = this.props;\n return memoizedGenerateRowStates(trace, childrenHiddenIDs, detailStates);\n }\n\n getClipping(): { left: boolean; right: boolean } {\n const { currentViewRangeTime } = this.props;\n return memoizedGetClipping(currentViewRangeTime);\n }\n\n getViewedBounds(): ViewedBoundsFunctionType {\n const { currentViewRangeTime, trace } = this.props;\n const [zoomStart, zoomEnd] = currentViewRangeTime;\n\n return memoizedViewBoundsFunc({\n min: trace.startTime,\n max: trace.endTime,\n viewStart: zoomStart,\n viewEnd: zoomEnd,\n });\n }\n\n getAccessors() {\n const lv = this.listView;\n if (!lv) {\n throw new Error('ListView unavailable');\n }\n return {\n getViewRange: this.getViewRange,\n getSearchedSpanIDs: this.getSearchedSpanIDs,\n getCollapsedChildren: this.getCollapsedChildren,\n getViewHeight: lv.getViewHeight,\n getBottomRowIndexVisible: lv.getBottomVisibleIndex,\n getTopRowIndexVisible: lv.getTopVisibleIndex,\n getRowPosition: lv.getRowPosition,\n mapRowIndexToSpanIndex: this.mapRowIndexToSpanIndex,\n mapSpanIndexToRowIndex: this.mapSpanIndexToRowIndex,\n };\n }\n\n getViewRange = () => this.props.currentViewRangeTime;\n\n getSearchedSpanIDs = () => this.props.findMatchesIDs;\n\n getCollapsedChildren = () => this.props.childrenHiddenIDs;\n\n mapRowIndexToSpanIndex = (index: number) => this.getRowStates()[index].spanIndex;\n\n mapSpanIndexToRowIndex = (index: number) => {\n const max = this.getRowStates().length;\n for (let i = 0; i < max; i++) {\n const { spanIndex } = this.getRowStates()[i];\n if (spanIndex === index) {\n return i;\n }\n }\n throw new Error(`unable to find row for span index: ${index}`);\n };\n\n setListView = (listView: ListView | TNil) => {\n const isChanged = this.listView !== listView;\n this.listView = listView;\n if (listView && isChanged) {\n this.props.registerAccessors(this.getAccessors());\n }\n };\n\n // use long form syntax to avert flow error\n // https://github.com/facebook/flow/issues/3076#issuecomment-290944051\n getKeyFromIndex = (index: number) => {\n const { isDetail, span } = this.getRowStates()[index];\n return `${span.traceID}--${span.spanID}--${isDetail ? 'detail' : 'bar'}`;\n };\n\n getIndexFromKey = (key: string) => {\n const parts = key.split('--');\n const _traceID = parts[0];\n const _spanID = parts[1];\n const _isDetail = parts[2] === 'detail';\n const max = this.getRowStates().length;\n for (let i = 0; i < max; i++) {\n const { span, isDetail } = this.getRowStates()[i];\n if (span.spanID === _spanID && span.traceID === _traceID && isDetail === _isDetail) {\n return i;\n }\n }\n return -1;\n };\n\n getRowHeight = (index: number) => {\n const { span, isDetail } = this.getRowStates()[index];\n if (!isDetail) {\n return DEFAULT_HEIGHTS.bar;\n }\n if (Array.isArray(span.logs) && span.logs.length) {\n return DEFAULT_HEIGHTS.detailWithLogs;\n }\n return DEFAULT_HEIGHTS.detail;\n };\n\n renderRow = (key: string, style: React.CSSProperties, index: number, attrs: {}) => {\n const { isDetail, span, spanIndex } = this.getRowStates()[index];\n return isDetail\n ? this.renderSpanDetailRow(span, key, style, attrs)\n : this.renderSpanBarRow(span, spanIndex, key, style, attrs);\n };\n\n scrollToSpan = (spanID?: string) => {\n if (spanID == null) {\n return;\n }\n const i = this.getRowStates().findIndex((row) => row.span.spanID === spanID);\n if (i >= 0) {\n this.listView?.scrollToIndex(i);\n }\n };\n\n renderSpanBarRow(span: TraceSpan, spanIndex: number, key: string, style: React.CSSProperties, attrs: {}) {\n const { spanID } = span;\n const { serviceName } = span.process;\n const {\n childrenHiddenIDs,\n childrenToggle,\n detailStates,\n detailToggle,\n findMatchesIDs,\n spanNameColumnWidth,\n trace,\n focusSpan,\n hoverIndentGuideIds,\n addHoverIndentGuideId,\n removeHoverIndentGuideId,\n theme,\n createSpanLink,\n focusedSpanId,\n } = this.props;\n // to avert flow error\n if (!trace) {\n return null;\n }\n const color = getColorByKey(serviceName, theme);\n const isCollapsed = childrenHiddenIDs.has(spanID);\n const isDetailExpanded = detailStates.has(spanID);\n const isMatchingFilter = findMatchesIDs ? findMatchesIDs.has(spanID) : false;\n const isFocused = spanID === focusedSpanId;\n const showErrorIcon = isErrorSpan(span) || (isCollapsed && spanContainsErredSpan(trace.spans, spanIndex));\n\n // Check for direct child \"server\" span if the span is a \"client\" span.\n let rpc = null;\n if (isCollapsed) {\n const rpcSpan = findServerChildSpan(trace.spans.slice(spanIndex));\n if (rpcSpan) {\n const rpcViewBounds = this.getViewedBounds()(rpcSpan.startTime, rpcSpan.startTime + rpcSpan.duration);\n rpc = {\n color: getColorByKey(rpcSpan.process.serviceName, theme),\n operationName: rpcSpan.operationName,\n serviceName: rpcSpan.process.serviceName,\n viewEnd: rpcViewBounds.end,\n viewStart: rpcViewBounds.start,\n };\n }\n }\n\n const peerServiceKV = span.tags.find((kv) => kv.key === PEER_SERVICE);\n // Leaf, kind == client and has peer.service.tag, is likely a client span that does a request\n // to an uninstrumented/external service\n let noInstrumentedServer = null;\n if (!span.hasChildren && peerServiceKV && isKindClient(span)) {\n noInstrumentedServer = {\n serviceName: peerServiceKV.value,\n color: getColorByKey(peerServiceKV.value, theme),\n };\n }\n\n const styles = getStyles();\n return (\n
\n \n
\n );\n }\n\n renderSpanDetailRow(span: TraceSpan, key: string, style: React.CSSProperties, attrs: {}) {\n const { spanID } = span;\n const { serviceName } = span.process;\n const {\n detailLogItemToggle,\n detailLogsToggle,\n detailProcessToggle,\n detailReferencesToggle,\n detailWarningsToggle,\n detailStackTracesToggle,\n detailStates,\n detailTagsToggle,\n detailToggle,\n spanNameColumnWidth,\n trace,\n focusSpan,\n hoverIndentGuideIds,\n addHoverIndentGuideId,\n removeHoverIndentGuideId,\n linksGetter,\n theme,\n createSpanLink,\n focusedSpanId,\n createFocusSpanLink,\n } = this.props;\n const detailState = detailStates.get(spanID);\n if (!trace || !detailState) {\n return null;\n }\n const color = getColorByKey(serviceName, theme);\n const styles = getStyles();\n return (\n
\n \n
\n );\n }\n\n render() {\n const styles = getStyles();\n const { scrollElement } = this.props;\n return (\n
\n \n
\n );\n }\n}\n\nexport default withTheme2(UnthemedVirtualizedTraceView);\n","// Copyright (c) 2018 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const HTTP_METHOD = 'http.method' as 'http.method';\nexport const PEER_SERVICE = 'peer.service' as 'peer.service';\nexport const SPAN_KIND = 'span.kind' as 'span.kind';\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nconst keyboardMappings: Record = {\n scrollPageDown: { binding: 's', label: 'Scroll down' },\n scrollPageUp: { binding: 'w', label: 'Scroll up' },\n scrollToNextVisibleSpan: { binding: 'f', label: 'Scroll to the next visible span' },\n scrollToPrevVisibleSpan: { binding: 'b', label: 'Scroll to the previous visible span' },\n panLeft: { binding: ['a', 'left'], label: 'Pan left' },\n panLeftFast: { binding: ['shift+a', 'shift+left'], label: 'Pan left — Large' },\n panRight: { binding: ['d', 'right'], label: 'Pan right' },\n panRightFast: { binding: ['shift+d', 'shift+right'], label: 'Pan right — Large' },\n zoomIn: { binding: 'up', label: 'Zoom in' },\n zoomInFast: { binding: 'shift+up', label: 'Zoom in — Large' },\n zoomOut: { binding: 'down', label: 'Zoom out' },\n zoomOutFast: { binding: 'shift+down', label: 'Zoom out — Large' },\n collapseAll: { binding: ']', label: 'Collapse All' },\n expandAll: { binding: '[', label: 'Expand All' },\n collapseOne: { binding: 'p', label: 'Collapse One Level' },\n expandOne: { binding: 'o', label: 'Expand One Level' },\n searchSpans: { binding: 'ctrl+b', label: 'Search Spans' },\n clearSearch: { binding: 'escape', label: 'Clear Search' },\n};\n\nexport default keyboardMappings;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport Combokeys from 'combokeys';\n\nimport keyboardMappings from './keyboard-mappings';\n\nexport type CombokeysHandler =\n | (() => void)\n | ((event: React.KeyboardEvent) => void)\n | ((event: React.KeyboardEvent, s: string) => void);\n\nexport type ShortcutCallbacks = {\n [name: string]: CombokeysHandler;\n};\n\nlet instance: Combokeys | undefined;\n\nfunction getInstance(): Combokeys {\n if (instance) {\n return instance;\n }\n const local = new Combokeys(document.body);\n instance = local;\n return local;\n}\n\nexport function merge(callbacks: ShortcutCallbacks) {\n const inst = getInstance();\n Object.keys(callbacks).forEach((name) => {\n const keysHandler = callbacks[name];\n if (keysHandler) {\n inst.bind(keyboardMappings[name].binding, keysHandler);\n }\n });\n}\n\nexport function reset() {\n const combokeys = getInstance();\n combokeys.reset();\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport { GrafanaTheme2, LinkModel } from '@grafana/data';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\n\nimport TimelineHeaderRow from './TimelineHeaderRow';\nimport VirtualizedTraceView from './VirtualizedTraceView';\nimport { merge as mergeShortcuts } from '../keyboard-shortcuts';\nimport { Accessors } from '../ScrollManager';\nimport { TUpdateViewRangeTimeFunction, ViewRange, ViewRangeTimeUpdate } from './types';\nimport { SpanLinkFunc, TNil } from '../types';\nimport { TraceSpan, Trace, TraceLog, TraceKeyValuePair, TraceLink } from '../types/trace';\nimport TTraceTimeline from '../types/TTraceTimeline';\nimport { autoColor } from '../Theme';\nimport ExternalLinkContext from '../url/externalLinkContext';\n\ntype TExtractUiFindFromStateReturn = {\n uiFind: string | undefined;\n};\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n return {\n TraceTimelineViewer: css`\n label: TraceTimelineViewer;\n border-bottom: 1px solid ${autoColor(theme, '#bbb')};\n\n & .json-markup {\n line-height: 17px;\n font-size: 13px;\n font-family: monospace;\n white-space: pre-wrap;\n }\n\n & .json-markup-key {\n font-weight: bold;\n }\n\n & .json-markup-bool {\n color: ${autoColor(theme, 'firebrick')};\n }\n\n & .json-markup-string {\n color: ${autoColor(theme, 'teal')};\n }\n\n & .json-markup-null {\n color: ${autoColor(theme, 'teal')};\n }\n\n & .json-markup-number {\n color: ${autoColor(theme, 'blue', 'black')};\n }\n `,\n };\n});\n\ntype TProps = TExtractUiFindFromStateReturn & {\n registerAccessors: (accessors: Accessors) => void;\n findMatchesIDs: Set | TNil;\n scrollToFirstVisibleSpan: () => void;\n traceTimeline: TTraceTimeline;\n trace: Trace;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n viewRange: ViewRange;\n focusSpan: (uiFind: string) => void;\n createLinkToExternalSpan: (traceID: string, spanID: string) => string;\n\n setSpanNameColumnWidth: (width: number) => void;\n collapseAll: (spans: TraceSpan[]) => void;\n collapseOne: (spans: TraceSpan[]) => void;\n expandAll: () => void;\n expandOne: (spans: TraceSpan[]) => void;\n\n childrenToggle: (spanID: string) => void;\n clearShouldScrollToFirstUiFindMatch: () => void;\n detailLogItemToggle: (spanID: string, log: TraceLog) => void;\n detailLogsToggle: (spanID: string) => void;\n detailWarningsToggle: (spanID: string) => void;\n detailStackTracesToggle: (spanID: string) => void;\n detailReferencesToggle: (spanID: string) => void;\n detailProcessToggle: (spanID: string) => void;\n detailTagsToggle: (spanID: string) => void;\n detailToggle: (spanID: string) => void;\n setTrace: (trace: Trace | TNil, uiFind: string | TNil) => void;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n linksGetter: (span: TraceSpan, items: TraceKeyValuePair[], itemIndex: number) => TraceLink[];\n theme: GrafanaTheme2;\n createSpanLink?: SpanLinkFunc;\n scrollElement?: Element;\n focusedSpanId?: string;\n createFocusSpanLink: (traceId: string, spanId: string) => LinkModel;\n};\n\ntype State = {\n // Will be set to real height of the component so it can be passed down to size some other elements.\n height: number;\n};\n\nconst NUM_TICKS = 5;\n\n/**\n * `TraceTimelineViewer` now renders the header row because it is sensitive to\n * `props.viewRange.time.cursor`. If `VirtualizedTraceView` renders it, it will\n * re-render the ListView every time the cursor is moved on the trace minimap\n * or `TimelineHeaderRow`.\n */\nexport class UnthemedTraceTimelineViewer extends React.PureComponent {\n constructor(props: TProps) {\n super(props);\n this.state = { height: 0 };\n }\n\n componentDidMount() {\n mergeShortcuts({\n collapseAll: this.collapseAll,\n expandAll: this.expandAll,\n collapseOne: this.collapseOne,\n expandOne: this.expandOne,\n });\n }\n\n collapseAll = () => {\n this.props.collapseAll(this.props.trace.spans);\n };\n\n collapseOne = () => {\n this.props.collapseOne(this.props.trace.spans);\n };\n\n expandAll = () => {\n this.props.expandAll();\n };\n\n expandOne = () => {\n this.props.expandOne(this.props.trace.spans);\n };\n\n render() {\n const {\n setSpanNameColumnWidth,\n updateNextViewRangeTime,\n updateViewRangeTime,\n viewRange,\n createLinkToExternalSpan,\n traceTimeline,\n theme,\n ...rest\n } = this.props;\n const { trace } = rest;\n const styles = getStyles(theme);\n\n return (\n \n ref && this.setState({ height: ref.getBoundingClientRect().height })}\n >\n \n \n \n \n );\n }\n}\n\nexport default withTheme2(UnthemedTraceTimelineViewer);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\n\nimport renderIntoCanvas from './render-into-canvas';\nimport { getRgbColorByKey } from '../../utils/color-generator';\nimport { TNil } from '../../types';\n\nimport { autoColor } from '../../Theme';\nimport { withTheme2, stylesFactory } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n return {\n CanvasSpanGraph: css`\n label: CanvasSpanGraph;\n background: ${autoColor(theme, '#fafafa')};\n height: 60px;\n position: absolute;\n width: 100%;\n `,\n };\n});\n\ntype CanvasSpanGraphProps = {\n items: Array<{ valueWidth: number; valueOffset: number; serviceName: string }>;\n valueWidth: number;\n theme: GrafanaTheme2;\n};\n\nexport class UnthemedCanvasSpanGraph extends React.PureComponent {\n _canvasElm: HTMLCanvasElement | TNil;\n\n constructor(props: CanvasSpanGraphProps) {\n super(props);\n this._canvasElm = undefined;\n }\n\n getColor = (key: string) => getRgbColorByKey(key, this.props.theme);\n\n componentDidMount() {\n this._draw();\n }\n\n componentDidUpdate() {\n this._draw();\n }\n\n _setCanvasRef = (elm: HTMLCanvasElement | TNil) => {\n this._canvasElm = elm;\n };\n\n _draw() {\n if (this._canvasElm) {\n const { valueWidth: totalValueWidth, items } = this.props;\n renderIntoCanvas(this._canvasElm, items, totalValueWidth, this.getColor, autoColor(this.props.theme, '#fff'));\n }\n }\n\n render() {\n return ;\n }\n}\n\nexport default withTheme2(UnthemedCanvasSpanGraph);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TNil } from '../..';\n\n// exported for tests\nexport const ITEM_ALPHA = 0.8;\nexport const MIN_ITEM_HEIGHT = 2;\nexport const MAX_TOTAL_HEIGHT = 200;\nexport const MIN_ITEM_WIDTH = 10;\nexport const MIN_TOTAL_HEIGHT = 60;\nexport const MAX_ITEM_HEIGHT = 6;\n\nexport default function renderIntoCanvas(\n canvas: HTMLCanvasElement,\n items: Array<{ valueWidth: number; valueOffset: number; serviceName: string }>,\n totalValueWidth: number,\n getFillColor: (serviceName: string) => [number, number, number],\n bgColor: string\n) {\n const fillCache: Map = new Map();\n const cHeight = items.length < MIN_TOTAL_HEIGHT ? MIN_TOTAL_HEIGHT : Math.min(items.length, MAX_TOTAL_HEIGHT);\n const cWidth = window.innerWidth * 2;\n // eslint-disable-next-line no-param-reassign\n canvas.width = cWidth;\n // eslint-disable-next-line no-param-reassign\n canvas.height = cHeight;\n const itemHeight = Math.min(MAX_ITEM_HEIGHT, Math.max(MIN_ITEM_HEIGHT, cHeight / items.length));\n const itemYChange = cHeight / items.length;\n\n const ctx = canvas.getContext('2d', { alpha: false }) as CanvasRenderingContext2D;\n ctx.fillStyle = bgColor;\n ctx.fillRect(0, 0, cWidth, cHeight);\n for (let i = 0; i < items.length; i++) {\n const { valueWidth, valueOffset, serviceName } = items[i];\n const x = (valueOffset / totalValueWidth) * cWidth;\n let width = (valueWidth / totalValueWidth) * cWidth;\n if (width < MIN_ITEM_WIDTH) {\n width = MIN_ITEM_WIDTH;\n }\n let fillStyle = fillCache.get(serviceName);\n if (!fillStyle) {\n fillStyle = `rgba(${getFillColor(serviceName).concat(ITEM_ALPHA).join()})`;\n fillCache.set(serviceName, fillStyle);\n }\n ctx.fillStyle = fillStyle;\n ctx.fillRect(x, i * itemYChange, width, itemHeight);\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nimport { formatDuration } from '../../utils/date';\n\nconst getStyles = () => {\n return {\n TickLabels: css`\n label: TickLabels;\n height: 1rem;\n position: relative;\n `,\n TickLabelsLabel: css`\n label: TickLabelsLabel;\n color: #717171;\n font-size: 0.7rem;\n position: absolute;\n user-select: none;\n `,\n };\n};\n\ntype TickLabelsProps = {\n numTicks: number;\n duration: number;\n};\n\nexport default function TickLabels(props: TickLabelsProps) {\n const { numTicks, duration } = props;\n const styles = useStyles2(getStyles);\n\n const ticks = [];\n for (let i = 0; i < numTicks + 1; i++) {\n const portion = i / numTicks;\n const style = portion === 1 ? { right: '0%' } : { left: `${portion * 100}%` };\n ticks.push(\n
\n {formatDuration(duration * portion)}\n
\n );\n }\n\n return
{ticks}
;\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nconst getStyles = () => {\n return {\n GraphTick: css`\n label: GraphTick;\n stroke: #aaa;\n stroke-width: 1px;\n `,\n };\n};\n\ntype GraphTicksProps = {\n numTicks: number;\n};\n\nexport default function GraphTicks(props: GraphTicksProps) {\n const { numTicks } = props;\n const styles = useStyles2(getStyles);\n const ticks = [];\n // i starts at 1, limit is `i < numTicks` so the first and last ticks aren't drawn\n for (let i = 1; i < numTicks; i++) {\n const x = `${(i / numTicks) * 100}%`;\n ticks.push();\n }\n\n return (\n \n {ticks}\n \n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport cx from 'classnames';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nexport const getStyles = () => {\n return {\n ScrubberHandleExpansion: cx(\n css`\n label: ScrubberHandleExpansion;\n cursor: col-resize;\n fill-opacity: 0;\n fill: #44f;\n `,\n 'scrubber-handle-expansion'\n ),\n ScrubberHandle: cx(\n css`\n label: ScrubberHandle;\n cursor: col-resize;\n fill: #555;\n `,\n 'scrubber-handle'\n ),\n ScrubberLine: cx(\n css`\n label: ScrubberLine;\n pointer-events: none;\n stroke: #555;\n `,\n 'scrubber-line'\n ),\n ScrubberDragging: css`\n label: ScrubberDragging;\n & .scrubber-handle-expansion {\n fill-opacity: 1;\n }\n & .scrubber-handle {\n fill: #44f;\n }\n & > .scrubber-line {\n stroke: #44f;\n }\n `,\n ScrubberHandles: css`\n label: ScrubberHandles;\n &:hover > .scrubber-handle-expansion {\n fill-opacity: 1;\n }\n &:hover > .scrubber-handle {\n fill: #44f;\n }\n &:hover + .scrubber.line {\n stroke: #44f;\n }\n `,\n };\n};\n\ntype ScrubberProps = {\n isDragging: boolean;\n position: number;\n onMouseDown: (evt: React.MouseEvent) => void;\n onMouseEnter: (evt: React.MouseEvent) => void;\n onMouseLeave: (evt: React.MouseEvent) => void;\n};\n\nexport default function Scrubber({ isDragging, onMouseDown, onMouseEnter, onMouseLeave, position }: ScrubberProps) {\n const xPercent = `${position * 100}%`;\n const styles = useStyles2(getStyles);\n const className = cx({ [styles.ScrubberDragging]: isDragging });\n return (\n \n \n {/* handleExpansion is only visible when `isDragging` is true */}\n \n \n \n \n \n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport cx from 'classnames';\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { withTheme2, stylesFactory } from '@grafana/ui';\n\nimport GraphTicks from './GraphTicks';\nimport Scrubber from './Scrubber';\nimport { TUpdateViewRangeTimeFunction, UIButton, ViewRange, ViewRangeTimeUpdate, TNil } from '../..';\nimport { autoColor } from '../../Theme';\nimport DraggableManager, { DraggableBounds, DraggingUpdate, EUpdateTypes } from '../../utils/DraggableManager';\n\nexport const getStyles = stylesFactory((theme: GrafanaTheme2) => {\n // Need this cause emotion will merge emotion generated classes into single className if used with cx from emotion\n // package and the selector won't work\n const ViewingLayerResetZoomHoverClassName = 'JaegerUiComponents__ViewingLayerResetZoomHoverClassName';\n const ViewingLayerResetZoom = css`\n label: ViewingLayerResetZoom;\n display: none;\n position: absolute;\n right: 1%;\n top: 10%;\n z-index: 1;\n `;\n return {\n ViewingLayer: css`\n label: ViewingLayer;\n cursor: vertical-text;\n position: relative;\n z-index: 1;\n &:hover > .${ViewingLayerResetZoomHoverClassName} {\n display: unset;\n }\n `,\n ViewingLayerGraph: css`\n label: ViewingLayerGraph;\n border: 1px solid ${autoColor(theme, '#999')};\n /* need !important here to overcome something from semantic UI */\n overflow: visible !important;\n position: relative;\n transform-origin: 0 0;\n width: 100%;\n `,\n ViewingLayerInactive: css`\n label: ViewingLayerInactive;\n fill: ${autoColor(theme, 'rgba(214, 214, 214, 0.5)')};\n `,\n ViewingLayerCursorGuide: css`\n label: ViewingLayerCursorGuide;\n stroke: ${autoColor(theme, '#f44')};\n stroke-width: 1;\n `,\n ViewingLayerDraggedShift: css`\n label: ViewingLayerDraggedShift;\n fill-opacity: 0.2;\n `,\n ViewingLayerDrag: css`\n label: ViewingLayerDrag;\n fill: ${autoColor(theme, '#44f')};\n `,\n ViewingLayerFullOverlay: css`\n label: ViewingLayerFullOverlay;\n bottom: 0;\n cursor: col-resize;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n user-select: none;\n `,\n ViewingLayerResetZoom,\n ViewingLayerResetZoomHoverClassName,\n };\n});\n\ntype ViewingLayerProps = {\n height: number;\n numTicks: number;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n viewRange: ViewRange;\n theme: GrafanaTheme2;\n};\n\ntype ViewingLayerState = {\n /**\n * Cursor line should not be drawn when the mouse is over the scrubber handle.\n */\n preventCursorLine: boolean;\n};\n\n/**\n * Designate the tags for the different dragging managers. Exported for tests.\n */\nexport const dragTypes = {\n /**\n * Tag for dragging the right scrubber, e.g. end of the current view range.\n */\n SHIFT_END: 'SHIFT_END',\n /**\n * Tag for dragging the left scrubber, e.g. start of the current view range.\n */\n SHIFT_START: 'SHIFT_START',\n /**\n * Tag for dragging a new view range.\n */\n REFRAME: 'REFRAME',\n};\n\n/**\n * Returns the layout information for drawing the view-range differential, e.g.\n * show what will change when the mouse is released. Basically, this is the\n * difference from the start of the drag to the current position.\n *\n * @returns {{ x: string, width: string, leadginX: string }}\n */\nfunction getNextViewLayout(start: number, position: number) {\n const [left, right] = start < position ? [start, position] : [position, start];\n return {\n x: `${left * 100}%`,\n width: `${(right - left) * 100}%`,\n leadingX: `${position * 100}%`,\n };\n}\n\n/**\n * `ViewingLayer` is rendered on top of the Canvas rendering of the minimap and\n * handles showing the current view range and handles mouse UX for modifying it.\n */\nexport class UnthemedViewingLayer extends React.PureComponent {\n state: ViewingLayerState;\n\n _root: Element | TNil;\n\n /**\n * `_draggerReframe` handles clicking and dragging on the `ViewingLayer` to\n * redefined the view range.\n */\n _draggerReframe: DraggableManager;\n\n /**\n * `_draggerStart` handles dragging the left scrubber to adjust the start of\n * the view range.\n */\n _draggerStart: DraggableManager;\n\n /**\n * `_draggerEnd` handles dragging the right scrubber to adjust the end of\n * the view range.\n */\n _draggerEnd: DraggableManager;\n\n constructor(props: ViewingLayerProps) {\n super(props);\n\n this._draggerReframe = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleReframeDragEnd,\n onDragMove: this._handleReframeDragUpdate,\n onDragStart: this._handleReframeDragUpdate,\n onMouseMove: this._handleReframeMouseMove,\n onMouseLeave: this._handleReframeMouseLeave,\n tag: dragTypes.REFRAME,\n });\n\n this._draggerStart = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleScrubberDragEnd,\n onDragMove: this._handleScrubberDragUpdate,\n onDragStart: this._handleScrubberDragUpdate,\n onMouseEnter: this._handleScrubberEnterLeave,\n onMouseLeave: this._handleScrubberEnterLeave,\n tag: dragTypes.SHIFT_START,\n });\n\n this._draggerEnd = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleScrubberDragEnd,\n onDragMove: this._handleScrubberDragUpdate,\n onDragStart: this._handleScrubberDragUpdate,\n onMouseEnter: this._handleScrubberEnterLeave,\n onMouseLeave: this._handleScrubberEnterLeave,\n tag: dragTypes.SHIFT_END,\n });\n\n this._root = undefined;\n this.state = {\n preventCursorLine: false,\n };\n }\n\n componentWillUnmount() {\n this._draggerReframe.dispose();\n this._draggerEnd.dispose();\n this._draggerStart.dispose();\n }\n\n _setRoot = (elm: SVGElement | TNil) => {\n this._root = elm;\n };\n\n _getDraggingBounds = (tag: string | TNil): DraggableBounds => {\n if (!this._root) {\n throw new Error('invalid state');\n }\n const { left: clientXLeft, width } = this._root.getBoundingClientRect();\n const [viewStart, viewEnd] = this.props.viewRange.time.current;\n let maxValue = 1;\n let minValue = 0;\n if (tag === dragTypes.SHIFT_START) {\n maxValue = viewEnd;\n } else if (tag === dragTypes.SHIFT_END) {\n minValue = viewStart;\n }\n return { clientXLeft, maxValue, minValue, width };\n };\n\n _handleReframeMouseMove = ({ value }: DraggingUpdate) => {\n this.props.updateNextViewRangeTime({ cursor: value });\n };\n\n _handleReframeMouseLeave = () => {\n this.props.updateNextViewRangeTime({ cursor: null });\n };\n\n _handleReframeDragUpdate = ({ value }: DraggingUpdate) => {\n const shift = value;\n const { time } = this.props.viewRange;\n const anchor = time.reframe ? time.reframe.anchor : shift;\n const update = { reframe: { anchor, shift } };\n this.props.updateNextViewRangeTime(update);\n };\n\n _handleReframeDragEnd = ({ manager, value }: DraggingUpdate) => {\n const { time } = this.props.viewRange;\n const anchor = time.reframe ? time.reframe.anchor : value;\n const [start, end] = value < anchor ? [value, anchor] : [anchor, value];\n manager.resetBounds();\n this.props.updateViewRangeTime(start, end, 'minimap');\n };\n\n _handleScrubberEnterLeave = ({ type }: DraggingUpdate) => {\n const preventCursorLine = type === EUpdateTypes.MouseEnter;\n this.setState({ preventCursorLine });\n };\n\n _handleScrubberDragUpdate = ({ event, tag, type, value }: DraggingUpdate) => {\n if (type === EUpdateTypes.DragStart) {\n event.stopPropagation();\n }\n if (tag === dragTypes.SHIFT_START) {\n this.props.updateNextViewRangeTime({ shiftStart: value });\n } else if (tag === dragTypes.SHIFT_END) {\n this.props.updateNextViewRangeTime({ shiftEnd: value });\n }\n };\n\n _handleScrubberDragEnd = ({ manager, tag, value }: DraggingUpdate) => {\n const [viewStart, viewEnd] = this.props.viewRange.time.current;\n let update: [number, number];\n if (tag === dragTypes.SHIFT_START) {\n update = [value, viewEnd];\n } else if (tag === dragTypes.SHIFT_END) {\n update = [viewStart, value];\n } else {\n // to satisfy flow\n throw new Error('bad state');\n }\n manager.resetBounds();\n this.setState({ preventCursorLine: false });\n this.props.updateViewRangeTime(update[0], update[1], 'minimap');\n };\n\n /**\n * Resets the zoom to fully zoomed out.\n */\n _resetTimeZoomClickHandler = () => {\n this.props.updateViewRangeTime(0, 1);\n };\n\n /**\n * Renders the difference between where the drag started and the current\n * position, e.g. the red or blue highlight.\n *\n * @returns React.Node[]\n */\n _getMarkers(from: number, to: number) {\n const styles = getStyles(this.props.theme);\n const layout = getNextViewLayout(from, to);\n return [\n ,\n ,\n ];\n }\n\n render() {\n const { height, viewRange, numTicks, theme } = this.props;\n const { preventCursorLine } = this.state;\n const { current, cursor, shiftStart, shiftEnd, reframe } = viewRange.time;\n const haveNextTimeRange = shiftStart != null || shiftEnd != null || reframe != null;\n const [viewStart, viewEnd] = current;\n let leftInactive = 0;\n if (viewStart) {\n leftInactive = viewStart * 100;\n }\n let rightInactive = 100;\n if (viewEnd) {\n rightInactive = 100 - viewEnd * 100;\n }\n let cursorPosition: string | undefined;\n if (!haveNextTimeRange && cursor != null && !preventCursorLine) {\n cursorPosition = `${cursor * 100}%`;\n }\n const styles = getStyles(theme);\n\n return (\n
\n {(viewStart !== 0 || viewEnd !== 1) && (\n \n Reset Selection\n \n )}\n \n {leftInactive > 0 && (\n \n )}\n {rightInactive > 0 && (\n \n )}\n \n {cursorPosition && (\n \n )}\n {shiftStart != null && this._getMarkers(viewStart, shiftStart)}\n {shiftEnd != null && this._getMarkers(viewEnd, shiftEnd)}\n \n \n {reframe != null && this._getMarkers(reframe.anchor, reframe.shift)}\n \n {/* fullOverlay updates the mouse cursor blocks mouse events */}\n {haveNextTimeRange &&
}\n
\n );\n }\n}\n\nexport default withTheme2(UnthemedViewingLayer);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport cx from 'classnames';\nimport memoizeOne from 'memoize-one';\n\nimport CanvasSpanGraph from './CanvasSpanGraph';\nimport TickLabels from './TickLabels';\nimport ViewingLayer from './ViewingLayer';\nimport { TUpdateViewRangeTimeFunction, ViewRange, ViewRangeTimeUpdate } from '../..';\nimport { TraceSpan, Trace } from '../../types/trace';\nimport { ubPb2, ubPx2, ubRelative } from '../../uberUtilityStyles';\n\nconst DEFAULT_HEIGHT = 60;\nconst TIMELINE_TICK_INTERVAL = 4;\n\ntype SpanGraphProps = {\n height?: number;\n trace: Trace;\n viewRange: ViewRange;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n updateNextViewRangeTime: (nextUpdate: ViewRangeTimeUpdate) => void;\n};\n\ntype SpanItem = {\n valueOffset: number;\n valueWidth: number;\n serviceName: string;\n};\n\nfunction getItem(span: TraceSpan): SpanItem {\n return {\n valueOffset: span.relativeStartTime,\n valueWidth: span.duration,\n serviceName: span.process.serviceName,\n };\n}\n\nfunction getItems(trace: Trace): SpanItem[] {\n return trace.spans.map(getItem);\n}\n\nconst memoizedGetitems = memoizeOne(getItems);\n\nexport default class SpanGraph extends React.PureComponent {\n static defaultProps = {\n height: DEFAULT_HEIGHT,\n };\n\n render() {\n const { height, trace, viewRange, updateNextViewRangeTime, updateViewRangeTime } = this.props;\n if (!trace) {\n return
;\n }\n\n const items = memoizedGetitems(trace);\n return (\n
\n \n
\n \n \n
\n
\n );\n }\n}\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\n\nimport { TNil } from '../types/index';\nimport { UIIcon, UIInput } from '../uiElementsContext';\n\ntype Props = {\n allowClear?: boolean;\n inputProps: Record;\n location: Location;\n match: any;\n trackFindFunction?: (str: string | TNil) => void;\n value: string | undefined;\n onChange: (value: string) => void;\n};\n\nexport default class UiFindInput extends React.PureComponent {\n static defaultProps: Partial = {\n inputProps: {},\n trackFindFunction: undefined,\n value: undefined,\n };\n\n clearUiFind = () => {\n this.props.onChange('');\n };\n\n render() {\n const { allowClear, inputProps, value } = this.props;\n\n const suffix = (\n <>\n {allowClear && value && value.length && }\n {inputProps.suffix}\n \n );\n\n return (\n this.props.onChange(e.target.value)}\n suffix={suffix}\n value={value}\n />\n );\n }\n}\n","// Copyright (c) 2018 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport cx from 'classnames';\nimport IoAndroidLocate from 'react-icons/lib/io/android-locate';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nimport * as markers from './TracePageSearchBar.markers';\nimport UiFindInput from '../common/UiFindInput';\nimport { TNil } from '../types';\n\nimport { UIButton, UIInputGroup } from '../uiElementsContext';\nimport { ubFlexAuto, ubJustifyEnd } from '../uberUtilityStyles';\n// eslint-disable-next-line no-duplicate-imports\nimport { memo } from 'react';\n\nexport const getStyles = () => {\n return {\n TracePageSearchBar: css`\n label: TracePageSearchBar;\n `,\n TracePageSearchBarBar: css`\n label: TracePageSearchBarBar;\n max-width: 20rem;\n transition: max-width 0.5s;\n &:focus-within {\n max-width: 100%;\n }\n `,\n TracePageSearchBarCount: css`\n label: TracePageSearchBarCount;\n opacity: 0.6;\n `,\n TracePageSearchBarBtn: css`\n label: TracePageSearchBarBtn;\n border-left: none;\n transition: 0.2s;\n `,\n TracePageSearchBarBtnDisabled: css`\n label: TracePageSearchBarBtnDisabled;\n opacity: 0.5;\n `,\n TracePageSearchBarLocateBtn: css`\n label: TracePageSearchBarLocateBtn;\n padding: 1px 8px 4px;\n `,\n };\n};\n\ntype TracePageSearchBarProps = {\n textFilter: string | TNil;\n prevResult: () => void;\n nextResult: () => void;\n clearSearch: () => void;\n focusUiFindMatches: () => void;\n resultCount: number;\n navigable: boolean;\n searchValue: string;\n onSearchValueChange: (value: string) => void;\n hideSearchButtons?: boolean;\n};\n\nexport default memo(function TracePageSearchBar(props: TracePageSearchBarProps) {\n const {\n clearSearch,\n focusUiFindMatches,\n navigable,\n nextResult,\n prevResult,\n resultCount,\n textFilter,\n onSearchValueChange,\n searchValue,\n hideSearchButtons,\n } = props;\n const styles = useStyles2(getStyles);\n\n const count = textFilter ? {resultCount} : null;\n\n const btnClass = cx(styles.TracePageSearchBarBtn, { [styles.TracePageSearchBarBtnDisabled]: !textFilter });\n const uiFindInputInputProps = {\n 'data-test': markers.IN_TRACE_SEARCH,\n className: cx(styles.TracePageSearchBarBar, ubFlexAuto),\n name: 'search',\n suffix: count,\n };\n\n return (\n
\n {/* style inline because compact overwrites the display */}\n \n \n {!hideSearchButtons && (\n <>\n {navigable && (\n <>\n \n \n \n \n \n \n )}\n \n \n )}\n \n
\n );\n});\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const IN_TRACE_SEARCH = 'in-trace-search';\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nconst getStyles = () => {\n return {\n BreakableText: css`\n label: BreakableText;\n display: inline-block;\n white-space: pre;\n `,\n };\n};\n\nconst WORD_RX = /\\W*\\w+\\W*/g;\n\ntype Props = {\n text: string;\n className?: string;\n wordRegexp?: RegExp;\n};\n\n// TODO typescript doesn't understand text or null as react nodes\n// https://github.com/Microsoft/TypeScript/issues/21699\nexport default function BreakableText(\n props: Props\n): any /* React.ReactNode /* React.ReactElement | React.ReactElement[] \\*\\/ */ {\n const { className, text, wordRegexp = WORD_RX } = props;\n const styles = useStyles2(getStyles);\n if (!text) {\n return typeof text === 'string' ? text : null;\n }\n const spans = [];\n wordRegexp.exec('');\n // if the given text has no words, set the first match to the entire text\n let match: RegExpExecArray | string[] | null = wordRegexp.exec(text) || [text];\n while (match) {\n spans.push(\n \n {match[0]}\n \n );\n match = wordRegexp.exec(text);\n }\n return spans;\n}\n\nBreakableText.defaultProps = {\n wordRegexp: WORD_RX,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport cx from 'classnames';\nimport { css, keyframes } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nimport { UIIcon } from '../uiElementsContext';\n\nconst getStyles = () => {\n const LoadingIndicatorColorAnim = keyframes`\n /*\n rgb(0, 128, 128) == teal\n rgba(0, 128, 128, 0.3) == #bedfdf\n */\n from {\n color: #bedfdf;\n }\n to {\n color: teal;\n }\n `;\n return {\n LoadingIndicator: css`\n label: LoadingIndicator;\n animation: ${LoadingIndicatorColorAnim} 1s infinite alternate;\n font-size: 36px;\n /* outline / stroke the loading indicator */\n text-shadow: -0.5px 0 rgba(0, 128, 128, 0.6), 0 0.5px rgba(0, 128, 128, 0.6), 0.5px 0 rgba(0, 128, 128, 0.6),\n 0 -0.5px rgba(0, 128, 128, 0.6);\n `,\n LoadingIndicatorCentered: css`\n label: LoadingIndicatorCentered;\n display: block;\n margin-left: auto;\n margin-right: auto;\n `,\n LoadingIndicatorSmall: css`\n label: LoadingIndicatorSmall;\n font-size: 0.7em;\n `,\n };\n};\n\ntype LoadingIndicatorProps = {\n centered?: boolean;\n className?: string;\n small?: boolean;\n};\n\nexport default function LoadingIndicator(props: LoadingIndicatorProps) {\n const { centered, className, small, ...rest } = props;\n const styles = useStyles2(getStyles);\n const cls = cx(styles.LoadingIndicator, {\n [styles.LoadingIndicatorCentered]: centered,\n [styles.LoadingIndicatorSmall]: small,\n className,\n });\n return ;\n}\n\nLoadingIndicator.defaultProps = {\n centered: false,\n className: undefined,\n small: false,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const TOP_NAV_HEIGHT = 46 as 46;\n\nexport const FALLBACK_DAG_MAX_NUM_SERVICES = 100 as 100;\nexport const FALLBACK_TRACE_NAME = '' as '';\n\nexport const FETCH_DONE = 'FETCH_DONE' as 'FETCH_DONE';\nexport const FETCH_ERROR = 'FETCH_ERROR' as 'FETCH_ERROR';\nexport const FETCH_LOADING = 'FETCH_LOADING' as 'FETCH_LOADING';\n\nexport const fetchedState = {\n DONE: FETCH_DONE,\n ERROR: FETCH_ERROR,\n LOADING: FETCH_LOADING,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport BreakableText from './BreakableText';\nimport LoadingIndicator from './LoadingIndicator';\nimport { fetchedState, FALLBACK_TRACE_NAME } from '../constants';\nimport { FetchedState, TNil } from '../types';\nimport { ApiError } from '../types/api-error';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n TraceName: css`\n label: TraceName;\n font-size: ${theme.typography.size.lg};\n `,\n TraceNameError: css`\n label: TraceNameError;\n color: #c00;\n `,\n };\n};\n\ntype Props = {\n className?: string;\n error?: ApiError | TNil;\n state?: FetchedState | TNil;\n traceName?: string | TNil;\n};\n\nexport default function TraceName(props: Props) {\n const { className, error, state, traceName } = props;\n const isErred = state === fetchedState.ERROR;\n let title: string | React.ReactNode = traceName || FALLBACK_TRACE_NAME;\n const styles = useStyles2(getStyles);\n let errorCssClass = '';\n if (isErred) {\n errorCssClass = styles.TraceNameError;\n let titleStr = '';\n if (error) {\n titleStr = typeof error === 'string' ? error : error.message || String(error);\n }\n if (!titleStr) {\n titleStr = 'Error: Unknown error';\n }\n title = titleStr;\n title = ;\n } else if (state === fetchedState.LOADING) {\n title = ;\n } else {\n const text = String(traceName || FALLBACK_TRACE_NAME);\n title = ;\n }\n return {title};\n}\n","// Copyright (c) 2020 The Jaeger Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { memoize } from 'lodash';\n\nimport { TraceSpan } from '../types/trace';\n\nexport function _getTraceNameImpl(spans: TraceSpan[]) {\n // Use a span with no references to another span in given array\n // prefering the span with the fewest references\n // using start time as a tie breaker\n let candidateSpan: TraceSpan | undefined;\n const allIDs: Set = new Set(spans.map(({ spanID }) => spanID));\n\n for (let i = 0; i < spans.length; i++) {\n const hasInternalRef =\n spans[i].references &&\n spans[i].references.some(({ traceID, spanID }) => traceID === spans[i].traceID && allIDs.has(spanID));\n if (hasInternalRef) {\n continue;\n }\n\n if (!candidateSpan) {\n candidateSpan = spans[i];\n continue;\n }\n\n const thisRefLength = (spans[i].references && spans[i].references.length) || 0;\n const candidateRefLength = (candidateSpan.references && candidateSpan.references.length) || 0;\n\n if (\n thisRefLength < candidateRefLength ||\n (thisRefLength === candidateRefLength && spans[i].startTime < candidateSpan.startTime)\n ) {\n candidateSpan = spans[i];\n }\n }\n return candidateSpan ? `${candidateSpan.process.serviceName}: ${candidateSpan.operationName}` : '';\n}\n\nexport const getTraceName = memoize(_getTraceNameImpl, (spans: TraceSpan[]) => {\n if (!spans.length) {\n return 0;\n }\n return spans[0].traceID;\n});\n","// \nvar hasOwn = function hasOwn(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n};\n\nfunction deepEquals(equals, deepObjects) {\n function deep(valueA, valueB) {\n if (equals(valueA, valueB)) {\n return true;\n }\n\n if (Array.isArray(valueA)) {\n if (!Array.isArray(valueB) || valueA.length !== valueB.length) {\n return false;\n } // Check deep equality of each value in A against the same indexed value in B\n\n\n if (!valueA.every(function (value, index) {\n return deep(value, valueB[index]);\n })) {\n return false;\n } // could not find unequal items\n\n\n return true;\n }\n\n if (Array.isArray(valueB)) {\n return false;\n }\n\n if (typeof valueA === \"object\") {\n if (typeof valueB !== \"object\") {\n return false;\n }\n\n var isANull = valueA === null;\n var isBNull = valueB === null;\n\n if (isANull || isBNull) {\n return isANull === isBNull;\n }\n\n var aKeys = Object.keys(valueA);\n var bKeys = Object.keys(valueB);\n\n if (aKeys.length !== bKeys.length) {\n return false;\n } // Should we compare with shallow equivalence or deep equivalence?\n\n\n var equalityChecker = deepObjects ? deep : equals; // Check if objects share same keys, and each of those keys are equal\n\n if (!aKeys.every(function (aKey) {\n return hasOwn(valueA, aKey) && hasOwn(valueB, aKey) && equalityChecker(valueA[aKey], valueB[aKey]);\n })) {\n return false;\n } // could not find unequal keys or values\n\n\n return true;\n }\n\n return false;\n }\n\n return deep;\n}\n\n// \nvar findIndex = function findIndex(arr, fn) {\n for (var i = 0; i < arr.length; i++) {\n if (fn(arr[i])) {\n return i;\n }\n }\n\n return -1;\n};\n\nfunction lruCache(limit, equals) {\n var entries = [];\n\n function get(key) {\n var cacheIndex = findIndex(entries, function (entry) {\n return equals(key, entry.key);\n }); // We found a cached entry\n\n if (cacheIndex > -1) {\n var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top\n\n if (cacheIndex > 0) {\n entries.splice(cacheIndex, 1);\n entries.unshift(entry);\n }\n\n return entry.value;\n } // No entry found in cache, return null\n\n\n return undefined;\n }\n\n function put(key, value) {\n if (!get(key)) {\n entries.unshift({\n key: key,\n value: value\n });\n\n if (entries.length > limit) {\n entries.pop();\n }\n }\n }\n\n return {\n get: get,\n put: put\n };\n}\n\n// \nfunction singletonCache(equals) {\n var entry;\n return {\n get: function get(key) {\n if (entry && equals(key, entry.key)) {\n return entry.value;\n }\n },\n put: function put(key, value) {\n entry = {\n key: key,\n value: value\n };\n }\n };\n}\n\n// \n\nfunction createCache(limit, equals) {\n return limit === 1 ? singletonCache(equals) : lruCache(limit, equals);\n}\n\nfunction createEqualsFn(basicEquals, deepObjects) {\n // Choose strategy for basic or deep object equals\n var equals = deepObjects ? deepEquals(basicEquals, deepObjects) : basicEquals;\n return function (valueA, valueB) {\n // The arguments are always the argument array-like objects\n // Different lengths means they are not the same\n if (valueA.length !== valueB.length) {\n return false;\n } // Compare the values\n\n\n for (var index = 0; index < valueA.length; index += 1) {\n if (!equals(valueA[index], valueB[index])) {\n return false;\n }\n } // Found no conflicts\n\n\n return true;\n };\n}\n\nfunction memoize() {\n var limit = 1;\n\n var equals = function equals(valueA, valueB) {\n return valueA === valueB;\n };\n\n var deepObjects = false;\n\n for (var _len = arguments.length, config = new Array(_len), _key = 0; _key < _len; _key++) {\n config[_key] = arguments[_key];\n }\n\n if (typeof config[0] === \"number\") {\n limit = config.shift();\n }\n\n if (typeof config[0] === \"function\") {\n equals = config.shift();\n } else if (typeof config[0] === \"undefined\") {\n // Support passing undefined equal argument;\n config.shift();\n }\n\n if (typeof config[0] === \"boolean\") {\n deepObjects = config[0];\n }\n\n var cache = createCache(limit, createEqualsFn(equals, deepObjects));\n return function (fn) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var value = cache.get(args);\n\n if (value === undefined) {\n value = fn.apply(fn, args);\n cache.put(args, value);\n }\n\n return value;\n };\n };\n}\n\nexport default memoize;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport deepFreeze from 'deep-freeze';\n\nimport { FALLBACK_DAG_MAX_NUM_SERVICES } from './index';\n\nexport default deepFreeze(\n Object.defineProperty(\n {\n archiveEnabled: false,\n dependencies: {\n dagMaxNumServices: FALLBACK_DAG_MAX_NUM_SERVICES,\n menuEnabled: true,\n },\n linkPatterns: [],\n menu: [\n {\n label: 'About Jaeger',\n items: [\n {\n label: 'GitHub',\n url: 'https://github.com/uber/jaeger',\n },\n {\n label: 'Docs',\n url: 'http://jaeger.readthedocs.io/en/latest/',\n },\n {\n label: 'Twitter',\n url: 'https://twitter.com/JaegerTracing',\n },\n {\n label: 'Discussion Group',\n url: 'https://groups.google.com/forum/#!forum/jaeger-tracing',\n },\n {\n label: 'Gitter.im',\n url: 'https://gitter.im/jaegertracing/Lobby',\n },\n {\n label: 'Blog',\n url: 'https://medium.com/jaegertracing/',\n },\n ],\n },\n ],\n search: {\n maxLookback: {\n label: '2 Days',\n value: '2d',\n },\n maxLimit: 1500,\n },\n tracking: {\n gaID: null,\n trackErrors: true,\n },\n },\n // fields that should be individually merged vs wholesale replaced\n '__mergeFields',\n { value: ['dependencies', 'search', 'tracking'] }\n )\n);\n\nexport const deprecations = [\n {\n formerKey: 'dependenciesMenuEnabled',\n currentKey: 'dependencies.menuEnabled',\n },\n {\n formerKey: 'gaTrackingID',\n currentKey: 'tracking.gaID',\n },\n];\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { get as _get } from 'lodash';\n\nimport defaultConfig from '../../constants/default-config';\n\n/**\n * Merge the embedded config from the query service (if present) with the\n * default config from `../../constants/default-config`.\n */\nexport default function getConfig() {\n return defaultConfig;\n}\n\nexport function getConfigValue(path: string) {\n return _get(getConfig(), path);\n}\n","// Copyright (c) 2017 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TraceSpan } from '../types/trace';\n\n/**\n * Searches the span.references to find 'CHILD_OF' reference type or returns null.\n * @param {TraceSpan} span The span whose parent is to be returned.\n * @returns {TraceSpan|null} The parent span if there is one, null otherwise.\n */\nexport function getParent(span: TraceSpan) {\n const parentRef = span.references ? span.references.find((ref) => ref.refType === 'CHILD_OF') : null;\n return parentRef ? parentRef.span : null;\n}\n","// Copyright (c) 2017 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { uniq as _uniq } from 'lodash';\nimport memoize from 'lru-memoize';\nimport { getConfigValue } from '../utils/config/get-config';\nimport { getParent } from './span';\nimport { TNil } from '../types';\nimport { TraceSpan, TraceLink, TraceKeyValuePair, Trace } from '../types/trace';\n\nconst parameterRegExp = /#\\{([^{}]*)\\}/g;\n\ntype ProcessedTemplate = {\n parameters: string[];\n template: (template: { [key: string]: any }) => string;\n};\n\ntype ProcessedLinkPattern = {\n object: any;\n type: (link: string) => boolean;\n key: (link: string) => boolean;\n value: (value: any) => boolean;\n url: ProcessedTemplate;\n text: ProcessedTemplate;\n parameters: string[];\n};\n\ntype TLinksRV = Array<{ url: string; text: string }>;\n\nfunction getParamNames(str: string) {\n const names = new Set();\n str.replace(parameterRegExp, (match, name) => {\n names.add(name);\n return match;\n });\n return Array.from(names);\n}\n\nfunction stringSupplant(str: string, encodeFn: (unencoded: any) => string, map: Record) {\n return str.replace(parameterRegExp, (_, name) => {\n const value = map[name];\n return value == null ? '' : encodeFn(value);\n });\n}\n\nexport function processTemplate(template: any, encodeFn: (unencoded: any) => string): ProcessedTemplate {\n if (typeof template !== 'string') {\n /*\n\n // kept on ice until #123 is implemented:\n if (template && Array.isArray(template.parameters) && (typeof template.template === 'function')) {\n return template;\n }\n\n */\n throw new Error('Invalid template');\n }\n return {\n parameters: getParamNames(template),\n template: stringSupplant.bind(null, template, encodeFn),\n };\n}\n\nexport function createTestFunction(entry: any) {\n if (typeof entry === 'string') {\n return (arg: any) => arg === entry;\n }\n if (Array.isArray(entry)) {\n return (arg: any) => entry.indexOf(arg) > -1;\n }\n /*\n\n // kept on ice until #123 is implemented:\n if (entry instanceof RegExp) {\n return (arg: any) => entry.test(arg);\n }\n if (typeof entry === 'function') {\n return entry;\n }\n\n */\n if (entry == null) {\n return () => true;\n }\n throw new Error(`Invalid value: ${entry}`);\n}\n\nconst identity = (a: any): typeof a => a;\n\nexport function processLinkPattern(pattern: any): ProcessedLinkPattern | TNil {\n try {\n const url = processTemplate(pattern.url, encodeURIComponent);\n const text = processTemplate(pattern.text, identity);\n return {\n object: pattern,\n type: createTestFunction(pattern.type),\n key: createTestFunction(pattern.key),\n value: createTestFunction(pattern.value),\n url,\n text,\n parameters: _uniq(url.parameters.concat(text.parameters)),\n };\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(`Ignoring invalid link pattern: ${error}`, pattern);\n return null;\n }\n}\n\nexport function getParameterInArray(name: string, array: TraceKeyValuePair[]) {\n if (array) {\n return array.find((entry) => entry.key === name);\n }\n return undefined;\n}\n\nexport function getParameterInAncestor(name: string, span: TraceSpan) {\n let currentSpan: TraceSpan | TNil = span;\n while (currentSpan) {\n const result = getParameterInArray(name, currentSpan.tags) || getParameterInArray(name, currentSpan.process.tags);\n if (result) {\n return result;\n }\n currentSpan = getParent(currentSpan);\n }\n return undefined;\n}\n\nfunction callTemplate(template: ProcessedTemplate, data: any) {\n return template.template(data);\n}\n\nexport function computeTraceLink(linkPatterns: ProcessedLinkPattern[], trace: Trace) {\n const result: TLinksRV = [];\n const validKeys = (Object.keys(trace) as Array).filter(\n (key) => typeof trace[key] === 'string' || trace[key] === 'number'\n );\n\n linkPatterns\n .filter((pattern) => pattern.type('traces'))\n .forEach((pattern) => {\n const parameterValues: Record = {};\n const allParameters = pattern.parameters.every((parameter) => {\n const key = parameter as keyof Trace;\n if (validKeys.includes(key)) {\n // At this point is safe to access to trace object using parameter variable because\n // we validated parameter against validKeys, this implies that parameter a keyof Trace.\n parameterValues[parameter] = trace[key];\n return true;\n }\n return false;\n });\n if (allParameters) {\n result.push({\n url: callTemplate(pattern.url, parameterValues),\n text: callTemplate(pattern.text, parameterValues),\n });\n }\n });\n\n return result;\n}\n\nexport function computeLinks(\n linkPatterns: ProcessedLinkPattern[],\n span: TraceSpan,\n items: TraceKeyValuePair[],\n itemIndex: number\n) {\n const item = items[itemIndex];\n let type = 'logs';\n const processTags = span.process.tags === items;\n if (processTags) {\n type = 'process';\n }\n const spanTags = span.tags === items;\n if (spanTags) {\n type = 'tags';\n }\n const result: Array<{ url: string; text: string }> = [];\n linkPatterns.forEach((pattern) => {\n if (pattern.type(type) && pattern.key(item.key) && pattern.value(item.value)) {\n const parameterValues: Record = {};\n const allParameters = pattern.parameters.every((parameter) => {\n let entry = getParameterInArray(parameter, items);\n if (!entry && !processTags) {\n // do not look in ancestors for process tags because the same object may appear in different places in the hierarchy\n // and the cache in getLinks uses that object as a key\n entry = getParameterInAncestor(parameter, span);\n }\n if (entry) {\n parameterValues[parameter] = entry.value;\n return true;\n }\n // eslint-disable-next-line no-console\n console.warn(\n `Skipping link pattern, missing parameter ${parameter} for key ${item.key} in ${type}.`,\n pattern.object\n );\n return false;\n });\n if (allParameters) {\n result.push({\n url: callTemplate(pattern.url, parameterValues),\n text: callTemplate(pattern.text, parameterValues),\n });\n }\n }\n });\n return result;\n}\n\nexport function createGetLinks(linkPatterns: ProcessedLinkPattern[], cache: WeakMap) {\n return (span: TraceSpan, items: TraceKeyValuePair[], itemIndex: number) => {\n if (linkPatterns.length === 0) {\n return [];\n }\n const item = items[itemIndex];\n let result = cache.get(item);\n if (!result) {\n result = computeLinks(linkPatterns, span, items, itemIndex);\n cache.set(item, result);\n }\n return result;\n };\n}\n\nconst processedLinks: ProcessedLinkPattern[] = (getConfigValue('linkPatterns') || [])\n .map(processLinkPattern)\n .filter(Boolean);\n\nexport const getTraceLinks: (trace: Trace | undefined) => TLinksRV = memoize(10)((trace: Trace | undefined) => {\n const result: TLinksRV = [];\n if (!trace) {\n return result;\n }\n return computeTraceLink(processedLinks, trace);\n});\n\nexport default createGetLinks(processedLinks, new WeakMap());\n","// Copyright (c) 2019 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { UIDropdown, UIMenu, UIMenuItem } from '..';\nimport NewWindowIcon from './NewWindowIcon';\n\ntype Link = {\n text: string;\n url: string;\n};\n\ntype ExternalLinksProps = {\n links: Link[];\n className?: string;\n};\n\nconst LinkValue = (props: { href: string; title?: string; children?: React.ReactNode; className?: string }) => (\n \n {props.children} \n \n);\n\n// export for testing\nexport const linkValueList = (links: Link[]) => (\n \n {links.map(({ text, url }, index) => (\n // `index` is necessary in the key because url can repeat\n \n {text}\n \n ))}\n \n);\n\nexport default function ExternalLinks(props: ExternalLinksProps) {\n const { links } = props;\n if (links.length === 1) {\n return ;\n }\n return (\n \n \n \n \n \n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { get as _get, maxBy as _maxBy, values as _values } from 'lodash';\nimport MdKeyboardArrowRight from 'react-icons/lib/md/keyboard-arrow-right';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { dateTimeFormat, GrafanaTheme2, TimeZone } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\n\nimport SpanGraph from './SpanGraph';\nimport TracePageSearchBar from './TracePageSearchBar';\nimport { autoColor, TUpdateViewRangeTimeFunction, ViewRange, ViewRangeTimeUpdate } from '..';\nimport LabeledList from '../common/LabeledList';\nimport TraceName from '../common/TraceName';\nimport { getTraceName } from '../model/trace-viewer';\nimport { TNil } from '../types';\nimport { Trace } from '../types/trace';\nimport { formatDuration } from '../utils/date';\nimport { getTraceLinks } from '../model/link-patterns';\n\nimport ExternalLinks from '../common/ExternalLinks';\nimport { uTxMuted } from '../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n TracePageHeader: css`\n label: TracePageHeader;\n & > :first-child {\n border-bottom: 1px solid ${autoColor(theme, '#e8e8e8')};\n }\n & > :nth-child(2) {\n background-color: ${autoColor(theme, '#eee')};\n border-bottom: 1px solid ${autoColor(theme, '#e4e4e4')};\n }\n & > :last-child {\n border-bottom: 1px solid ${autoColor(theme, '#ccc')};\n }\n `,\n TracePageHeaderTitleRow: css`\n label: TracePageHeaderTitleRow;\n align-items: center;\n display: flex;\n `,\n TracePageHeaderBack: css`\n label: TracePageHeaderBack;\n align-items: center;\n align-self: stretch;\n background-color: #fafafa;\n border-bottom: 1px solid #ddd;\n border-right: 1px solid #ddd;\n color: inherit;\n display: flex;\n font-size: 1.4rem;\n padding: 0 1rem;\n margin-bottom: -1px;\n &:hover {\n background-color: #f0f0f0;\n border-color: #ccc;\n }\n `,\n TracePageHeaderTitleLink: css`\n label: TracePageHeaderTitleLink;\n align-items: center;\n display: flex;\n flex: 1;\n\n &:hover * {\n text-decoration: underline;\n }\n &:hover > *,\n &:hover small {\n text-decoration: none;\n }\n `,\n TracePageHeaderDetailToggle: css`\n label: TracePageHeaderDetailToggle;\n font-size: 2.5rem;\n transition: transform 0.07s ease-out;\n `,\n TracePageHeaderDetailToggleExpanded: css`\n label: TracePageHeaderDetailToggleExpanded;\n transform: rotate(90deg);\n `,\n TracePageHeaderTitle: css`\n label: TracePageHeaderTitle;\n color: inherit;\n flex: 1;\n font-size: 1.7em;\n line-height: 1em;\n margin: 0 0 0 0.5em;\n padding-bottom: 0.5em;\n `,\n TracePageHeaderTitleCollapsible: css`\n label: TracePageHeaderTitleCollapsible;\n margin-left: 0;\n `,\n TracePageHeaderOverviewItems: css`\n label: TracePageHeaderOverviewItems;\n border-bottom: 1px solid #e4e4e4;\n padding: 0.25rem 0.5rem !important;\n `,\n TracePageHeaderOverviewItemValueDetail: cx(\n css`\n label: TracePageHeaderOverviewItemValueDetail;\n color: #aaa;\n `,\n 'trace-item-value-detail'\n ),\n TracePageHeaderOverviewItemValue: css`\n label: TracePageHeaderOverviewItemValue;\n &:hover > .trace-item-value-detail {\n color: unset;\n }\n `,\n TracePageHeaderArchiveIcon: css`\n label: TracePageHeaderArchiveIcon;\n font-size: 1.78em;\n margin-right: 0.15em;\n `,\n TracePageHeaderTraceId: css`\n label: TracePageHeaderTraceId;\n white-space: nowrap;\n `,\n };\n};\n\ntype TracePageHeaderEmbedProps = {\n canCollapse: boolean;\n clearSearch: () => void;\n focusUiFindMatches: () => void;\n hideMap: boolean;\n hideSummary: boolean;\n nextResult: () => void;\n onSlimViewClicked: () => void;\n onTraceGraphViewClicked: () => void;\n prevResult: () => void;\n resultCount: number;\n slimView: boolean;\n textFilter: string | TNil;\n trace: Trace;\n traceGraphView: boolean;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n viewRange: ViewRange;\n searchValue: string;\n onSearchValueChange: (value: string) => void;\n hideSearchButtons?: boolean;\n timeZone: TimeZone;\n};\n\nexport const HEADER_ITEMS = [\n {\n key: 'timestamp',\n label: 'Trace Start',\n renderer(trace: Trace, timeZone: TimeZone, styles: ReturnType) {\n // Convert date from micro to milli seconds\n const dateStr = dateTimeFormat(trace.startTime / 1000, { timeZone, defaultWithMS: true });\n const match = dateStr.match(/^(.+)(:\\d\\d\\.\\d+)$/);\n return match ? (\n \n {match[1]}\n {match[2]}\n \n ) : (\n dateStr\n );\n },\n },\n {\n key: 'duration',\n label: 'Duration',\n renderer: (trace: Trace) => formatDuration(trace.duration),\n },\n {\n key: 'service-count',\n label: 'Services',\n renderer: (trace: Trace) => new Set(_values(trace.processes).map((p) => p.serviceName)).size,\n },\n {\n key: 'depth',\n label: 'Depth',\n renderer: (trace: Trace) => _get(_maxBy(trace.spans, 'depth'), 'depth', 0) + 1,\n },\n {\n key: 'span-count',\n label: 'Total Spans',\n renderer: (trace: Trace) => trace.spans.length,\n },\n];\n\nexport default function TracePageHeader(props: TracePageHeaderEmbedProps) {\n const {\n canCollapse,\n clearSearch,\n focusUiFindMatches,\n hideMap,\n hideSummary,\n nextResult,\n onSlimViewClicked,\n prevResult,\n resultCount,\n slimView,\n textFilter,\n trace,\n traceGraphView,\n updateNextViewRangeTime,\n updateViewRangeTime,\n viewRange,\n searchValue,\n onSearchValueChange,\n hideSearchButtons,\n timeZone,\n } = props;\n\n const styles = useStyles2(getStyles);\n const links = React.useMemo(() => {\n if (!trace) {\n return [];\n }\n return getTraceLinks(trace);\n }, [trace]);\n\n if (!trace) {\n return null;\n }\n\n const summaryItems =\n !hideSummary &&\n !slimView &&\n HEADER_ITEMS.map((item) => {\n const { renderer, ...rest } = item;\n return { ...rest, value: renderer(trace, timeZone, styles) };\n });\n\n const title = (\n

\n {' '}\n {trace.traceID}\n

\n );\n\n return (\n
\n
\n {links && links.length > 0 && }\n {canCollapse ? (\n \n \n {title}\n \n ) : (\n title\n )}\n \n
\n {summaryItems && }\n {!hideMap && !slimView && (\n \n )}\n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TraceLog } from '../../types/trace';\n\n/**\n * Which items of a {@link SpanDetail} component are expanded.\n */\nexport default class DetailState {\n isTagsOpen: boolean;\n isProcessOpen: boolean;\n logs: { isOpen: boolean; openedItems: Set };\n isWarningsOpen: boolean;\n isStackTracesOpen: boolean;\n isReferencesOpen: boolean;\n\n constructor(oldState?: DetailState) {\n const {\n isTagsOpen,\n isProcessOpen,\n isReferencesOpen,\n isWarningsOpen,\n isStackTracesOpen,\n logs,\n }: DetailState | Record = oldState || {};\n this.isTagsOpen = Boolean(isTagsOpen);\n this.isProcessOpen = Boolean(isProcessOpen);\n this.isReferencesOpen = Boolean(isReferencesOpen);\n this.isWarningsOpen = Boolean(isWarningsOpen);\n this.isStackTracesOpen = Boolean(isStackTracesOpen);\n this.logs = {\n isOpen: Boolean(logs && logs.isOpen),\n openedItems: logs && logs.openedItems ? new Set(logs.openedItems) : new Set(),\n };\n }\n\n toggleTags() {\n const next = new DetailState(this);\n next.isTagsOpen = !this.isTagsOpen;\n return next;\n }\n\n toggleProcess() {\n const next = new DetailState(this);\n next.isProcessOpen = !this.isProcessOpen;\n return next;\n }\n\n toggleReferences() {\n const next = new DetailState(this);\n next.isReferencesOpen = !this.isReferencesOpen;\n return next;\n }\n\n toggleWarnings() {\n const next = new DetailState(this);\n next.isWarningsOpen = !this.isWarningsOpen;\n return next;\n }\n\n toggleStackTraces() {\n const next = new DetailState(this);\n next.isStackTracesOpen = !this.isStackTracesOpen;\n return next;\n }\n\n toggleLogs() {\n const next = new DetailState(this);\n next.logs.isOpen = !this.logs.isOpen;\n return next;\n }\n\n toggleLogItem(logItem: TraceLog) {\n const next = new DetailState(this);\n if (next.logs.openedItems.has(logItem)) {\n next.logs.openedItems.delete(logItem);\n } else {\n next.logs.openedItems.add(logItem);\n }\n return next;\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const getProcessServiceName = (proc) => proc.serviceName;\nexport const getProcessTags = (proc) => proc.tags;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createSelector } from 'reselect';\nimport fuzzy from 'fuzzy';\n\nimport { getProcessServiceName } from './process';\n\nexport const getSpanId = (span) => span.spanID;\nexport const getSpanName = (span) => span.operationName;\nexport const getSpanDuration = (span) => span.duration;\nexport const getSpanTimestamp = (span) => span.startTime;\nexport const getSpanProcessId = (span) => span.processID;\nexport const getSpanReferences = (span) => span.references || [];\nexport const getSpanReferenceByType = createSelector(\n createSelector(({ span }) => span, getSpanReferences),\n ({ type }) => type,\n (references, type) => references.find((ref) => ref.refType === type)\n);\nexport const getSpanParentId = createSelector(\n (span) => getSpanReferenceByType({ span, type: 'CHILD_OF' }),\n (childOfRef) => (childOfRef ? childOfRef.spanID : null)\n);\n\nexport const getSpanProcess = (span) => {\n if (!span.process) {\n throw new Error(\n `\n you must hydrate the spans with the processes, perhaps\n using hydrateSpansWithProcesses(), before accessing a span's process\n `\n );\n }\n\n return span.process;\n};\n\nexport const getSpanServiceName = createSelector(getSpanProcess, getProcessServiceName);\n\nexport const filterSpansForTimestamps = createSelector(\n ({ spans }) => spans,\n ({ leftBound }) => leftBound,\n ({ rightBound }) => rightBound,\n (spans, leftBound, rightBound) =>\n spans.filter((span) => getSpanTimestamp(span) >= leftBound && getSpanTimestamp(span) <= rightBound)\n);\n\nexport const filterSpansForText = createSelector(\n ({ spans }) => spans,\n ({ text }) => text,\n (spans, text) =>\n fuzzy\n .filter(text, spans, {\n extract: (span) => `${getSpanServiceName(span)} ${getSpanName(span)}`,\n })\n .map(({ original }) => original)\n);\n\nconst getTextFilterdSpansAsMap = createSelector(filterSpansForText, (matchingSpans) =>\n matchingSpans.reduce(\n (obj, span) => ({\n ...obj,\n [getSpanId(span)]: span,\n }),\n {}\n )\n);\n\nexport const highlightSpansForTextFilter = createSelector(\n ({ spans }) => spans,\n getTextFilterdSpansAsMap,\n (spans, textFilteredSpansMap) =>\n spans.map((span) => ({\n ...span,\n muted: !textFilteredSpansMap[getSpanId(span)],\n }))\n);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport default class TreeNode {\n static iterFunction(fn, depth = 0) {\n return (node) => fn(node.value, node, depth);\n }\n\n static searchFunction(search) {\n if (typeof search === 'function') {\n return search;\n }\n\n return (value, node) => (search instanceof TreeNode ? node === search : value === search);\n }\n\n constructor(value, children = []) {\n this.value = value;\n this.children = children;\n }\n\n get depth() {\n return this.children.reduce((depth, child) => Math.max(child.depth + 1, depth), 1);\n }\n\n get size() {\n let i = 0;\n this.walk(() => i++);\n return i;\n }\n\n addChild(child) {\n this.children.push(child instanceof TreeNode ? child : new TreeNode(child));\n return this;\n }\n\n find(search) {\n const searchFn = TreeNode.iterFunction(TreeNode.searchFunction(search));\n if (searchFn(this)) {\n return this;\n }\n for (let i = 0; i < this.children.length; i++) {\n const result = this.children[i].find(search);\n if (result) {\n return result;\n }\n }\n return null;\n }\n\n getPath(search) {\n const searchFn = TreeNode.iterFunction(TreeNode.searchFunction(search));\n\n const findPath = (currentNode, currentPath) => {\n // skip if we already found the result\n const attempt = currentPath.concat([currentNode]);\n // base case: return the array when there is a match\n if (searchFn(currentNode)) {\n return attempt;\n }\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = currentNode.children[i];\n const match = findPath(child, attempt);\n if (match) {\n return match;\n }\n }\n return null;\n };\n\n return findPath(this, []);\n }\n\n walk(fn, depth = 0) {\n const nodeStack = [];\n let actualDepth = depth;\n nodeStack.push({ node: this, depth: actualDepth });\n while (nodeStack.length) {\n const { node, depth: nodeDepth } = nodeStack.pop();\n fn(node.value, node, nodeDepth);\n actualDepth = nodeDepth + 1;\n let i = node.children.length - 1;\n while (i >= 0) {\n nodeStack.push({ node: node.children[i], depth: actualDepth });\n i--;\n }\n }\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createSelector, createStructuredSelector } from 'reselect';\n\nimport {\n getSpanId,\n getSpanName,\n getSpanServiceName,\n getSpanTimestamp,\n getSpanDuration,\n getSpanProcessId,\n} from './span';\nimport { getProcessServiceName } from './process';\nimport { formatMillisecondTime, formatSecondTime, ONE_SECOND } from '../utils/date';\nimport { numberSortComparator } from '../utils/sort';\nimport TreeNode from '../utils/TreeNode';\n\nexport const getTraceId = (trace) => trace.traceID;\n\nexport const getTraceSpans = (trace) => trace.spans;\n\nconst getTraceProcesses = (trace) => trace.processes;\n\nconst getSpanWithProcess = createSelector(\n (state) => state.span,\n (state) => state.processes,\n (span, processes) => ({\n ...span,\n process: processes[getSpanProcessId(span)],\n })\n);\n\nexport const getTraceSpansAsMap = createSelector(getTraceSpans, (spans) =>\n spans.reduce((map, span) => map.set(getSpanId(span), span), new Map())\n);\n\nexport const TREE_ROOT_ID = '__root__';\n\n/**\n * Build a tree of { value: spanID, children } items derived from the\n * `span.references` information. The tree represents the grouping of parent /\n * child relationships. The root-most node is nominal in that\n * `.value === TREE_ROOT_ID`. This is done because a root span (the main trace\n * span) is not always included with the trace data. Thus, there can be\n * multiple top-level spans, and the root node acts as their common parent.\n *\n * The children are sorted by `span.startTime` after the tree is built.\n *\n * @param {Trace} trace The trace to build the tree of spanIDs.\n * @return {TreeNode} A tree of spanIDs derived from the relationships\n * between spans in the trace.\n */\nexport function getTraceSpanIdsAsTree(trace) {\n const nodesById = new Map(trace.spans.map((span) => [span.spanID, new TreeNode(span.spanID)]));\n const spansById = new Map(trace.spans.map((span) => [span.spanID, span]));\n const root = new TreeNode(TREE_ROOT_ID);\n trace.spans.forEach((span) => {\n const node = nodesById.get(span.spanID);\n if (Array.isArray(span.references) && span.references.length) {\n const { refType, spanID: parentID } = span.references[0];\n if (refType === 'CHILD_OF' || refType === 'FOLLOWS_FROM') {\n const parent = nodesById.get(parentID) || root;\n parent.children.push(node);\n } else {\n throw new Error(`Unrecognized ref type: ${refType}`);\n }\n } else {\n root.children.push(node);\n }\n });\n const comparator = (nodeA, nodeB) => {\n const a = spansById.get(nodeA.value);\n const b = spansById.get(nodeB.value);\n return +(a.startTime > b.startTime) || +(a.startTime === b.startTime) - 1;\n };\n trace.spans.forEach((span) => {\n const node = nodesById.get(span.spanID);\n if (node.children.length > 1) {\n node.children.sort(comparator);\n }\n });\n root.children.sort(comparator);\n return root;\n}\n\n// attach \"process\" as an object to each span.\nexport const hydrateSpansWithProcesses = (trace) => {\n const spans = getTraceSpans(trace);\n const processes = getTraceProcesses(trace);\n\n return {\n ...trace,\n spans: spans.map((span) => getSpanWithProcess({ span, processes })),\n };\n};\n\nexport const getTraceSpanCount = createSelector(getTraceSpans, (spans) => spans.length);\n\nexport const getTraceTimestamp = createSelector(getTraceSpans, (spans) =>\n spans.reduce(\n (prevTimestamp, span) => (prevTimestamp ? Math.min(prevTimestamp, getSpanTimestamp(span)) : getSpanTimestamp(span)),\n null\n )\n);\n\nexport const getTraceDuration = createSelector(getTraceSpans, getTraceTimestamp, (spans, timestamp) =>\n spans.reduce(\n (prevDuration, span) =>\n prevDuration\n ? Math.max(getSpanTimestamp(span) - timestamp + getSpanDuration(span), prevDuration)\n : getSpanDuration(span),\n null\n )\n);\n\nexport const getTraceEndTimestamp = createSelector(\n getTraceTimestamp,\n getTraceDuration,\n (timestamp, duration) => timestamp + duration\n);\n\nexport const getParentSpan = createSelector(\n getTraceSpanIdsAsTree,\n getTraceSpansAsMap,\n (tree, spanMap) =>\n tree.children\n .map((node) => spanMap.get(node.value))\n .sort((spanA, spanB) => numberSortComparator(getSpanTimestamp(spanA), getSpanTimestamp(spanB)))[0]\n);\n\nexport const getTraceDepth = createSelector(getTraceSpanIdsAsTree, (spanTree) => spanTree.depth - 1);\n\nexport const getSpanDepthForTrace = createSelector(\n createSelector((state) => state.trace, getTraceSpanIdsAsTree),\n createSelector((state) => state.span, getSpanId),\n (node, spanID) => node.getPath(spanID).length - 1\n);\n\nexport const getTraceServices = createSelector(getTraceProcesses, (processes) =>\n Object.keys(processes).reduce(\n (services, processID) => services.add(getProcessServiceName(processes[processID])),\n new Set()\n )\n);\n\nexport const getTraceServiceCount = createSelector(getTraceServices, (services) => services.size);\n\n// establish constants to determine how math should be handled\n// for nanosecond-to-millisecond conversions.\nexport const DURATION_FORMATTERS = {\n ms: formatMillisecondTime,\n s: formatSecondTime,\n};\n\nconst getDurationFormatterForTrace = createSelector(getTraceDuration, (totalDuration) =>\n totalDuration >= ONE_SECOND ? DURATION_FORMATTERS.s : DURATION_FORMATTERS.ms\n);\n\nexport const formatDurationForUnit = createSelector(\n ({ duration }) => duration,\n ({ unit }) => DURATION_FORMATTERS[unit],\n (duration, formatter) => formatter(duration)\n);\n\nexport const formatDurationForTrace = createSelector(\n ({ duration }) => duration,\n createSelector(({ trace }) => trace, getDurationFormatterForTrace),\n (duration, formatter) => formatter(duration)\n);\n\nexport const getSortedSpans = createSelector(\n ({ trace }) => trace,\n ({ spans }) => spans,\n ({ sort }) => sort,\n (trace, spans, { dir, comparator, selector }) =>\n [...spans].sort((spanA, spanB) => dir * comparator(selector(spanA, trace), selector(spanB, trace)))\n);\n\nconst getTraceSpansByHierarchyPosition = createSelector(getTraceSpanIdsAsTree, (tree) => {\n const hierarchyPositionMap = new Map();\n let i = 0;\n tree.walk((spanID) => hierarchyPositionMap.set(spanID, i++));\n return hierarchyPositionMap;\n});\n\nexport const getTreeSizeForTraceSpan = createSelector(\n createSelector((state) => state.trace, getTraceSpanIdsAsTree),\n createSelector((state) => state.span, getSpanId),\n (tree, spanID) => {\n const node = tree.find(spanID);\n if (!node) {\n return -1;\n }\n return node.size - 1;\n }\n);\n\nexport const getSpanHierarchySortPositionForTrace = createSelector(\n createSelector(({ trace }) => trace, getTraceSpansByHierarchyPosition),\n ({ span }) => span,\n (hierarchyPositionMap, span) => hierarchyPositionMap.get(getSpanId(span))\n);\n\nexport const getTraceName = createSelector(\n createSelector(\n createSelector(hydrateSpansWithProcesses, getParentSpan),\n createStructuredSelector({\n name: getSpanName,\n serviceName: getSpanServiceName,\n })\n ),\n ({ name, serviceName }) => `${serviceName}: ${name}`\n);\n\nexport const omitCollapsedSpans = createSelector(\n ({ spans }) => spans,\n createSelector(({ trace }) => trace, getTraceSpanIdsAsTree),\n ({ collapsed }) => collapsed,\n (spans, tree, collapse) => {\n const hiddenSpanIds = collapse.reduce((result, collapsedSpanId) => {\n tree.find(collapsedSpanId).walk((id) => id !== collapsedSpanId && result.add(id));\n return result;\n }, new Set());\n\n return hiddenSpanIds.size > 0 ? spans.filter((span) => !hiddenSpanIds.has(getSpanId(span))) : spans;\n }\n);\n\nexport const DEFAULT_TICK_INTERVAL = 4;\nexport const DEFAULT_TICK_WIDTH = 3;\nexport const getTicksForTrace = createSelector(\n ({ trace }) => trace,\n ({ interval = DEFAULT_TICK_INTERVAL }) => interval,\n ({ width = DEFAULT_TICK_WIDTH }) => width,\n (\n trace,\n interval,\n width\n // timestamps will be spaced over the interval, starting from the initial timestamp\n ) =>\n [...Array(interval + 1).keys()].map((num) => ({\n timestamp: getTraceTimestamp(trace) + getTraceDuration(trace) * (num / interval),\n width,\n }))\n);\n\n// TODO: delete this when the backend can ensure uniqueness\n/* istanbul ignore next */\nexport const enforceUniqueSpanIds = createSelector(\n /* istanbul ignore next */ (trace) => trace,\n getTraceSpans,\n /* istanbul ignore next */ (trace, spans) => {\n const map = new Map();\n\n return {\n ...trace,\n spans: spans.reduce((result, span) => {\n const spanID = map.has(getSpanId(span)) ? `${getSpanId(span)}_${map.get(getSpanId(span))}` : getSpanId(span);\n const updatedSpan = { ...span, spanID };\n\n if (spanID !== getSpanId(span)) {\n // eslint-disable-next-line no-console\n console.warn('duplicate spanID in trace replaced', getSpanId(span), 'new:', spanID);\n }\n\n // set the presence of the span in the map or increment the number\n map.set(getSpanId(span), (map.get(getSpanId(span)) || 0) + 1);\n\n return result.concat([updatedSpan]);\n }, []),\n };\n }\n);\n\n// TODO: delete this when the backend can ensure uniqueness\nexport const dropEmptyStartTimeSpans = createSelector(\n /* istanbul ignore next */ (trace) => trace,\n getTraceSpans,\n /* istanbul ignore next */ (trace, spans) => ({\n ...trace,\n spans: spans.filter((span) => !!getSpanTimestamp(span)),\n })\n);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport function localeStringComparator(itemA, itemB) {\n return itemA.localeCompare(itemB);\n}\n\nexport function numberSortComparator(itemA, itemB) {\n return itemA - itemB;\n}\n\nexport function classNameForSortDir(dir) {\n return `sorted ${dir === 1 ? 'ascending' : 'descending'}`;\n}\n\nexport function getNewSortForClick(prevSort, column) {\n const { defaultDir = 1 } = column;\n\n return {\n key: column.name,\n dir: prevSort.key === column.name ? -1 * prevSort.dir : defaultDir,\n };\n}\n\nexport function createSortClickHandler(column, currentSortKey, currentSortDir, updateSort) {\n return function onClickSortingElement() {\n const { key, dir } = getNewSortForClick({ key: currentSortKey, dir: currentSortDir }, column);\n updateSort(key, dir);\n };\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { isEqual as _isEqual } from 'lodash';\n\n// @ts-ignore\nimport { getTraceSpanIdsAsTree } from '../selectors/trace';\nimport { getConfigValue } from '../utils/config/get-config';\nimport { TraceKeyValuePair, TraceSpan, Trace, TraceResponse } from '../types/trace';\n// @ts-ignore\nimport TreeNode from '../utils/TreeNode';\nimport { getTraceName } from './trace-viewer';\n\n// exported for tests\nexport function deduplicateTags(spanTags: TraceKeyValuePair[]) {\n const warningsHash: Map = new Map();\n const tags: TraceKeyValuePair[] = spanTags.reduce((uniqueTags, tag) => {\n if (!uniqueTags.some((t) => t.key === tag.key && t.value === tag.value)) {\n uniqueTags.push(tag);\n } else {\n warningsHash.set(`${tag.key}:${tag.value}`, `Duplicate tag \"${tag.key}:${tag.value}\"`);\n }\n return uniqueTags;\n }, []);\n const warnings = Array.from(warningsHash.values());\n return { tags, warnings };\n}\n\n// exported for tests\nexport function orderTags(spanTags: TraceKeyValuePair[], topPrefixes?: string[]) {\n const orderedTags: TraceKeyValuePair[] = spanTags.slice();\n const tp = (topPrefixes || []).map((p: string) => p.toLowerCase());\n\n orderedTags.sort((a, b) => {\n const aKey = a.key.toLowerCase();\n const bKey = b.key.toLowerCase();\n\n for (let i = 0; i < tp.length; i++) {\n const p = tp[i];\n if (aKey.startsWith(p) && !bKey.startsWith(p)) {\n return -1;\n }\n if (!aKey.startsWith(p) && bKey.startsWith(p)) {\n return 1;\n }\n }\n\n if (aKey > bKey) {\n return 1;\n }\n if (aKey < bKey) {\n return -1;\n }\n return 0;\n });\n\n return orderedTags;\n}\n\n/**\n * NOTE: Mutates `data` - Transform the HTTP response data into the form the app\n * generally requires.\n */\nexport default function transformTraceData(data: TraceResponse | undefined): Trace | null {\n if (!data?.traceID) {\n return null;\n }\n const traceID = data.traceID.toLowerCase();\n\n let traceEndTime = 0;\n let traceStartTime = Number.MAX_SAFE_INTEGER;\n const spanIdCounts = new Map();\n const spanMap = new Map();\n // filter out spans with empty start times\n // eslint-disable-next-line no-param-reassign\n data.spans = data.spans.filter((span) => Boolean(span.startTime));\n\n const max = data.spans.length;\n for (let i = 0; i < max; i++) {\n const span: TraceSpan = data.spans[i] as TraceSpan;\n const { startTime, duration, processID } = span;\n //\n let spanID = span.spanID;\n // check for start / end time for the trace\n if (startTime < traceStartTime) {\n traceStartTime = startTime;\n }\n if (startTime + duration > traceEndTime) {\n traceEndTime = startTime + duration;\n }\n // make sure span IDs are unique\n const idCount = spanIdCounts.get(spanID);\n if (idCount != null) {\n // eslint-disable-next-line no-console\n console.warn(`Dupe spanID, ${idCount + 1} x ${spanID}`, span, spanMap.get(spanID));\n if (_isEqual(span, spanMap.get(spanID))) {\n // eslint-disable-next-line no-console\n console.warn('\\t two spans with same ID have `isEqual(...) === true`');\n }\n spanIdCounts.set(spanID, idCount + 1);\n spanID = `${spanID}_${idCount}`;\n span.spanID = spanID;\n } else {\n spanIdCounts.set(spanID, 1);\n }\n span.process = data.processes[processID];\n spanMap.set(spanID, span);\n }\n // tree is necessary to sort the spans, so children follow parents, and\n // siblings are sorted by start time\n const tree = getTraceSpanIdsAsTree(data);\n const spans: TraceSpan[] = [];\n const svcCounts: Record = {};\n\n // Eslint complains about number type not needed but then TS complains it is implicitly any.\n // eslint-disable-next-line @typescript-eslint/no-inferrable-types\n tree.walk((spanID: string, node: TreeNode, depth: number = 0) => {\n if (spanID === '__root__') {\n return;\n }\n const span = spanMap.get(spanID) as TraceSpan;\n if (!span) {\n return;\n }\n const { serviceName } = span.process;\n svcCounts[serviceName] = (svcCounts[serviceName] || 0) + 1;\n span.relativeStartTime = span.startTime - traceStartTime;\n span.depth = depth - 1;\n span.hasChildren = node.children.length > 0;\n span.warnings = span.warnings || [];\n span.tags = span.tags || [];\n span.references = span.references || [];\n const tagsInfo = deduplicateTags(span.tags);\n span.tags = orderTags(tagsInfo.tags, getConfigValue('topTagPrefixes'));\n span.warnings = span.warnings.concat(tagsInfo.warnings);\n span.references.forEach((ref, index) => {\n const refSpan = spanMap.get(ref.spanID) as TraceSpan;\n if (refSpan) {\n // eslint-disable-next-line no-param-reassign\n ref.span = refSpan;\n if (index > 0) {\n // Don't take into account the parent, just other references.\n refSpan.subsidiarilyReferencedBy = refSpan.subsidiarilyReferencedBy || [];\n refSpan.subsidiarilyReferencedBy.push({\n spanID,\n traceID,\n span,\n refType: ref.refType,\n });\n }\n }\n });\n spans.push(span);\n });\n const traceName = getTraceName(spans);\n const services = Object.keys(svcCounts).map((name) => ({ name, numberOfSpans: svcCounts[name] }));\n return {\n services,\n spans,\n traceID,\n traceName,\n // can't use spread operator for intersection types\n // repl: https://goo.gl/4Z23MJ\n // issue: https://github.com/facebook/flow/issues/1511\n processes: data.processes,\n duration: traceEndTime - traceStartTime,\n startTime: traceStartTime,\n endTime: traceEndTime,\n };\n}\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TraceKeyValuePair, TraceSpan } from '../types/trace';\nimport { TNil } from '../types';\n\nexport default function filterSpans(textFilter: string, spans: TraceSpan[] | TNil) {\n if (!spans) {\n return null;\n }\n\n // if a span field includes at least one filter in includeFilters, the span is a match\n const includeFilters: string[] = [];\n\n // values with keys that include text in any one of the excludeKeys will be ignored\n const excludeKeys: string[] = [];\n\n // split textFilter by whitespace, remove empty strings, and extract includeFilters and excludeKeys\n textFilter\n .split(/\\s+/)\n .filter(Boolean)\n .forEach((w) => {\n if (w[0] === '-') {\n excludeKeys.push(w.substr(1).toLowerCase());\n } else {\n includeFilters.push(w.toLowerCase());\n }\n });\n\n const isTextInFilters = (filters: string[], text: string) =>\n filters.some((filter) => text.toLowerCase().includes(filter));\n\n const isTextInKeyValues = (kvs: TraceKeyValuePair[]) =>\n kvs\n ? kvs.some((kv) => {\n // ignore checking key and value for a match if key is in excludeKeys\n if (isTextInFilters(excludeKeys, kv.key)) {\n return false;\n }\n // match if key or value matches an item in includeFilters\n return isTextInFilters(includeFilters, kv.key) || isTextInFilters(includeFilters, kv.value.toString());\n })\n : false;\n\n const isSpanAMatch = (span: TraceSpan) =>\n isTextInFilters(includeFilters, span.operationName) ||\n isTextInFilters(includeFilters, span.process.serviceName) ||\n isTextInKeyValues(span.tags) ||\n (span.logs !== null && span.logs.some((log) => isTextInKeyValues(log.fields))) ||\n isTextInKeyValues(span.process.tags) ||\n includeFilters.some((filter) => filter === span.spanID);\n\n // declare as const because need to disambiguate the type\n const rv: Set = new Set(spans.filter(isSpanAMatch).map((span: TraceSpan) => span.spanID));\n return rv;\n}\n","/**\n * Get non overlapping duration of the ranges as they can overlap or have gaps.\n */\nimport { FieldType, MutableDataFrame, NodeGraphDataFrameFieldNames as Fields } from '@grafana/data';\n\nexport function getNonOverlappingDuration(ranges: Array<[number, number]>): number {\n ranges.sort((a, b) => a[0] - b[0]);\n const mergedRanges = ranges.reduce((acc, range) => {\n if (!acc.length) {\n return [range];\n }\n const tail = acc.slice(-1)[0];\n const [prevStart, prevEnd] = tail;\n const [start, end] = range;\n if (end < prevEnd) {\n // In this case the range is completely inside the prev range so we can just ignore it.\n return acc;\n }\n\n if (start > prevEnd) {\n // There is no overlap so we can just add it to stack\n return [...acc, range];\n }\n\n // We know there is overlap and current range ends later than previous so we can just extend the range\n return [...acc.slice(0, -1), [prevStart, end]] as Array<[number, number]>;\n }, [] as Array<[number, number]>);\n\n return mergedRanges.reduce((acc, range) => {\n return acc + (range[1] - range[0]);\n }, 0);\n}\n\n/**\n * Returns a map of the spans with children array for easier processing. It will also contain empty spans in case\n * span is missing but other spans are it's children. This is more generic because it needs to allow iterating over\n * both arrays and dataframe views.\n */\nexport function makeSpanMap(getSpan: (index: number) => { span: T; id: string; parentIds: string[] } | undefined): {\n [id: string]: { span: T; children: string[] };\n} {\n const spanMap: { [id: string]: { span?: T; children: string[] } } = {};\n\n let span;\n for (let index = 0; (span = getSpan(index)), !!span; index++) {\n if (!spanMap[span.id]) {\n spanMap[span.id] = {\n span: span.span,\n children: [],\n };\n } else {\n spanMap[span.id].span = span.span;\n }\n\n for (const parentId of span.parentIds) {\n if (parentId) {\n if (!spanMap[parentId]) {\n spanMap[parentId] = {\n span: undefined,\n children: [span.id],\n };\n } else {\n spanMap[parentId].children.push(span.id);\n }\n }\n }\n }\n return spanMap as { [id: string]: { span: T; children: string[] } };\n}\n\nexport function getStats(duration: number, traceDuration: number, selfDuration: number) {\n return {\n main: `${toFixedNoTrailingZeros(duration)}ms (${toFixedNoTrailingZeros((duration / traceDuration) * 100)}%)`,\n secondary: `${toFixedNoTrailingZeros(selfDuration)}ms (${toFixedNoTrailingZeros(\n (selfDuration / duration) * 100\n )}%)`,\n };\n}\n\nfunction toFixedNoTrailingZeros(n: number) {\n return parseFloat(n.toFixed(2));\n}\n\n/**\n * Create default frames used when returning data for node graph.\n */\nexport function makeFrames() {\n const nodesFrame = new MutableDataFrame({\n fields: [\n { name: Fields.id, type: FieldType.string },\n { name: Fields.title, type: FieldType.string },\n { name: Fields.subTitle, type: FieldType.string },\n { name: Fields.mainStat, type: FieldType.string, config: { displayName: 'Total time (% of trace)' } },\n { name: Fields.secondaryStat, type: FieldType.string, config: { displayName: 'Self time (% of total)' } },\n {\n name: Fields.color,\n type: FieldType.number,\n config: { color: { mode: 'continuous-GrYlRd' }, displayName: 'Self time / Trace duration' },\n },\n ],\n meta: {\n preferredVisualisationType: 'nodeGraph',\n },\n });\n\n const edgesFrame = new MutableDataFrame({\n fields: [\n { name: Fields.id, type: FieldType.string },\n { name: Fields.target, type: FieldType.string },\n { name: Fields.source, type: FieldType.string },\n ],\n meta: {\n preferredVisualisationType: 'nodeGraph',\n },\n });\n\n return [nodesFrame, edgesFrame];\n}\n","import {\n DataFrame,\n DataSourceInstanceSettings,\n FieldType,\n MutableDataFrame,\n TraceLog,\n TraceSpanRow,\n} from '@grafana/data';\nimport { transformTraceData } from '@jaegertracing/jaeger-ui-components';\nimport { JaegerResponse, Span, TraceProcess, TraceResponse } from './types';\n\nexport function createTraceFrame(data: TraceResponse): DataFrame {\n const spans = data.spans.map((s) => toSpanRow(s, data.processes));\n\n const frame = new MutableDataFrame({\n fields: [\n { name: 'traceID', type: FieldType.string },\n { name: 'spanID', type: FieldType.string },\n { name: 'parentSpanID', type: FieldType.string },\n { name: 'operationName', type: FieldType.string },\n { name: 'serviceName', type: FieldType.string },\n { name: 'serviceTags', type: FieldType.other },\n { name: 'startTime', type: FieldType.number },\n { name: 'duration', type: FieldType.number },\n { name: 'logs', type: FieldType.other },\n { name: 'tags', type: FieldType.other },\n { name: 'warnings', type: FieldType.other },\n { name: 'stackTraces', type: FieldType.other },\n ],\n meta: {\n preferredVisualisationType: 'trace',\n custom: {\n traceFormat: 'jaeger',\n },\n },\n });\n\n for (const span of spans) {\n frame.add(span);\n }\n\n return frame;\n}\n\nfunction toSpanRow(span: Span, processes: Record): TraceSpanRow {\n return {\n spanID: span.spanID,\n traceID: span.traceID,\n parentSpanID: span.references?.find((r) => r.refType === 'CHILD_OF')?.spanID,\n operationName: span.operationName,\n // from micro to millis\n startTime: span.startTime / 1000,\n duration: span.duration / 1000,\n logs: span.logs.map((l) => ({\n ...l,\n timestamp: l.timestamp / 1000,\n })),\n tags: span.tags,\n warnings: span.warnings ?? undefined,\n stackTraces: span.stackTraces,\n serviceName: processes[span.processID].serviceName,\n serviceTags: processes[span.processID].tags,\n };\n}\n\nexport function createTableFrame(data: TraceResponse[], instanceSettings: DataSourceInstanceSettings): DataFrame {\n const frame = new MutableDataFrame({\n fields: [\n {\n name: 'traceID',\n type: FieldType.string,\n config: {\n displayNameFromDS: 'Trace ID',\n links: [\n {\n title: 'Trace: ${__value.raw}',\n url: '',\n internal: {\n datasourceUid: instanceSettings.uid,\n datasourceName: instanceSettings.name,\n query: {\n query: '${__value.raw}',\n },\n },\n },\n ],\n },\n },\n { name: 'traceName', type: FieldType.string, config: { displayNameFromDS: 'Trace name' } },\n { name: 'startTime', type: FieldType.time, config: { displayNameFromDS: 'Start time' } },\n { name: 'duration', type: FieldType.number, config: { displayNameFromDS: 'Duration', unit: 'µs' } },\n ],\n meta: {\n preferredVisualisationType: 'table',\n },\n });\n // Show the most recent traces\n const traceData = data.map(transformToTraceData).sort((a, b) => b?.startTime! - a?.startTime!);\n\n for (const trace of traceData) {\n frame.add(trace);\n }\n\n return frame;\n}\n\nfunction transformToTraceData(data: TraceResponse) {\n const traceData = transformTraceData(data);\n if (!traceData) {\n return;\n }\n\n return {\n traceID: traceData.traceID,\n startTime: traceData.startTime / 1000,\n duration: traceData.duration,\n traceName: traceData.traceName,\n };\n}\n\nexport function transformToJaeger(data: MutableDataFrame): JaegerResponse {\n let traceResponse: TraceResponse = {\n traceID: '',\n spans: [],\n processes: {},\n warnings: null,\n };\n let processes: string[] = [];\n\n for (let i = 0; i < data.length; i++) {\n const span = data.get(i);\n\n // Set traceID\n if (!traceResponse.traceID) {\n traceResponse.traceID = span.traceID;\n }\n\n // Create process if doesn't exist\n if (!processes.find((p) => p === span.serviceName)) {\n processes.push(span.serviceName);\n traceResponse.processes[`p${processes.length}`] = {\n serviceName: span.serviceName,\n tags: span.serviceTags,\n };\n }\n\n // Create span\n traceResponse.spans.push({\n traceID: span.traceID,\n spanID: span.spanID,\n duration: span.duration * 1000,\n references: span.parentSpanID\n ? [\n {\n refType: 'CHILD_OF',\n spanID: span.parentSpanID,\n traceID: span.traceID,\n },\n ]\n : [],\n flags: 0,\n logs: span.logs.map((l: TraceLog) => ({\n ...l,\n timestamp: l.timestamp * 1000,\n })),\n operationName: span.operationName,\n processID:\n Object.keys(traceResponse.processes).find(\n (key) => traceResponse.processes[key].serviceName === span.serviceName\n ) || '',\n startTime: span.startTime * 1000,\n tags: span.tags,\n warnings: span.warnings ? span.warnings : null,\n });\n }\n\n return { data: [traceResponse], total: 0, limit: 0, offset: 0, errors: null };\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar IconBase = function IconBase(_ref, _ref2) {\n var children = _ref.children;\n var color = _ref.color;\n var size = _ref.size;\n var style = _ref.style;\n var width = _ref.width;\n var height = _ref.height;\n\n var props = _objectWithoutProperties(_ref, ['children', 'color', 'size', 'style', 'width', 'height']);\n\n var _ref2$reactIconBase = _ref2.reactIconBase;\n var reactIconBase = _ref2$reactIconBase === undefined ? {} : _ref2$reactIconBase;\n\n var computedSize = size || reactIconBase.size || '1em';\n return _react2.default.createElement('svg', _extends({\n children: children,\n fill: 'currentColor',\n preserveAspectRatio: 'xMidYMid meet',\n height: height || computedSize,\n width: width || computedSize\n }, reactIconBase, props, {\n style: _extends({\n verticalAlign: 'middle',\n color: color || reactIconBase.color\n }, reactIconBase.style || {}, style)\n }));\n};\n\nIconBase.propTypes = {\n color: _propTypes2.default.string,\n size: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n height: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n style: _propTypes2.default.object\n};\n\nIconBase.contextTypes = {\n reactIconBase: _propTypes2.default.shape(IconBase.propTypes)\n};\n\nexports.default = IconBase;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoAlert = function IoAlert(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm25 37.5h-10v-7.5h10v7.5z m-1.2-12.5h-7.5l-1.3-22.5h10z' })\n )\n );\n};\n\nexports.default = IoAlert;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoAndroidLocate = function IoAndroidLocate(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm17.5 13.8c3.4 0 6.3 2.8 6.3 6.2s-2.9 6.3-6.3 6.3-6.2-2.9-6.2-6.3 2.8-6.2 6.2-6.2z m14.9 4.6h2.6v3.2h-2.6c-0.8 7-6.3 12.5-13.3 13.3v2.6h-3.2v-2.6c-7-0.8-12.5-6.3-13.3-13.3h-2.6v-3.2h2.6c0.8-7 6.3-12.5 13.3-13.3v-2.6h3.2v2.6c7 0.8 12.5 6.3 13.3 13.3z m-14.9 13.2c6.4 0 11.6-5.2 11.6-11.6s-5.2-11.6-11.6-11.6-11.6 5.2-11.6 11.6 5.2 11.6 11.6 11.6z' })\n )\n );\n};\n\nexports.default = IoAndroidLocate;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoAndroidOpen = function IoAndroidOpen(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31.6 31.6v-10.3h3.4v10.3c0 1.8-1.6 3.4-3.4 3.4h-23.2c-1.8 0-3.4-1.6-3.4-3.4v-23.2c0-1.8 1.6-3.4 3.4-3.4h10.4v3.4h-10.4v23.2h23.2z m-9.1-26.6h12.5v12.5h-3.4v-6.8l-16.8 16.8-2.3-2.3 16.8-16.8h-6.8v-3.4z' })\n )\n );\n};\n\nexports.default = IoAndroidOpen;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoArrowRightA = function IoArrowRightA(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm35 20l-15 15v-8.7h-15v-12.5h15v-8.8z' })\n )\n );\n};\n\nexports.default = IoArrowRightA;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoChevronRight = function IoChevronRight(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm23.3 20l-13.1-13.6c-0.3-0.3-0.3-0.9 0-1.2l2.4-2.4c0.3-0.3 0.9-0.4 1.2-0.1l16 16.7c0.1 0.1 0.2 0.4 0.2 0.6s-0.1 0.5-0.2 0.6l-16 16.7c-0.3 0.3-0.9 0.3-1.2 0l-2.4-2.5c-0.3-0.3-0.3-0.9 0-1.2z' })\n )\n );\n};\n\nexports.default = IoChevronRight;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoIosArrowDown = function IoIosArrowDown(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31 12.5l1.5 1.6-12.5 13.4-12.5-13.4 1.5-1.6 11 11.7z' })\n )\n );\n};\n\nexports.default = IoIosArrowDown;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoIosArrowRight = function IoIosArrowRight(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm12.5 9l1.6-1.5 13.4 12.5-13.4 12.5-1.6-1.5 11.7-11z' })\n )\n );\n};\n\nexports.default = IoIosArrowRight;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoLink = function IoLink(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm20 16.3z m8.8-3.8c3.4 0 6.2 2.8 6.2 6.3v2.5c0 3.4-2.8 6.2-6.2 6.2h-8.8c-2.6 0-4.7-1.6-5.7-3.7-0.3-0.8-0.5-1.6-0.5-2.5v-2.5h3.7v2.5c0 1.4 1.1 2.5 2.5 2.5h8.8c1.4 0 2.5-1.1 2.5-2.5v-2.5c0-1.5-1.1-2.5-2.5-2.5h-1.3c-0.5-2.5-2.5-3.8-2.5-3.8h3.8z m-3 3.8c0.3 0.7 0.5 1.6 0.5 2.5v2.5h-3.8v-2.5c0-1.5-1.1-2.5-2.5-2.5h-8.7c-1.5 0-2.5 1-2.5 2.5v2.5c0 1.4 1 2.5 2.5 2.5h1.2c0.5 2.4 2.5 3.7 2.5 3.7h-3.7c-3.5 0-6.3-2.8-6.3-6.2v-2.5c0-3.5 2.8-6.3 6.3-6.3h8.7c2.6 0 4.8 1.6 5.8 3.8z' })\n )\n );\n};\n\nexports.default = IoLink;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoNetwork = function IoNetwork(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm35 7.5c0 1.9-1 3.4-2.5 4.3v7.3l-10 5v4.1c1.5 0.9 2.5 2.4 2.5 4.3 0 2.7-2.3 5-5 5s-5-2.3-5-5c0-1.9 1-3.4 2.5-4.3v-4.1l-10-5v-7.3c-1.5-0.9-2.5-2.4-2.5-4.3 0-2.7 2.3-5 5-5s5 2.3 5 5c0 1.9-1 3.4-2.5 4.3v4.1l7.5 3.8 7.5-3.8v-4.1c-1.5-0.9-2.5-2.4-2.5-4.3 0-2.7 2.3-5 5-5s5 2.3 5 5z m-25-2.5c-1.4 0-2.5 1.1-2.5 2.5s1.1 2.5 2.5 2.5 2.5-1.1 2.5-2.5-1.1-2.5-2.5-2.5z m10 30c1.4 0 2.5-1.1 2.5-2.5s-1.1-2.5-2.5-2.5-2.5 1.1-2.5 2.5 1.1 2.5 2.5 2.5z m10-25c1.4 0 2.5-1.1 2.5-2.5s-1.1-2.5-2.5-2.5-2.5 1.1-2.5 2.5 1.1 2.5 2.5 2.5z' })\n )\n );\n};\n\nexports.default = IoNetwork;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdFileUpload = function MdFileUpload(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm8.4 30h23.2v3.4h-23.2v-3.4z m6.6-3.4v-10h-6.6l11.6-11.6 11.6 11.6h-6.6v10h-10z' })\n )\n );\n};\n\nexports.default = MdFileUpload;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdKeyboardArrowRight = function MdKeyboardArrowRight(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm14.3 27.3l7.7-7.7-7.7-7.7 2.3-2.3 10 10-10 10z' })\n )\n );\n};\n\nexports.default = MdKeyboardArrowRight;\nmodule.exports = exports['default'];","/* eslint-env node, browser */\n'use strict'\n\nmodule.exports = function (element, options) {\n var self = this\n var Combokeys = self.constructor\n\n /**\n * an object of passed options\n *\n * @type { storeInstancesGlobally?: true }\n */\n\n self.options = Object.assign({ storeInstancesGlobally: true }, options || {})\n\n /**\n * a list of all the callbacks setup via Combokeys.bind()\n *\n * @type {Object}\n */\n self.callbacks = {}\n\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n self.directMap = {}\n\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n self.sequenceLevels = {}\n\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n self.resetTimer = null\n\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n self.ignoreNextKeyup = false\n\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n self.ignoreNextKeypress = false\n\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n self.nextExpectedAction = false\n\n self.element = element\n\n self.addEvents()\n\n if (self.options.storeInstancesGlobally) {\n Combokeys.instances.push(self)\n }\n\n return self\n}\n\nmodule.exports.prototype.bind = require('./prototype/bind')\nmodule.exports.prototype.bindMultiple = require('./prototype/bindMultiple')\nmodule.exports.prototype.unbind = require('./prototype/unbind')\nmodule.exports.prototype.trigger = require('./prototype/trigger')\nmodule.exports.prototype.reset = require('./prototype/reset.js')\nmodule.exports.prototype.stopCallback = require('./prototype/stopCallback')\nmodule.exports.prototype.handleKey = require('./prototype/handleKey')\nmodule.exports.prototype.addEvents = require('./prototype/addEvents')\nmodule.exports.prototype.bindSingle = require('./prototype/bindSingle')\nmodule.exports.prototype.getKeyInfo = require('./prototype/getKeyInfo')\nmodule.exports.prototype.pickBestAction = require('./prototype/pickBestAction')\nmodule.exports.prototype.getReverseMap = require('./prototype/getReverseMap')\nmodule.exports.prototype.getMatches = require('./prototype/getMatches')\nmodule.exports.prototype.resetSequences = require('./prototype/resetSequences')\nmodule.exports.prototype.fireCallback = require('./prototype/fireCallback')\nmodule.exports.prototype.bindSequence = require('./prototype/bindSequence')\nmodule.exports.prototype.resetSequenceTimer = require('./prototype/resetSequenceTimer')\nmodule.exports.prototype.detach = require('./prototype/detach')\n\nmodule.exports.instances = []\nmodule.exports.reset = require('./reset')\n\n/**\n * variable to store the flipped version of MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\nmodule.exports.REVERSE_MAP = null\n","/* eslint-env node, browser */\n'use strict'\nmodule.exports = function () {\n var self = this\n var on = require('./dom-event')\n var element = self.element\n\n self.eventHandler = require('./handleKeyEvent').bind(self)\n\n on(element, 'keypress', self.eventHandler)\n on(element, 'keydown', self.eventHandler)\n on(element, 'keyup', self.eventHandler)\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * binds an event to Combokeys\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - \"keypress\", \"keydown\", or \"keyup\"\n * @returns void\n */\nmodule.exports = function (keys, callback, action) {\n var self = this\n\n keys = keys instanceof Array ? keys : [keys]\n self.bindMultiple(keys, callback, action)\n return self\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\nmodule.exports = function (combinations, callback, action) {\n var self = this\n\n for (var j = 0; j < combinations.length; ++j) {\n self.bindSingle(combinations[j], callback, action)\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\nmodule.exports = function (combo, keys, callback, action) {\n var self = this\n\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n self.sequenceLevels[combo] = 0\n\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n function increaseSequence (nextAction) {\n return function () {\n self.nextExpectedAction = nextAction\n ++self.sequenceLevels[combo]\n self.resetSequenceTimer()\n }\n }\n\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n function callbackAndReset (e) {\n var characterFromEvent\n self.fireCallback(callback, e, combo)\n\n // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n if (action !== 'keyup') {\n characterFromEvent = require('../../helpers/characterFromEvent')\n self.ignoreNextKeyup = characterFromEvent(e)\n }\n\n // weird race condition if a sequence ends with the key\n // another sequence begins with\n setTimeout(\n function () {\n self.resetSequences()\n },\n 10\n )\n }\n\n // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n for (var j = 0; j < keys.length; ++j) {\n var isFinal = j + 1 === keys.length\n var wrappedCallback = isFinal ? callbackAndReset : increaseSequence(action || self.getKeyInfo(keys[j + 1]).action)\n self.bindSingle(keys[j], wrappedCallback, action, combo, j)\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\nmodule.exports = function (combination, callback, action, sequenceName, level) {\n var self = this\n\n // store a direct mapped reference for use with Combokeys.trigger\n self.directMap[combination + ':' + action] = callback\n\n // make sure multiple spaces in a row become a single space\n combination = combination.replace(/\\s+/g, ' ')\n\n var sequence = combination.split(' ')\n var info\n\n // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n if (sequence.length > 1) {\n self.bindSequence(combination, sequence, callback, action)\n return\n }\n\n info = self.getKeyInfo(combination, action)\n\n // make sure to initialize array if this is the first time\n // a callback is added for this key\n self.callbacks[info.key] = self.callbacks[info.key] || []\n\n // remove an existing match if there is one\n self.getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level)\n\n // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n self.callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n })\n}\n","var off = require('./dom-event').off\nmodule.exports = function () {\n var self = this\n var element = self.element\n\n off(element, 'keypress', self.eventHandler)\n off(element, 'keydown', self.eventHandler)\n off(element, 'keyup', self.eventHandler)\n}\n","module.exports = on\nmodule.exports.on = on\nmodule.exports.off = off\n\nfunction on (element, event, callback, capture) {\n !element.addEventListener && (event = 'on' + event)\n ;(element.addEventListener || element.attachEvent).call(element, event, callback, capture)\n return callback\n}\n\nfunction off (element, event, callback, capture) {\n !element.removeEventListener && (event = 'on' + event)\n ;(element.removeEventListener || element.detachEvent).call(element, event, callback, capture)\n return callback\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (callback, e, combo, sequence) {\n var self = this\n var preventDefault\n var stopPropagation\n\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return\n }\n\n if (callback(e, combo) === false) {\n preventDefault = require('../../helpers/preventDefault')\n preventDefault(e)\n stopPropagation = require('../../helpers/stopPropagation')\n stopPropagation(e)\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\nmodule.exports = function (combination, action) {\n var self = this\n var keysFromString\n var keys\n var key\n var j\n var modifiers = []\n var SPECIAL_ALIASES\n var SHIFT_MAP\n var isModifier\n\n keysFromString = require('../../helpers/keysFromString')\n // take the keys from this pattern and figure out what the actual\n // pattern is all about\n keys = keysFromString(combination)\n\n SPECIAL_ALIASES = require('../../helpers/special-aliases')\n SHIFT_MAP = require('../../helpers/shift-map')\n isModifier = require('../../helpers/isModifier')\n for (j = 0; j < keys.length; ++j) {\n key = keys[j]\n\n // normalize key names\n if (SPECIAL_ALIASES[key]) {\n key = SPECIAL_ALIASES[key]\n }\n\n // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n if (action && action !== 'keypress' && SHIFT_MAP[key]) {\n key = SHIFT_MAP[key]\n modifiers.push('shift')\n }\n\n // if this key is a modifier then add it to the list of modifiers\n if (isModifier(key)) {\n modifiers.push(key)\n }\n }\n\n // depending on what the key combination is\n // we will try to pick the best event for it\n action = self.pickBestAction(key, modifiers, action)\n\n return {\n key: key,\n modifiers: modifiers,\n action: action\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\nmodule.exports = function (character, modifiers, e, sequenceName, combination, level) {\n var self = this\n var j\n var callback\n var matches = []\n var action = e.type\n var isModifier\n var modifiersMatch\n\n if (\n action === 'keypress' &&\n // Firefox fires keypress for arrows\n !(e.code && e.code.slice(0, 5) === 'Arrow')\n ) {\n // 'any-character' callbacks are only on `keypress`\n var anyCharCallbacks = self.callbacks['any-character'] || []\n anyCharCallbacks.forEach(function (callback) {\n matches.push(callback)\n })\n }\n\n if (!self.callbacks[character]) { return matches }\n\n isModifier = require('../../helpers/isModifier')\n // if a modifier key is coming up on its own we should allow it\n if (action === 'keyup' && isModifier(character)) {\n modifiers = [character]\n }\n\n // loop through all callbacks for the key that was pressed\n // and see if any of them match\n for (j = 0; j < self.callbacks[character].length; ++j) {\n callback = self.callbacks[character][j]\n\n // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n if (!sequenceName && callback.seq && self.sequenceLevels[callback.seq] !== callback.level) {\n continue\n }\n\n // if the action we are looking for doesn't match the action we got\n // then we should keep going\n if (action !== callback.action) {\n continue\n }\n\n // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n modifiersMatch = require('./modifiersMatch')\n if ((action === 'keypress' && !e.metaKey && !e.ctrlKey) || modifiersMatch(modifiers, callback.modifiers)) {\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo === combination\n var deleteSequence = sequenceName && callback.seq === sequenceName && callback.level === level\n if (deleteCombo || deleteSequence) {\n self.callbacks[character].splice(j, 1)\n }\n\n matches.push(callback)\n }\n }\n\n return matches\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\nmodule.exports = function () {\n var self = this\n var constructor = self.constructor\n var SPECIAL_KEYS_MAP\n\n if (!constructor.REVERSE_MAP) {\n constructor.REVERSE_MAP = {}\n SPECIAL_KEYS_MAP = require('../../helpers/special-keys-map')\n for (var key in SPECIAL_KEYS_MAP) {\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue\n }\n\n if (SPECIAL_KEYS_MAP.hasOwnProperty(key)) {\n constructor.REVERSE_MAP[SPECIAL_KEYS_MAP[key]] = key\n }\n }\n }\n return constructor.REVERSE_MAP\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (character, modifiers, e) {\n var self = this\n var callbacks\n var j\n var doNotReset = {}\n var maxLevel = 0\n var processedSequenceCallback = false\n var isModifier\n var ignoreThisKeypress\n\n callbacks = self.getMatches(character, modifiers, e)\n // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n for (j = 0; j < callbacks.length; ++j) {\n if (callbacks[j].seq) {\n maxLevel = Math.max(maxLevel, callbacks[j].level)\n }\n }\n\n // loop through matching callbacks for this key event\n for (j = 0; j < callbacks.length; ++j) {\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[j].seq) {\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the resetSequences call\n if (callbacks[j].level !== maxLevel) {\n continue\n }\n\n processedSequenceCallback = true\n\n // keep a list of which sequences were matches for later\n doNotReset[callbacks[j].seq] = 1\n self.fireCallback(callbacks[j].callback, e, callbacks[j].combo, callbacks[j].seq)\n continue\n }\n\n // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n if (!processedSequenceCallback) {\n self.fireCallback(callbacks[j].callback, e, callbacks[j].combo)\n }\n }\n\n // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n ignoreThisKeypress = e.type === 'keypress' && self.ignoreNextKeypress\n isModifier = require('../../helpers/isModifier')\n if (e.type === self.nextExpectedAction && !isModifier(character) && !ignoreThisKeypress) {\n self.resetSequences(doNotReset)\n }\n\n self.ignoreNextKeypress = processedSequenceCallback && e.type === 'keydown'\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (e) {\n var self = this\n var characterFromEvent\n var eventModifiers\n\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode\n }\n characterFromEvent = require('../../helpers/characterFromEvent')\n var character = characterFromEvent(e)\n\n // no character found then stop\n if (character === undefined) {\n return\n }\n\n // need to use === for the character check because the character can be 0\n if (e.type === 'keyup' && self.ignoreNextKeyup === character) {\n self.ignoreNextKeyup = false\n return\n }\n\n eventModifiers = require('../../helpers/eventModifiers')\n self.handleKey(character, eventModifiers(e), e)\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\nmodule.exports = function (modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',')\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\nmodule.exports = function (key, modifiers, action) {\n var self = this\n\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = self.getReverseMap()[key] ? 'keydown' : 'keypress'\n }\n\n // modifier keys don't work as expected with keypress,\n // switch to keydown\n if (action === 'keypress' && modifiers.length) {\n action = 'keydown'\n }\n\n return action\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * resets the library back to its initial state. This is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\nmodule.exports = function () {\n var self = this\n self.callbacks = {}\n self.directMap = {}\n return this\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\nmodule.exports = function () {\n var self = this\n\n clearTimeout(self.resetTimer)\n self.resetTimer = setTimeout(\n function () {\n self.resetSequences()\n },\n 1000\n )\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\nmodule.exports = function (doNotReset) {\n var self = this\n\n doNotReset = doNotReset || {}\n\n var activeSequences = false\n var key\n\n for (key in self.sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true\n continue\n }\n self.sequenceLevels[key] = 0\n }\n\n if (!activeSequences) {\n self.nextExpectedAction = false\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n* should we stop this event before firing off callbacks\n*\n* @param {Event} e\n* @param {Element} element\n* @return {boolean}\n*/\nmodule.exports = function (e, element) {\n // if the element has the class \"combokeys\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' combokeys ') > -1) {\n return false\n }\n\n var tagName = element.tagName.toLowerCase()\n\n // stop for input, select, and textarea\n return tagName === 'input' || tagName === 'select' || tagName === 'textarea' || element.isContentEditable\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\nmodule.exports = function (keys, action) {\n var self = this\n if (self.directMap[keys + ':' + action]) {\n self.directMap[keys + ':' + action]({}, keys)\n }\n return this\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * unbinds an event to Combokeys\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * directMap dict.\n *\n * TODO: actually remove this from the callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\nmodule.exports = function (keys, action) {\n var self = this\n\n return self.bind(keys, function () {}, action)\n}\n","/* eslint-env node, browser */\n'use strict'\n\nmodule.exports = function () {\n var self = this\n\n self.instances.forEach(function (combokeys) {\n combokeys.reset()\n })\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\nmodule.exports = function (e) {\n var SPECIAL_KEYS_MAP,\n SPECIAL_CHARACTERS_MAP\n SPECIAL_KEYS_MAP = require('./special-keys-map')\n SPECIAL_CHARACTERS_MAP = require('./special-characters-map')\n\n // for keypress events we should return the character as is\n if (e.type === 'keypress') {\n var character = String.fromCharCode(e.which)\n\n // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n if (!e.shiftKey) {\n character = character.toLowerCase()\n }\n\n return character\n }\n\n // for non keypress events the special maps are needed\n if (SPECIAL_KEYS_MAP[e.which] !== undefined) {\n return SPECIAL_KEYS_MAP[e.which]\n }\n\n if (SPECIAL_CHARACTERS_MAP[e.which] !== undefined) {\n return SPECIAL_CHARACTERS_MAP[e.which]\n }\n\n // if it is not in the special map\n\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n return String.fromCharCode(e.which).toLowerCase()\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\nmodule.exports = function (e) {\n var modifiers = []\n\n if (e.shiftKey) {\n modifiers.push('shift')\n }\n\n if (e.altKey) {\n modifiers.push('alt')\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl')\n }\n\n if (e.metaKey) {\n modifiers.push('meta')\n }\n\n return modifiers\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\nmodule.exports = function (key) {\n return key === 'shift' || key === 'ctrl' || key === 'alt' || key === 'meta'\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\nmodule.exports = function (combination) {\n if (combination === '+') {\n return ['+']\n }\n\n return combination.split('+')\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (e) {\n if (e.preventDefault) {\n e.preventDefault()\n return\n }\n\n e.returnValue = false\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\nmodule.exports = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\"': \"'\",\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\nmodule.exports = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\nmodule.exports = {\n 106: '*',\n 107: 'plus',\n 109: 'minus',\n 110: '.',\n 111: '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: \"'\"\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\nmodule.exports = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 173: 'minus',\n 187: 'plus',\n 189: 'minus',\n 224: 'meta'\n}\n\n/**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\nfor (var i = 1; i < 20; ++i) {\n module.exports[111 + i] = 'f' + i\n}\n\n/**\n * loop through to map numbers on the numeric keypad\n */\nfor (i = 0; i <= 9; ++i) {\n module.exports[i + 96] = i\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (e) {\n if (e.stopPropagation) {\n e.stopPropagation()\n return\n }\n\n e.cancelBubble = true\n}\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","module.exports = function deepFreeze (o) {\n Object.freeze(o);\n\n Object.getOwnPropertyNames(o).forEach(function (prop) {\n if (o.hasOwnProperty(prop)\n && o[prop] !== null\n && (typeof o[prop] === \"object\" || typeof o[prop] === \"function\")\n && !Object.isFrozen(o[prop])) {\n deepFreeze(o[prop]);\n }\n });\n \n return o;\n};\n","/*\n * Fuzzy\n * https://github.com/myork/fuzzy\n *\n * Copyright (c) 2012 Matt York\n * Licensed under the MIT license.\n */\n\n(function() {\n\nvar root = this;\n\nvar fuzzy = {};\n\n// Use in node or in browser\nif (typeof exports !== 'undefined') {\n module.exports = fuzzy;\n} else {\n root.fuzzy = fuzzy;\n}\n\n// Return all elements of `array` that have a fuzzy\n// match against `pattern`.\nfuzzy.simpleFilter = function(pattern, array) {\n return array.filter(function(str) {\n return fuzzy.test(pattern, str);\n });\n};\n\n// Does `pattern` fuzzy match `str`?\nfuzzy.test = function(pattern, str) {\n return fuzzy.match(pattern, str) !== null;\n};\n\n// If `pattern` matches `str`, wrap each matching character\n// in `opts.pre` and `opts.post`. If no match, return null\nfuzzy.match = function(pattern, str, opts) {\n opts = opts || {};\n var patternIdx = 0\n , result = []\n , len = str.length\n , totalScore = 0\n , currScore = 0\n // prefix\n , pre = opts.pre || ''\n // suffix\n , post = opts.post || ''\n // String to compare against. This might be a lowercase version of the\n // raw string\n , compareString = opts.caseSensitive && str || str.toLowerCase()\n , ch;\n\n pattern = opts.caseSensitive && pattern || pattern.toLowerCase();\n\n // For each character in the string, either add it to the result\n // or wrap in template if it's the next string in the pattern\n for(var idx = 0; idx < len; idx++) {\n ch = str[idx];\n if(compareString[idx] === pattern[patternIdx]) {\n ch = pre + ch + post;\n patternIdx += 1;\n\n // consecutive characters should increase the score more than linearly\n currScore += 1 + currScore;\n } else {\n currScore = 0;\n }\n totalScore += currScore;\n result[result.length] = ch;\n }\n\n // return rendered string if we have a match for every char\n if(patternIdx === pattern.length) {\n // if the string is an exact match with pattern, totalScore should be maxed\n totalScore = (compareString === pattern) ? Infinity : totalScore;\n return {rendered: result.join(''), score: totalScore};\n }\n\n return null;\n};\n\n// The normal entry point. Filters `arr` for matches against `pattern`.\n// It returns an array with matching values of the type:\n//\n// [{\n// string: 'lah' // The rendered string\n// , index: 2 // The index of the element in `arr`\n// , original: 'blah' // The original element in `arr`\n// }]\n//\n// `opts` is an optional argument bag. Details:\n//\n// opts = {\n// // string to put before a matching character\n// pre: ''\n//\n// // string to put after matching character\n// , post: ''\n//\n// // Optional function. Input is an entry in the given arr`,\n// // output should be the string to test `pattern` against.\n// // In this example, if `arr = [{crying: 'koala'}]` we would return\n// // 'koala'.\n// , extract: function(arg) { return arg.crying; }\n// }\nfuzzy.filter = function(pattern, arr, opts) {\n if(!arr || arr.length === 0) {\n return [];\n }\n if (typeof pattern !== 'string') {\n return arr;\n }\n opts = opts || {};\n return arr\n .reduce(function(prev, element, idx, arr) {\n var str = element;\n if(opts.extract) {\n str = opts.extract(element);\n }\n var rendered = fuzzy.match(pattern, str, opts);\n if(rendered != null) {\n prev[prev.length] = {\n string: rendered.rendered\n , score: rendered.score\n , index: idx\n , original: element\n };\n }\n return prev;\n }, [])\n\n // Sort by score. Browsers are inconsistent wrt stable/unstable\n // sorting, so force stable by using the index in the case of tie.\n // See http://ofb.net/~sethml/is-sort-stable.html\n .sort(function(a,b) {\n var compare = b.score - a.score;\n if(compare) return compare;\n return a.index - b.index;\n });\n};\n\n\n}());\n\n","'use strict'\n\nvar INDENT = ' '\n\nfunction inlineRule (objRule) {\n var str = ''\n objRule && Object.keys(objRule).forEach(function (rule) {\n str += rule + ':' + objRule[rule] + ';'\n })\n return str\n}\n\nfunction Stylize (styleFile) {\n function styleClass (cssClass) {\n return 'class=\"' + cssClass + '\"'\n }\n\n function styleInline (cssClass) {\n return 'style=\"' + inlineRule(styleFile['.' + cssClass]) + '\"'\n }\n\n if (!styleFile) return styleClass\n return styleInline\n}\n\nfunction type (doc) {\n if (doc === null) return 'null'\n if (Array.isArray(doc)) return 'array'\n if (typeof doc === 'string' && /^https?:/.test(doc)) return 'link'\n if (typeof doc === 'object' && typeof doc.toISOString === 'function') return 'date'\n\n return typeof doc\n}\n\nfunction escape (str) {\n return str.replace(//g, '>')\n}\n\nmodule.exports = function (doc, styleFile) {\n var indent = ''\n var style = Stylize(styleFile)\n\n var forEach = function (list, start, end, fn) {\n if (!list.length) return start + ' ' + end\n\n var out = start + '\\n'\n\n indent += INDENT\n list.forEach(function (key, i) {\n out += indent + fn(key) + (i < list.length - 1 ? ',' : '') + '\\n'\n })\n indent = indent.slice(0, -INDENT.length)\n\n return out + indent + end\n }\n\n function visit (obj) {\n if (obj === undefined) return ''\n\n switch (type(obj)) {\n case 'boolean':\n return '' + obj + ''\n\n case 'number':\n return '' + obj + ''\n\n case 'date':\n return '\"' + escape(obj.toISOString()) + '\"'\n\n case 'null':\n return 'null'\n\n case 'string':\n return '\"' + escape(obj.replace(/\\n/g, '\\n' + indent)) + '\"'\n\n case 'link':\n return '\"' + escape(obj) + '\"'\n\n case 'array':\n return forEach(obj, '[', ']', visit)\n\n case 'object':\n var keys = Object.keys(obj).filter(function (key) {\n return obj[key] !== undefined\n })\n\n return forEach(keys, '{', '}', function (key) {\n return '\"' + key + '\": ' + visit(obj[key])\n })\n }\n\n return ''\n }\n\n return '
' + visit(doc) + '
'\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n"],"names":["insertWithoutScoping","cache","serialized","undefined","inserted","name","insert","sheet","merge","registered","css","className","registeredStyles","rawClassName","length","classnames","args","cls","i","arg","toAdd","Array","isArray","k","options","speedy","value","this","isSpeedy","compat","_len","arguments","_key","key","cx","_len4","_key4","injectGlobal","_len3","_key3","keyframes","_len2","_key2","animation","styles","hydrate","ids","forEach","flush","getRegisteredStyles","bind","_createEmotion","getStyles","TimelineCollapser","props","onExpandAll","onExpandOne","onCollapseAll","onCollapseOne","useStyles2","IconButton","tooltip","size","tooltipPlacement","onClick","EUpdateTypes","DraggableManager","constructor","getBounds","tag","resetBoundsOnResize","rest","_bounds","event","button","clientX","type","eventType","_isDragging","handler","_onMouseEnter","_onMouseLeave","Error","_onMouseMove","x","_getPosition","manager","window","addEventListener","_handleDragEvent","style","_get","document","userSelect","_onDragStart","_onDragMove","_stopDragging","_onDragEnd","handleMouseDown","handleMouseEnter","_handleMinorMouseEvent","handleMouseMove","handleMouseLeave","_resetBoundsOnResize","Boolean","resetBounds","onMouseEnter","onMouseLeave","onMouseMove","onDragStart","onDragMove","onDragEnd","_getBounds","clientXLeft","maxValue","minValue","width","removeEventListener","isDragging","dispose","stylesFactory","TimelineColumnResizer","wrapper","dragger","draggerDragging","draggerDraggingLeft","draggerDraggingRight","gripIcon","gripIconDragging","React","super","elm","_rootElm","left","getBoundingClientRect","min","max","setState","dragPosition","onChange","_dragManager","_getDraggingBounds","_handleDragEnd","_handleDragUpdate","state","componentWillUnmount","render","draggerStyle","position","columnResizeHandleHeight","gripStyle","isDraggingLeft","isDraggingRight","Math","right","height","ref","_setRootElm","onMouseDown","TimelineViewingLayer","TimelineViewingLayerCursorGuide","TimelineViewingLayerDragged","TimelineViewingLayerDraggedDraggingLeft","TimelineViewingLayerDraggedDraggingRight","TimelineViewingLayerDraggedShiftDrag","TimelineViewingLayerDraggedReframeDrag","TimelineViewingLayerFullOverlay","mapFromViewSubRange","viewStart","viewEnd","mapToViewSubRange","getMarkers","from","to","isShift","layout","start","isOutOfView","getNextViewLayout","Reflect","has","_root","viewRangeTime","current","cursor","updateNextViewRangeTime","reframe","shift","update","anchor","end","updateViewRangeTime","_draggerReframe","_handleReframeDragEnd","_handleReframeDragUpdate","_handleReframeMouseLeave","_handleReframeMouseMove","UNSAFE_componentWillReceiveProps","nextProps","boundsInvalidator","shiftEnd","shiftStart","cusrorPosition","_setRoot","ONE_MILLISECOND","ONE_SECOND","ONE_MINUTE","ONE_HOUR","DEFAULT_MS_PRECISION","log10","UNIT_STEPS","unit","microseconds","ofPrevious","quantizeDuration","duration","floatPrecision","conversionFactor","number","precision","targetPrecision","floor","abs","trunc","Number","toPrecision","toFloatPrecision","formatDuration","primaryUnit","secondaryUnit","_dropWhile","index","_round","primaryUnitString","secondaryValue","round","secondaryUnitString","spanHasTag","span","tags","some","isClientSpan","isServerSpan","isErrorBool","isErrorStr","isErrorSpan","autoColor","theme","hex","base","isLight","color","tinycolor","clone","lighten","darken","includeFallbackColors","toHex8String","toHsl","l","newColor","Ticks","TicksTick","TicksTickLabel","TicksTickLabelEndAnchor","endTime","numTicks","showLabels","startTime","labels","viewingDuration","durationAtTick","push","ticks","portion","defaultProps","ubRelative","ubMb1","ubMy1","ubM0","ubPx2","ubPb2","ubFlex","ubItemsCenter","ubFlexAuto","ubTxRightAlign","ubInlineBlock","uAlignIcon","uTxEllipsis","uWidth100","uTxMuted","ubJustifyEnd","flexRow","TimelineRow","children","TimelineRowCell","widthPercent","mergedStyle","flexBasis","maxWidth","Cell","TimelineHeaderRow","TimelineHeaderRowTitle","TimelineHeaderWrapper","nameColumnWidth","onColummWidthChange","Positions","bufferLen","ys","heights","dataLen","lastI","profileData","dataLength","calcHeights","heightGetter","forcedLastI","_max","h","calcYs","yValue","confirmHeight","_i","chg","findFloorIndex","imin","imax","getRowPosition","y","getEstimatedHeight","known","DEFAULT_INITIAL_DRAW","ListView","_viewHeight","bottomY","_scrollTop","_yPositions","_getHeight","scrollElement","scrollElementTop","top","listViewOffset","scrollTop","_itemHolderElm","itemOffset","scrollTo","_isScrolledOrResized","requestAnimationFrame","_positionList","_wrapperElm","_calcViewIndexes","maxStart","viewBufferMin","_startIndex","minEnd","_endIndex","_startIndexDrawn","_endIndexDrawn","forceUpdate","windowScroller","clientHeight","_scanItemHeights","getIndexFromKey","lowDirtyKey","highDirtyKey","isDirty","nodes","childNodes","node","itemKey","getAttribute","console","warn","observed","firstElementChild","_knownHeights","get","set","getKeyFromIndex","itemHeightGetter","Map","_htmlTopOffset","_windowScrollListenerAdded","_htmlElm","documentElement","componentDidMount","_onScroll","componentDidUpdate","_isViewChanged","useRoot","innerHeight","scrollY","yStart","yEnd","initialDraw","itemRenderer","viewBuffer","items","attrs","wrapperProps","_initWrapper","onScroll","overflowY","scrollerStyle","margin","padding","itemsWrapperClassName","_initItemHolder","NewWindowIconLarge","NewWindowIcon","isLarge","UIPopover","GetElementsContext","elements","Popover","UITooltip","Tooltip","UIIcon","Icon","UIDropdown","Dropdown","UIMenu","Menu","UIMenuItem","MenuItem","UIButton","Button","UIDivider","Divider","UIInput","Input","UIInputGroup","InputGroup","UIElementsContext","displayName","Consumer","ExternalLinkContext","ReferenceLink","reference","focusSpan","otherProps","role","spanID","createLinkToExternalSpan","href","traceID","target","rel","MultiParent","TraceRefLink","ReferencesButton","references","map","process","serviceName","operationName","tooltipText","tooltipProps","arrowPointAtCenter","mouseLeaveDelay","placement","title","overlayClassName","overlay","referencesList","trigger","getFirstAncestor","_find","refType","SpanTreeOffset","SpanTreeOffsetParent","indentGuide","indentGuideActive","iconWrapper","UnthemedSpanTreeOffset","ancestorId","relatedTarget","HTMLSpanElement","removeHoverIndentGuideId","addHoverIndentGuideId","ancestorIds","ancestorIDs","spanAncestorIds","reverse","childrenVisible","showChildrenIcon","hasChildren","icon","hoverIndentGuideIds","withTheme2","CopyIcon","hasCopied","copy","copyText","visible","onVisibleChange","handleTooltipVisibilityChange","tooltipTitle","htmlType","handleClick","copyIconClassName","KeyValueTable","body","row","keyColumn","copyColumn","linkIcon","jsonObjectOrArrayStartRegex","parseIfComplexJson","test","JSON","parse","_","LinkValue","linkValueList","links","text","url","KeyValuesTable","data","linksGetter","markup","__html","jsonMarkup","jsonTable","dangerouslySetInnerHTML","valueMarkup","stringify","header","headerEmpty","headerHighContrast","emptyIcon","summary","summaryItem","summaryLabel","summaryDelim","KeyValuesSummary","item","String","AccordianKeyValues","highContrast","interactive","isOpen","label","onToggle","isEmpty","iconCls","arrow","headerProps","AccordianLogs","AccordianLogsHeader","AccordianLogsContent","AccordianLogsFooter","logs","openedItems","onItemToggle","timestamp","HeaderComponent","_sortBy","log","fields","bar","rpc","logMarker","toPercent","toFixed","SpanBar","getViewedBounds","shortLabel","longLabel","traceStartTime","labelClassName","setLabel","useState","logGroups","_groupBy","posPercent","onMouseOver","background","Object","keys","positionKey","content","spanBarClassName","spanBarLabelClassName","nameWrapperClassName","nameWrapperMatchingFilterClassName","viewClassName","nameColumnClassName","animations","nameWrapper","nameWrapperMatchingFilter","nameColumn","endpointName","view","viewExpanded","viewExpandedAndMatchingFilter","rowClippingLeft","rowClippingRight","rowExpanded","rowMatchingFilter","rowFocused","rowExpandedAndMatchingFilter","nameDetailExpanded","svcName","svcNameChildrenCollapsed","errorIcon","rpcColorMarker","labelRight","labelLeft","UnthemedSpanBarRow","onDetailToggled","onChildrenToggled","columnDivision","isChildrenExpanded","isDetailExpanded","isMatchingFilter","isFocused","noInstrumentedServer","showErrorIcon","clippingLeft","clippingRight","createSpanLink","isParent","viewBounds","labelDetail","hintClassName","_childrenToggle","_detailToggle","borderColor","tabIndex","backgroundColor","errorIconColor","link","marginRight","ctrlKey","metaKey","shiftKey","preventDefault","subsidiarilyReferencedBy","TextList","List","DefaultTextComponent","AccordianText","headerClassName","TextComponent","accordianKeyValuesStyles","getAccordianKeyValuesStyles","LabeledList","LabeledListItem","LabeledListLabel","dividerClassName","divider","ReferencesList","list","itemContent","debugInfo","debugLabel","References","AccordianReferences","dividerVertical","debugValue","AccordianWarnings","AccordianWarningsHeader","AccordianWarningsHeaderOpen","AccordianWarningsLabel","Textarea","LinkIcon","SpanDetail","detailState","logItemToggle","logsToggle","processToggle","tagsToggle","warningsToggle","stackTracesToggle","referencesToggle","createFocusSpanLink","isTagsOpen","isProcessOpen","logsState","isWarningsOpen","isReferencesOpen","isStackTracesOpen","relativeStartTime","warnings","stackTraces","overviewItems","focusSpanLink","DataLinkButton","buttonProps","logItem","textComponentProps","stackTrace","join","TextArea","readOnly","cols","rows","e","currentTarget","altKey","expandedAccent","infoWrapper","UnthemedSpanDetailRow","itemIndex","focusedSpanId","overflow","borderTopColor","_linksGetter","strToRgb","s","r","slice","g","b","parseInt","ColorGenerator","colorsHex","colorsRgb","currentIdx","_getColorIndex","getColorByKey","getRgbColorByKey","clear","getGenerator","memoizeOne","colors","rowsWrapper","DEFAULT_HEIGHTS","memoizedGenerateRowStates","trace","childrenHiddenIDs","detailStates","spans","collapseDepth","rowStates","depth","hidden","isDetail","spanIndex","generateRowStates","memoizedViewBoundsFunc","viewRange","viewMin","viewWindow","isEqual","memoizedGetClipping","currentViewRange","zoomStart","zoomEnd","UnthemedVirtualizedTraceView","currentViewRangeTime","findMatchesIDs","getRowStates","listView","isChanged","registerAccessors","getAccessors","parts","split","_traceID","_spanID","_isDetail","renderSpanDetailRow","renderSpanBarRow","findIndex","scrollToIndex","setTrace","uiFind","scrollToSpan","shouldComponentUpdate","nextPropKeys","prevProps","shouldScrollToFirstUiFindMatch","clearShouldScrollToFirstUiFindMatch","scrollToFirstVisibleSpan","nextRegisterAccessors","nextTrace","getClipping","lv","getViewRange","getSearchedSpanIDs","getCollapsedChildren","getViewHeight","getBottomRowIndexVisible","getBottomVisibleIndex","getTopRowIndexVisible","getTopVisibleIndex","mapRowIndexToSpanIndex","mapSpanIndexToRowIndex","childrenToggle","detailToggle","spanNameColumnWidth","isCollapsed","parentSpanIndex","spanContainsErredSpan","rpcSpan","spanChildDepth","findServerChildSpan","rpcViewBounds","peerServiceKV","find","kv","isKindClient","SpanBarRow","detailLogItemToggle","detailLogsToggle","detailProcessToggle","detailReferencesToggle","detailWarningsToggle","detailStackTracesToggle","detailTagsToggle","zIndex","SpanDetailRow","setListView","getRowHeight","renderRow","scrollPageDown","binding","scrollPageUp","scrollToNextVisibleSpan","scrollToPrevVisibleSpan","panLeft","panLeftFast","panRight","panRightFast","zoomIn","zoomInFast","zoomOut","zoomOutFast","collapseAll","expandAll","collapseOne","expandOne","searchSpans","clearSearch","instance","getInstance","local","Combokeys","TraceTimelineViewer","UnthemedTraceTimelineViewer","callbacks","inst","keysHandler","keyboardMappings","mergeShortcuts","setSpanNameColumnWidth","traceTimeline","time","VirtualizedTraceView","CanvasSpanGraph","UnthemedCanvasSpanGraph","_canvasElm","_draw","valueWidth","totalValueWidth","canvas","getFillColor","bgColor","fillCache","cHeight","cWidth","innerWidth","itemHeight","itemYChange","ctx","getContext","alpha","fillStyle","fillRect","valueOffset","concat","renderIntoCanvas","getColor","_setCanvasRef","TickLabels","TickLabelsLabel","GraphTick","GraphTicks","x1","y1","x2","y2","ScrubberHandleExpansion","ScrubberHandle","ScrubberLine","ScrubberDragging","ScrubberHandles","Scrubber","xPercent","transform","ViewingLayerResetZoomHoverClassName","ViewingLayerResetZoom","ViewingLayer","ViewingLayerGraph","ViewingLayerInactive","ViewingLayerCursorGuide","ViewingLayerDraggedShift","ViewingLayerDrag","ViewingLayerFullOverlay","dragTypes","UnthemedViewingLayer","preventCursorLine","stopPropagation","_draggerStart","_handleScrubberDragEnd","_handleScrubberDragUpdate","_handleScrubberEnterLeave","_draggerEnd","_getMarkers","leadingX","haveNextTimeRange","leftInactive","cursorPosition","rightInactive","_resetTimeZoomClickHandler","strokeWidth","getItem","memoizedGetitems","SpanGraph","UiFindInput","allowClear","inputProps","suffix","clearUiFind","autosize","placeholder","trackFindFunction","TracePageSearchBar","TracePageSearchBarBar","TracePageSearchBarCount","TracePageSearchBarBtn","TracePageSearchBarBtnDisabled","TracePageSearchBarLocateBtn","memo","focusUiFindMatches","navigable","nextResult","prevResult","resultCount","textFilter","onSearchValueChange","searchValue","hideSearchButtons","count","btnClass","uiFindInputInputProps","compact","display","disabled","BreakableText","WORD_RX","wordRegexp","exec","match","LoadingIndicatorColorAnim","LoadingIndicator","LoadingIndicatorCentered","LoadingIndicatorSmall","centered","small","FALLBACK_TRACE_NAME","fetchedState","TraceName","typography","lg","TraceNameError","error","traceName","isErred","errorCssClass","titleStr","message","getTraceName","memoize","candidateSpan","allIDs","Set","thisRefLength","candidateRefLength","hasOwn","object","prototype","hasOwnProperty","call","createCache","limit","equals","entry","put","singletonCache","entries","cacheIndex","arr","fn","splice","unshift","pop","lruCache","createEqualsFn","basicEquals","deepObjects","deep","valueA","valueB","every","isANull","isBNull","aKeys","bKeys","equalityChecker","aKey","deepEquals","config","apply","deepFreeze","defineProperty","archiveEnabled","dependencies","dagMaxNumServices","menuEnabled","linkPatterns","menu","search","maxLookback","maxLimit","tracking","gaID","trackErrors","getConfigValue","path","defaultConfig","getParent","parentRef","parameterRegExp","getParamNames","str","names","replace","add","stringSupplant","encodeFn","processTemplate","template","parameters","createTestFunction","indexOf","identity","a","getParameterInArray","array","callTemplate","computeLinks","processTags","result","pattern","parameterValues","allParameters","parameter","currentSpan","getParameterInAncestor","processedLinks","encodeURIComponent","_uniq","filter","getTraceLinks","validKeys","includes","computeTraceLink","WeakMap","ExternalLinks","TracePageHeader","TracePageHeaderTitleRow","TracePageHeaderBack","TracePageHeaderTitleLink","TracePageHeaderDetailToggle","TracePageHeaderDetailToggleExpanded","TracePageHeaderTitle","TracePageHeaderTitleCollapsible","TracePageHeaderOverviewItems","TracePageHeaderOverviewItemValueDetail","TracePageHeaderOverviewItemValue","TracePageHeaderArchiveIcon","TracePageHeaderTraceId","HEADER_ITEMS","renderer","timeZone","dateStr","dateTimeFormat","defaultWithMS","_values","processes","p","_maxBy","canCollapse","hideMap","hideSummary","onSlimViewClicked","slimView","traceGraphView","summaryItems","DetailState","oldState","toggleTags","next","toggleProcess","toggleReferences","toggleWarnings","toggleStackTraces","toggleLogs","toggleLogItem","delete","getProcessServiceName","proc","getSpanId","getSpanName","getSpanDuration","getSpanTimestamp","getSpanProcessId","processID","getSpanReferenceByType","getSpanServiceName","childOfRef","filterSpansForText","leftBound","rightBound","extract","original","getTextFilterdSpansAsMap","matchingSpans","reduce","obj","textFilteredSpansMap","muted","TreeNode","static","child","walk","addChild","iterFunction","searchFunction","searchFn","getPath","findPath","currentNode","currentPath","attempt","nodeStack","actualDepth","nodeDepth","getTraceSpans","getTraceProcesses","getSpanWithProcess","getTraceSpansAsMap","getTraceSpanIdsAsTree","nodesById","spansById","root","parentID","comparator","nodeA","nodeB","sort","getTraceTimestamp","prevTimestamp","getTraceDuration","prevDuration","getParentSpan","tree","spanMap","spanA","spanB","numberSortComparator","itemA","itemB","getTraceServices","spanTree","services","DURATION_FORMATTERS","ms","targetDuration","moment","asMilliseconds","asSeconds","getDurationFormatterForTrace","totalDuration","getTraceSpansByHierarchyPosition","formatter","dir","selector","hierarchyPositionMap","collapsed","collapse","hiddenSpanIds","collapsedSpanId","id","interval","num","updatedSpan","deduplicateTags","spanTags","warningsHash","uniqueTags","t","values","orderTags","topPrefixes","orderedTags","tp","toLowerCase","bKey","startsWith","transformTraceData","traceEndTime","MAX_SAFE_INTEGER","spanIdCounts","idCount","_isEqual","svcCounts","tagsInfo","refSpan","numberOfSpans","filterSpans","includeFilters","excludeKeys","w","substr","isTextInFilters","filters","isTextInKeyValues","kvs","toString","getNonOverlappingDuration","ranges","acc","range","tail","prevStart","prevEnd","makeSpanMap","getSpan","parentId","parentIds","getStats","traceDuration","selfDuration","main","toFixedNoTrailingZeros","secondary","n","parseFloat","makeFrames","MutableDataFrame","Fields","FieldType","mode","meta","preferredVisualisationType","createTraceFrame","toSpanRow","parentSpanID","serviceTags","frame","custom","traceFormat","createTableFrame","instanceSettings","displayNameFromDS","internal","datasourceUid","uid","datasourceName","query","traceData","transformToTraceData","transformToJaeger","traceResponse","flags","total","offset","errors","exports","_extends","assign","source","_react2","_interopRequireDefault","_propTypes2","__esModule","default","IconBase","_ref","_ref2","_objectWithoutProperties","_ref2$reactIconBase","reactIconBase","computedSize","createElement","fill","preserveAspectRatio","verticalAlign","propTypes","string","oneOfType","contextTypes","shape","module","_reactIconBase2","viewBox","d","element","self","storeInstancesGlobally","directMap","sequenceLevels","resetTimer","ignoreNextKeyup","ignoreNextKeypress","nextExpectedAction","addEvents","instances","bindMultiple","unbind","reset","stopCallback","handleKey","bindSingle","getKeyInfo","pickBestAction","getReverseMap","getMatches","resetSequences","fireCallback","bindSequence","resetSequenceTimer","detach","REVERSE_MAP","on","eventHandler","callback","action","combinations","j","combo","increaseSequence","nextAction","callbackAndReset","characterFromEvent","setTimeout","wrappedCallback","combination","sequenceName","level","info","sequence","modifiers","seq","off","capture","attachEvent","detachEvent","srcElement","SPECIAL_ALIASES","SHIFT_MAP","isModifier","keysFromString","character","modifiersMatch","matches","code","deleteCombo","deleteSequence","SPECIAL_KEYS_MAP","ignoreThisKeypress","doNotReset","maxLevel","processedSequenceCallback","eventModifiers","which","keyCode","modifiers1","modifiers2","clearTimeout","activeSequences","tagName","isContentEditable","combokeys","SPECIAL_CHARACTERS_MAP","fromCharCode","returnValue","navigator","platform","cancelBubble","deselectCurrent","clipboardToIE11Formatting","debug","reselectPrevious","selection","mark","success","createRange","getSelection","textContent","all","clip","whiteSpace","webkitUserSelect","MozUserSelect","msUserSelect","format","clipboardData","clearData","setData","onCopy","appendChild","selectNodeContents","addRange","execCommand","err","copyKey","userAgent","prompt","removeRange","removeAllRanges","removeChild","o","freeze","getOwnPropertyNames","prop","isFrozen","fuzzy","simpleFilter","opts","ch","patternIdx","len","totalScore","currScore","pre","post","compareString","caseSensitive","idx","Infinity","rendered","score","prev","compare","INDENT","Stylize","styleFile","cssClass","objRule","rule","escape","doc","indent","out","visit","toISOString","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","location","propFullName","secret","getShim","isRequired","ReactPropTypes","bigint","bool","func","symbol","any","arrayOf","elementType","instanceOf","objectOf","oneOf","exact","checkPropTypes","PropTypes","rangeCount","active","activeElement","getRangeAt","toUpperCase","blur","focus"],"sourceRoot":""}