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6G,GAAG,IAAIxB,EAAEA,EAAEvE,MAAM+F,EAAE,IAAI,IAAI0hC,EAAEjkC,EAAE,WAAWwoC,EAAE,OAAOzrC,EAAEmE,GAAG+iC,EAAE/iC,EAAEH,GAAGL,KAAK1F,QAAQkG,GAAE,SAAUA,GAAG,OAAO+iC,EAAE/iC,EAAEH,OAAOwB,EAAh7D,GAAq7DkmC,EAAG,IAAIb,EAAGc,GAAGD,EAAGztC,QAAWytC,EAAGX,mBAAmBrgC,KAAKghC,GAAOA,EAAGP,cAAczgC,KAAKghC,GAAOA,EAAGT,cAAcvgC,KAAKghC,GAAOA,EAAGJ,aAAa5gC,KAAKghC,GAAOA,EAAGN,YAAY1gC,KAAKghC,GAAOA,EAAGL,YAAY3gC,KAAKghC,GAAI","sources":["webpack://grafana/./public/app/features/explore/ExploreActions.tsx","webpack://grafana/./public/app/features/explore/ExploreGraph.tsx","webpack://grafana/./public/app/features/explore/exploreGraphStyleUtils.ts","webpack://grafana/./public/app/features/explore/ExploreGraphLabel.tsx","webpack://grafana/./.yarn/__virtual__/re-resizable-virtual-3cca0dab2b/3/opt/drone/yarncache/re-resizable-npm-6.9.9-2a772ae568-a2c8bfe866.zip/node_modules/re-resizable/lib/resizer.js","webpack://grafana/./.yarn/__virtual__/re-resizable-virtual-3cca0dab2b/3/opt/drone/yarncache/re-resizable-npm-6.9.9-2a772ae568-a2c8bfe866.zip/node_modules/re-resizable/lib/index.js","webpack://grafana/./public/app/features/explore/ExploreDrawer.tsx","webpack://grafana/./public/app/features/explore/ExploreQueryInspector.tsx","webpack://grafana/./public/app/features/explore/TimeSyncButton.tsx","webpack://grafana/./public/app/features/explore/ExploreTimeControls.tsx","webpack://grafana/./public/app/features/explore/LiveTailButton.tsx","webpack://grafana/./public/app/features/explore/useLiveTailControls.ts","webpack://grafana/./public/app/features/explore/ExploreToolbar.tsx","webpack://grafana/./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useInterval.js","webpack://grafana/./public/app/features/explore/Time.tsx","webpack://grafana/./public/app/features/explore/ElapsedTime.tsx","webpack://grafana/./public/app/features/explore/LiveLogs.tsx","webpack://grafana/./public/app/features/explore/MetaInfoText.tsx","webpack://grafana/./public/app/features/explore/LogsMetaRow.tsx","webpack://grafana/./public/app/features/explore/LogsNavigationPages.tsx","webpack://grafana/./public/app/features/explore/LogsNavigation.tsx","webpack://grafana/./public/app/features/explore/Logs.tsx","webpack://grafana/./public/app/features/explore/utils/LogsCrossFadeTransition.tsx","webpack://grafana/./public/app/features/explore/LogsContainer.tsx","webpack://grafana/./public/app/features/explore/LogsVolumePanel.tsx","webpack://grafana/./public/app/features/explore/NoData.tsx","webpack://grafana/./public/app/features/explore/NoDataSourceCallToAction.tsx","webpack://grafana/./public/app/features/explore/NodeGraphContainer.tsx","webpack://grafana/./public/app/features/explore/QueryRows.tsx","webpack://grafana/./public/app/core/components/Animations/FadeIn.tsx","webpack://grafana/./public/app/features/explore/ErrorContainer.tsx","webpack://grafana/./public/app/features/explore/ResponseErrorContainer.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistoryCard.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistoryQueriesTab.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistorySettingsTab.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistoryStarredTab.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistory.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistoryContainer.tsx","webpack://grafana/./public/app/features/explore/SecondaryActions.tsx","webpack://grafana/./public/app/features/explore/TableContainer.tsx","webpack://grafana/./public/app/features/explore/TraceView/TraceViewContainer.tsx","webpack://grafana/./public/app/features/explore/Explore.tsx","webpack://grafana/./public/app/features/explore/ExplorePaneContainer.tsx","webpack://grafana/./public/app/features/explore/Wrapper.tsx","webpack://grafana/./public/app/features/explore/state/selectors.ts","webpack://grafana/./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/usePrevious.js","webpack://grafana/../../opt/drone/yarncache/immer-npm-9.0.14-0baed19a8d-17f1365c06.zip/node_modules/immer/dist/immer.esm.mjs"],"sourcesContent":["import { useRegisterActions, useKBar, Action, Priority } from 'kbar';\nimport { FC, useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { ExploreId } from 'app/types';\n\nimport { splitOpen, splitClose } from './state/main';\nimport { runQueries } from './state/query';\nimport { isSplit } from './state/selectors';\n\ninterface Props {\n exploreIdLeft: ExploreId;\n exploreIdRight?: ExploreId;\n}\n\nexport const ExploreActions: FC<Props> = ({ exploreIdLeft, exploreIdRight }: Props) => {\n const [actions, setActions] = useState<Action[]>([]);\n const { query } = useKBar();\n const dispatch = useDispatch();\n const splitted = useSelector(isSplit);\n\n useEffect(() => {\n const exploreSection = {\n name: 'Explore',\n priority: Priority.HIGH + 1,\n };\n\n const actionsArr: Action[] = [];\n\n if (splitted) {\n actionsArr.push({\n id: 'explore/run-query-left',\n name: 'Run query (left)',\n keywords: 'query left',\n perform: () => {\n dispatch(runQueries(exploreIdLeft));\n },\n section: exploreSection,\n });\n if (exploreIdRight) {\n // we should always have the right exploreId if split\n actionsArr.push({\n id: 'explore/run-query-right',\n name: 'Run query (right)',\n keywords: 'query right',\n perform: () => {\n dispatch(runQueries(exploreIdRight));\n },\n section: exploreSection,\n });\n actionsArr.push({\n id: 'explore/split-view-close-left',\n name: 'Close split view left',\n keywords: 'split',\n perform: () => {\n dispatch(splitClose(exploreIdLeft));\n },\n section: exploreSection,\n });\n actionsArr.push({\n id: 'explore/split-view-close-right',\n name: 'Close split view right',\n keywords: 'split',\n perform: () => {\n dispatch(splitClose(exploreIdRight));\n },\n section: exploreSection,\n });\n }\n } else {\n actionsArr.push({\n id: 'explore/run-query',\n name: 'Run query',\n keywords: 'query',\n perform: () => {\n dispatch(runQueries(exploreIdLeft));\n },\n section: exploreSection,\n });\n actionsArr.push({\n id: 'explore/split-view-open',\n name: 'Open split view',\n keywords: 'split',\n perform: () => {\n dispatch(splitOpen());\n },\n section: exploreSection,\n });\n }\n setActions(actionsArr);\n }, [exploreIdLeft, exploreIdRight, splitted, query, dispatch]);\n\n useRegisterActions(!query ? [] : actions, [actions, query]);\n\n return null;\n};\n","import { css, cx } from '@emotion/css';\nimport { identity } from 'lodash';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { usePrevious } from 'react-use';\n\nimport {\n AbsoluteTimeRange,\n applyFieldOverrides,\n compareArrayValues,\n compareDataFrameStructures,\n createFieldConfigRegistry,\n DataFrame,\n dateTime,\n FieldColorModeId,\n FieldConfigSource,\n getFrameDisplayName,\n GrafanaTheme2,\n LoadingState,\n SplitOpen,\n TimeZone,\n} from '@grafana/data';\nimport { PanelRenderer } from '@grafana/runtime';\nimport { GraphDrawStyle, LegendDisplayMode, TooltipDisplayMode, SortOrder } from '@grafana/schema';\nimport {\n Icon,\n PanelContext,\n PanelContextProvider,\n SeriesVisibilityChangeMode,\n useStyles2,\n useTheme2,\n} from '@grafana/ui';\nimport appEvents from 'app/core/app_events';\nimport { defaultGraphConfig, getGraphFieldConfig } from 'app/plugins/panel/timeseries/config';\nimport { TimeSeriesOptions } from 'app/plugins/panel/timeseries/types';\n\nimport { ExploreGraphStyle } from '../../types';\nimport { seriesVisibilityConfigFactory } from '../dashboard/dashgrid/SeriesVisibilityConfigFactory';\n\nimport { applyGraphStyle } from './exploreGraphStyleUtils';\n\nconst MAX_NUMBER_OF_TIME_SERIES = 20;\n\ninterface Props {\n data: DataFrame[];\n height: number;\n width: number;\n absoluteRange: AbsoluteTimeRange;\n timeZone: TimeZone;\n loadingState: LoadingState;\n annotations?: DataFrame[];\n onHiddenSeriesChanged?: (hiddenSeries: string[]) => void;\n tooltipDisplayMode?: TooltipDisplayMode;\n splitOpenFn?: SplitOpen;\n onChangeTime: (timeRange: AbsoluteTimeRange) => void;\n graphStyle: ExploreGraphStyle;\n}\n\nexport function ExploreGraph({\n data,\n height,\n width,\n timeZone,\n absoluteRange,\n onChangeTime,\n loadingState,\n annotations,\n onHiddenSeriesChanged,\n splitOpenFn,\n graphStyle,\n tooltipDisplayMode = TooltipDisplayMode.Single,\n}: Props) {\n const theme = useTheme2();\n const [showAllTimeSeries, setShowAllTimeSeries] = useState(false);\n const [baseStructureRev, setBaseStructureRev] = useState(1);\n\n const previousData = usePrevious(data);\n const structureChangesRef = useRef(0);\n\n if (data && previousData && !compareArrayValues(previousData, data, compareDataFrameStructures)) {\n structureChangesRef.current++;\n }\n\n const structureRev = baseStructureRev + structureChangesRef.current;\n\n const [fieldConfig, setFieldConfig] = useState<FieldConfigSource>({\n defaults: {\n color: {\n mode: FieldColorModeId.PaletteClassic,\n },\n custom: {\n drawStyle: GraphDrawStyle.Line,\n fillOpacity: 0,\n pointSize: 5,\n },\n },\n overrides: [],\n });\n\n const style = useStyles2(getStyles);\n const timeRange = {\n from: dateTime(absoluteRange.from),\n to: dateTime(absoluteRange.to),\n raw: {\n from: dateTime(absoluteRange.from),\n to: dateTime(absoluteRange.to),\n },\n };\n\n const dataWithConfig = useMemo(() => {\n const registry = createFieldConfigRegistry(getGraphFieldConfig(defaultGraphConfig), 'Explore');\n const styledFieldConfig = applyGraphStyle(fieldConfig, graphStyle);\n return applyFieldOverrides({\n fieldConfig: styledFieldConfig,\n data,\n timeZone,\n replaceVariables: (value) => value, // We don't need proper replace here as it is only used in getLinks and we use getFieldLinks\n theme,\n fieldConfigRegistry: registry,\n });\n }, [fieldConfig, graphStyle, data, timeZone, theme]);\n\n useEffect(() => {\n if (onHiddenSeriesChanged) {\n const hiddenFrames: string[] = [];\n dataWithConfig.forEach((frame) => {\n const allFieldsHidden = frame.fields.map((field) => field.config?.custom?.hideFrom?.viz).every(identity);\n if (allFieldsHidden) {\n hiddenFrames.push(getFrameDisplayName(frame));\n }\n });\n onHiddenSeriesChanged(hiddenFrames);\n }\n }, [dataWithConfig, onHiddenSeriesChanged]);\n\n const seriesToShow = showAllTimeSeries ? dataWithConfig : dataWithConfig.slice(0, MAX_NUMBER_OF_TIME_SERIES);\n\n const panelContext: PanelContext = {\n eventBus: appEvents,\n onSplitOpen: splitOpenFn,\n onToggleSeriesVisibility(label: string, mode: SeriesVisibilityChangeMode) {\n setBaseStructureRev((r) => r + 1);\n setFieldConfig(seriesVisibilityConfigFactory(label, mode, fieldConfig, data));\n },\n };\n\n return (\n <PanelContextProvider value={panelContext}>\n {dataWithConfig.length > MAX_NUMBER_OF_TIME_SERIES && !showAllTimeSeries && (\n <div className={cx([style.timeSeriesDisclaimer])}>\n <Icon className={style.disclaimerIcon} name=\"exclamation-triangle\" />\n {`Showing only ${MAX_NUMBER_OF_TIME_SERIES} time series. `}\n <span\n className={cx([style.showAllTimeSeries])}\n onClick={() => {\n structureChangesRef.current++;\n setShowAllTimeSeries(true);\n }}\n >{`Show all ${dataWithConfig.length}`}</span>\n </div>\n )}\n <PanelRenderer\n data={{ series: seriesToShow, timeRange, structureRev, state: loadingState, annotations }}\n pluginId=\"timeseries\"\n title=\"\"\n width={width}\n height={height}\n onChangeTimeRange={onChangeTime}\n timeZone={timeZone}\n options={\n {\n tooltip: { mode: tooltipDisplayMode, sort: SortOrder.None },\n legend: { displayMode: LegendDisplayMode.List, placement: 'bottom', calcs: [] },\n } as TimeSeriesOptions\n }\n />\n </PanelContextProvider>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n timeSeriesDisclaimer: css`\n label: time-series-disclaimer;\n width: 300px;\n margin: ${theme.spacing(1)} auto;\n padding: 10px 0;\n border-radius: ${theme.spacing(2)};\n text-align: center;\n background-color: ${theme.colors.background.primary};\n `,\n disclaimerIcon: css`\n label: disclaimer-icon;\n color: ${theme.colors.warning.main};\n margin-right: ${theme.spacing(0.5)};\n `,\n showAllTimeSeries: css`\n label: show-all-time-series;\n cursor: pointer;\n color: ${theme.colors.text.link};\n `,\n});\n","import produce from 'immer';\n\nimport { FieldConfigSource } from '@grafana/data';\nimport { GraphDrawStyle, GraphFieldConfig, StackingMode } from '@grafana/schema';\n\nimport { ExploreGraphStyle } from '../../types';\n\nexport type FieldConfig = FieldConfigSource<GraphFieldConfig>;\n\nexport function applyGraphStyle(config: FieldConfig, style: ExploreGraphStyle): FieldConfig {\n return produce(config, (draft) => {\n if (draft.defaults.custom === undefined) {\n draft.defaults.custom = {};\n }\n\n const { custom } = draft.defaults;\n\n if (custom.stacking === undefined) {\n custom.stacking = { group: 'A' };\n }\n\n switch (style) {\n case 'lines':\n custom.drawStyle = GraphDrawStyle.Line;\n custom.stacking.mode = StackingMode.None;\n custom.fillOpacity = 0;\n break;\n case 'bars':\n custom.drawStyle = GraphDrawStyle.Bars;\n custom.stacking.mode = StackingMode.None;\n custom.fillOpacity = 100;\n break;\n case 'points':\n custom.drawStyle = GraphDrawStyle.Points;\n custom.stacking.mode = StackingMode.None;\n custom.fillOpacity = 0;\n break;\n case 'stacked_lines':\n custom.drawStyle = GraphDrawStyle.Line;\n custom.stacking.mode = StackingMode.Normal;\n custom.fillOpacity = 100;\n break;\n case 'stacked_bars':\n custom.drawStyle = GraphDrawStyle.Bars;\n custom.stacking.mode = StackingMode.Normal;\n custom.fillOpacity = 100;\n break;\n default: {\n // should never happen\n // NOTE: casting to `never` will cause typescript\n // to verify that the switch statement checks every possible\n // enum-value\n const invalidValue: never = style;\n throw new Error(`Invalid graph-style: ${invalidValue}`);\n }\n }\n });\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { SelectableValue } from '@grafana/data';\nimport { RadioButtonGroup } from '@grafana/ui';\n\nimport { EXPLORE_GRAPH_STYLES, ExploreGraphStyle } from '../../types';\n\nconst ALL_GRAPH_STYLE_OPTIONS: Array<SelectableValue<ExploreGraphStyle>> = EXPLORE_GRAPH_STYLES.map((style) => ({\n value: style,\n // capital-case it and switch `_` to ` `\n label: style[0].toUpperCase() + style.slice(1).replace(/_/, ' '),\n}));\n\nconst spacing = css({\n display: 'flex',\n justifyContent: 'space-between',\n});\n\ntype Props = {\n graphStyle: ExploreGraphStyle;\n onChangeGraphStyle: (style: ExploreGraphStyle) => void;\n};\n\nexport function ExploreGraphLabel(props: Props) {\n const { graphStyle, onChangeGraphStyle } = props;\n return (\n <div className={spacing}>\n Graph\n <RadioButtonGroup size=\"sm\" options={ALL_GRAPH_STYLE_OPTIONS} value={graphStyle} onChange={onChangeGraphStyle} />\n </div>\n );\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nvar rowSizeBase = {\n width: '100%',\n height: '10px',\n top: '0px',\n left: '0px',\n cursor: 'row-resize',\n};\nvar colSizeBase = {\n width: '10px',\n height: '100%',\n top: '0px',\n left: '0px',\n cursor: 'col-resize',\n};\nvar edgeBase = {\n width: '20px',\n height: '20px',\n position: 'absolute',\n};\nvar styles = {\n top: __assign(__assign({}, rowSizeBase), { top: '-5px' }),\n right: __assign(__assign({}, colSizeBase), { left: undefined, right: '-5px' }),\n bottom: __assign(__assign({}, rowSizeBase), { top: undefined, bottom: '-5px' }),\n left: __assign(__assign({}, colSizeBase), { left: '-5px' }),\n topRight: __assign(__assign({}, edgeBase), { right: '-10px', top: '-10px', cursor: 'ne-resize' }),\n bottomRight: __assign(__assign({}, edgeBase), { right: '-10px', bottom: '-10px', cursor: 'se-resize' }),\n bottomLeft: __assign(__assign({}, edgeBase), { left: '-10px', bottom: '-10px', cursor: 'sw-resize' }),\n topLeft: __assign(__assign({}, edgeBase), { left: '-10px', top: '-10px', cursor: 'nw-resize' }),\n};\nvar Resizer = /** @class */ (function (_super) {\n __extends(Resizer, _super);\n function Resizer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.onMouseDown = function (e) {\n _this.props.onResizeStart(e, _this.props.direction);\n };\n _this.onTouchStart = function (e) {\n _this.props.onResizeStart(e, _this.props.direction);\n };\n return _this;\n }\n Resizer.prototype.render = function () {\n return (React.createElement(\"div\", { className: this.props.className || '', style: __assign(__assign({ position: 'absolute', userSelect: 'none' }, styles[this.props.direction]), (this.props.replaceStyles || {})), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children));\n };\n return Resizer;\n}(React.PureComponent));\nexport { Resizer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport { flushSync } from 'react-dom';\nimport { Resizer } from './resizer';\nvar DEFAULT_SIZE = {\n width: 'auto',\n height: 'auto',\n};\nvar clamp = function (n, min, max) { return Math.max(Math.min(n, max), min); };\nvar snap = function (n, size) { return Math.round(n / size) * size; };\nvar hasDirection = function (dir, target) {\n return new RegExp(dir, 'i').test(target);\n};\n// INFO: In case of window is a Proxy and does not porxy Events correctly, use isTouchEvent & isMouseEvent to distinguish event type instead of `instanceof`.\nvar isTouchEvent = function (event) {\n return Boolean(event.touches && event.touches.length);\n};\nvar isMouseEvent = function (event) {\n return Boolean((event.clientX || event.clientX === 0) &&\n (event.clientY || event.clientY === 0));\n};\nvar findClosestSnap = function (n, snapArray, snapGap) {\n if (snapGap === void 0) { snapGap = 0; }\n var closestGapIndex = snapArray.reduce(function (prev, curr, index) { return (Math.abs(curr - n) < Math.abs(snapArray[prev] - n) ? index : prev); }, 0);\n var gap = Math.abs(snapArray[closestGapIndex] - n);\n return snapGap === 0 || gap < snapGap ? snapArray[closestGapIndex] : n;\n};\nvar getStringSize = function (n) {\n n = n.toString();\n if (n === 'auto') {\n return n;\n }\n if (n.endsWith('px')) {\n return n;\n }\n if (n.endsWith('%')) {\n return n;\n }\n if (n.endsWith('vh')) {\n return n;\n }\n if (n.endsWith('vw')) {\n return n;\n }\n if (n.endsWith('vmax')) {\n return n;\n }\n if (n.endsWith('vmin')) {\n return n;\n }\n return n + \"px\";\n};\nvar getPixelSize = function (size, parentSize, innerWidth, innerHeight) {\n if (size && typeof size === 'string') {\n if (size.endsWith('px')) {\n return Number(size.replace('px', ''));\n }\n if (size.endsWith('%')) {\n var ratio = Number(size.replace('%', '')) / 100;\n return parentSize * ratio;\n }\n if (size.endsWith('vw')) {\n var ratio = Number(size.replace('vw', '')) / 100;\n return innerWidth * ratio;\n }\n if (size.endsWith('vh')) {\n var ratio = Number(size.replace('vh', '')) / 100;\n return innerHeight * ratio;\n }\n }\n return size;\n};\nvar calculateNewMax = function (parentSize, innerWidth, innerHeight, maxWidth, maxHeight, minWidth, minHeight) {\n maxWidth = getPixelSize(maxWidth, parentSize.width, innerWidth, innerHeight);\n maxHeight = getPixelSize(maxHeight, parentSize.height, innerWidth, innerHeight);\n minWidth = getPixelSize(minWidth, parentSize.width, innerWidth, innerHeight);\n minHeight = getPixelSize(minHeight, parentSize.height, innerWidth, innerHeight);\n return {\n maxWidth: typeof maxWidth === 'undefined' ? undefined : Number(maxWidth),\n maxHeight: typeof maxHeight === 'undefined' ? undefined : Number(maxHeight),\n minWidth: typeof minWidth === 'undefined' ? undefined : Number(minWidth),\n minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight),\n };\n};\nvar definedProps = [\n 'as',\n 'style',\n 'className',\n 'grid',\n 'snap',\n 'bounds',\n 'boundsByDirection',\n 'size',\n 'defaultSize',\n 'minWidth',\n 'minHeight',\n 'maxWidth',\n 'maxHeight',\n 'lockAspectRatio',\n 'lockAspectRatioExtraWidth',\n 'lockAspectRatioExtraHeight',\n 'enable',\n 'handleStyles',\n 'handleClasses',\n 'handleWrapperStyle',\n 'handleWrapperClass',\n 'children',\n 'onResizeStart',\n 'onResize',\n 'onResizeStop',\n 'handleComponent',\n 'scale',\n 'resizeRatio',\n 'snapGap',\n];\n// HACK: This class is used to calculate % size.\nvar baseClassName = '__resizable_base__';\nvar Resizable = /** @class */ (function (_super) {\n __extends(Resizable, _super);\n function Resizable(props) {\n var _this = _super.call(this, props) || this;\n _this.ratio = 1;\n _this.resizable = null;\n // For parent boundary\n _this.parentLeft = 0;\n _this.parentTop = 0;\n // For boundary\n _this.resizableLeft = 0;\n _this.resizableRight = 0;\n _this.resizableTop = 0;\n _this.resizableBottom = 0;\n // For target boundary\n _this.targetLeft = 0;\n _this.targetTop = 0;\n _this.appendBase = function () {\n if (!_this.resizable || !_this.window) {\n return null;\n }\n var parent = _this.parentNode;\n if (!parent) {\n return null;\n }\n var element = _this.window.document.createElement('div');\n element.style.width = '100%';\n element.style.height = '100%';\n element.style.position = 'absolute';\n element.style.transform = 'scale(0, 0)';\n element.style.left = '0';\n element.style.flex = '0 0 100%';\n if (element.classList) {\n element.classList.add(baseClassName);\n }\n else {\n element.className += baseClassName;\n }\n parent.appendChild(element);\n return element;\n };\n _this.removeBase = function (base) {\n var parent = _this.parentNode;\n if (!parent) {\n return;\n }\n parent.removeChild(base);\n };\n _this.ref = function (c) {\n if (c) {\n _this.resizable = c;\n }\n };\n _this.state = {\n isResizing: false,\n width: typeof (_this.propsSize && _this.propsSize.width) === 'undefined'\n ? 'auto'\n : _this.propsSize && _this.propsSize.width,\n height: typeof (_this.propsSize && _this.propsSize.height) === 'undefined'\n ? 'auto'\n : _this.propsSize && _this.propsSize.height,\n direction: 'right',\n original: {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n },\n backgroundStyle: {\n height: '100%',\n width: '100%',\n backgroundColor: 'rgba(0,0,0,0)',\n cursor: 'auto',\n opacity: 0,\n position: 'fixed',\n zIndex: 9999,\n top: '0',\n left: '0',\n bottom: '0',\n right: '0',\n },\n flexBasis: undefined,\n };\n _this.onResizeStart = _this.onResizeStart.bind(_this);\n _this.onMouseMove = _this.onMouseMove.bind(_this);\n _this.onMouseUp = _this.onMouseUp.bind(_this);\n return _this;\n }\n Object.defineProperty(Resizable.prototype, \"parentNode\", {\n get: function () {\n if (!this.resizable) {\n return null;\n }\n return this.resizable.parentNode;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Resizable.prototype, \"window\", {\n get: function () {\n if (!this.resizable) {\n return null;\n }\n if (!this.resizable.ownerDocument) {\n return null;\n }\n return this.resizable.ownerDocument.defaultView;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Resizable.prototype, \"propsSize\", {\n get: function () {\n return this.props.size || this.props.defaultSize || DEFAULT_SIZE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Resizable.prototype, \"size\", {\n get: function () {\n var width = 0;\n var height = 0;\n if (this.resizable && this.window) {\n var orgWidth = this.resizable.offsetWidth;\n var orgHeight = this.resizable.offsetHeight;\n // HACK: Set position `relative` to get parent size.\n // This is because when re-resizable set `absolute`, I can not get base width correctly.\n var orgPosition = this.resizable.style.position;\n if (orgPosition !== 'relative') {\n this.resizable.style.position = 'relative';\n }\n // INFO: Use original width or height if set auto.\n width = this.resizable.style.width !== 'auto' ? this.resizable.offsetWidth : orgWidth;\n height = this.resizable.style.height !== 'auto' ? this.resizable.offsetHeight : orgHeight;\n // Restore original position\n this.resizable.style.position = orgPosition;\n }\n return { width: width, height: height };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Resizable.prototype, \"sizeStyle\", {\n get: function () {\n var _this = this;\n var size = this.props.size;\n var getSize = function (key) {\n if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') {\n return 'auto';\n }\n if (_this.propsSize && _this.propsSize[key] && _this.propsSize[key].toString().endsWith('%')) {\n if (_this.state[key].toString().endsWith('%')) {\n return _this.state[key].toString();\n }\n var parentSize = _this.getParentSize();\n var value = Number(_this.state[key].toString().replace('px', ''));\n var percent = (value / parentSize[key]) * 100;\n return percent + \"%\";\n }\n return getStringSize(_this.state[key]);\n };\n var width = size && typeof size.width !== 'undefined' && !this.state.isResizing\n ? getStringSize(size.width)\n : getSize('width');\n var height = size && typeof size.height !== 'undefined' && !this.state.isResizing\n ? getStringSize(size.height)\n : getSize('height');\n return { width: width, height: height };\n },\n enumerable: false,\n configurable: true\n });\n Resizable.prototype.getParentSize = function () {\n if (!this.parentNode) {\n if (!this.window) {\n return { width: 0, height: 0 };\n }\n return { width: this.window.innerWidth, height: this.window.innerHeight };\n }\n var base = this.appendBase();\n if (!base) {\n return { width: 0, height: 0 };\n }\n // INFO: To calculate parent width with flex layout\n var wrapChanged = false;\n var wrap = this.parentNode.style.flexWrap;\n if (wrap !== 'wrap') {\n wrapChanged = true;\n this.parentNode.style.flexWrap = 'wrap';\n // HACK: Use relative to get parent padding size\n }\n base.style.position = 'relative';\n base.style.minWidth = '100%';\n base.style.minHeight = '100%';\n var size = {\n width: base.offsetWidth,\n height: base.offsetHeight,\n };\n if (wrapChanged) {\n this.parentNode.style.flexWrap = wrap;\n }\n this.removeBase(base);\n return size;\n };\n Resizable.prototype.bindEvents = function () {\n if (this.window) {\n this.window.addEventListener('mouseup', this.onMouseUp);\n this.window.addEventListener('mousemove', this.onMouseMove);\n this.window.addEventListener('mouseleave', this.onMouseUp);\n this.window.addEventListener('touchmove', this.onMouseMove, {\n capture: true,\n passive: false,\n });\n this.window.addEventListener('touchend', this.onMouseUp);\n }\n };\n Resizable.prototype.unbindEvents = function () {\n if (this.window) {\n this.window.removeEventListener('mouseup', this.onMouseUp);\n this.window.removeEventListener('mousemove', this.onMouseMove);\n this.window.removeEventListener('mouseleave', this.onMouseUp);\n this.window.removeEventListener('touchmove', this.onMouseMove, true);\n this.window.removeEventListener('touchend', this.onMouseUp);\n }\n };\n Resizable.prototype.componentDidMount = function () {\n if (!this.resizable || !this.window) {\n return;\n }\n var computedStyle = this.window.getComputedStyle(this.resizable);\n this.setState({\n width: this.state.width || this.size.width,\n height: this.state.height || this.size.height,\n flexBasis: computedStyle.flexBasis !== 'auto' ? computedStyle.flexBasis : undefined,\n });\n };\n Resizable.prototype.componentWillUnmount = function () {\n if (this.window) {\n this.unbindEvents();\n }\n };\n Resizable.prototype.createSizeForCssProperty = function (newSize, kind) {\n var propsSize = this.propsSize && this.propsSize[kind];\n return this.state[kind] === 'auto' &&\n this.state.original[kind] === newSize &&\n (typeof propsSize === 'undefined' || propsSize === 'auto')\n ? 'auto'\n : newSize;\n };\n Resizable.prototype.calculateNewMaxFromBoundary = function (maxWidth, maxHeight) {\n var boundsByDirection = this.props.boundsByDirection;\n var direction = this.state.direction;\n var widthByDirection = boundsByDirection && hasDirection('left', direction);\n var heightByDirection = boundsByDirection && hasDirection('top', direction);\n var boundWidth;\n var boundHeight;\n if (this.props.bounds === 'parent') {\n var parent_1 = this.parentNode;\n if (parent_1) {\n boundWidth = widthByDirection\n ? this.resizableRight - this.parentLeft\n : parent_1.offsetWidth + (this.parentLeft - this.resizableLeft);\n boundHeight = heightByDirection\n ? this.resizableBottom - this.parentTop\n : parent_1.offsetHeight + (this.parentTop - this.resizableTop);\n }\n }\n else if (this.props.bounds === 'window') {\n if (this.window) {\n boundWidth = widthByDirection ? this.resizableRight : this.window.innerWidth - this.resizableLeft;\n boundHeight = heightByDirection ? this.resizableBottom : this.window.innerHeight - this.resizableTop;\n }\n }\n else if (this.props.bounds) {\n boundWidth = widthByDirection\n ? this.resizableRight - this.targetLeft\n : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft);\n boundHeight = heightByDirection\n ? this.resizableBottom - this.targetTop\n : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop);\n }\n if (boundWidth && Number.isFinite(boundWidth)) {\n maxWidth = maxWidth && maxWidth < boundWidth ? maxWidth : boundWidth;\n }\n if (boundHeight && Number.isFinite(boundHeight)) {\n maxHeight = maxHeight && maxHeight < boundHeight ? maxHeight : boundHeight;\n }\n return { maxWidth: maxWidth, maxHeight: maxHeight };\n };\n Resizable.prototype.calculateNewSizeFromDirection = function (clientX, clientY) {\n var scale = this.props.scale || 1;\n var resizeRatio = this.props.resizeRatio || 1;\n var _a = this.state, direction = _a.direction, original = _a.original;\n var _b = this.props, lockAspectRatio = _b.lockAspectRatio, lockAspectRatioExtraHeight = _b.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _b.lockAspectRatioExtraWidth;\n var newWidth = original.width;\n var newHeight = original.height;\n var extraHeight = lockAspectRatioExtraHeight || 0;\n var extraWidth = lockAspectRatioExtraWidth || 0;\n if (hasDirection('right', direction)) {\n newWidth = original.width + ((clientX - original.x) * resizeRatio) / scale;\n if (lockAspectRatio) {\n newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;\n }\n }\n if (hasDirection('left', direction)) {\n newWidth = original.width - ((clientX - original.x) * resizeRatio) / scale;\n if (lockAspectRatio) {\n newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;\n }\n }\n if (hasDirection('bottom', direction)) {\n newHeight = original.height + ((clientY - original.y) * resizeRatio) / scale;\n if (lockAspectRatio) {\n newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;\n }\n }\n if (hasDirection('top', direction)) {\n newHeight = original.height - ((clientY - original.y) * resizeRatio) / scale;\n if (lockAspectRatio) {\n newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;\n }\n }\n return { newWidth: newWidth, newHeight: newHeight };\n };\n Resizable.prototype.calculateNewSizeFromAspectRatio = function (newWidth, newHeight, max, min) {\n var _a = this.props, lockAspectRatio = _a.lockAspectRatio, lockAspectRatioExtraHeight = _a.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _a.lockAspectRatioExtraWidth;\n var computedMinWidth = typeof min.width === 'undefined' ? 10 : min.width;\n var computedMaxWidth = typeof max.width === 'undefined' || max.width < 0 ? newWidth : max.width;\n var computedMinHeight = typeof min.height === 'undefined' ? 10 : min.height;\n var computedMaxHeight = typeof max.height === 'undefined' || max.height < 0 ? newHeight : max.height;\n var extraHeight = lockAspectRatioExtraHeight || 0;\n var extraWidth = lockAspectRatioExtraWidth || 0;\n if (lockAspectRatio) {\n var extraMinWidth = (computedMinHeight - extraHeight) * this.ratio + extraWidth;\n var extraMaxWidth = (computedMaxHeight - extraHeight) * this.ratio + extraWidth;\n var extraMinHeight = (computedMinWidth - extraWidth) / this.ratio + extraHeight;\n var extraMaxHeight = (computedMaxWidth - extraWidth) / this.ratio + extraHeight;\n var lockedMinWidth = Math.max(computedMinWidth, extraMinWidth);\n var lockedMaxWidth = Math.min(computedMaxWidth, extraMaxWidth);\n var lockedMinHeight = Math.max(computedMinHeight, extraMinHeight);\n var lockedMaxHeight = Math.min(computedMaxHeight, extraMaxHeight);\n newWidth = clamp(newWidth, lockedMinWidth, lockedMaxWidth);\n newHeight = clamp(newHeight, lockedMinHeight, lockedMaxHeight);\n }\n else {\n newWidth = clamp(newWidth, computedMinWidth, computedMaxWidth);\n newHeight = clamp(newHeight, computedMinHeight, computedMaxHeight);\n }\n return { newWidth: newWidth, newHeight: newHeight };\n };\n Resizable.prototype.setBoundingClientRect = function () {\n // For parent boundary\n if (this.props.bounds === 'parent') {\n var parent_2 = this.parentNode;\n if (parent_2) {\n var parentRect = parent_2.getBoundingClientRect();\n this.parentLeft = parentRect.left;\n this.parentTop = parentRect.top;\n }\n }\n // For target(html element) boundary\n if (this.props.bounds && typeof this.props.bounds !== 'string') {\n var targetRect = this.props.bounds.getBoundingClientRect();\n this.targetLeft = targetRect.left;\n this.targetTop = targetRect.top;\n }\n // For boundary\n if (this.resizable) {\n var _a = this.resizable.getBoundingClientRect(), left = _a.left, top_1 = _a.top, right = _a.right, bottom = _a.bottom;\n this.resizableLeft = left;\n this.resizableRight = right;\n this.resizableTop = top_1;\n this.resizableBottom = bottom;\n }\n };\n Resizable.prototype.onResizeStart = function (event, direction) {\n if (!this.resizable || !this.window) {\n return;\n }\n var clientX = 0;\n var clientY = 0;\n if (event.nativeEvent && isMouseEvent(event.nativeEvent)) {\n clientX = event.nativeEvent.clientX;\n clientY = event.nativeEvent.clientY;\n }\n else if (event.nativeEvent && isTouchEvent(event.nativeEvent)) {\n clientX = event.nativeEvent.touches[0].clientX;\n clientY = event.nativeEvent.touches[0].clientY;\n }\n if (this.props.onResizeStart) {\n if (this.resizable) {\n var startResize = this.props.onResizeStart(event, direction, this.resizable);\n if (startResize === false) {\n return;\n }\n }\n }\n // Fix #168\n if (this.props.size) {\n if (typeof this.props.size.height !== 'undefined' && this.props.size.height !== this.state.height) {\n this.setState({ height: this.props.size.height });\n }\n if (typeof this.props.size.width !== 'undefined' && this.props.size.width !== this.state.width) {\n this.setState({ width: this.props.size.width });\n }\n }\n // For lockAspectRatio case\n this.ratio =\n typeof this.props.lockAspectRatio === 'number' ? this.props.lockAspectRatio : this.size.width / this.size.height;\n var flexBasis;\n var computedStyle = this.window.getComputedStyle(this.resizable);\n if (computedStyle.flexBasis !== 'auto') {\n var parent_3 = this.parentNode;\n if (parent_3) {\n var dir = this.window.getComputedStyle(parent_3).flexDirection;\n this.flexDir = dir.startsWith('row') ? 'row' : 'column';\n flexBasis = computedStyle.flexBasis;\n }\n }\n // For boundary\n this.setBoundingClientRect();\n this.bindEvents();\n var state = {\n original: {\n x: clientX,\n y: clientY,\n width: this.size.width,\n height: this.size.height,\n },\n isResizing: true,\n backgroundStyle: __assign(__assign({}, this.state.backgroundStyle), { cursor: this.window.getComputedStyle(event.target).cursor || 'auto' }),\n direction: direction,\n flexBasis: flexBasis,\n };\n this.setState(state);\n };\n Resizable.prototype.onMouseMove = function (event) {\n var _this = this;\n if (!this.state.isResizing || !this.resizable || !this.window) {\n return;\n }\n if (this.window.TouchEvent && isTouchEvent(event)) {\n try {\n event.preventDefault();\n event.stopPropagation();\n }\n catch (e) {\n // Ignore on fail\n }\n }\n var _a = this.props, maxWidth = _a.maxWidth, maxHeight = _a.maxHeight, minWidth = _a.minWidth, minHeight = _a.minHeight;\n var clientX = isTouchEvent(event) ? event.touches[0].clientX : event.clientX;\n var clientY = isTouchEvent(event) ? event.touches[0].clientY : event.clientY;\n var _b = this.state, direction = _b.direction, original = _b.original, width = _b.width, height = _b.height;\n var parentSize = this.getParentSize();\n var max = calculateNewMax(parentSize, this.window.innerWidth, this.window.innerHeight, maxWidth, maxHeight, minWidth, minHeight);\n maxWidth = max.maxWidth;\n maxHeight = max.maxHeight;\n minWidth = max.minWidth;\n minHeight = max.minHeight;\n // Calculate new size\n var _c = this.calculateNewSizeFromDirection(clientX, clientY), newHeight = _c.newHeight, newWidth = _c.newWidth;\n // Calculate max size from boundary settings\n var boundaryMax = this.calculateNewMaxFromBoundary(maxWidth, maxHeight);\n if (this.props.snap && this.props.snap.x) {\n newWidth = findClosestSnap(newWidth, this.props.snap.x, this.props.snapGap);\n }\n if (this.props.snap && this.props.snap.y) {\n newHeight = findClosestSnap(newHeight, this.props.snap.y, this.props.snapGap);\n }\n // Calculate new size from aspect ratio\n var newSize = this.calculateNewSizeFromAspectRatio(newWidth, newHeight, { width: boundaryMax.maxWidth, height: boundaryMax.maxHeight }, { width: minWidth, height: minHeight });\n newWidth = newSize.newWidth;\n newHeight = newSize.newHeight;\n if (this.props.grid) {\n var newGridWidth = snap(newWidth, this.props.grid[0]);\n var newGridHeight = snap(newHeight, this.props.grid[1]);\n var gap = this.props.snapGap || 0;\n newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;\n newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;\n }\n var delta = {\n width: newWidth - original.width,\n height: newHeight - original.height,\n };\n if (width && typeof width === 'string') {\n if (width.endsWith('%')) {\n var percent = (newWidth / parentSize.width) * 100;\n newWidth = percent + \"%\";\n }\n else if (width.endsWith('vw')) {\n var vw = (newWidth / this.window.innerWidth) * 100;\n newWidth = vw + \"vw\";\n }\n else if (width.endsWith('vh')) {\n var vh = (newWidth / this.window.innerHeight) * 100;\n newWidth = vh + \"vh\";\n }\n }\n if (height && typeof height === 'string') {\n if (height.endsWith('%')) {\n var percent = (newHeight / parentSize.height) * 100;\n newHeight = percent + \"%\";\n }\n else if (height.endsWith('vw')) {\n var vw = (newHeight / this.window.innerWidth) * 100;\n newHeight = vw + \"vw\";\n }\n else if (height.endsWith('vh')) {\n var vh = (newHeight / this.window.innerHeight) * 100;\n newHeight = vh + \"vh\";\n }\n }\n var newState = {\n width: this.createSizeForCssProperty(newWidth, 'width'),\n height: this.createSizeForCssProperty(newHeight, 'height'),\n };\n if (this.flexDir === 'row') {\n newState.flexBasis = newState.width;\n }\n else if (this.flexDir === 'column') {\n newState.flexBasis = newState.height;\n }\n // For v18, update state sync\n flushSync(function () {\n _this.setState(newState);\n });\n if (this.props.onResize) {\n this.props.onResize(event, direction, this.resizable, delta);\n }\n };\n Resizable.prototype.onMouseUp = function (event) {\n var _a = this.state, isResizing = _a.isResizing, direction = _a.direction, original = _a.original;\n if (!isResizing || !this.resizable) {\n return;\n }\n var delta = {\n width: this.size.width - original.width,\n height: this.size.height - original.height,\n };\n if (this.props.onResizeStop) {\n this.props.onResizeStop(event, direction, this.resizable, delta);\n }\n if (this.props.size) {\n this.setState(this.props.size);\n }\n this.unbindEvents();\n this.setState({\n isResizing: false,\n backgroundStyle: __assign(__assign({}, this.state.backgroundStyle), { cursor: 'auto' }),\n });\n };\n Resizable.prototype.updateSize = function (size) {\n this.setState({ width: size.width, height: size.height });\n };\n Resizable.prototype.renderResizer = function () {\n var _this = this;\n var _a = this.props, enable = _a.enable, handleStyles = _a.handleStyles, handleClasses = _a.handleClasses, handleWrapperStyle = _a.handleWrapperStyle, handleWrapperClass = _a.handleWrapperClass, handleComponent = _a.handleComponent;\n if (!enable) {\n return null;\n }\n var resizers = Object.keys(enable).map(function (dir) {\n if (enable[dir] !== false) {\n return (React.createElement(Resizer, { key: dir, direction: dir, onResizeStart: _this.onResizeStart, replaceStyles: handleStyles && handleStyles[dir], className: handleClasses && handleClasses[dir] }, handleComponent && handleComponent[dir] ? handleComponent[dir] : null));\n }\n return null;\n });\n // #93 Wrap the resize box in span (will not break 100% width/height)\n return (React.createElement(\"div\", { className: handleWrapperClass, style: handleWrapperStyle }, resizers));\n };\n Resizable.prototype.render = function () {\n var _this = this;\n var extendsProps = Object.keys(this.props).reduce(function (acc, key) {\n if (definedProps.indexOf(key) !== -1) {\n return acc;\n }\n acc[key] = _this.props[key];\n return acc;\n }, {});\n var style = __assign(__assign(__assign({ position: 'relative', userSelect: this.state.isResizing ? 'none' : 'auto' }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: 'border-box', flexShrink: 0 });\n if (this.state.flexBasis) {\n style.flexBasis = this.state.flexBasis;\n }\n var Wrapper = this.props.as || 'div';\n return (React.createElement(Wrapper, __assign({ ref: this.ref, style: style, className: this.props.className }, extendsProps),\n this.state.isResizing && React.createElement(\"div\", { style: this.state.backgroundStyle }),\n this.props.children,\n this.renderResizer()));\n };\n Resizable.defaultProps = {\n as: 'div',\n onResizeStart: function () { },\n onResize: function () { },\n onResizeStop: function () { },\n enable: {\n top: true,\n right: true,\n bottom: true,\n left: true,\n topRight: true,\n bottomRight: true,\n bottomLeft: true,\n topLeft: true,\n },\n style: {},\n grid: [1, 1],\n lockAspectRatio: false,\n lockAspectRatioExtraWidth: 0,\n lockAspectRatioExtraHeight: 0,\n scale: 1,\n resizeRatio: 1,\n snapGap: 0,\n };\n return Resizable;\n}(React.PureComponent));\nexport { Resizable };\n","// Libraries\nimport { css, cx, keyframes } from '@emotion/css';\nimport { Resizable, ResizeCallback } from 're-resizable';\nimport React from 'react';\n\n// Services & Utils\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { stylesFactory, useTheme2 } from '@grafana/ui';\n\n// Types\n\nconst drawerSlide = (theme: GrafanaTheme2) => keyframes`\n 0% {\n transform: translateY(${theme.components.horizontalDrawer.defaultHeight}px);\n }\n\n 100% {\n transform: translateY(0px);\n }\n`;\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n return {\n container: css`\n position: fixed !important;\n bottom: 0;\n background: ${theme.colors.background.primary};\n border-top: 1px solid ${theme.colors.border.weak};\n margin: ${theme.spacing(0, -2, 0, -2)};\n box-shadow: ${theme.shadows.z3};\n z-index: ${theme.zIndex.sidemenu};\n `,\n drawerActive: css`\n opacity: 1;\n animation: 0.5s ease-out ${drawerSlide(theme)};\n `,\n rzHandle: css`\n background: ${theme.colors.secondary.main};\n transition: 0.3s background ease-in-out;\n position: relative;\n width: 200px !important;\n height: 7px !important;\n left: calc(50% - 100px) !important;\n top: -4px !important;\n cursor: grab;\n border-radius: 4px;\n &:hover {\n background: ${theme.colors.secondary.shade};\n }\n `,\n };\n});\n\nexport interface Props {\n width: number;\n children: React.ReactNode;\n onResize?: ResizeCallback;\n}\n\nexport function ExploreDrawer(props: Props) {\n const { width, children, onResize } = props;\n const theme = useTheme2();\n const styles = getStyles(theme);\n const drawerWidth = `${width + 31.5}px`;\n\n return (\n <Resizable\n className={cx(styles.container, styles.drawerActive)}\n defaultSize={{ width: drawerWidth, height: `${theme.components.horizontalDrawer.defaultHeight}px` }}\n handleClasses={{ top: styles.rzHandle }}\n enable={{\n top: true,\n right: false,\n bottom: false,\n left: false,\n topRight: false,\n bottomRight: false,\n bottomLeft: false,\n topLeft: false,\n }}\n maxHeight=\"100vh\"\n maxWidth={drawerWidth}\n minWidth={drawerWidth}\n onResize={onResize}\n >\n {children}\n </Resizable>\n );\n}\n","import React from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { CoreApp, TimeZone } from '@grafana/data';\nimport { TabbedContainer, TabConfig } from '@grafana/ui';\nimport { ExploreDrawer } from 'app/features/explore/ExploreDrawer';\nimport { InspectDataTab } from 'app/features/inspector/InspectDataTab';\nimport { InspectErrorTab } from 'app/features/inspector/InspectErrorTab';\nimport { InspectJSONTab } from 'app/features/inspector/InspectJSONTab';\nimport { InspectStatsTab } from 'app/features/inspector/InspectStatsTab';\nimport { QueryInspector } from 'app/features/inspector/QueryInspector';\nimport { StoreState, ExploreItemState, ExploreId } from 'app/types';\n\nimport { runQueries } from './state/query';\n\ninterface DispatchProps {\n width: number;\n exploreId: ExploreId;\n timeZone: TimeZone;\n onClose: () => void;\n}\n\ntype Props = DispatchProps & ConnectedProps<typeof connector>;\n\nexport function ExploreQueryInspector(props: Props) {\n const { loading, width, onClose, queryResponse, timeZone } = props;\n const dataFrames = queryResponse?.series || [];\n const error = queryResponse?.error;\n\n const statsTab: TabConfig = {\n label: 'Stats',\n value: 'stats',\n icon: 'chart-line',\n content: <InspectStatsTab data={queryResponse!} timeZone={queryResponse?.request?.timezone as TimeZone} />,\n };\n\n const jsonTab: TabConfig = {\n label: 'JSON',\n value: 'json',\n icon: 'brackets-curly',\n content: <InspectJSONTab data={queryResponse} onClose={onClose} />,\n };\n\n const dataTab: TabConfig = {\n label: 'Data',\n value: 'data',\n icon: 'database',\n content: (\n <InspectDataTab\n data={dataFrames}\n isLoading={loading}\n options={{ withTransforms: false, withFieldConfig: false }}\n timeZone={timeZone}\n app={CoreApp.Explore}\n />\n ),\n };\n\n const queryTab: TabConfig = {\n label: 'Query',\n value: 'query',\n icon: 'info-circle',\n content: <QueryInspector data={dataFrames} onRefreshQuery={() => props.runQueries(props.exploreId)} />,\n };\n\n const tabs = [statsTab, queryTab, jsonTab, dataTab];\n if (error) {\n const errorTab: TabConfig = {\n label: 'Error',\n value: 'error',\n icon: 'exclamation-triangle',\n content: <InspectErrorTab error={error} />,\n };\n tabs.push(errorTab);\n }\n return (\n <ExploreDrawer width={width}>\n <TabbedContainer tabs={tabs} onClose={onClose} closeIconTooltip=\"Close query inspector\" />\n </ExploreDrawer>\n );\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: ExploreId }) {\n const explore = state.explore;\n const item: ExploreItemState = explore[exploreId]!;\n const { loading, queryResponse } = item;\n\n return {\n loading,\n queryResponse,\n };\n}\n\nconst mapDispatchToProps = {\n runQueries,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default connector(ExploreQueryInspector);\n","import React from 'react';\n\nimport { Tooltip, ToolbarButton } from '@grafana/ui';\n\ninterface TimeSyncButtonProps {\n isSynced: boolean;\n onClick: () => void;\n}\n\nexport function TimeSyncButton(props: TimeSyncButtonProps) {\n const { onClick, isSynced } = props;\n\n const syncTimesTooltip = () => {\n const { isSynced } = props;\n const tooltip = isSynced ? 'Unsync all views' : 'Sync all views to this time range';\n return <>{tooltip}</>;\n };\n\n return (\n <Tooltip content={syncTimesTooltip} placement=\"bottom\">\n <ToolbarButton\n icon=\"link\"\n variant={isSynced ? 'active' : 'default'}\n aria-label={isSynced ? 'Synced times' : 'Unsynced times'}\n onClick={onClick}\n />\n </Tooltip>\n );\n}\n","import React, { Component } from 'react';\n\nimport { TimeRange, TimeZone, RawTimeRange, dateTimeForTimeZone, dateMath } from '@grafana/data';\nimport { TimePickerWithHistory } from 'app/core/components/TimePicker/TimePickerWithHistory';\nimport { getShiftedTimeRange, getZoomedTimeRange } from 'app/core/utils/timePicker';\nimport { ExploreId } from 'app/types';\n\nimport { TimeSyncButton } from './TimeSyncButton';\n\nexport interface Props {\n exploreId: ExploreId;\n hideText?: boolean;\n range: TimeRange;\n timeZone: TimeZone;\n fiscalYearStartMonth: number;\n splitted: boolean;\n syncedTimes: boolean;\n onChangeTimeSync: () => void;\n onChangeTime: (range: RawTimeRange) => void;\n onChangeTimeZone: (timeZone: TimeZone) => void;\n onChangeFiscalYearStartMonth: (fiscalYearStartMonth: number) => void;\n}\n\nexport class ExploreTimeControls extends Component<Props> {\n onMoveTimePicker = (direction: number) => {\n const { range, onChangeTime, timeZone } = this.props;\n const { from, to } = getShiftedTimeRange(direction, range);\n const nextTimeRange = {\n from: dateTimeForTimeZone(timeZone, from),\n to: dateTimeForTimeZone(timeZone, to),\n };\n\n onChangeTime(nextTimeRange);\n };\n\n onMoveForward = () => this.onMoveTimePicker(1);\n onMoveBack = () => this.onMoveTimePicker(-1);\n\n onChangeTimePicker = (timeRange: TimeRange) => {\n const adjustedFrom = dateMath.isMathString(timeRange.raw.from) ? timeRange.raw.from : timeRange.from;\n const adjustedTo = dateMath.isMathString(timeRange.raw.to) ? timeRange.raw.to : timeRange.to;\n\n this.props.onChangeTime({\n from: adjustedFrom,\n to: adjustedTo,\n });\n };\n\n onZoom = () => {\n const { range, onChangeTime, timeZone } = this.props;\n const { from, to } = getZoomedTimeRange(range, 2);\n const nextTimeRange = {\n from: dateTimeForTimeZone(timeZone, from),\n to: dateTimeForTimeZone(timeZone, to),\n };\n\n onChangeTime(nextTimeRange);\n };\n\n render() {\n const {\n range,\n timeZone,\n fiscalYearStartMonth,\n splitted,\n syncedTimes,\n onChangeTimeSync,\n hideText,\n onChangeTimeZone,\n onChangeFiscalYearStartMonth,\n } = this.props;\n const timeSyncButton = splitted ? <TimeSyncButton onClick={onChangeTimeSync} isSynced={syncedTimes} /> : undefined;\n const timePickerCommonProps = {\n value: range,\n timeZone,\n fiscalYearStartMonth,\n onMoveBackward: this.onMoveBack,\n onMoveForward: this.onMoveForward,\n onZoom: this.onZoom,\n hideText,\n };\n\n return (\n <TimePickerWithHistory\n {...timePickerCommonProps}\n timeSyncButton={timeSyncButton}\n isSynced={syncedTimes}\n widthOverride={splitted ? window.innerWidth / 2 : undefined}\n onChange={this.onChangeTimePicker}\n onChangeTimeZone={onChangeTimeZone}\n onChangeFiscalYearStartMonth={onChangeFiscalYearStartMonth}\n />\n );\n }\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport { Tooltip, ButtonGroup, ToolbarButton } from '@grafana/ui';\n\ntype LiveTailButtonProps = {\n splitted: boolean;\n start: () => void;\n stop: () => void;\n pause: () => void;\n resume: () => void;\n isLive: boolean;\n isPaused: boolean;\n};\n\nexport function LiveTailButton(props: LiveTailButtonProps) {\n const { start, pause, resume, isLive, isPaused, stop, splitted } = props;\n const buttonVariant = isLive && !isPaused ? 'active' : 'default';\n const onClickMain = isLive ? (isPaused ? resume : pause) : start;\n\n return (\n <ButtonGroup>\n <Tooltip\n content={isLive && !isPaused ? <>Pause the live stream</> : <>Start live stream your logs</>}\n placement=\"bottom\"\n >\n <ToolbarButton\n iconOnly={splitted}\n variant={buttonVariant}\n icon={!isLive || isPaused ? 'play' : 'pause'}\n onClick={onClickMain}\n >\n {isLive && isPaused ? 'Paused' : 'Live'}\n </ToolbarButton>\n </Tooltip>\n\n <CSSTransition\n mountOnEnter={true}\n unmountOnExit={true}\n timeout={100}\n in={isLive}\n classNames={{\n enter: styles.stopButtonEnter,\n enterActive: styles.stopButtonEnterActive,\n exit: styles.stopButtonExit,\n exitActive: styles.stopButtonExitActive,\n }}\n >\n <Tooltip content={<>Stop and exit the live stream</>} placement=\"bottom\">\n <ToolbarButton variant={buttonVariant} onClick={stop} icon=\"square-shape\" />\n </Tooltip>\n </CSSTransition>\n </ButtonGroup>\n );\n}\n\nconst styles = {\n stopButtonEnter: css`\n label: stopButtonEnter;\n width: 0;\n opacity: 0;\n overflow: hidden;\n `,\n stopButtonEnterActive: css`\n label: stopButtonEnterActive;\n opacity: 1;\n width: 32px;\n `,\n stopButtonExit: css`\n label: stopButtonExit;\n width: 32px;\n opacity: 1;\n overflow: hidden;\n `,\n stopButtonExitActive: css`\n label: stopButtonExitActive;\n opacity: 0;\n width: 0;\n `,\n};\n","import React, { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { RefreshPicker } from '@grafana/ui';\n\nimport { ExploreId } from '../../types';\n\nimport { setPausedStateAction, runQueries } from './state/query';\nimport { changeRefreshInterval } from './state/time';\n\n/**\n * Hook that gives you all the functions needed to control the live tailing.\n */\nexport function useLiveTailControls(exploreId: ExploreId) {\n const dispatch = useDispatch();\n\n const pause = useCallback(() => {\n dispatch(setPausedStateAction({ exploreId, isPaused: true }));\n }, [exploreId, dispatch]);\n\n const resume = useCallback(() => {\n dispatch(setPausedStateAction({ exploreId, isPaused: false }));\n }, [exploreId, dispatch]);\n\n const stop = useCallback(() => {\n // We need to pause here first because there is transition where we are not live but live logs are still shown\n // to cross fade with the normal view. This will prevent reordering of the logs in the live view during the\n // transition.\n pause();\n\n // TODO referencing this from perspective of refresh picker when there is designated button for it now is not\n // great. Needs a bit of refactoring.\n dispatch(changeRefreshInterval(exploreId, RefreshPicker.offOption.value));\n dispatch(runQueries(exploreId));\n }, [exploreId, dispatch, pause]);\n\n const start = useCallback(() => {\n dispatch(changeRefreshInterval(exploreId, RefreshPicker.liveOption.value));\n }, [exploreId, dispatch]);\n\n return {\n pause,\n resume,\n stop,\n start,\n };\n}\n\ntype Props = {\n exploreId: ExploreId;\n children: (controls: ReturnType<typeof useLiveTailControls>) => React.ReactElement;\n};\n\n/**\n * If you can't use the hook you can use this as a render prop pattern.\n */\nexport function LiveTailControls(props: Props) {\n const controls = useLiveTailControls(props.exploreId);\n return props.children(controls);\n}\n","import React, { lazy, PureComponent, RefObject, Suspense } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { DataSourceInstanceSettings, RawTimeRange } from '@grafana/data';\nimport { config, DataSourcePicker, reportInteraction } from '@grafana/runtime';\nimport {\n defaultIntervals,\n PageToolbar,\n RefreshPicker,\n SetInterval,\n ToolbarButton,\n ToolbarButtonRow,\n} from '@grafana/ui';\nimport { createAndCopyShortLink } from 'app/core/utils/shortLinks';\nimport { ExploreId } from 'app/types/explore';\nimport { StoreState } from 'app/types/store';\n\nimport { DashNavButton } from '../dashboard/components/DashNav/DashNavButton';\nimport { getTimeSrv } from '../dashboard/services/TimeSrv';\nimport { updateFiscalYearStartMonthForSession, updateTimeZoneForSession } from '../profile/state/reducers';\nimport { getFiscalYearStartMonth, getTimeZone } from '../profile/state/selectors';\n\nimport { ExploreTimeControls } from './ExploreTimeControls';\nimport { LiveTailButton } from './LiveTailButton';\nimport { changeDatasource } from './state/datasource';\nimport { splitClose, splitOpen } from './state/main';\nimport { cancelQueries, runQueries } from './state/query';\nimport { isSplit } from './state/selectors';\nimport { syncTimes, changeRefreshInterval } from './state/time';\nimport { LiveTailControls } from './useLiveTailControls';\n\nconst AddToDashboard = lazy(() =>\n import('./AddToDashboard').then(({ AddToDashboard }) => ({ default: AddToDashboard }))\n);\n\ninterface OwnProps {\n exploreId: ExploreId;\n onChangeTime: (range: RawTimeRange, changedByScanner?: boolean) => void;\n topOfViewRef: RefObject<HTMLDivElement>;\n}\n\ntype Props = OwnProps & ConnectedProps<typeof connector>;\n\nclass UnConnectedExploreToolbar extends PureComponent<Props> {\n onChangeDatasource = async (dsSettings: DataSourceInstanceSettings) => {\n this.props.changeDatasource(this.props.exploreId, dsSettings.uid, { importQueries: true });\n };\n\n onRunQuery = (loading = false) => {\n const { runQueries, cancelQueries, exploreId } = this.props;\n if (loading) {\n return cancelQueries(exploreId);\n } else {\n return runQueries(exploreId);\n }\n };\n\n onChangeRefreshInterval = (item: string) => {\n const { changeRefreshInterval, exploreId } = this.props;\n changeRefreshInterval(exploreId, item);\n };\n\n onChangeTimeSync = () => {\n const { syncTimes, exploreId } = this.props;\n syncTimes(exploreId);\n };\n\n renderRefreshPicker = (showSmallTimePicker: boolean) => {\n const { loading, refreshInterval, isLive } = this.props;\n\n let refreshPickerText: string | undefined = loading ? 'Cancel' : 'Run query';\n let refreshPickerTooltip = undefined;\n let refreshPickerWidth = '108px';\n if (showSmallTimePicker) {\n refreshPickerTooltip = refreshPickerText;\n refreshPickerText = undefined;\n refreshPickerWidth = '35px';\n }\n\n return (\n <RefreshPicker\n onIntervalChanged={this.onChangeRefreshInterval}\n value={refreshInterval}\n isLoading={loading}\n text={refreshPickerText}\n tooltip={refreshPickerTooltip}\n intervals={getTimeSrv().getValidIntervals(defaultIntervals)}\n isLive={isLive}\n onRefresh={() => this.onRunQuery(loading)}\n noIntervalPicker={isLive}\n primary={true}\n width={refreshPickerWidth}\n />\n );\n };\n\n render() {\n const {\n datasourceMissing,\n closeSplit,\n exploreId,\n loading,\n range,\n timeZone,\n fiscalYearStartMonth,\n splitted,\n syncedTimes,\n refreshInterval,\n onChangeTime,\n split,\n hasLiveOption,\n isLive,\n isPaused,\n containerWidth,\n onChangeTimeZone,\n onChangeFiscalYearStartMonth,\n topOfViewRef,\n } = this.props;\n\n const showSmallDataSourcePicker = (splitted ? containerWidth < 700 : containerWidth < 800) || false;\n const showSmallTimePicker = splitted || containerWidth < 1210;\n\n return (\n <div ref={topOfViewRef}>\n <PageToolbar\n aria-label=\"Explore toolbar\"\n title={exploreId === ExploreId.left ? 'Explore' : undefined}\n pageIcon={exploreId === ExploreId.left ? 'compass' : undefined}\n leftItems={[\n exploreId === ExploreId.left && (\n <DashNavButton\n key=\"share\"\n tooltip=\"Copy shortened link\"\n icon=\"share-alt\"\n onClick={() => createAndCopyShortLink(window.location.href)}\n aria-label=\"Copy shortened link\"\n />\n ),\n !datasourceMissing && (\n <DataSourcePicker\n key={`${exploreId}-ds-picker`}\n onChange={this.onChangeDatasource}\n current={this.props.datasourceName}\n hideTextValue={showSmallDataSourcePicker}\n width={showSmallDataSourcePicker ? 8 : undefined}\n />\n ),\n ].filter(Boolean)}\n >\n <ToolbarButtonRow>\n {!splitted ? (\n <ToolbarButton title=\"Split\" onClick={() => split()} icon=\"columns\" disabled={isLive}>\n Split\n </ToolbarButton>\n ) : (\n <ToolbarButton title=\"Close split pane\" onClick={() => closeSplit(exploreId)} icon=\"times\">\n Close\n </ToolbarButton>\n )}\n\n {config.featureToggles.explore2Dashboard && (\n <Suspense fallback={null}>\n <AddToDashboard exploreId={exploreId} />\n </Suspense>\n )}\n\n {!isLive && (\n <ExploreTimeControls\n exploreId={exploreId}\n range={range}\n timeZone={timeZone}\n fiscalYearStartMonth={fiscalYearStartMonth}\n onChangeTime={onChangeTime}\n splitted={splitted}\n syncedTimes={syncedTimes}\n onChangeTimeSync={this.onChangeTimeSync}\n hideText={showSmallTimePicker}\n onChangeTimeZone={onChangeTimeZone}\n onChangeFiscalYearStartMonth={onChangeFiscalYearStartMonth}\n />\n )}\n\n {this.renderRefreshPicker(showSmallTimePicker)}\n\n {refreshInterval && <SetInterval func={this.onRunQuery} interval={refreshInterval} loading={loading} />}\n\n {hasLiveOption && (\n <LiveTailControls exploreId={exploreId}>\n {(c) => {\n const controls = {\n ...c,\n start: () => {\n reportInteraction('grafana_explore_logs_live_tailing_clicked', {\n datasourceType: this.props.datasourceType,\n });\n c.start();\n },\n };\n return (\n <LiveTailButton\n splitted={splitted}\n isLive={isLive}\n isPaused={isPaused}\n start={controls.start}\n pause={controls.pause}\n resume={controls.resume}\n stop={controls.stop}\n />\n );\n }}\n </LiveTailControls>\n )}\n </ToolbarButtonRow>\n </PageToolbar>\n </div>\n );\n }\n}\n\nconst mapStateToProps = (state: StoreState, { exploreId }: OwnProps) => {\n const { syncedTimes } = state.explore;\n const exploreItem = state.explore[exploreId]!;\n const { datasourceInstance, datasourceMissing, range, refreshInterval, loading, isLive, isPaused, containerWidth } =\n exploreItem;\n\n const hasLiveOption = !!datasourceInstance?.meta?.streaming;\n\n return {\n datasourceMissing,\n datasourceName: datasourceInstance?.name,\n datasourceType: datasourceInstance?.type,\n loading,\n range,\n timeZone: getTimeZone(state.user),\n fiscalYearStartMonth: getFiscalYearStartMonth(state.user),\n splitted: isSplit(state),\n refreshInterval,\n hasLiveOption,\n isLive,\n isPaused,\n syncedTimes,\n containerWidth,\n };\n};\n\nconst mapDispatchToProps = {\n changeDatasource,\n changeRefreshInterval,\n cancelQueries,\n runQueries,\n closeSplit: splitClose,\n split: splitOpen,\n syncTimes,\n onChangeTimeZone: updateTimeZoneForSession,\n onChangeFiscalYearStartMonth: updateFiscalYearStartMonthForSession,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport const ExploreToolbar = connector(UnConnectedExploreToolbar);\n","import { useEffect, useRef } from 'react';\nvar useInterval = function (callback, delay) {\n var savedCallback = useRef(function () { });\n useEffect(function () {\n savedCallback.current = callback;\n });\n useEffect(function () {\n if (delay !== null) {\n var interval_1 = setInterval(function () { return savedCallback.current(); }, delay || 0);\n return function () { return clearInterval(interval_1); };\n }\n return undefined;\n }, [delay]);\n};\nexport default useInterval;\n","import React, { FC } from 'react';\n\nimport { toDuration } from '@grafana/data';\n\nexport interface TimeProps {\n timeInMs: number;\n className?: string;\n humanize?: boolean;\n}\n\nexport const Time: FC<TimeProps> = ({ timeInMs, className, humanize }) => {\n return <span className={`elapsed-time ${className}`}>{formatTime(timeInMs, humanize)}</span>;\n};\n\nconst formatTime = (timeInMs: number, humanize = false): string => {\n const inSeconds = timeInMs / 1000;\n\n if (!humanize) {\n return `${inSeconds.toFixed(1)}s`;\n }\n\n const duration = toDuration(inSeconds, 'seconds');\n const hours = duration.hours();\n const minutes = duration.minutes();\n const seconds = duration.seconds();\n\n if (hours) {\n return `${hours}h ${minutes}m ${seconds}s`;\n }\n\n if (minutes) {\n return `${minutes}m ${seconds}s`;\n }\n\n return `${seconds}s`;\n};\n","import React, { FC, useState, useEffect } from 'react';\nimport { useInterval } from 'react-use';\n\nimport { Time, TimeProps } from './Time';\n\nconst INTERVAL = 150;\n\nexport interface ElapsedTimeProps extends Omit<TimeProps, 'timeInMs'> {\n // Use this to reset the timer. Any value is allowed just need to be !== from the previous.\n // Keep in mind things like [] !== [] or {} !== {}.\n resetKey?: any;\n}\n\nexport const ElapsedTime: FC<ElapsedTimeProps> = ({ resetKey, humanize, className }) => {\n const [elapsed, setElapsed] = useState(0); // the current value of elapsed\n\n // hook that will schedule a interval and then update the elapsed value on every tick.\n useInterval(() => setElapsed(elapsed + INTERVAL), INTERVAL);\n // this effect will only be run when resetKey changes. This will reset the elapsed to 0.\n useEffect(() => setElapsed(0), [resetKey]);\n\n return <Time timeInMs={elapsed} className={className} humanize={humanize} />;\n};\n","import { css, cx } from '@emotion/css';\nimport React, { PureComponent } from 'react';\nimport tinycolor from 'tinycolor2';\n\nimport { LogRowModel, TimeZone, dateTimeFormat, GrafanaTheme2 } from '@grafana/data';\nimport { LogMessageAnsi, getLogRowStyles, Icon, Button, Themeable2, withTheme2 } from '@grafana/ui';\n\nimport { ElapsedTime } from './ElapsedTime';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n logsRowsLive: css`\n label: logs-rows-live;\n font-family: ${theme.typography.fontFamilyMonospace};\n font-size: ${theme.typography.bodySmall.fontSize};\n display: flex;\n flex-flow: column nowrap;\n height: 60vh;\n overflow-y: scroll;\n :first-child {\n margin-top: auto !important;\n }\n `,\n logsRowFade: css`\n label: logs-row-fresh;\n color: ${theme.colors.text};\n background-color: ${tinycolor(theme.colors.info.transparent).setAlpha(0.25).toString()};\n animation: fade 1s ease-out 1s 1 normal forwards;\n @keyframes fade {\n from {\n background-color: ${tinycolor(theme.colors.info.transparent).setAlpha(0.25).toString()};\n }\n to {\n background-color: transparent;\n }\n }\n `,\n logsRowsIndicator: css`\n font-size: ${theme.typography.h6.fontSize};\n padding-top: ${theme.spacing(1)};\n display: flex;\n align-items: center;\n `,\n button: css`\n margin-right: ${theme.spacing(1)};\n `,\n fullWidth: css`\n width: 100%;\n `,\n});\n\nexport interface Props extends Themeable2 {\n logRows?: LogRowModel[];\n timeZone: TimeZone;\n stopLive: () => void;\n onPause: () => void;\n onResume: () => void;\n isPaused: boolean;\n}\n\ninterface State {\n logRowsToRender?: LogRowModel[];\n}\n\nclass LiveLogs extends PureComponent<Props, State> {\n private liveEndDiv: HTMLDivElement | null = null;\n private scrollContainerRef = React.createRef<HTMLTableSectionElement>();\n\n constructor(props: Props) {\n super(props);\n this.state = {\n logRowsToRender: props.logRows,\n };\n }\n\n static getDerivedStateFromProps(nextProps: Props, state: State) {\n if (!nextProps.isPaused) {\n return {\n // We update what we show only if not paused. We keep any background subscriptions running and keep updating\n // our state, but we do not show the updates, this allows us start again showing correct result after resuming\n // without creating a gap in the log results.\n logRowsToRender: nextProps.logRows,\n };\n } else {\n return null;\n }\n }\n\n /**\n * Handle pausing when user scrolls up so that we stop resetting his position to the bottom when new row arrives.\n * We do not need to throttle it here much, adding new rows should be throttled/buffered itself in the query epics\n * and after you pause we remove the handler and add it after you manually resume, so this should not be fired often.\n */\n onScroll = (event: React.SyntheticEvent) => {\n const { isPaused, onPause } = this.props;\n const { scrollTop, clientHeight, scrollHeight } = event.currentTarget;\n const distanceFromBottom = scrollHeight - (scrollTop + clientHeight);\n if (distanceFromBottom >= 5 && !isPaused) {\n onPause();\n }\n };\n\n rowsToRender = () => {\n const { isPaused } = this.props;\n let { logRowsToRender: rowsToRender = [] } = this.state;\n if (!isPaused) {\n // A perf optimisation here. Show just 100 rows when streaming and full length when the streaming is paused.\n rowsToRender = rowsToRender.slice(-100);\n }\n return rowsToRender;\n };\n\n render() {\n const { theme, timeZone, onPause, onResume, isPaused } = this.props;\n const styles = getStyles(theme);\n const { logsRow, logsRowLocalTime, logsRowMessage } = getLogRowStyles(theme);\n\n return (\n <div>\n <table className={styles.fullWidth}>\n <tbody\n onScroll={isPaused ? undefined : this.onScroll}\n className={cx(['logs-rows', styles.logsRowsLive])}\n ref={this.scrollContainerRef}\n >\n {this.rowsToRender().map((row: LogRowModel) => {\n return (\n <tr className={cx(logsRow, styles.logsRowFade)} key={row.uid}>\n <td className={cx(logsRowLocalTime)}>{dateTimeFormat(row.timeEpochMs, { timeZone })}</td>\n <td className={cx(logsRowMessage)}>{row.hasAnsi ? <LogMessageAnsi value={row.raw} /> : row.entry}</td>\n </tr>\n );\n })}\n <tr\n ref={(element) => {\n this.liveEndDiv = element;\n // This is triggered on every update so on every new row. It keeps the view scrolled at the bottom by\n // default.\n // As scrollTo is not implemented in JSDOM it needs to be part of the condition\n if (this.liveEndDiv && this.scrollContainerRef.current?.scrollTo && !isPaused) {\n this.scrollContainerRef.current?.scrollTo(0, this.scrollContainerRef.current.scrollHeight);\n }\n }}\n />\n </tbody>\n </table>\n <div className={styles.logsRowsIndicator}>\n <Button variant=\"secondary\" onClick={isPaused ? onResume : onPause} className={styles.button}>\n <Icon name={isPaused ? 'play' : 'pause'} />\n &nbsp;\n {isPaused ? 'Resume' : 'Pause'}\n </Button>\n <Button variant=\"secondary\" onClick={this.props.stopLive} className={styles.button}>\n <Icon name=\"square-shape\" size=\"lg\" type=\"mono\" />\n &nbsp; Exit live mode\n </Button>\n {isPaused || (\n <span>\n Last line received: <ElapsedTime resetKey={this.props.logRows} humanize={true} /> ago\n </span>\n )}\n </div>\n </div>\n );\n }\n}\n\nexport const LiveLogsWithTheme = withTheme2(LiveLogs);\n","import { css } from '@emotion/css';\nimport React, { memo } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n metaContainer: css`\n flex: 1;\n color: ${theme.colors.text.secondary};\n margin-bottom: ${theme.spacing(2)};\n min-width: 30%;\n display: flex;\n flex-wrap: wrap;\n `,\n metaItem: css`\n margin-right: ${theme.spacing(2)};\n margin-top: ${theme.spacing(0.5)};\n display: flex;\n align-items: baseline;\n\n .logs-meta-item__error {\n color: ${theme.colors.error.text};\n }\n `,\n metaLabel: css`\n margin-right: calc(${theme.spacing(2)} / 2);\n font-size: ${theme.typography.bodySmall.fontSize};\n font-weight: ${theme.typography.fontWeightMedium};\n `,\n metaValue: css`\n font-family: ${theme.typography.fontFamilyMonospace};\n font-size: ${theme.typography.bodySmall.fontSize};\n `,\n});\n\nexport interface MetaItemProps {\n label?: string;\n value: string | JSX.Element;\n}\n\nconst MetaInfoItem = memo(function MetaInfoItem(props: MetaItemProps) {\n const style = useStyles2(getStyles);\n const { label, value } = props;\n\n return (\n <div data-testid=\"meta-info-text-item\" className={style.metaItem}>\n {label && <span className={style.metaLabel}>{label}:</span>}\n <span className={style.metaValue}>{value}</span>\n </div>\n );\n});\n\ninterface MetaInfoTextProps {\n metaItems: MetaItemProps[];\n}\n\nexport const MetaInfoText = memo(function MetaInfoText(props: MetaInfoTextProps) {\n const style = useStyles2(getStyles);\n const { metaItems } = props;\n\n return (\n <div className={style.metaContainer} data-testid=\"meta-info-text\">\n {metaItems.map((item, index) => (\n <MetaInfoItem key={`${index}-${item.label}`} label={item.label} value={item.value} />\n ))}\n </div>\n );\n});\n","import React from 'react';\n\nimport { LogsDedupStrategy, LogsMetaItem, LogsMetaKind, LogRowModel } from '@grafana/data';\nimport { Button, Tooltip, Icon, LogLabels } from '@grafana/ui';\nimport { MAX_CHARACTERS } from '@grafana/ui/src/components/Logs/LogRowMessage';\n\nimport { MetaInfoText, MetaItemProps } from './MetaInfoText';\n\nexport type Props = {\n meta: LogsMetaItem[];\n dedupStrategy: LogsDedupStrategy;\n dedupCount: number;\n showDetectedFields: string[];\n hasUnescapedContent: boolean;\n forceEscape: boolean;\n logRows: LogRowModel[];\n onEscapeNewlines: () => void;\n clearDetectedFields: () => void;\n};\n\nexport const LogsMetaRow: React.FC<Props> = React.memo(\n ({\n meta,\n dedupStrategy,\n dedupCount,\n showDetectedFields,\n clearDetectedFields,\n hasUnescapedContent,\n forceEscape,\n onEscapeNewlines,\n logRows,\n }) => {\n const logsMetaItem: Array<LogsMetaItem | MetaItemProps> = [...meta];\n\n // Add deduplication info\n if (dedupStrategy !== LogsDedupStrategy.none) {\n logsMetaItem.push({\n label: 'Dedup count',\n value: dedupCount,\n kind: LogsMetaKind.Number,\n });\n }\n // Add info about limit for highlighting\n if (logRows.some((r) => r.entry.length > MAX_CHARACTERS)) {\n logsMetaItem.push({\n label: 'Info',\n value: 'Logs with more than 100,000 characters could not be parsed and highlighted',\n kind: LogsMetaKind.String,\n });\n }\n\n // Add detected fields info\n if (showDetectedFields?.length > 0) {\n logsMetaItem.push(\n {\n label: 'Showing only detected fields',\n value: renderMetaItem(showDetectedFields, LogsMetaKind.LabelsMap),\n },\n {\n label: '',\n value: (\n <Button variant=\"secondary\" size=\"sm\" onClick={clearDetectedFields}>\n Show original line\n </Button>\n ),\n }\n );\n }\n\n // Add unescaped content info\n if (hasUnescapedContent) {\n logsMetaItem.push({\n label: 'Your logs might have incorrectly escaped content',\n value: (\n <Tooltip\n content=\"Fix incorrectly escaped newline and tab sequences in log lines. Manually review the results to confirm that the replacements are correct.\"\n placement=\"right\"\n >\n <Button variant=\"secondary\" size=\"sm\" onClick={onEscapeNewlines}>\n <span>{forceEscape ? 'Remove escaping' : 'Escape newlines'}&nbsp;</span>\n <Icon name=\"exclamation-triangle\" className=\"muted\" size=\"sm\" />\n </Button>\n </Tooltip>\n ),\n });\n }\n\n return (\n <>\n {logsMetaItem && (\n <MetaInfoText\n metaItems={logsMetaItem.map((item) => {\n return {\n label: item.label,\n value: 'kind' in item ? renderMetaItem(item.value, item.kind) : item.value,\n };\n })}\n />\n )}\n </>\n );\n }\n);\n\nLogsMetaRow.displayName = 'LogsMetaRow';\n\nfunction renderMetaItem(value: any, kind: LogsMetaKind) {\n if (kind === LogsMetaKind.LabelsMap) {\n return (\n <span className=\"logs-meta-item__labels\">\n <LogLabels labels={value} />\n </span>\n );\n } else if (kind === LogsMetaKind.Error) {\n return <span className=\"logs-meta-item__error\">{value}</span>;\n }\n return value;\n}\n","import { css, cx } from '@emotion/css';\nimport React from 'react';\n\nimport { dateTimeFormat, systemDateFormats, TimeZone, AbsoluteTimeRange, GrafanaTheme2 } from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime';\nimport { CustomScrollbar, Spinner, useTheme2 } from '@grafana/ui';\n\nimport { LogsPage } from './LogsNavigation';\n\ntype Props = {\n pages: LogsPage[];\n currentPageIndex: number;\n oldestLogsFirst: boolean;\n timeZone: TimeZone;\n loading: boolean;\n changeTime: (range: AbsoluteTimeRange) => void;\n};\n\nexport function LogsNavigationPages({\n pages,\n currentPageIndex,\n oldestLogsFirst,\n timeZone,\n loading,\n changeTime,\n}: Props) {\n const formatTime = (time: number) => {\n return `${dateTimeFormat(time, {\n format: systemDateFormats.interval.second,\n timeZone: timeZone,\n })}`;\n };\n\n const createPageContent = (page: LogsPage, index: number) => {\n if (currentPageIndex === index && loading) {\n return <Spinner />;\n }\n const topContent = formatTime(oldestLogsFirst ? page.logsRange.from : page.logsRange.to);\n const bottomContent = formatTime(oldestLogsFirst ? page.logsRange.to : page.logsRange.from);\n return `${topContent} — ${bottomContent}`;\n };\n\n const theme = useTheme2();\n const styles = getStyles(theme, loading);\n\n return (\n <CustomScrollbar autoHide>\n <div className={styles.pagesWrapper} data-testid=\"logsNavigationPages\">\n <div className={styles.pagesContainer}>\n {pages.map((page: LogsPage, index: number) => (\n <div\n data-testid={`page${index + 1}`}\n className={styles.page}\n key={page.queryRange.to}\n onClick={() => {\n reportInteraction('grafana_explore_logs_pagination_clicked', {\n pageType: 'page',\n pageNumber: index + 1,\n });\n !loading && changeTime({ from: page.queryRange.from, to: page.queryRange.to });\n }}\n >\n <div className={cx(styles.line, { selectedBg: currentPageIndex === index })} />\n <div className={cx(styles.time, { selectedText: currentPageIndex === index })}>\n {createPageContent(page, index)}\n </div>\n </div>\n ))}\n </div>\n </div>\n </CustomScrollbar>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2, loading: boolean) => {\n return {\n pagesWrapper: css`\n height: 100%;\n padding-left: ${theme.spacing(0.5)};\n display: flex;\n flex-direction: column;\n overflow-y: scroll;\n &::after {\n content: '';\n display: block;\n background: repeating-linear-gradient(\n 135deg,\n ${theme.colors.background.primary},\n ${theme.colors.background.primary} 5px,\n ${theme.colors.background.secondary} 5px,\n ${theme.colors.background.secondary} 15px\n );\n width: 3px;\n height: inherit;\n margin-bottom: 8px;\n }\n `,\n pagesContainer: css`\n display: flex;\n padding: 0;\n flex-direction: column;\n `,\n page: css`\n display: flex;\n margin: ${theme.spacing(2)} 0;\n cursor: ${loading ? 'auto' : 'pointer'};\n white-space: normal;\n .selectedBg {\n background: ${theme.colors.primary.main};\n }\n .selectedText {\n color: ${theme.colors.primary.main};\n }\n `,\n line: css`\n width: 3px;\n height: 100%;\n align-items: center;\n background: ${theme.colors.text.secondary};\n `,\n time: css`\n width: 60px;\n min-height: 80px;\n font-size: ${theme.v1.typography.size.sm};\n padding-left: ${theme.spacing(0.5)};\n display: flex;\n align-items: center;\n `,\n };\n};\n","import { css } from '@emotion/css';\nimport { isEqual } from 'lodash';\nimport React, { memo, useState, useEffect, useRef } from 'react';\n\nimport { LogsSortOrder, AbsoluteTimeRange, TimeZone, DataQuery, GrafanaTheme2 } from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime';\nimport { Button, Icon, Spinner, useTheme2 } from '@grafana/ui';\n\nimport { LogsNavigationPages } from './LogsNavigationPages';\n\ntype Props = {\n absoluteRange: AbsoluteTimeRange;\n timeZone: TimeZone;\n queries: DataQuery[];\n loading: boolean;\n visibleRange: AbsoluteTimeRange;\n logsSortOrder?: LogsSortOrder | null;\n onChangeTime: (range: AbsoluteTimeRange) => void;\n scrollToTopLogs: () => void;\n addResultsToCache: () => void;\n clearCache: () => void;\n};\n\nexport type LogsPage = {\n logsRange: AbsoluteTimeRange;\n queryRange: AbsoluteTimeRange;\n};\n\nfunction LogsNavigation({\n absoluteRange,\n logsSortOrder,\n timeZone,\n loading,\n onChangeTime,\n scrollToTopLogs,\n visibleRange,\n queries,\n clearCache,\n addResultsToCache,\n}: Props) {\n const [pages, setPages] = useState<LogsPage[]>([]);\n const [currentPageIndex, setCurrentPageIndex] = useState(0);\n\n // These refs are to determine, if we want to clear up logs navigation when totally new query is run\n const expectedQueriesRef = useRef<DataQuery[]>();\n const expectedRangeRef = useRef<AbsoluteTimeRange>();\n // This ref is to store range span for future queres based on firstly selected time range\n // e.g. if last 5 min selected, always run 5 min range\n const rangeSpanRef = useRef(0);\n\n const oldestLogsFirst = logsSortOrder === LogsSortOrder.Ascending;\n const onFirstPage = oldestLogsFirst ? currentPageIndex === pages.length - 1 : currentPageIndex === 0;\n const onLastPage = oldestLogsFirst ? currentPageIndex === 0 : currentPageIndex === pages.length - 1;\n const theme = useTheme2();\n const styles = getStyles(theme, oldestLogsFirst, loading);\n\n // Main effect to set pages and index\n useEffect(() => {\n const newPage = { logsRange: visibleRange, queryRange: absoluteRange };\n let newPages: LogsPage[] = [];\n // We want to start new pagination if queries change or if absolute range is different than expected\n if (!isEqual(expectedRangeRef.current, absoluteRange) || !isEqual(expectedQueriesRef.current, queries)) {\n clearCache();\n setPages([newPage]);\n setCurrentPageIndex(0);\n expectedQueriesRef.current = queries;\n rangeSpanRef.current = absoluteRange.to - absoluteRange.from;\n } else {\n setPages((pages) => {\n // Remove duplicates with new query\n newPages = pages.filter((page) => !isEqual(newPage.queryRange, page.queryRange));\n // Sort pages based on logsOrder so they visually align with displayed logs\n newPages = [...newPages, newPage].sort((a, b) => sortPages(a, b, logsSortOrder));\n // Set new pages\n\n return newPages;\n });\n\n // Set current page index\n const index = newPages.findIndex((page) => page.queryRange.to === absoluteRange.to);\n setCurrentPageIndex(index);\n }\n addResultsToCache();\n }, [visibleRange, absoluteRange, logsSortOrder, queries, clearCache, addResultsToCache]);\n\n useEffect(() => {\n clearCache();\n // We can't enforce the eslint rule here because we only want to run when component is mounted.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const changeTime = ({ from, to }: AbsoluteTimeRange) => {\n expectedRangeRef.current = { from, to };\n onChangeTime({ from, to });\n };\n\n const sortPages = (a: LogsPage, b: LogsPage, logsSortOrder?: LogsSortOrder | null) => {\n if (logsSortOrder === LogsSortOrder.Ascending) {\n return a.queryRange.to > b.queryRange.to ? 1 : -1;\n }\n return a.queryRange.to > b.queryRange.to ? -1 : 1;\n };\n\n const olderLogsButton = (\n <Button\n data-testid=\"olderLogsButton\"\n className={styles.navButton}\n variant=\"secondary\"\n onClick={() => {\n //If we are not on the last page, use next page's range\n reportInteraction('grafana_explore_logs_pagination_clicked', {\n pageType: 'olderLogsButton',\n });\n if (!onLastPage) {\n const indexChange = oldestLogsFirst ? -1 : 1;\n changeTime({\n from: pages[currentPageIndex + indexChange].queryRange.from,\n to: pages[currentPageIndex + indexChange].queryRange.to,\n });\n } else {\n //If we are on the last page, create new range\n changeTime({ from: visibleRange.from - rangeSpanRef.current, to: visibleRange.from });\n }\n }}\n disabled={loading}\n >\n <div className={styles.navButtonContent}>\n {loading ? <Spinner /> : <Icon name={oldestLogsFirst ? 'angle-up' : 'angle-down'} size=\"lg\" />}\n Older logs\n </div>\n </Button>\n );\n\n const newerLogsButton = (\n <Button\n data-testid=\"newerLogsButton\"\n className={styles.navButton}\n variant=\"secondary\"\n onClick={() => {\n reportInteraction('grafana_explore_logs_pagination_clicked', {\n pageType: 'newerLogsButton',\n });\n //If we are not on the first page, use previous page's range\n if (!onFirstPage) {\n const indexChange = oldestLogsFirst ? 1 : -1;\n changeTime({\n from: pages[currentPageIndex + indexChange].queryRange.from,\n to: pages[currentPageIndex + indexChange].queryRange.to,\n });\n }\n //If we are on the first page, button is disabled and we do nothing\n }}\n disabled={loading || onFirstPage}\n >\n <div className={styles.navButtonContent}>\n {loading && <Spinner />}\n {onFirstPage || loading ? null : <Icon name={oldestLogsFirst ? 'angle-down' : 'angle-up'} size=\"lg\" />}\n {onFirstPage ? 'Start of range' : 'Newer logs'}\n </div>\n </Button>\n );\n\n return (\n <div className={styles.navContainer}>\n {oldestLogsFirst ? olderLogsButton : newerLogsButton}\n <LogsNavigationPages\n pages={pages}\n currentPageIndex={currentPageIndex}\n oldestLogsFirst={oldestLogsFirst}\n timeZone={timeZone}\n loading={loading}\n changeTime={changeTime}\n />\n {oldestLogsFirst ? newerLogsButton : olderLogsButton}\n <Button\n data-testid=\"scrollToTop\"\n className={styles.scrollToTopButton}\n variant=\"secondary\"\n onClick={scrollToTopLogs}\n title=\"Scroll to top\"\n >\n <Icon name=\"arrow-up\" size=\"lg\" />\n </Button>\n </div>\n );\n}\n\nexport default memo(LogsNavigation);\n\nconst getStyles = (theme: GrafanaTheme2, oldestLogsFirst: boolean, loading: boolean) => {\n return {\n navContainer: css`\n max-height: 95vh;\n display: flex;\n flex-direction: column;\n justify-content: ${oldestLogsFirst ? 'flex-start' : 'space-between'};\n position: sticky;\n top: ${theme.spacing(2)};\n right: 0;\n `,\n navButton: css`\n width: 58px;\n height: 68px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n line-height: 1;\n `,\n navButtonContent: css`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n white-space: normal;\n `,\n scrollToTopButton: css`\n width: 40px;\n height: 40px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: ${theme.spacing(1)};\n `,\n };\n};\n","import { css } from '@emotion/css';\nimport { capitalize } from 'lodash';\nimport memoizeOne from 'memoize-one';\nimport React, { PureComponent, createRef } from 'react';\n\nimport {\n rangeUtil,\n RawTimeRange,\n LogLevel,\n TimeZone,\n AbsoluteTimeRange,\n LogsDedupStrategy,\n LogRowModel,\n LogsDedupDescription,\n LogsMetaItem,\n LogsSortOrder,\n LinkModel,\n Field,\n DataQuery,\n DataFrame,\n GrafanaTheme2,\n LoadingState,\n} from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime';\nimport { TooltipDisplayMode } from '@grafana/schema';\nimport {\n RadioButtonGroup,\n LogRows,\n Button,\n InlineField,\n InlineFieldRow,\n InlineSwitch,\n withTheme2,\n Themeable2,\n} from '@grafana/ui';\nimport { RowContextOptions } from '@grafana/ui/src/components/Logs/LogRowContextProvider';\nimport { dedupLogRows, filterLogLevels } from 'app/core/logs_model';\nimport store from 'app/core/store';\nimport { ExploreId } from 'app/types/explore';\n\nimport { ExploreGraph } from './ExploreGraph';\nimport { LogsMetaRow } from './LogsMetaRow';\nimport LogsNavigation from './LogsNavigation';\n\nconst SETTINGS_KEYS = {\n showLabels: 'grafana.explore.logs.showLabels',\n showTime: 'grafana.explore.logs.showTime',\n wrapLogMessage: 'grafana.explore.logs.wrapLogMessage',\n prettifyLogMessage: 'grafana.explore.logs.prettifyLogMessage',\n logsSortOrder: 'grafana.explore.logs.sortOrder',\n};\n\ninterface Props extends Themeable2 {\n width: number;\n logRows: LogRowModel[];\n logsMeta?: LogsMetaItem[];\n logsSeries?: DataFrame[];\n logsQueries?: DataQuery[];\n visibleRange?: AbsoluteTimeRange;\n theme: GrafanaTheme2;\n loading: boolean;\n loadingState: LoadingState;\n absoluteRange: AbsoluteTimeRange;\n timeZone: TimeZone;\n scanning?: boolean;\n scanRange?: RawTimeRange;\n exploreId: ExploreId;\n datasourceType?: string;\n showContextToggle?: (row?: LogRowModel) => boolean;\n onChangeTime: (range: AbsoluteTimeRange) => void;\n onClickFilterLabel?: (key: string, value: string) => void;\n onClickFilterOutLabel?: (key: string, value: string) => void;\n onStartScanning?: () => void;\n onStopScanning?: () => void;\n getRowContext?: (row: LogRowModel, options?: RowContextOptions) => Promise<any>;\n getFieldLinks: (field: Field, rowIndex: number) => Array<LinkModel<Field>>;\n addResultsToCache: () => void;\n clearCache: () => void;\n}\n\ninterface State {\n showLabels: boolean;\n showTime: boolean;\n wrapLogMessage: boolean;\n prettifyLogMessage: boolean;\n dedupStrategy: LogsDedupStrategy;\n hiddenLogLevels: LogLevel[];\n logsSortOrder: LogsSortOrder | null;\n isFlipping: boolean;\n showDetectedFields: string[];\n forceEscape: boolean;\n}\n\nclass UnthemedLogs extends PureComponent<Props, State> {\n flipOrderTimer?: number;\n cancelFlippingTimer?: number;\n topLogsRef = createRef<HTMLDivElement>();\n\n state: State = {\n showLabels: store.getBool(SETTINGS_KEYS.showLabels, false),\n showTime: store.getBool(SETTINGS_KEYS.showTime, true),\n wrapLogMessage: store.getBool(SETTINGS_KEYS.wrapLogMessage, true),\n prettifyLogMessage: store.getBool(SETTINGS_KEYS.prettifyLogMessage, false),\n dedupStrategy: LogsDedupStrategy.none,\n hiddenLogLevels: [],\n logsSortOrder: store.get(SETTINGS_KEYS.logsSortOrder) || LogsSortOrder.Descending,\n isFlipping: false,\n showDetectedFields: [],\n forceEscape: false,\n };\n\n componentWillUnmount() {\n if (this.flipOrderTimer) {\n window.clearTimeout(this.flipOrderTimer);\n }\n\n if (this.cancelFlippingTimer) {\n window.clearTimeout(this.cancelFlippingTimer);\n }\n }\n\n onChangeLogsSortOrder = () => {\n this.setState({ isFlipping: true });\n // we are using setTimeout here to make sure that disabled button is rendered before the rendering of reordered logs\n this.flipOrderTimer = window.setTimeout(() => {\n this.setState((prevState) => {\n const newSortOrder =\n prevState.logsSortOrder === LogsSortOrder.Descending ? LogsSortOrder.Ascending : LogsSortOrder.Descending;\n store.set(SETTINGS_KEYS.logsSortOrder, newSortOrder);\n return { logsSortOrder: newSortOrder };\n });\n }, 0);\n this.cancelFlippingTimer = window.setTimeout(() => this.setState({ isFlipping: false }), 1000);\n };\n\n onEscapeNewlines = () => {\n this.setState((prevState) => ({\n forceEscape: !prevState.forceEscape,\n }));\n };\n\n onChangeDedup = (dedupStrategy: LogsDedupStrategy) => {\n reportInteraction('grafana_explore_logs_deduplication_clicked', {\n deduplicationType: dedupStrategy,\n datasourceType: this.props.datasourceType,\n });\n this.setState({ dedupStrategy });\n };\n\n onChangeLabels = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { target } = event;\n if (target) {\n const showLabels = target.checked;\n this.setState({\n showLabels,\n });\n store.set(SETTINGS_KEYS.showLabels, showLabels);\n }\n };\n\n onChangeTime = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { target } = event;\n if (target) {\n const showTime = target.checked;\n this.setState({\n showTime,\n });\n store.set(SETTINGS_KEYS.showTime, showTime);\n }\n };\n\n onChangeWrapLogMessage = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { target } = event;\n if (target) {\n const wrapLogMessage = target.checked;\n this.setState({\n wrapLogMessage,\n });\n store.set(SETTINGS_KEYS.wrapLogMessage, wrapLogMessage);\n }\n };\n\n onChangePrettifyLogMessage = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { target } = event;\n if (target) {\n const prettifyLogMessage = target.checked;\n this.setState({\n prettifyLogMessage,\n });\n store.set(SETTINGS_KEYS.prettifyLogMessage, prettifyLogMessage);\n }\n };\n\n onToggleLogLevel = (hiddenRawLevels: string[]) => {\n const hiddenLogLevels = hiddenRawLevels.map((level) => LogLevel[level as LogLevel]);\n this.setState({ hiddenLogLevels });\n };\n\n onClickScan = (event: React.SyntheticEvent) => {\n event.preventDefault();\n if (this.props.onStartScanning) {\n this.props.onStartScanning();\n }\n };\n\n onClickStopScan = (event: React.SyntheticEvent) => {\n event.preventDefault();\n if (this.props.onStopScanning) {\n this.props.onStopScanning();\n }\n };\n\n showDetectedField = (key: string) => {\n const index = this.state.showDetectedFields.indexOf(key);\n\n if (index === -1) {\n this.setState((state) => {\n return {\n showDetectedFields: state.showDetectedFields.concat(key),\n };\n });\n }\n };\n\n hideDetectedField = (key: string) => {\n const index = this.state.showDetectedFields.indexOf(key);\n if (index > -1) {\n this.setState((state) => {\n return {\n showDetectedFields: state.showDetectedFields.filter((k) => key !== k),\n };\n });\n }\n };\n\n clearDetectedFields = () => {\n this.setState((state) => {\n return {\n showDetectedFields: [],\n };\n });\n };\n\n checkUnescapedContent = memoizeOne((logRows: LogRowModel[]) => {\n return !!logRows.some((r) => r.hasUnescapedContent);\n });\n\n dedupRows = memoizeOne((logRows: LogRowModel[], dedupStrategy: LogsDedupStrategy) => {\n const dedupedRows = dedupLogRows(logRows, dedupStrategy);\n const dedupCount = dedupedRows.reduce((sum, row) => (row.duplicates ? sum + row.duplicates : sum), 0);\n return { dedupedRows, dedupCount };\n });\n\n filterRows = memoizeOne((logRows: LogRowModel[], hiddenLogLevels: LogLevel[]) => {\n return filterLogLevels(logRows, new Set(hiddenLogLevels));\n });\n\n createNavigationRange = memoizeOne((logRows: LogRowModel[]): { from: number; to: number } | undefined => {\n if (!logRows || logRows.length === 0) {\n return undefined;\n }\n const firstTimeStamp = logRows[0].timeEpochMs;\n const lastTimeStamp = logRows[logRows.length - 1].timeEpochMs;\n\n if (lastTimeStamp < firstTimeStamp) {\n return { from: lastTimeStamp, to: firstTimeStamp };\n }\n\n return { from: firstTimeStamp, to: lastTimeStamp };\n });\n\n scrollToTopLogs = () => this.topLogsRef.current?.scrollIntoView();\n\n render() {\n const {\n width,\n logRows,\n logsMeta,\n logsSeries,\n visibleRange,\n loading = false,\n loadingState,\n onClickFilterLabel,\n onClickFilterOutLabel,\n timeZone,\n scanning,\n scanRange,\n showContextToggle,\n absoluteRange,\n onChangeTime,\n getFieldLinks,\n theme,\n logsQueries,\n clearCache,\n addResultsToCache,\n exploreId,\n } = this.props;\n\n const {\n showLabels,\n showTime,\n wrapLogMessage,\n prettifyLogMessage,\n dedupStrategy,\n hiddenLogLevels,\n logsSortOrder,\n isFlipping,\n showDetectedFields,\n forceEscape,\n } = this.state;\n\n const styles = getStyles(theme, wrapLogMessage);\n const hasData = logRows && logRows.length > 0;\n const hasUnescapedContent = this.checkUnescapedContent(logRows);\n\n const filteredLogs = this.filterRows(logRows, hiddenLogLevels);\n const { dedupedRows, dedupCount } = this.dedupRows(filteredLogs, dedupStrategy);\n const navigationRange = this.createNavigationRange(logRows);\n\n const scanText = scanRange ? `Scanning ${rangeUtil.describeTimeRange(scanRange)}` : 'Scanning...';\n\n return (\n <>\n {logsSeries && logsSeries.length ? (\n <>\n <div className={styles.infoText}>\n This datasource does not support full-range histograms. The graph is based on the logs seen in the\n response.\n </div>\n <ExploreGraph\n graphStyle=\"lines\"\n data={logsSeries}\n height={150}\n width={width}\n tooltipDisplayMode={TooltipDisplayMode.Multi}\n absoluteRange={visibleRange || absoluteRange}\n timeZone={timeZone}\n loadingState={loadingState}\n onChangeTime={onChangeTime}\n onHiddenSeriesChanged={this.onToggleLogLevel}\n />\n </>\n ) : undefined}\n <div className={styles.logOptions} ref={this.topLogsRef}>\n <InlineFieldRow>\n <InlineField label=\"Time\" className={styles.horizontalInlineLabel} transparent>\n <InlineSwitch\n value={showTime}\n onChange={this.onChangeTime}\n className={styles.horizontalInlineSwitch}\n transparent\n id={`show-time_${exploreId}`}\n />\n </InlineField>\n <InlineField label=\"Unique labels\" className={styles.horizontalInlineLabel} transparent>\n <InlineSwitch\n value={showLabels}\n onChange={this.onChangeLabels}\n className={styles.horizontalInlineSwitch}\n transparent\n id={`unique-labels_${exploreId}`}\n />\n </InlineField>\n <InlineField label=\"Wrap lines\" className={styles.horizontalInlineLabel} transparent>\n <InlineSwitch\n value={wrapLogMessage}\n onChange={this.onChangeWrapLogMessage}\n className={styles.horizontalInlineSwitch}\n transparent\n id={`wrap-lines_${exploreId}`}\n />\n </InlineField>\n <InlineField label=\"Prettify JSON\" className={styles.horizontalInlineLabel} transparent>\n <InlineSwitch\n value={prettifyLogMessage}\n onChange={this.onChangePrettifyLogMessage}\n className={styles.horizontalInlineSwitch}\n transparent\n id={`prettify_${exploreId}`}\n />\n </InlineField>\n <InlineField label=\"Dedup\" className={styles.horizontalInlineLabel} transparent>\n <RadioButtonGroup\n options={Object.values(LogsDedupStrategy).map((dedupType) => ({\n label: capitalize(dedupType),\n value: dedupType,\n description: LogsDedupDescription[dedupType],\n }))}\n value={dedupStrategy}\n onChange={this.onChangeDedup}\n className={styles.radioButtons}\n />\n </InlineField>\n </InlineFieldRow>\n <div>\n <InlineField label=\"Display results\" className={styles.horizontalInlineLabel} transparent>\n <RadioButtonGroup\n disabled={isFlipping}\n options={[\n {\n label: 'Newest first',\n value: LogsSortOrder.Descending,\n description: 'Show results newest to oldest',\n },\n {\n label: 'Oldest first',\n value: LogsSortOrder.Ascending,\n description: 'Show results oldest to newest',\n },\n ]}\n value={logsSortOrder}\n onChange={this.onChangeLogsSortOrder}\n className={styles.radioButtons}\n />\n </InlineField>\n </div>\n </div>\n <LogsMetaRow\n logRows={logRows}\n meta={logsMeta || []}\n dedupStrategy={dedupStrategy}\n dedupCount={dedupCount}\n hasUnescapedContent={hasUnescapedContent}\n forceEscape={forceEscape}\n showDetectedFields={showDetectedFields}\n onEscapeNewlines={this.onEscapeNewlines}\n clearDetectedFields={this.clearDetectedFields}\n />\n <div className={styles.logsSection}>\n <div className={styles.logRows} data-testid=\"logRows\">\n <LogRows\n logRows={logRows}\n deduplicatedRows={dedupedRows}\n dedupStrategy={dedupStrategy}\n getRowContext={this.props.getRowContext}\n onClickFilterLabel={onClickFilterLabel}\n onClickFilterOutLabel={onClickFilterOutLabel}\n showContextToggle={showContextToggle}\n showLabels={showLabels}\n showTime={showTime}\n enableLogDetails={true}\n forceEscape={forceEscape}\n wrapLogMessage={wrapLogMessage}\n prettifyLogMessage={prettifyLogMessage}\n timeZone={timeZone}\n getFieldLinks={getFieldLinks}\n logsSortOrder={logsSortOrder}\n showDetectedFields={showDetectedFields}\n onClickShowDetectedField={this.showDetectedField}\n onClickHideDetectedField={this.hideDetectedField}\n />\n </div>\n <LogsNavigation\n logsSortOrder={logsSortOrder}\n visibleRange={navigationRange ?? absoluteRange}\n absoluteRange={absoluteRange}\n timeZone={timeZone}\n onChangeTime={onChangeTime}\n loading={loading}\n queries={logsQueries ?? []}\n scrollToTopLogs={this.scrollToTopLogs}\n addResultsToCache={addResultsToCache}\n clearCache={clearCache}\n />\n </div>\n {!loading && !hasData && !scanning && (\n <div className={styles.noData}>\n No logs found.\n <Button size=\"xs\" fill=\"text\" onClick={this.onClickScan}>\n Scan for older logs\n </Button>\n </div>\n )}\n\n {scanning && (\n <div className={styles.noData}>\n <span>{scanText}</span>\n <Button size=\"xs\" fill=\"text\" onClick={this.onClickStopScan}>\n Stop scan\n </Button>\n </div>\n )}\n </>\n );\n }\n}\n\nexport const Logs = withTheme2(UnthemedLogs);\n\nconst getStyles = (theme: GrafanaTheme2, wrapLogMessage: boolean) => {\n return {\n noData: css`\n > * {\n margin-left: 0.5em;\n }\n `,\n logOptions: css`\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n flex-wrap: wrap;\n background-color: ${theme.colors.background.primary};\n padding: ${theme.spacing(1, 2)};\n border-radius: ${theme.shape.borderRadius()};\n margin: ${theme.spacing(2, 0, 1)};\n border: 1px solid ${theme.colors.border.medium};\n `,\n headerButton: css`\n margin: ${theme.spacing(0.5, 0, 0, 1)};\n `,\n horizontalInlineLabel: css`\n > label {\n margin-right: 0;\n }\n `,\n horizontalInlineSwitch: css`\n padding: 0 ${theme.spacing(1)} 0 0;\n `,\n radioButtons: css`\n margin: 0;\n `,\n logsSection: css`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n `,\n logRows: css`\n overflow-x: ${wrapLogMessage ? 'unset' : 'scroll'};\n overflow-y: visible;\n width: 100%;\n `,\n infoText: css`\n font-size: ${theme.typography.size.sm};\n color: ${theme.colors.text.secondary};\n `,\n };\n};\n","import { css } from '@emotion/css';\nimport memoizeOne from 'memoize-one';\nimport React from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nconst transitionDuration = 500;\n// We add a bit of delay to the transition as another perf optimisation. As at the start we need to render\n// quite a bit of new rows, if we start transition at the same time there can be frame rate drop. This gives time\n// for react to first render them and then do the animation.\nconst transitionDelay = 100;\n\nconst getStyles = memoizeOne(() => {\n return {\n logsEnter: css`\n label: logsEnter;\n position: absolute;\n opacity: 0;\n height: auto;\n width: 100%;\n `,\n logsEnterActive: css`\n label: logsEnterActive;\n opacity: 1;\n transition: opacity ${transitionDuration}ms ease-out ${transitionDelay}ms;\n `,\n logsExit: css`\n label: logsExit;\n position: absolute;\n opacity: 1;\n height: auto;\n width: 100%;\n `,\n logsExitActive: css`\n label: logsExitActive;\n opacity: 0;\n transition: opacity ${transitionDuration}ms ease-out ${transitionDelay}ms;\n `,\n };\n});\n\ntype Props = {\n children: React.ReactNode;\n visible: boolean;\n};\n\n/**\n * Cross fade transition component that is tied a bit too much to the logs containers so not very useful elsewhere\n * right now.\n */\nexport function LogsCrossFadeTransition(props: Props) {\n const { visible, children } = props;\n const styles = getStyles();\n return (\n <CSSTransition\n in={visible}\n mountOnEnter={true}\n unmountOnExit={true}\n timeout={transitionDuration + transitionDelay}\n classNames={{\n enter: styles.logsEnter,\n enterActive: styles.logsEnterActive,\n exit: styles.logsExit,\n exitActive: styles.logsExitActive,\n }}\n >\n {children}\n </CSSTransition>\n );\n}\n","import { css } from '@emotion/css';\nimport React, { PureComponent } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport {\n AbsoluteTimeRange,\n Field,\n hasLogsContextSupport,\n LoadingState,\n LogRowModel,\n RawTimeRange,\n} from '@grafana/data';\nimport { Collapse } from '@grafana/ui';\nimport { StoreState } from 'app/types';\nimport { ExploreId, ExploreItemState } from 'app/types/explore';\n\nimport { getTimeZone } from '../profile/state/selectors';\n\nimport { LiveLogsWithTheme } from './LiveLogs';\nimport { Logs } from './Logs';\nimport { splitOpen } from './state/main';\nimport { addResultsToCache, clearCache } from './state/query';\nimport { updateTimeRange } from './state/time';\nimport { LiveTailControls } from './useLiveTailControls';\nimport { LogsCrossFadeTransition } from './utils/LogsCrossFadeTransition';\nimport { getFieldLinksForExplore } from './utils/links';\n\ninterface LogsContainerProps extends PropsFromRedux {\n width: number;\n exploreId: ExploreId;\n scanRange?: RawTimeRange;\n syncedTimes: boolean;\n loadingState: LoadingState;\n onClickFilterLabel?: (key: string, value: string) => void;\n onClickFilterOutLabel?: (key: string, value: string) => void;\n onStartScanning: () => void;\n onStopScanning: () => void;\n}\n\nclass LogsContainer extends PureComponent<LogsContainerProps> {\n onChangeTime = (absoluteRange: AbsoluteTimeRange) => {\n const { exploreId, updateTimeRange } = this.props;\n updateTimeRange({ exploreId, absoluteRange });\n };\n\n getLogRowContext = async (row: LogRowModel, options?: any): Promise<any> => {\n const { datasourceInstance, logsQueries } = this.props;\n\n if (hasLogsContextSupport(datasourceInstance)) {\n // we need to find the query, and we need to be very sure that\n // it's a query from this datasource\n const query = (logsQueries ?? []).find(\n (q) => q.refId === row.dataFrame.refId && q.datasource != null && q.datasource.type === datasourceInstance.type\n );\n return datasourceInstance.getLogRowContext(row, options, query);\n }\n\n return [];\n };\n\n showContextToggle = (row?: LogRowModel): boolean => {\n const { datasourceInstance } = this.props;\n\n if (hasLogsContextSupport(datasourceInstance)) {\n return datasourceInstance.showContextToggle(row);\n }\n\n return false;\n };\n\n getFieldLinks = (field: Field, rowIndex: number) => {\n const { splitOpen: splitOpenFn, range } = this.props;\n return getFieldLinksForExplore({ field, rowIndex, splitOpenFn, range });\n };\n\n render() {\n const {\n loading,\n loadingState,\n logRows,\n logsMeta,\n logsSeries,\n logsQueries,\n onClickFilterLabel,\n onClickFilterOutLabel,\n onStartScanning,\n onStopScanning,\n absoluteRange,\n timeZone,\n visibleRange,\n scanning,\n range,\n width,\n isLive,\n exploreId,\n addResultsToCache,\n clearCache,\n } = this.props;\n\n if (!logRows) {\n return null;\n }\n\n // We need to override css overflow of divs in Collapse element to enable sticky Logs navigation\n const styleOverridesForStickyNavigation = css`\n & > div {\n overflow: visible;\n & > div {\n overflow: visible;\n }\n }\n `;\n\n return (\n <>\n <LogsCrossFadeTransition visible={isLive}>\n <Collapse label=\"Logs\" loading={false} isOpen>\n <LiveTailControls exploreId={exploreId}>\n {(controls) => (\n <LiveLogsWithTheme\n logRows={logRows}\n timeZone={timeZone}\n stopLive={controls.stop}\n isPaused={this.props.isPaused}\n onPause={controls.pause}\n onResume={controls.resume}\n />\n )}\n </LiveTailControls>\n </Collapse>\n </LogsCrossFadeTransition>\n <LogsCrossFadeTransition visible={!isLive}>\n <Collapse label=\"Logs\" loading={loading} isOpen className={styleOverridesForStickyNavigation}>\n <Logs\n exploreId={exploreId}\n datasourceType={this.props.datasourceInstance?.type}\n logRows={logRows}\n logsMeta={logsMeta}\n logsSeries={logsSeries}\n logsQueries={logsQueries}\n width={width}\n loading={loading}\n loadingState={loadingState}\n onChangeTime={this.onChangeTime}\n onClickFilterLabel={onClickFilterLabel}\n onClickFilterOutLabel={onClickFilterOutLabel}\n onStartScanning={onStartScanning}\n onStopScanning={onStopScanning}\n absoluteRange={absoluteRange}\n visibleRange={visibleRange}\n timeZone={timeZone}\n scanning={scanning}\n scanRange={range.raw}\n showContextToggle={this.showContextToggle}\n getRowContext={this.getLogRowContext}\n getFieldLinks={this.getFieldLinks}\n addResultsToCache={() => addResultsToCache(exploreId)}\n clearCache={() => clearCache(exploreId)}\n />\n </Collapse>\n </LogsCrossFadeTransition>\n </>\n );\n }\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: string }) {\n const explore = state.explore;\n // @ts-ignore\n const item: ExploreItemState = explore[exploreId];\n const {\n logsResult,\n loading,\n scanning,\n datasourceInstance,\n isLive,\n isPaused,\n range,\n absoluteRange,\n logsVolumeDataProvider,\n logsVolumeData,\n } = item;\n const timeZone = getTimeZone(state.user);\n\n return {\n loading,\n logRows: logsResult?.rows,\n logsMeta: logsResult?.meta,\n logsSeries: logsResult?.series,\n logsQueries: logsResult?.queries,\n visibleRange: logsResult?.visibleRange,\n scanning,\n timeZone,\n datasourceInstance,\n isLive,\n isPaused,\n range,\n absoluteRange,\n logsVolumeDataProvider,\n logsVolumeData,\n };\n}\n\nconst mapDispatchToProps = {\n updateTimeRange,\n splitOpen,\n addResultsToCache,\n clearCache,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\ntype PropsFromRedux = ConnectedProps<typeof connector>;\n\nexport default connector(LogsContainer);\n","import { css } from '@emotion/css';\nimport React, { useState } from 'react';\n\nimport { AbsoluteTimeRange, DataQueryError, DataQueryResponse, LoadingState, SplitOpen, TimeZone } from '@grafana/data';\nimport { Alert, Button, Collapse, InlineField, TooltipDisplayMode, useStyles2, useTheme2 } from '@grafana/ui';\n\nimport { ExploreGraph } from './ExploreGraph';\n\ntype Props = {\n logsVolumeData?: DataQueryResponse;\n absoluteRange: AbsoluteTimeRange;\n timeZone: TimeZone;\n splitOpen: SplitOpen;\n width: number;\n onUpdateTimeRange: (timeRange: AbsoluteTimeRange) => void;\n onLoadLogsVolume: () => void;\n};\n\nconst SHORT_ERROR_MESSAGE_LIMIT = 100;\n\nfunction ErrorAlert(props: { error: DataQueryError }) {\n const [isOpen, setIsOpen] = useState(false);\n // generic get-error-message-logic, taken from\n // /public/app/features/explore/ErrorContainer.tsx\n const message = props.error.message || props.error.data?.message || '';\n\n const showButton = !isOpen && message.length > SHORT_ERROR_MESSAGE_LIMIT;\n\n return (\n <Alert title=\"Failed to load log volume for this query\" severity=\"warning\">\n {showButton ? (\n <Button\n variant=\"secondary\"\n size=\"xs\"\n onClick={() => {\n setIsOpen(true);\n }}\n >\n Show details\n </Button>\n ) : (\n message\n )}\n </Alert>\n );\n}\n\nexport function LogsVolumePanel(props: Props) {\n const { width, logsVolumeData, absoluteRange, timeZone, splitOpen, onUpdateTimeRange, onLoadLogsVolume } = props;\n const theme = useTheme2();\n const styles = useStyles2(getStyles);\n const spacing = parseInt(theme.spacing(2).slice(0, -2), 10);\n const height = 150;\n\n let LogsVolumePanelContent;\n\n if (!logsVolumeData) {\n return null;\n } else if (logsVolumeData?.error) {\n return <ErrorAlert error={logsVolumeData?.error} />;\n } else if (logsVolumeData?.state === LoadingState.Loading) {\n LogsVolumePanelContent = <span>Log volume is loading...</span>;\n } else if (logsVolumeData?.data) {\n if (logsVolumeData.data.length > 0) {\n LogsVolumePanelContent = (\n <ExploreGraph\n graphStyle=\"lines\"\n loadingState={LoadingState.Done}\n data={logsVolumeData.data}\n height={height}\n width={width - spacing}\n absoluteRange={absoluteRange}\n onChangeTime={onUpdateTimeRange}\n timeZone={timeZone}\n splitOpenFn={splitOpen}\n tooltipDisplayMode={TooltipDisplayMode.Multi}\n />\n );\n } else {\n LogsVolumePanelContent = <span>No volume data.</span>;\n }\n }\n\n const zoomRatio = logsLevelZoomRatio(logsVolumeData, absoluteRange);\n let zoomLevelInfo;\n\n if (zoomRatio !== undefined && zoomRatio < 1) {\n zoomLevelInfo = (\n <InlineField label=\"Reload log volume\" transparent>\n <Button size=\"xs\" icon=\"sync\" variant=\"secondary\" onClick={onLoadLogsVolume} id=\"reload-volume\" />\n </InlineField>\n );\n }\n\n return (\n <Collapse label=\"Log volume\" isOpen={true} loading={logsVolumeData?.state === LoadingState.Loading}>\n <div style={{ height }} className={styles.contentContainer}>\n {LogsVolumePanelContent}\n </div>\n <div className={styles.zoomInfoContainer}>{zoomLevelInfo}</div>\n </Collapse>\n );\n}\n\nconst getStyles = () => {\n return {\n zoomInfoContainer: css`\n display: flex;\n justify-content: end;\n position: absolute;\n right: 5px;\n top: 5px;\n `,\n contentContainer: css`\n display: flex;\n align-items: center;\n justify-content: center;\n `,\n };\n};\n\nfunction logsLevelZoomRatio(\n logsVolumeData: DataQueryResponse | undefined,\n selectedTimeRange: AbsoluteTimeRange\n): number | undefined {\n const dataRange = logsVolumeData && logsVolumeData.data[0] && logsVolumeData.data[0].meta?.custom?.absoluteRange;\n return dataRange ? (selectedTimeRange.from - selectedTimeRange.to) / (dataRange.from - dataRange.to) : undefined;\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data/src';\nimport { useStyles2, PanelContainer } from '@grafana/ui';\n\nexport const NoData = () => {\n const css = useStyles2(getStyles);\n return (\n <>\n <PanelContainer data-testid=\"explore-no-data\" className={css.wrapper}>\n <span className={css.message}>{'No data'}</span>\n </PanelContainer>\n </>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n wrapper: css`\n label: no-data-card;\n padding: ${theme.spacing(3)};\n background: ${theme.colors.background.primary};\n border-radius: ${theme.shape.borderRadius(2)};\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n `,\n message: css`\n font-size: ${theme.typography.h2.fontSize};\n padding: ${theme.spacing(4)};\n color: ${theme.colors.text.disabled};\n `,\n});\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { LinkButton, CallToActionCard, Icon, useTheme2 } from '@grafana/ui';\nimport { contextSrv } from 'app/core/core';\nimport { AccessControlAction } from 'app/types';\n\nexport const NoDataSourceCallToAction = () => {\n const theme = useTheme2();\n\n const canCreateDataSource =\n contextSrv.hasPermission(AccessControlAction.DataSourcesCreate) &&\n contextSrv.hasPermission(AccessControlAction.DataSourcesWrite);\n\n const message =\n 'Explore requires at least one data source. Once you have added a data source, you can query it here.';\n const footer = (\n <>\n <Icon name=\"rocket\" />\n <> ProTip: You can also define data sources through configuration files. </>\n <a\n href=\"http://docs.grafana.org/administration/provisioning/#datasources?utm_source=explore\"\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"text-link\"\n >\n Learn more\n </a>\n </>\n );\n\n const ctaElement = (\n <LinkButton size=\"lg\" href=\"datasources/new\" icon=\"database\" disabled={!canCreateDataSource}>\n Add data source\n </LinkButton>\n );\n\n const cardClassName = css`\n max-width: ${theme.breakpoints.values.lg}px;\n margin-top: ${theme.spacing(2)};\n align-self: center;\n `;\n\n return (\n <CallToActionCard callToActionElement={ctaElement} className={cardClassName} footer={footer} message={message} />\n );\n};\n","import { css } from '@emotion/css';\nimport React from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\nimport { useToggle } from 'react-use';\n\nimport { applyFieldOverrides, DataFrame, GrafanaTheme2 } from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime';\nimport { Badge, Collapse, useStyles2, useTheme2 } from '@grafana/ui';\n\nimport { NodeGraph } from '../../plugins/panel/nodeGraph';\nimport { useCategorizeFrames } from '../../plugins/panel/nodeGraph/useCategorizeFrames';\nimport { ExploreId, StoreState } from '../../types';\n\nimport { splitOpen } from './state/main';\nimport { useLinks } from './utils/links';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n warningText: css`\n label: warningText;\n font-size: ${theme.typography.bodySmall.fontSize};\n color: ${theme.colors.text.secondary};\n `,\n});\n\ninterface OwnProps {\n // Edges and Nodes are separate frames\n dataFrames: DataFrame[];\n exploreId: ExploreId;\n // When showing the node graph together with trace view we do some changes so it works better.\n withTraceView?: boolean;\n datasourceType: string;\n}\n\ntype Props = OwnProps & ConnectedProps<typeof connector>;\n\nexport function UnconnectedNodeGraphContainer(props: Props) {\n const { dataFrames, range, splitOpen, withTraceView, datasourceType } = props;\n const getLinks = useLinks(range, splitOpen);\n const theme = useTheme2();\n const styles = useStyles2(getStyles);\n\n // This is implicit dependency that is needed for links to work. At some point when replacing variables in the link\n // it requires field to have a display property which is added by the overrides even though we don't add any field\n // overrides in explore.\n const frames = applyFieldOverrides({\n fieldConfig: {\n defaults: {},\n overrides: [],\n },\n data: dataFrames,\n // We don't need proper replace here as it is only used in getLinks and we use getFieldLinks\n replaceVariables: (value) => value,\n theme,\n });\n\n const { nodes } = useCategorizeFrames(frames);\n const [open, toggleOpen] = useToggle(false);\n const toggled = () => {\n toggleOpen();\n reportInteraction('grafana_traces_node_graph_panel_clicked', {\n datasourceType: datasourceType,\n expanded: !open,\n });\n };\n\n const countWarning =\n withTraceView && nodes[0]?.length > 1000 ? (\n <span className={styles.warningText}> ({nodes[0].length} nodes, can be slow to load)</span>\n ) : null;\n\n return (\n <Collapse\n label={\n <span>\n Node graph{countWarning}{' '}\n <Badge text={'Beta'} color={'blue'} icon={'rocket'} tooltip={'This visualization is in beta'} />\n </span>\n }\n collapsible={withTraceView}\n // We allow collapsing this only when it is shown together with trace view.\n isOpen={withTraceView ? open : true}\n onToggle={withTraceView ? () => toggled() : undefined}\n >\n <div style={{ height: withTraceView ? 500 : 600 }}>\n <NodeGraph dataFrames={frames} getLinks={getLinks} />\n </div>\n </Collapse>\n );\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: OwnProps) {\n return {\n range: state.explore[exploreId]!.range,\n };\n}\n\nconst mapDispatchToProps = {\n splitOpen,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\nexport const NodeGraphContainer = connector(UnconnectedNodeGraphContainer);\n","import { createSelector } from '@reduxjs/toolkit';\nimport React, { useCallback, useMemo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { CoreApp, DataQuery } from '@grafana/data';\nimport { getNextRefIdChar } from 'app/core/utils/query';\nimport { ExploreId } from 'app/types/explore';\n\nimport { getDatasourceSrv } from '../plugins/datasource_srv';\nimport { QueryEditorRows } from '../query/components/QueryEditorRows';\n\nimport { runQueries, changeQueriesAction } from './state/query';\nimport { getExploreItemSelector } from './state/selectors';\n\ninterface Props {\n exploreId: ExploreId;\n}\n\nconst makeSelectors = (exploreId: ExploreId) => {\n const exploreItemSelector = getExploreItemSelector(exploreId);\n return {\n getQueries: createSelector(exploreItemSelector, (s) => s!.queries),\n getQueryResponse: createSelector(exploreItemSelector, (s) => s!.queryResponse),\n getHistory: createSelector(exploreItemSelector, (s) => s!.history),\n getEventBridge: createSelector(exploreItemSelector, (s) => s!.eventBridge),\n getDatasourceInstanceSettings: createSelector(\n exploreItemSelector,\n (s) => getDatasourceSrv().getInstanceSettings(s!.datasourceInstance?.uid)!\n ),\n };\n};\n\nexport const QueryRows = ({ exploreId }: Props) => {\n const dispatch = useDispatch();\n const { getQueries, getDatasourceInstanceSettings, getQueryResponse, getHistory, getEventBridge } = useMemo(\n () => makeSelectors(exploreId),\n [exploreId]\n );\n\n const queries = useSelector(getQueries)!;\n const dsSettings = useSelector(getDatasourceInstanceSettings)!;\n const queryResponse = useSelector(getQueryResponse)!;\n const history = useSelector(getHistory);\n const eventBridge = useSelector(getEventBridge);\n\n const onRunQueries = useCallback(() => {\n dispatch(runQueries(exploreId));\n }, [dispatch, exploreId]);\n\n const onChange = useCallback(\n (newQueries: DataQuery[]) => {\n dispatch(changeQueriesAction({ queries: newQueries, exploreId }));\n\n // if we are removing a query we want to run the remaining ones\n if (newQueries.length < queries.length) {\n onRunQueries();\n }\n },\n [dispatch, exploreId, onRunQueries, queries]\n );\n\n const onAddQuery = useCallback(\n (query: DataQuery) => {\n onChange([...queries, { ...query, refId: getNextRefIdChar(queries) }]);\n },\n [onChange, queries]\n );\n\n return (\n <QueryEditorRows\n dsSettings={dsSettings}\n queries={queries}\n onQueriesChange={onChange}\n onAddQuery={onAddQuery}\n onRunQueries={onRunQueries}\n data={queryResponse}\n app={CoreApp.Explore}\n history={history}\n eventBus={eventBridge}\n />\n );\n};\n","import React, { FC, CSSProperties } from 'react';\nimport Transition, { ExitHandler } from 'react-transition-group/Transition';\n\ninterface Props {\n duration: number;\n children: JSX.Element;\n in: boolean;\n unmountOnExit?: boolean;\n onExited?: ExitHandler<HTMLDivElement>;\n}\n\nexport const FadeIn: FC<Props> = (props) => {\n const defaultStyle: CSSProperties = {\n transition: `opacity ${props.duration}ms linear`,\n opacity: 0,\n };\n\n const transitionStyles: { [str: string]: CSSProperties } = {\n exited: { opacity: 0, display: 'none' },\n entering: { opacity: 0 },\n entered: { opacity: 1 },\n exiting: { opacity: 0 },\n };\n\n return (\n <Transition\n in={props.in}\n timeout={props.duration}\n unmountOnExit={props.unmountOnExit || false}\n onExited={props.onExited}\n >\n {(state) => (\n <div\n style={{\n ...defaultStyle,\n ...transitionStyles[state],\n }}\n >\n {props.children}\n </div>\n )}\n </Transition>\n );\n};\n","import React, { FunctionComponent } from 'react';\n\nimport { DataQueryError } from '@grafana/data';\nimport { Alert } from '@grafana/ui';\nimport { FadeIn } from 'app/core/components/Animations/FadeIn';\n\nexport interface ErrorContainerProps {\n queryError?: DataQueryError;\n}\n\nexport const ErrorContainer: FunctionComponent<ErrorContainerProps> = (props) => {\n const { queryError } = props;\n const showError = queryError ? true : false;\n const duration = showError ? 100 : 10;\n const title = queryError ? 'Query error' : 'Unknown error';\n const message = queryError?.message || queryError?.data?.message || null;\n\n return (\n <FadeIn in={showError} duration={duration}>\n <Alert severity=\"error\" title={title} topSpacing={2}>\n {message}\n </Alert>\n </FadeIn>\n );\n};\n","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nimport { LoadingState } from '@grafana/data';\n\nimport { ExploreId, StoreState } from '../../types';\n\nimport { ErrorContainer } from './ErrorContainer';\n\ninterface Props {\n exploreId: ExploreId;\n}\nexport function ResponseErrorContainer(props: Props) {\n const queryResponse = useSelector((state: StoreState) => state.explore[props.exploreId]?.queryResponse);\n const queryError = queryResponse?.state === LoadingState.Error ? queryResponse?.error : undefined;\n\n // Errors with ref ids are shown below the corresponding query\n if (queryError?.refId) {\n return null;\n }\n\n return <ErrorContainer queryError={queryError} />;\n}\n","import { css, cx } from '@emotion/css';\nimport React, { useState, useEffect } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { GrafanaTheme, DataSourceApi, DataQuery } from '@grafana/data';\nimport { config, getDataSourceSrv, reportInteraction } from '@grafana/runtime';\nimport { stylesFactory, useTheme, TextArea, Button, IconButton } from '@grafana/ui';\nimport { notifyApp } from 'app/core/actions';\nimport appEvents from 'app/core/app_events';\nimport { createSuccessNotification } from 'app/core/copy/appNotification';\nimport { copyStringToClipboard } from 'app/core/utils/explore';\nimport { createUrlFromRichHistory, createQueryText } from 'app/core/utils/richHistory';\nimport { createAndCopyShortLink } from 'app/core/utils/shortLinks';\nimport { dispatch } from 'app/store/store';\nimport { StoreState } from 'app/types';\nimport { RichHistoryQuery, ExploreId } from 'app/types/explore';\n\nimport { ShowConfirmModalEvent } from '../../../types/events';\nimport { changeDatasource } from '../state/datasource';\nimport { starHistoryItem, commentHistoryItem, deleteHistoryItem } from '../state/history';\nimport { setQueries } from '../state/query';\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: ExploreId }) {\n const explore = state.explore;\n const { datasourceInstance } = explore[exploreId]!;\n return {\n exploreId,\n datasourceInstance,\n };\n}\n\nconst mapDispatchToProps = {\n changeDatasource,\n deleteHistoryItem,\n commentHistoryItem,\n starHistoryItem,\n setQueries,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ninterface OwnProps<T extends DataQuery = DataQuery> {\n query: RichHistoryQuery<T>;\n dsImg: string;\n isRemoved: boolean;\n}\n\nexport type Props<T extends DataQuery = DataQuery> = ConnectedProps<typeof connector> & OwnProps<T>;\n\nconst getStyles = stylesFactory((theme: GrafanaTheme, isRemoved: boolean) => {\n /* Hard-coded value so all buttons and icons on right side of card are aligned */\n const rigtColumnWidth = '240px';\n const rigtColumnContentWidth = '170px';\n\n /* If datasource was removed, card will have inactive color */\n const cardColor = theme.colors.bg2;\n\n return {\n queryCard: css`\n display: flex;\n flex-direction: column;\n border: 1px solid ${theme.colors.border1};\n margin: ${theme.spacing.sm} 0;\n background-color: ${cardColor};\n border-radius: ${theme.border.radius.sm};\n .starred {\n color: ${theme.palette.orange};\n }\n `,\n cardRow: css`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ${theme.spacing.sm};\n border-bottom: none;\n :first-of-type {\n border-bottom: 1px solid ${theme.colors.border1};\n padding: ${theme.spacing.xs} ${theme.spacing.sm};\n }\n img {\n height: ${theme.typography.size.base};\n max-width: ${theme.typography.size.base};\n margin-right: ${theme.spacing.sm};\n }\n `,\n datasourceContainer: css`\n display: flex;\n align-items: center;\n font-size: ${theme.typography.size.sm};\n font-weight: ${theme.typography.weight.semibold};\n `,\n queryActionButtons: css`\n max-width: ${rigtColumnContentWidth};\n display: flex;\n justify-content: flex-end;\n font-size: ${theme.typography.size.base};\n button {\n margin-left: ${theme.spacing.sm};\n }\n `,\n queryContainer: css`\n font-weight: ${theme.typography.weight.semibold};\n width: calc(100% - ${rigtColumnWidth});\n `,\n queryRow: css`\n border-top: 1px solid ${theme.colors.border1};\n word-break: break-all;\n padding: 4px 2px;\n :first-child {\n border-top: none;\n padding: 0 0 4px 0;\n }\n `,\n updateCommentContainer: css`\n width: calc(100% + ${rigtColumnWidth});\n margin-top: ${theme.spacing.sm};\n `,\n comment: css`\n overflow-wrap: break-word;\n font-size: ${theme.typography.size.sm};\n font-weight: ${theme.typography.weight.regular};\n margin-top: ${theme.spacing.xs};\n `,\n commentButtonRow: css`\n > * {\n margin-right: ${theme.spacing.sm};\n }\n `,\n textArea: css`\n width: 100%;\n `,\n runButton: css`\n max-width: ${rigtColumnContentWidth};\n display: flex;\n justify-content: flex-end;\n button {\n height: auto;\n padding: ${theme.spacing.xs} ${theme.spacing.md};\n line-height: 1.4;\n span {\n white-space: normal !important;\n }\n }\n `,\n };\n});\n\nexport function RichHistoryCard(props: Props) {\n const {\n query,\n dsImg,\n isRemoved,\n commentHistoryItem,\n starHistoryItem,\n deleteHistoryItem,\n changeDatasource,\n exploreId,\n datasourceInstance,\n setQueries,\n } = props;\n const [activeUpdateComment, setActiveUpdateComment] = useState(false);\n const [comment, setComment] = useState<string | undefined>(query.comment);\n const [queryDsInstance, setQueryDsInstance] = useState<DataSourceApi | undefined>(undefined);\n\n useEffect(() => {\n const getQueryDsInstance = async () => {\n const ds = await getDataSourceSrv().get(query.datasourceName);\n setQueryDsInstance(ds);\n };\n\n getQueryDsInstance();\n }, [query.datasourceName]);\n\n const theme = useTheme();\n const styles = getStyles(theme, isRemoved);\n\n const onRunQuery = async () => {\n const queriesToRun = query.queries;\n const differentDataSource = query.datasourceName !== datasourceInstance?.name;\n if (differentDataSource) {\n await changeDatasource(exploreId, query.datasourceName, { importQueries: true });\n setQueries(exploreId, queriesToRun);\n } else {\n setQueries(exploreId, queriesToRun);\n }\n reportInteraction('grafana_explore_query_history_run', {\n queryHistoryEnabled: config.queryHistoryEnabled,\n differentDataSource,\n });\n };\n\n const onCopyQuery = () => {\n const queriesToCopy = query.queries.map((q) => createQueryText(q, queryDsInstance)).join('\\n');\n copyStringToClipboard(queriesToCopy);\n dispatch(notifyApp(createSuccessNotification('Query copied to clipboard')));\n };\n\n const onCreateShortLink = async () => {\n const link = createUrlFromRichHistory(query);\n await createAndCopyShortLink(link);\n };\n\n const onDeleteQuery = () => {\n const performDelete = (queryId: string) => {\n deleteHistoryItem(queryId);\n dispatch(notifyApp(createSuccessNotification('Query deleted')));\n reportInteraction('grafana_explore_query_history_deleted', {\n queryHistoryEnabled: config.queryHistoryEnabled,\n });\n };\n\n // For starred queries, we want confirmation. For non-starred, we don't.\n if (query.starred) {\n appEvents.publish(\n new ShowConfirmModalEvent({\n title: 'Delete',\n text: 'Are you sure you want to permanently delete your starred query?',\n yesText: 'Delete',\n icon: 'trash-alt',\n onConfirm: () => performDelete(query.id),\n })\n );\n } else {\n performDelete(query.id);\n }\n };\n\n const onStarrQuery = () => {\n starHistoryItem(query.id, !query.starred);\n reportInteraction('grafana_explore_query_history_starred', {\n queryHistoryEnabled: config.queryHistoryEnabled,\n newValue: !query.starred,\n });\n };\n\n const toggleActiveUpdateComment = () => setActiveUpdateComment(!activeUpdateComment);\n\n const onUpdateComment = () => {\n commentHistoryItem(query.id, comment);\n setActiveUpdateComment(false);\n reportInteraction('grafana_explore_query_history_commented', {\n queryHistoryEnabled: config.queryHistoryEnabled,\n });\n };\n\n const onCancelUpdateComment = () => {\n setActiveUpdateComment(false);\n setComment(query.comment);\n };\n\n const onKeyDown = (keyEvent: React.KeyboardEvent) => {\n if (keyEvent.key === 'Enter' && (keyEvent.shiftKey || keyEvent.ctrlKey)) {\n onUpdateComment();\n }\n\n if (keyEvent.key === 'Escape') {\n onCancelUpdateComment();\n }\n };\n\n const updateComment = (\n <div className={styles.updateCommentContainer} aria-label={comment ? 'Update comment form' : 'Add comment form'}>\n <TextArea\n value={comment}\n placeholder={comment ? undefined : 'An optional description of what the query does.'}\n onChange={(e) => setComment(e.currentTarget.value)}\n className={styles.textArea}\n />\n <div className={styles.commentButtonRow}>\n <Button onClick={onUpdateComment} aria-label=\"Submit button\">\n Save comment\n </Button>\n <Button variant=\"secondary\" onClick={onCancelUpdateComment}>\n Cancel\n </Button>\n </div>\n </div>\n );\n\n const queryActionButtons = (\n <div className={styles.queryActionButtons}>\n <IconButton\n name=\"comment-alt\"\n onClick={toggleActiveUpdateComment}\n title={query.comment?.length > 0 ? 'Edit comment' : 'Add comment'}\n />\n <IconButton name=\"copy\" onClick={onCopyQuery} title=\"Copy query to clipboard\" />\n {!isRemoved && (\n <IconButton name=\"share-alt\" onClick={onCreateShortLink} title=\"Copy shortened link to clipboard\" />\n )}\n <IconButton name=\"trash-alt\" title={'Delete query'} onClick={onDeleteQuery} />\n <IconButton\n name={query.starred ? 'favorite' : 'star'}\n iconType={query.starred ? 'mono' : 'default'}\n onClick={onStarrQuery}\n title={query.starred ? 'Unstar query' : 'Star query'}\n />\n </div>\n );\n\n return (\n <div className={styles.queryCard} onKeyDown={onKeyDown}>\n <div className={styles.cardRow}>\n <div className={styles.datasourceContainer}>\n <img src={dsImg} aria-label=\"Data source icon\" />\n <div aria-label=\"Data source name\">\n {isRemoved ? 'Data source does not exist anymore' : query.datasourceName}\n </div>\n </div>\n {queryActionButtons}\n </div>\n <div className={cx(styles.cardRow)}>\n <div className={styles.queryContainer}>\n {query.queries.map((q, i) => {\n const queryText = createQueryText(q, queryDsInstance);\n return (\n <div aria-label=\"Query text\" key={`${q}-${i}`} className={styles.queryRow}>\n {queryText}\n </div>\n );\n })}\n {!activeUpdateComment && query.comment && (\n <div aria-label=\"Query comment\" className={styles.comment}>\n {query.comment}\n </div>\n )}\n {activeUpdateComment && updateComment}\n </div>\n {!activeUpdateComment && (\n <div className={styles.runButton}>\n <Button variant=\"secondary\" onClick={onRunQuery} disabled={isRemoved}>\n {datasourceInstance?.name === query.datasourceName ? 'Run query' : 'Switch data source and run query'}\n </Button>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport default connector(RichHistoryCard);\n","import { css } from '@emotion/css';\nimport React, { useEffect } from 'react';\n\nimport { GrafanaTheme, SelectableValue } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { Button, FilterInput, MultiSelect, RangeSlider, Select, stylesFactory, useTheme } from '@grafana/ui';\nimport {\n createDatasourcesList,\n mapNumbertoTimeInSlider,\n mapQueriesToHeadings,\n SortOrder,\n RichHistorySearchFilters,\n RichHistorySettings,\n} from 'app/core/utils/richHistory';\nimport { ExploreId, RichHistoryQuery } from 'app/types/explore';\n\nimport { getSortOrderOptions } from './RichHistory';\nimport RichHistoryCard from './RichHistoryCard';\n\nexport interface Props {\n queries: RichHistoryQuery[];\n totalQueries: number;\n loading: boolean;\n activeDatasourceInstance: string;\n updateFilters: (filtersToUpdate?: Partial<RichHistorySearchFilters>) => void;\n clearRichHistoryResults: () => void;\n loadMoreRichHistory: () => void;\n richHistorySettings: RichHistorySettings;\n richHistorySearchFilters?: RichHistorySearchFilters;\n exploreId: ExploreId;\n height: number;\n}\n\nconst getStyles = stylesFactory((theme: GrafanaTheme, height: number) => {\n const bgColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark4;\n\n /* 134px is based on the width of the Query history tabs bar, so the content is aligned to right side of the tab */\n const cardWidth = '100% - 134px';\n const sliderHeight = `${height - 180}px`;\n return {\n container: css`\n display: flex;\n .label-slider {\n font-size: ${theme.typography.size.sm};\n &:last-of-type {\n margin-top: ${theme.spacing.lg};\n }\n &:first-of-type {\n font-weight: ${theme.typography.weight.semibold};\n margin-bottom: ${theme.spacing.md};\n }\n }\n `,\n containerContent: css`\n width: calc(${cardWidth});\n `,\n containerSlider: css`\n width: 129px;\n margin-right: ${theme.spacing.sm};\n .slider {\n bottom: 10px;\n height: ${sliderHeight};\n width: 129px;\n padding: ${theme.spacing.sm} 0;\n }\n `,\n slider: css`\n position: fixed;\n `,\n selectors: css`\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n `,\n filterInput: css`\n margin-bottom: ${theme.spacing.sm};\n `,\n multiselect: css`\n width: 100%;\n margin-bottom: ${theme.spacing.sm};\n .gf-form-select-box__multi-value {\n background-color: ${bgColor};\n padding: ${theme.spacing.xxs} ${theme.spacing.xs} ${theme.spacing.xxs} ${theme.spacing.sm};\n border-radius: ${theme.border.radius.sm};\n }\n `,\n sort: css`\n width: 170px;\n `,\n sessionName: css`\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n margin-top: ${theme.spacing.lg};\n h4 {\n margin: 0 10px 0 0;\n }\n `,\n heading: css`\n font-size: ${theme.typography.heading.h4};\n margin: ${theme.spacing.md} ${theme.spacing.xxs} ${theme.spacing.sm} ${theme.spacing.xxs};\n `,\n footer: css`\n height: 60px;\n margin: ${theme.spacing.lg} auto;\n display: flex;\n justify-content: center;\n font-weight: ${theme.typography.weight.light};\n font-size: ${theme.typography.size.sm};\n a {\n font-weight: ${theme.typography.weight.semibold};\n margin-left: ${theme.spacing.xxs};\n }\n `,\n queries: css`\n font-size: ${theme.typography.size.sm};\n font-weight: ${theme.typography.weight.regular};\n margin-left: ${theme.spacing.xs};\n `,\n };\n});\n\nexport function RichHistoryQueriesTab(props: Props) {\n const {\n queries,\n totalQueries,\n loading,\n richHistorySearchFilters,\n updateFilters,\n clearRichHistoryResults,\n loadMoreRichHistory,\n richHistorySettings,\n exploreId,\n height,\n activeDatasourceInstance,\n } = props;\n\n const theme = useTheme();\n const styles = getStyles(theme, height);\n\n const listOfDatasources = createDatasourcesList();\n\n useEffect(() => {\n const datasourceFilters =\n !richHistorySettings.activeDatasourceOnly && richHistorySettings.lastUsedDatasourceFilters\n ? richHistorySettings.lastUsedDatasourceFilters\n : [activeDatasourceInstance];\n const filters: RichHistorySearchFilters = {\n search: '',\n sortOrder: SortOrder.Descending,\n datasourceFilters,\n from: 0,\n to: richHistorySettings.retentionPeriod,\n starred: false,\n };\n updateFilters(filters);\n\n return () => {\n clearRichHistoryResults();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!richHistorySearchFilters) {\n return <span>Loading...</span>;\n }\n\n /* mappedQueriesToHeadings is an object where query headings (stringified dates/data sources)\n * are keys and arrays with queries that belong to that headings are values.\n */\n const mappedQueriesToHeadings = mapQueriesToHeadings(queries, richHistorySearchFilters.sortOrder);\n const sortOrderOptions = getSortOrderOptions();\n const partialResults = queries.length && queries.length !== totalQueries;\n\n return (\n <div className={styles.container}>\n <div className={styles.containerSlider}>\n <div className={styles.slider}>\n <div className=\"label-slider\">Filter history</div>\n <div className=\"label-slider\">{mapNumbertoTimeInSlider(richHistorySearchFilters.from)}</div>\n <div className=\"slider\">\n <RangeSlider\n tooltipAlwaysVisible={false}\n min={0}\n max={richHistorySettings.retentionPeriod}\n value={[richHistorySearchFilters.from, richHistorySearchFilters.to]}\n orientation=\"vertical\"\n formatTooltipResult={mapNumbertoTimeInSlider}\n reverse={true}\n onAfterChange={(value) => {\n updateFilters({ from: value![0], to: value![1] });\n }}\n />\n </div>\n <div className=\"label-slider\">{mapNumbertoTimeInSlider(richHistorySearchFilters.to)}</div>\n </div>\n </div>\n\n <div className={styles.containerContent}>\n <div className={styles.selectors}>\n {!richHistorySettings.activeDatasourceOnly && (\n <MultiSelect\n className={styles.multiselect}\n options={listOfDatasources.map((ds) => {\n return { value: ds.name, label: ds.name };\n })}\n value={richHistorySearchFilters.datasourceFilters}\n placeholder=\"Filter queries for data sources(s)\"\n aria-label=\"Filter queries for data sources(s)\"\n onChange={(options: SelectableValue[]) => {\n updateFilters({ datasourceFilters: options.map((option) => option.value) });\n }}\n />\n )}\n <div className={styles.filterInput}>\n <FilterInput\n placeholder=\"Search queries\"\n value={richHistorySearchFilters.search}\n onChange={(search: string) => updateFilters({ search })}\n />\n </div>\n <div aria-label=\"Sort queries\" className={styles.sort}>\n <Select\n value={sortOrderOptions.filter((order) => order.value === richHistorySearchFilters.sortOrder)}\n options={sortOrderOptions}\n placeholder=\"Sort queries by\"\n onChange={(e: SelectableValue<SortOrder>) => updateFilters({ sortOrder: e.value })}\n />\n </div>\n </div>\n\n {loading && <span>Loading results...</span>}\n\n {!loading &&\n Object.keys(mappedQueriesToHeadings).map((heading) => {\n return (\n <div key={heading}>\n <div className={styles.heading}>\n {heading}{' '}\n <span className={styles.queries}>\n {partialResults ? 'Displaying ' : ''}\n {mappedQueriesToHeadings[heading].length} queries\n </span>\n </div>\n {mappedQueriesToHeadings[heading].map((q: RichHistoryQuery) => {\n const idx = listOfDatasources.findIndex((d) => d.name === q.datasourceName);\n return (\n <RichHistoryCard\n query={q}\n key={q.id}\n exploreId={exploreId}\n dsImg={idx === -1 ? 'public/img/icn-datasource.svg' : listOfDatasources[idx].imgUrl}\n isRemoved={idx === -1}\n />\n );\n })}\n </div>\n );\n })}\n {partialResults ? (\n <div>\n Showing {queries.length} of {totalQueries} <Button onClick={loadMoreRichHistory}>Load more</Button>\n </div>\n ) : null}\n <div className={styles.footer}>\n {!config.queryHistoryEnabled ? 'The history is local to your browser and is not shared with others.' : ''}\n </div>\n </div>\n </div>\n );\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme, SelectableValue } from '@grafana/data';\nimport { stylesFactory, useTheme, Select, Button, Field, InlineField, InlineSwitch, Alert } from '@grafana/ui';\nimport { notifyApp } from 'app/core/actions';\nimport appEvents from 'app/core/app_events';\nimport { createSuccessNotification } from 'app/core/copy/appNotification';\nimport { MAX_HISTORY_ITEMS } from 'app/core/history/RichHistoryLocalStorage';\nimport { dispatch } from 'app/store/store';\n\nimport { supportedFeatures } from '../../../core/history/richHistoryStorageProvider';\nimport { ShowConfirmModalEvent } from '../../../types/events';\n\nexport interface RichHistorySettingsProps {\n retentionPeriod: number;\n starredTabAsFirstTab: boolean;\n activeDatasourceOnly: boolean;\n onChangeRetentionPeriod: (option: SelectableValue<number>) => void;\n toggleStarredTabAsFirstTab: () => void;\n toggleactiveDatasourceOnly: () => void;\n deleteRichHistory: () => void;\n}\n\nconst getStyles = stylesFactory((theme: GrafanaTheme) => {\n return {\n container: css`\n font-size: ${theme.typography.size.sm};\n .space-between {\n margin-bottom: ${theme.spacing.lg};\n }\n `,\n input: css`\n max-width: 200px;\n `,\n };\n});\n\nconst retentionPeriodOptions = [\n { value: 2, label: '2 days' },\n { value: 5, label: '5 days' },\n { value: 7, label: '1 week' },\n { value: 14, label: '2 weeks' },\n];\n\nexport function RichHistorySettingsTab(props: RichHistorySettingsProps) {\n const {\n retentionPeriod,\n starredTabAsFirstTab,\n activeDatasourceOnly,\n onChangeRetentionPeriod,\n toggleStarredTabAsFirstTab,\n toggleactiveDatasourceOnly,\n deleteRichHistory,\n } = props;\n const theme = useTheme();\n const styles = getStyles(theme);\n const selectedOption = retentionPeriodOptions.find((v) => v.value === retentionPeriod);\n\n const onDelete = () => {\n appEvents.publish(\n new ShowConfirmModalEvent({\n title: 'Delete',\n text: 'Are you sure you want to permanently delete your query history?',\n yesText: 'Delete',\n icon: 'trash-alt',\n onConfirm: () => {\n deleteRichHistory();\n dispatch(notifyApp(createSuccessNotification('Query history deleted')));\n },\n })\n );\n };\n\n return (\n <div className={styles.container}>\n {supportedFeatures().changeRetention ? (\n <Field\n label=\"History time span\"\n description={`Select the period of time for which Grafana will save your query history. Up to ${MAX_HISTORY_ITEMS} entries will be stored.`}\n className=\"space-between\"\n >\n <div className={styles.input}>\n <Select value={selectedOption} options={retentionPeriodOptions} onChange={onChangeRetentionPeriod}></Select>\n </div>\n </Field>\n ) : (\n <Alert severity=\"info\" title=\"History time span\">\n Grafana will keep entries up to {selectedOption?.label}.\n </Alert>\n )}\n <InlineField label=\"Change the default active tab from “Query history” to “Starred”\" className=\"space-between\">\n <InlineSwitch\n id=\"explore-query-history-settings-default-active-tab\"\n value={starredTabAsFirstTab}\n onChange={toggleStarredTabAsFirstTab}\n />\n </InlineField>\n {supportedFeatures().onlyActiveDataSource && (\n <InlineField label=\"Only show queries for data source currently active in Explore\" className=\"space-between\">\n <InlineSwitch\n id=\"explore-query-history-settings-data-source-behavior\"\n value={activeDatasourceOnly}\n onChange={toggleactiveDatasourceOnly}\n />\n </InlineField>\n )}\n {supportedFeatures().clearHistory && (\n <div>\n <div\n className={css`\n font-weight: ${theme.typography.weight.bold};\n `}\n >\n Clear query history\n </div>\n <div\n className={css`\n margin-bottom: ${theme.spacing.sm};\n `}\n >\n Delete all of your query history, permanently.\n </div>\n <Button variant=\"destructive\" onClick={onDelete}>\n Clear query history\n </Button>\n </div>\n )}\n </div>\n );\n}\n","import { css } from '@emotion/css';\nimport React, { useEffect } from 'react';\n\nimport { GrafanaTheme, SelectableValue } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { stylesFactory, useTheme, Select, MultiSelect, FilterInput, Button } from '@grafana/ui';\nimport {\n createDatasourcesList,\n SortOrder,\n RichHistorySearchFilters,\n RichHistorySettings,\n} from 'app/core/utils/richHistory';\nimport { RichHistoryQuery, ExploreId } from 'app/types/explore';\n\nimport { getSortOrderOptions } from './RichHistory';\nimport RichHistoryCard from './RichHistoryCard';\n\nexport interface Props {\n queries: RichHistoryQuery[];\n totalQueries: number;\n loading: boolean;\n activeDatasourceInstance: string;\n updateFilters: (filtersToUpdate: Partial<RichHistorySearchFilters>) => void;\n clearRichHistoryResults: () => void;\n loadMoreRichHistory: () => void;\n richHistorySearchFilters?: RichHistorySearchFilters;\n richHistorySettings: RichHistorySettings;\n exploreId: ExploreId;\n}\n\nconst getStyles = stylesFactory((theme: GrafanaTheme) => {\n const bgColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark4;\n return {\n container: css`\n display: flex;\n `,\n containerContent: css`\n width: 100%;\n `,\n selectors: css`\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n `,\n multiselect: css`\n width: 100%;\n margin-bottom: ${theme.spacing.sm};\n .gf-form-select-box__multi-value {\n background-color: ${bgColor};\n padding: ${theme.spacing.xxs} ${theme.spacing.xs} ${theme.spacing.xxs} ${theme.spacing.sm};\n border-radius: ${theme.border.radius.sm};\n }\n `,\n filterInput: css`\n margin-bottom: ${theme.spacing.sm};\n `,\n sort: css`\n width: 170px;\n `,\n footer: css`\n height: 60px;\n margin-top: ${theme.spacing.lg};\n display: flex;\n justify-content: center;\n font-weight: ${theme.typography.weight.light};\n font-size: ${theme.typography.size.sm};\n a {\n font-weight: ${theme.typography.weight.semibold};\n margin-left: ${theme.spacing.xxs};\n }\n `,\n };\n});\n\nexport function RichHistoryStarredTab(props: Props) {\n const {\n updateFilters,\n clearRichHistoryResults,\n loadMoreRichHistory,\n activeDatasourceInstance,\n richHistorySettings,\n queries,\n totalQueries,\n loading,\n richHistorySearchFilters,\n exploreId,\n } = props;\n\n const theme = useTheme();\n const styles = getStyles(theme);\n\n const listOfDatasources = createDatasourcesList();\n\n useEffect(() => {\n const datasourceFilters =\n richHistorySettings.activeDatasourceOnly && richHistorySettings.lastUsedDatasourceFilters\n ? richHistorySettings.lastUsedDatasourceFilters\n : [activeDatasourceInstance];\n const filters: RichHistorySearchFilters = {\n search: '',\n sortOrder: SortOrder.Descending,\n datasourceFilters,\n from: 0,\n to: richHistorySettings.retentionPeriod,\n starred: true,\n };\n updateFilters(filters);\n return () => {\n clearRichHistoryResults();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!richHistorySearchFilters) {\n return <span>Loading...</span>;\n }\n\n const sortOrderOptions = getSortOrderOptions();\n\n return (\n <div className={styles.container}>\n <div className={styles.containerContent}>\n <div className={styles.selectors}>\n {!richHistorySettings.activeDatasourceOnly && (\n <MultiSelect\n className={styles.multiselect}\n options={listOfDatasources.map((ds) => {\n return { value: ds.name, label: ds.name };\n })}\n value={richHistorySearchFilters.datasourceFilters}\n placeholder=\"Filter queries for data sources(s)\"\n aria-label=\"Filter queries for data sources(s)\"\n onChange={(options: SelectableValue[]) => {\n updateFilters({ datasourceFilters: options.map((option) => option.value) });\n }}\n />\n )}\n <div className={styles.filterInput}>\n <FilterInput\n placeholder=\"Search queries\"\n value={richHistorySearchFilters.search}\n onChange={(search: string) => updateFilters({ search })}\n />\n </div>\n <div aria-label=\"Sort queries\" className={styles.sort}>\n <Select\n value={sortOrderOptions.filter((order) => order.value === richHistorySearchFilters.sortOrder)}\n options={sortOrderOptions}\n placeholder=\"Sort queries by\"\n onChange={(e: SelectableValue<SortOrder>) => updateFilters({ sortOrder: e.value })}\n />\n </div>\n </div>\n {loading && <span>Loading results...</span>}\n {!loading &&\n queries.map((q) => {\n const idx = listOfDatasources.findIndex((d) => d.name === q.datasourceName);\n return (\n <RichHistoryCard\n query={q}\n key={q.id}\n exploreId={exploreId}\n dsImg={idx === -1 ? 'public/img/icn-datasource.svg' : listOfDatasources[idx].imgUrl}\n isRemoved={idx === -1}\n />\n );\n })}\n {queries.length && queries.length !== totalQueries ? (\n <div>\n Showing {queries.length} of {totalQueries} <Button onClick={loadMoreRichHistory}>Load more</Button>\n </div>\n ) : null}\n <div className={styles.footer}>\n {!config.queryHistoryEnabled ? 'The history is local to your browser and is not shared with others.' : ''}\n </div>\n </div>\n </div>\n );\n}\n","import { debounce } from 'lodash';\nimport React, { PureComponent } from 'react';\n\nimport { SelectableValue } from '@grafana/data';\nimport { Themeable, withTheme, TabbedContainer, TabConfig } from '@grafana/ui';\nimport { SortOrder, RichHistorySearchFilters, RichHistorySettings } from 'app/core/utils/richHistory';\nimport { RichHistoryQuery, ExploreId } from 'app/types/explore';\n\nimport { supportedFeatures } from '../../../core/history/richHistoryStorageProvider';\n\nimport { RichHistoryQueriesTab } from './RichHistoryQueriesTab';\nimport { RichHistorySettingsTab } from './RichHistorySettingsTab';\nimport { RichHistoryStarredTab } from './RichHistoryStarredTab';\n\nexport enum Tabs {\n RichHistory = 'Query history',\n Starred = 'Starred',\n Settings = 'Settings',\n}\n\nexport const getSortOrderOptions = () =>\n [\n { label: 'Newest first', value: SortOrder.Descending },\n { label: 'Oldest first', value: SortOrder.Ascending },\n { label: 'Data source A-Z', value: SortOrder.DatasourceAZ },\n { label: 'Data source Z-A', value: SortOrder.DatasourceZA },\n ].filter((option) => supportedFeatures().availableFilters.includes(option.value));\n\nexport interface RichHistoryProps extends Themeable {\n richHistory: RichHistoryQuery[];\n richHistoryTotal?: number;\n richHistorySettings: RichHistorySettings;\n richHistorySearchFilters?: RichHistorySearchFilters;\n updateHistorySettings: (settings: RichHistorySettings) => void;\n updateHistorySearchFilters: (exploreId: ExploreId, filters: RichHistorySearchFilters) => void;\n loadRichHistory: (exploreId: ExploreId) => void;\n loadMoreRichHistory: (exploreId: ExploreId) => void;\n clearRichHistoryResults: (exploreId: ExploreId) => void;\n deleteRichHistory: () => void;\n activeDatasourceInstance: string;\n firstTab: Tabs;\n exploreId: ExploreId;\n height: number;\n onClose: () => void;\n}\n\ntype RichHistoryState = {\n loading: boolean;\n};\n\nclass UnThemedRichHistory extends PureComponent<RichHistoryProps> {\n state: RichHistoryState = {\n loading: false,\n };\n\n updateSettings = (settingsToUpdate: Partial<RichHistorySettings>) => {\n this.props.updateHistorySettings({ ...this.props.richHistorySettings, ...settingsToUpdate });\n };\n\n updateFilters = (filtersToUpdate?: Partial<RichHistorySearchFilters>) => {\n const filters = {\n ...this.props.richHistorySearchFilters!,\n ...filtersToUpdate,\n page: 1, // always load fresh results when updating filters\n };\n this.props.updateHistorySearchFilters(this.props.exploreId, filters);\n this.loadRichHistory();\n };\n\n clearResults = () => {\n this.props.clearRichHistoryResults(this.props.exploreId);\n };\n\n loadRichHistory = debounce(() => {\n this.props.loadRichHistory(this.props.exploreId);\n this.setState({\n loading: true,\n });\n }, 300);\n\n onChangeRetentionPeriod = (retentionPeriod: SelectableValue<number>) => {\n if (retentionPeriod.value !== undefined) {\n this.updateSettings({ retentionPeriod: retentionPeriod.value });\n }\n };\n\n toggleStarredTabAsFirstTab = () =>\n this.updateSettings({ starredTabAsFirstTab: !this.props.richHistorySettings.starredTabAsFirstTab });\n\n toggleActiveDatasourceOnly = () =>\n this.updateSettings({ activeDatasourceOnly: !this.props.richHistorySettings.activeDatasourceOnly });\n\n componentDidUpdate(prevProps: Readonly<RichHistoryProps>, prevState: Readonly<{}>, snapshot?: any) {\n if (prevProps.richHistory !== this.props.richHistory) {\n this.setState({\n loading: false,\n });\n }\n }\n\n render() {\n const {\n richHistory,\n richHistoryTotal,\n height,\n exploreId,\n deleteRichHistory,\n onClose,\n firstTab,\n activeDatasourceInstance,\n } = this.props;\n const { loading } = this.state;\n\n const QueriesTab: TabConfig = {\n label: 'Query history',\n value: Tabs.RichHistory,\n content: (\n <RichHistoryQueriesTab\n queries={richHistory}\n totalQueries={richHistoryTotal || 0}\n loading={loading}\n updateFilters={this.updateFilters}\n clearRichHistoryResults={() => this.props.clearRichHistoryResults(this.props.exploreId)}\n loadMoreRichHistory={() => this.props.loadMoreRichHistory(this.props.exploreId)}\n activeDatasourceInstance={activeDatasourceInstance}\n richHistorySettings={this.props.richHistorySettings}\n richHistorySearchFilters={this.props.richHistorySearchFilters}\n exploreId={exploreId}\n height={height}\n />\n ),\n icon: 'history',\n };\n\n const StarredTab: TabConfig = {\n label: 'Starred',\n value: Tabs.Starred,\n content: (\n <RichHistoryStarredTab\n queries={richHistory}\n totalQueries={richHistoryTotal || 0}\n loading={loading}\n activeDatasourceInstance={activeDatasourceInstance}\n updateFilters={this.updateFilters}\n clearRichHistoryResults={() => this.props.clearRichHistoryResults(this.props.exploreId)}\n loadMoreRichHistory={() => this.props.loadMoreRichHistory(this.props.exploreId)}\n richHistorySettings={this.props.richHistorySettings}\n richHistorySearchFilters={this.props.richHistorySearchFilters}\n exploreId={exploreId}\n />\n ),\n icon: 'star',\n };\n\n const SettingsTab: TabConfig = {\n label: 'Settings',\n value: Tabs.Settings,\n content: (\n <RichHistorySettingsTab\n retentionPeriod={this.props.richHistorySettings.retentionPeriod}\n starredTabAsFirstTab={this.props.richHistorySettings.starredTabAsFirstTab}\n activeDatasourceOnly={this.props.richHistorySettings.activeDatasourceOnly}\n onChangeRetentionPeriod={this.onChangeRetentionPeriod}\n toggleStarredTabAsFirstTab={this.toggleStarredTabAsFirstTab}\n toggleactiveDatasourceOnly={this.toggleActiveDatasourceOnly}\n deleteRichHistory={deleteRichHistory}\n />\n ),\n icon: 'sliders-v-alt',\n };\n\n let tabs = [QueriesTab, StarredTab, SettingsTab];\n return (\n <TabbedContainer tabs={tabs} onClose={onClose} defaultTab={firstTab} closeIconTooltip=\"Close query history\" />\n );\n }\n}\n\nexport const RichHistory = withTheme(UnThemedRichHistory);\n","// Libraries\nimport React, { useEffect, useState } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { config, reportInteraction } from '@grafana/runtime';\nimport { useTheme2 } from '@grafana/ui';\n// Types\nimport { ExploreItemState, StoreState } from 'app/types';\nimport { ExploreId } from 'app/types/explore';\n\n// Components, enums\nimport { ExploreDrawer } from '../ExploreDrawer';\nimport {\n deleteRichHistory,\n initRichHistory,\n loadRichHistory,\n loadMoreRichHistory,\n clearRichHistoryResults,\n updateHistorySettings,\n updateHistorySearchFilters,\n} from '../state/history';\n\nimport { RichHistory, Tabs } from './RichHistory';\n\n//Actions\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: ExploreId }) {\n const explore = state.explore;\n // @ts-ignore\n const item: ExploreItemState = explore[exploreId];\n const richHistorySearchFilters = item.richHistorySearchFilters;\n const richHistorySettings = explore.richHistorySettings;\n const { datasourceInstance } = item;\n const firstTab = richHistorySettings?.starredTabAsFirstTab ? Tabs.Starred : Tabs.RichHistory;\n const { richHistory, richHistoryTotal } = item;\n return {\n richHistory,\n richHistoryTotal,\n firstTab,\n activeDatasourceInstance: datasourceInstance!.name,\n richHistorySettings,\n richHistorySearchFilters,\n };\n}\n\nconst mapDispatchToProps = {\n initRichHistory,\n loadRichHistory,\n loadMoreRichHistory,\n clearRichHistoryResults,\n updateHistorySettings,\n updateHistorySearchFilters,\n deleteRichHistory,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ninterface OwnProps {\n width: number;\n exploreId: ExploreId;\n onClose: () => void;\n}\nexport type Props = ConnectedProps<typeof connector> & OwnProps;\n\nexport function RichHistoryContainer(props: Props) {\n const theme = useTheme2();\n const [height, setHeight] = useState(theme.components.horizontalDrawer.defaultHeight);\n\n const {\n richHistory,\n richHistoryTotal,\n width,\n firstTab,\n activeDatasourceInstance,\n exploreId,\n deleteRichHistory,\n initRichHistory,\n loadRichHistory,\n loadMoreRichHistory,\n clearRichHistoryResults,\n richHistorySettings,\n updateHistorySettings,\n richHistorySearchFilters,\n updateHistorySearchFilters,\n onClose,\n } = props;\n\n useEffect(() => {\n initRichHistory();\n reportInteraction('grafana_explore_query_history_opened', {\n queryHistoryEnabled: config.queryHistoryEnabled,\n });\n }, [initRichHistory]);\n\n if (!richHistorySettings) {\n return <span>Loading...</span>;\n }\n\n return (\n <ExploreDrawer\n width={width}\n onResize={(_e, _dir, ref) => {\n setHeight(Number(ref.style.height.slice(0, -2)));\n }}\n >\n <RichHistory\n richHistory={richHistory}\n richHistoryTotal={richHistoryTotal}\n firstTab={firstTab}\n activeDatasourceInstance={activeDatasourceInstance}\n exploreId={exploreId}\n onClose={onClose}\n height={height}\n deleteRichHistory={deleteRichHistory}\n richHistorySettings={richHistorySettings}\n richHistorySearchFilters={richHistorySearchFilters}\n updateHistorySettings={updateHistorySettings}\n updateHistorySearchFilters={updateHistorySearchFilters}\n loadRichHistory={loadRichHistory}\n loadMoreRichHistory={loadMoreRichHistory}\n clearRichHistoryResults={clearRichHistoryResults}\n />\n </ExploreDrawer>\n );\n}\n\nexport default connector(RichHistoryContainer);\n","import { css, cx } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Button, HorizontalGroup, useTheme2 } from '@grafana/ui';\n\ntype Props = {\n addQueryRowButtonDisabled?: boolean;\n addQueryRowButtonHidden?: boolean;\n richHistoryRowButtonHidden?: boolean;\n richHistoryButtonActive?: boolean;\n queryInspectorButtonActive?: boolean;\n\n onClickAddQueryRowButton: () => void;\n onClickRichHistoryButton: () => void;\n onClickQueryInspectorButton: () => void;\n};\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n containerMargin: css`\n margin-top: ${theme.spacing(2)};\n `,\n };\n};\nexport function SecondaryActions(props: Props) {\n const theme = useTheme2();\n const styles = getStyles(theme);\n return (\n <div className={styles.containerMargin}>\n <HorizontalGroup>\n {!props.addQueryRowButtonHidden && (\n <Button\n variant=\"secondary\"\n aria-label=\"Add row button\"\n onClick={props.onClickAddQueryRowButton}\n disabled={props.addQueryRowButtonDisabled}\n icon=\"plus\"\n >\n Add query\n </Button>\n )}\n {!props.richHistoryRowButtonHidden && (\n <Button\n variant=\"secondary\"\n aria-label=\"Rich history button\"\n className={cx({ ['explore-active-button']: props.richHistoryButtonActive })}\n onClick={props.onClickRichHistoryButton}\n icon=\"history\"\n >\n Query history\n </Button>\n )}\n <Button\n variant=\"secondary\"\n aria-label=\"Query inspector button\"\n className={cx({ ['explore-active-button']: props.queryInspectorButtonActive })}\n onClick={props.onClickQueryInspectorButton}\n icon=\"info-circle\"\n >\n Inspector\n </Button>\n </HorizontalGroup>\n </div>\n );\n}\n","import React, { PureComponent } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { ValueLinkConfig, applyFieldOverrides, TimeZone } from '@grafana/data';\nimport { Collapse, Table } from '@grafana/ui';\nimport { FilterItem } from '@grafana/ui/src/components/Table/types';\nimport { config } from 'app/core/config';\nimport { PANEL_BORDER } from 'app/core/constants';\nimport { StoreState } from 'app/types';\nimport { ExploreId, ExploreItemState } from 'app/types/explore';\n\nimport { MetaInfoText } from './MetaInfoText';\nimport { splitOpen } from './state/main';\nimport { getFieldLinksForExplore } from './utils/links';\n\ninterface TableContainerProps {\n ariaLabel?: string;\n exploreId: ExploreId;\n width: number;\n timeZone: TimeZone;\n onCellFilterAdded?: (filter: FilterItem) => void;\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: TableContainerProps) {\n const explore = state.explore;\n // @ts-ignore\n const item: ExploreItemState = explore[exploreId];\n const { loading: loadingInState, tableResult, range } = item;\n const loading = tableResult && tableResult.length > 0 ? false : loadingInState;\n return { loading, tableResult, range };\n}\n\nconst mapDispatchToProps = {\n splitOpen,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype Props = TableContainerProps & ConnectedProps<typeof connector>;\n\nexport class TableContainer extends PureComponent<Props> {\n getTableHeight() {\n const { tableResult } = this.props;\n\n if (!tableResult || tableResult.length === 0) {\n return 200;\n }\n\n // tries to estimate table height\n return Math.max(Math.min(600, tableResult.length * 35) + 35);\n }\n\n render() {\n const { loading, onCellFilterAdded, tableResult, width, splitOpen, range, ariaLabel, timeZone } = this.props;\n const height = this.getTableHeight();\n const tableWidth = width - config.theme.panelPadding * 2 - PANEL_BORDER;\n\n let dataFrame = tableResult;\n\n if (dataFrame?.length) {\n dataFrame = applyFieldOverrides({\n data: [dataFrame],\n timeZone,\n theme: config.theme2,\n replaceVariables: (v: string) => v,\n fieldConfig: {\n defaults: {},\n overrides: [],\n },\n })[0];\n // Bit of code smell here. We need to add links here to the frame modifying the frame on every render.\n // Should work fine in essence but still not the ideal way to pass props. In logs container we do this\n // differently and sidestep this getLinks API on a dataframe\n for (const field of dataFrame.fields) {\n field.getLinks = (config: ValueLinkConfig) => {\n return getFieldLinksForExplore({\n field,\n rowIndex: config.valueRowIndex!,\n splitOpenFn: splitOpen,\n range,\n dataFrame: dataFrame!,\n });\n };\n }\n }\n\n return (\n <Collapse label=\"Table\" loading={loading} isOpen>\n {dataFrame?.length ? (\n <Table\n ariaLabel={ariaLabel}\n data={dataFrame}\n width={tableWidth}\n height={height}\n onCellFilterAdded={onCellFilterAdded}\n />\n ) : (\n <MetaInfoText metaItems={[{ value: '0 series returned' }]} />\n )}\n </Collapse>\n );\n }\n}\n\nexport default connector(TableContainer);\n","import TracePageSearchBar from '@jaegertracing/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar';\nimport { TopOfViewRefType } from '@jaegertracing/jaeger-ui-components/src/TraceTimelineViewer/VirtualizedTraceView';\nimport React, { RefObject, useMemo, useState } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport { DataFrame, SplitOpen, PanelData } from '@grafana/data';\nimport { Collapse } from '@grafana/ui';\nimport { StoreState } from 'app/types';\nimport { ExploreId } from 'app/types/explore';\n\nimport { TraceView } from './TraceView';\nimport { useSearch } from './useSearch';\nimport { transformDataFrames } from './utils/transform';\ninterface Props {\n dataFrames: DataFrame[];\n splitOpenFn: SplitOpen;\n exploreId: ExploreId;\n scrollElement?: Element;\n queryResponse: PanelData;\n topOfViewRef: RefObject<HTMLDivElement>;\n}\nexport function TraceViewContainer(props: Props) {\n // At this point we only show single trace\n const frame = props.dataFrames[0];\n const { dataFrames, splitOpenFn, exploreId, scrollElement, topOfViewRef, queryResponse } = props;\n const traceProp = useMemo(() => transformDataFrames(frame), [frame]);\n const { search, setSearch, spanFindMatches } = useSearch(traceProp?.spans);\n const [focusedSpanIdForSearch, setFocusedSpanIdForSearch] = useState('');\n const [searchBarSuffix, setSearchBarSuffix] = useState('');\n const datasource = useSelector(\n (state: StoreState) => state.explore[props.exploreId!]?.datasourceInstance ?? undefined\n );\n\n if (!traceProp) {\n return null;\n }\n\n return (\n <>\n <TracePageSearchBar\n navigable={true}\n searchValue={search}\n setSearch={setSearch}\n spanFindMatches={spanFindMatches}\n searchBarSuffix={searchBarSuffix}\n setSearchBarSuffix={setSearchBarSuffix}\n focusedSpanIdForSearch={focusedSpanIdForSearch}\n setFocusedSpanIdForSearch={setFocusedSpanIdForSearch}\n />\n\n <Collapse label=\"Trace View\" isOpen>\n <TraceView\n exploreId={exploreId}\n dataFrames={dataFrames}\n splitOpenFn={splitOpenFn}\n scrollElement={scrollElement}\n traceProp={traceProp}\n spanFindMatches={spanFindMatches}\n search={search}\n focusedSpanIdForSearch={focusedSpanIdForSearch}\n queryResponse={queryResponse}\n datasource={datasource}\n topOfViewRef={topOfViewRef}\n topOfViewRefType={TopOfViewRefType.Explore}\n />\n </Collapse>\n </>\n );\n}\n","import { css, cx } from '@emotion/css';\nimport memoizeOne from 'memoize-one';\nimport React, { createRef } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { compose } from 'redux';\nimport { Unsubscribable } from 'rxjs';\n\nimport { AbsoluteTimeRange, DataQuery, GrafanaTheme2, LoadingState, RawTimeRange } from '@grafana/data';\nimport { selectors } from '@grafana/e2e-selectors';\nimport { Collapse, CustomScrollbar, ErrorBoundaryAlert, Themeable2, withTheme2, PanelContainer } from '@grafana/ui';\nimport { FILTER_FOR_OPERATOR, FILTER_OUT_OPERATOR, FilterItem } from '@grafana/ui/src/components/Table/types';\nimport appEvents from 'app/core/app_events';\nimport { supportedFeatures } from 'app/core/history/richHistoryStorageProvider';\nimport { getNodeGraphDataFrames } from 'app/plugins/panel/nodeGraph/utils';\nimport { StoreState } from 'app/types';\nimport { AbsoluteTimeEvent } from 'app/types/events';\nimport { ExploreGraphStyle, ExploreId, ExploreItemState } from 'app/types/explore';\n\nimport { getTimeZone } from '../profile/state/selectors';\n\nimport { ExploreGraph } from './ExploreGraph';\nimport { ExploreGraphLabel } from './ExploreGraphLabel';\nimport ExploreQueryInspector from './ExploreQueryInspector';\nimport { ExploreToolbar } from './ExploreToolbar';\nimport LogsContainer from './LogsContainer';\nimport { LogsVolumePanel } from './LogsVolumePanel';\nimport { NoData } from './NoData';\nimport { NoDataSourceCallToAction } from './NoDataSourceCallToAction';\nimport { NodeGraphContainer } from './NodeGraphContainer';\nimport { QueryRows } from './QueryRows';\nimport { ResponseErrorContainer } from './ResponseErrorContainer';\nimport RichHistoryContainer from './RichHistory/RichHistoryContainer';\nimport { SecondaryActions } from './SecondaryActions';\nimport TableContainer from './TableContainer';\nimport { TraceViewContainer } from './TraceView/TraceViewContainer';\nimport { changeSize, changeGraphStyle } from './state/explorePane';\nimport { splitOpen } from './state/main';\nimport { addQueryRow, loadLogsVolumeData, modifyQueries, scanStart, scanStopAction, setQueries } from './state/query';\nimport { makeAbsoluteTime, updateTimeRange } from './state/time';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n exploreMain: css`\n label: exploreMain;\n // Is needed for some transition animations to work.\n position: relative;\n margin-top: 21px;\n `,\n button: css`\n label: button;\n margin: 1em 4px 0 0;\n `,\n queryContainer: css`\n label: queryContainer;\n // Need to override normal css class and don't want to count on ordering of the classes in html.\n height: auto !important;\n flex: unset !important;\n display: unset !important;\n padding: ${theme.spacing(1)};\n `,\n exploreContainer: css`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n padding: ${theme.spacing(2)};\n padding-top: 0;\n `,\n };\n};\n\nexport interface ExploreProps extends Themeable2 {\n exploreId: ExploreId;\n theme: GrafanaTheme2;\n}\n\nenum ExploreDrawer {\n RichHistory,\n QueryInspector,\n}\n\ninterface ExploreState {\n openDrawer?: ExploreDrawer;\n}\n\nexport type Props = ExploreProps & ConnectedProps<typeof connector>;\n\n/**\n * Explore provides an area for quick query iteration for a given datasource.\n * Once a datasource is selected it populates the query section at the top.\n * When queries are run, their results are being displayed in the main section.\n * The datasource determines what kind of query editor it brings, and what kind\n * of results viewers it supports. The state is managed entirely in Redux.\n *\n * SPLIT VIEW\n *\n * Explore can have two Explore areas side-by-side. This is handled in `Wrapper.tsx`.\n * Since there can be multiple Explores (e.g., left and right) each action needs\n * the `exploreId` as first parameter so that the reducer knows which Explore state\n * is affected.\n *\n * DATASOURCE REQUESTS\n *\n * A click on Run Query creates transactions for all DataQueries for all expanded\n * result viewers. New runs are discarding previous runs. Upon completion a transaction\n * saves the result. The result viewers construct their data from the currently existing\n * transactions.\n *\n * The result viewers determine some of the query options sent to the datasource, e.g.,\n * `format`, to indicate eventual transformations by the datasources' result transformers.\n */\nexport class Explore extends React.PureComponent<Props, ExploreState> {\n scrollElement: HTMLDivElement | undefined;\n absoluteTimeUnsubsciber: Unsubscribable | undefined;\n topOfViewRef = createRef<HTMLDivElement>();\n\n constructor(props: Props) {\n super(props);\n this.state = {\n openDrawer: undefined,\n };\n }\n\n componentDidMount() {\n this.absoluteTimeUnsubsciber = appEvents.subscribe(AbsoluteTimeEvent, this.onMakeAbsoluteTime);\n }\n\n componentWillUnmount() {\n this.absoluteTimeUnsubsciber?.unsubscribe();\n }\n\n onChangeTime = (rawRange: RawTimeRange) => {\n const { updateTimeRange, exploreId } = this.props;\n updateTimeRange({ exploreId, rawRange });\n };\n\n // Use this in help pages to set page to a single query\n onClickExample = (query: DataQuery) => {\n this.props.setQueries(this.props.exploreId, [query]);\n };\n\n onCellFilterAdded = (filter: FilterItem) => {\n const { value, key, operator } = filter;\n if (operator === FILTER_FOR_OPERATOR) {\n this.onClickFilterLabel(key, value);\n }\n\n if (operator === FILTER_OUT_OPERATOR) {\n this.onClickFilterOutLabel(key, value);\n }\n };\n\n onClickFilterLabel = (key: string, value: string) => {\n this.onModifyQueries({ type: 'ADD_FILTER', key, value });\n };\n\n onClickFilterOutLabel = (key: string, value: string) => {\n this.onModifyQueries({ type: 'ADD_FILTER_OUT', key, value });\n };\n\n onClickAddQueryRowButton = () => {\n const { exploreId, queryKeys } = this.props;\n this.props.addQueryRow(exploreId, queryKeys.length);\n };\n\n onMakeAbsoluteTime = () => {\n const { makeAbsoluteTime } = this.props;\n makeAbsoluteTime();\n };\n\n onModifyQueries = (action: any, index?: number) => {\n const { datasourceInstance } = this.props;\n if (datasourceInstance?.modifyQuery) {\n const modifier = (queries: DataQuery, modification: any) =>\n datasourceInstance.modifyQuery!(queries, modification);\n this.props.modifyQueries(this.props.exploreId, action, modifier, index);\n }\n };\n\n onResize = (size: { height: number; width: number }) => {\n this.props.changeSize(this.props.exploreId, size);\n };\n\n onStartScanning = () => {\n // Scanner will trigger a query\n this.props.scanStart(this.props.exploreId);\n };\n\n onStopScanning = () => {\n this.props.scanStopAction({ exploreId: this.props.exploreId });\n };\n\n onUpdateTimeRange = (absoluteRange: AbsoluteTimeRange) => {\n const { exploreId, updateTimeRange } = this.props;\n updateTimeRange({ exploreId, absoluteRange });\n };\n\n onChangeGraphStyle = (graphStyle: ExploreGraphStyle) => {\n const { exploreId, changeGraphStyle } = this.props;\n changeGraphStyle(exploreId, graphStyle);\n };\n\n toggleShowRichHistory = () => {\n this.setState((state) => {\n return {\n openDrawer: state.openDrawer === ExploreDrawer.RichHistory ? undefined : ExploreDrawer.RichHistory,\n };\n });\n };\n\n toggleShowQueryInspector = () => {\n this.setState((state) => {\n return {\n openDrawer: state.openDrawer === ExploreDrawer.QueryInspector ? undefined : ExploreDrawer.QueryInspector,\n };\n });\n };\n\n renderEmptyState(exploreContainerStyles: string) {\n return (\n <div className={cx(exploreContainerStyles)}>\n <NoDataSourceCallToAction />\n </div>\n );\n }\n\n renderNoData() {\n return <NoData />;\n }\n\n renderGraphPanel(width: number) {\n const { graphResult, absoluteRange, timeZone, splitOpen, queryResponse, loading, theme, graphStyle } = this.props;\n const spacing = parseInt(theme.spacing(2).slice(0, -2), 10);\n const label = <ExploreGraphLabel graphStyle={graphStyle} onChangeGraphStyle={this.onChangeGraphStyle} />;\n return (\n <Collapse label={label} loading={loading} isOpen>\n <ExploreGraph\n graphStyle={graphStyle}\n data={graphResult!}\n height={400}\n width={width - spacing}\n absoluteRange={absoluteRange}\n onChangeTime={this.onUpdateTimeRange}\n timeZone={timeZone}\n annotations={queryResponse.annotations}\n splitOpenFn={splitOpen}\n loadingState={queryResponse.state}\n />\n </Collapse>\n );\n }\n\n renderLogsVolume(width: number) {\n const { logsVolumeData, exploreId, loadLogsVolumeData, absoluteRange, timeZone, splitOpen } = this.props;\n\n return (\n <LogsVolumePanel\n absoluteRange={absoluteRange}\n width={width}\n logsVolumeData={logsVolumeData}\n onUpdateTimeRange={this.onUpdateTimeRange}\n timeZone={timeZone}\n splitOpen={splitOpen}\n onLoadLogsVolume={() => loadLogsVolumeData(exploreId)}\n />\n );\n }\n\n renderTablePanel(width: number) {\n const { exploreId, datasourceInstance, timeZone } = this.props;\n return (\n <TableContainer\n ariaLabel={selectors.pages.Explore.General.table}\n width={width}\n exploreId={exploreId}\n onCellFilterAdded={datasourceInstance?.modifyQuery ? this.onCellFilterAdded : undefined}\n timeZone={timeZone}\n />\n );\n }\n\n renderLogsPanel(width: number) {\n const { exploreId, syncedTimes, theme, queryResponse } = this.props;\n const spacing = parseInt(theme.spacing(2).slice(0, -2), 10);\n return (\n <LogsContainer\n exploreId={exploreId}\n loadingState={queryResponse.state}\n syncedTimes={syncedTimes}\n width={width - spacing}\n onClickFilterLabel={this.onClickFilterLabel}\n onClickFilterOutLabel={this.onClickFilterOutLabel}\n onStartScanning={this.onStartScanning}\n onStopScanning={this.onStopScanning}\n />\n );\n }\n\n renderNodeGraphPanel() {\n const { exploreId, showTrace, queryResponse, datasourceInstance } = this.props;\n const datasourceType = datasourceInstance ? datasourceInstance?.type : 'unknown';\n\n return (\n <NodeGraphContainer\n dataFrames={this.memoizedGetNodeGraphDataFrames(queryResponse.series)}\n exploreId={exploreId}\n withTraceView={showTrace}\n datasourceType={datasourceType}\n />\n );\n }\n\n memoizedGetNodeGraphDataFrames = memoizeOne(getNodeGraphDataFrames);\n\n renderTraceViewPanel() {\n const { queryResponse, splitOpen, exploreId } = this.props;\n const dataFrames = queryResponse.series.filter((series) => series.meta?.preferredVisualisationType === 'trace');\n\n return (\n // If there is no data (like 404) we show a separate error so no need to show anything here\n dataFrames.length && (\n <TraceViewContainer\n exploreId={exploreId}\n dataFrames={dataFrames}\n splitOpenFn={splitOpen}\n scrollElement={this.scrollElement}\n queryResponse={queryResponse}\n topOfViewRef={this.topOfViewRef}\n />\n )\n );\n }\n\n render() {\n const {\n datasourceInstance,\n datasourceMissing,\n exploreId,\n graphResult,\n queryResponse,\n isLive,\n theme,\n showMetrics,\n showTable,\n showLogs,\n showTrace,\n showNodeGraph,\n timeZone,\n } = this.props;\n const { openDrawer } = this.state;\n const styles = getStyles(theme);\n const showPanels = queryResponse && queryResponse.state !== LoadingState.NotStarted;\n const showRichHistory = openDrawer === ExploreDrawer.RichHistory;\n const richHistoryRowButtonHidden = !supportedFeatures().queryHistoryAvailable;\n const showQueryInspector = openDrawer === ExploreDrawer.QueryInspector;\n const showNoData =\n queryResponse.state === LoadingState.Done &&\n [\n queryResponse.logsFrames,\n queryResponse.graphFrames,\n queryResponse.nodeGraphFrames,\n queryResponse.tableFrames,\n queryResponse.traceFrames,\n ].every((e) => e.length === 0);\n\n return (\n <CustomScrollbar\n testId={selectors.pages.Explore.General.scrollView}\n autoHeightMin={'100%'}\n scrollRefCallback={(scrollElement) => (this.scrollElement = scrollElement || undefined)}\n >\n <ExploreToolbar exploreId={exploreId} onChangeTime={this.onChangeTime} topOfViewRef={this.topOfViewRef} />\n {datasourceMissing ? this.renderEmptyState(styles.exploreContainer) : null}\n {datasourceInstance && (\n <div className={cx(styles.exploreContainer)}>\n <PanelContainer className={styles.queryContainer}>\n <QueryRows exploreId={exploreId} />\n <SecondaryActions\n addQueryRowButtonDisabled={isLive}\n // We cannot show multiple traces at the same time right now so we do not show add query button.\n //TODO:unification\n addQueryRowButtonHidden={false}\n richHistoryRowButtonHidden={richHistoryRowButtonHidden}\n richHistoryButtonActive={showRichHistory}\n queryInspectorButtonActive={showQueryInspector}\n onClickAddQueryRowButton={this.onClickAddQueryRowButton}\n onClickRichHistoryButton={this.toggleShowRichHistory}\n onClickQueryInspectorButton={this.toggleShowQueryInspector}\n />\n <ResponseErrorContainer exploreId={exploreId} />\n </PanelContainer>\n <AutoSizer onResize={this.onResize} disableHeight>\n {({ width }) => {\n if (width === 0) {\n return null;\n }\n\n return (\n <main className={cx(styles.exploreMain)} style={{ width }}>\n <ErrorBoundaryAlert>\n {showPanels && (\n <>\n {showMetrics && graphResult && (\n <ErrorBoundaryAlert>{this.renderGraphPanel(width)}</ErrorBoundaryAlert>\n )}\n {<ErrorBoundaryAlert>{this.renderLogsVolume(width)}</ErrorBoundaryAlert>}\n {showTable && <ErrorBoundaryAlert>{this.renderTablePanel(width)}</ErrorBoundaryAlert>}\n {showLogs && <ErrorBoundaryAlert>{this.renderLogsPanel(width)}</ErrorBoundaryAlert>}\n {showNodeGraph && <ErrorBoundaryAlert>{this.renderNodeGraphPanel()}</ErrorBoundaryAlert>}\n {showTrace && <ErrorBoundaryAlert>{this.renderTraceViewPanel()}</ErrorBoundaryAlert>}\n {showNoData && <ErrorBoundaryAlert>{this.renderNoData()}</ErrorBoundaryAlert>}\n </>\n )}\n {showRichHistory && (\n <RichHistoryContainer\n width={width}\n exploreId={exploreId}\n onClose={this.toggleShowRichHistory}\n />\n )}\n {showQueryInspector && (\n <ExploreQueryInspector\n exploreId={exploreId}\n width={width}\n onClose={this.toggleShowQueryInspector}\n timeZone={timeZone}\n />\n )}\n </ErrorBoundaryAlert>\n </main>\n );\n }}\n </AutoSizer>\n </div>\n )}\n </CustomScrollbar>\n );\n }\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: ExploreProps) {\n const explore = state.explore;\n const { syncedTimes } = explore;\n const item: ExploreItemState = explore[exploreId]!;\n const timeZone = getTimeZone(state.user);\n const {\n datasourceInstance,\n datasourceMissing,\n queryKeys,\n isLive,\n graphResult,\n logsVolumeData,\n logsResult,\n showLogs,\n showMetrics,\n showTable,\n showTrace,\n absoluteRange,\n queryResponse,\n showNodeGraph,\n loading,\n graphStyle,\n } = item;\n\n return {\n datasourceInstance,\n datasourceMissing,\n queryKeys,\n isLive,\n graphResult,\n logsVolumeData,\n logsResult: logsResult ?? undefined,\n absoluteRange,\n queryResponse,\n syncedTimes,\n timeZone,\n showLogs,\n showMetrics,\n showTable,\n showTrace,\n showNodeGraph,\n loading,\n graphStyle,\n };\n}\n\nconst mapDispatchToProps = {\n changeSize,\n changeGraphStyle,\n modifyQueries,\n scanStart,\n scanStopAction,\n setQueries,\n updateTimeRange,\n makeAbsoluteTime,\n loadLogsVolumeData,\n addQueryRow,\n splitOpen,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default compose(connector, withTheme2)(Explore) as React.ComponentType<{ exploreId: ExploreId }>;\n","import memoizeOne from 'memoize-one';\nimport React from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { DataQuery, ExploreUrlState, EventBusExtended, EventBusSrv } from '@grafana/data';\nimport { selectors } from '@grafana/e2e-selectors';\nimport store from 'app/core/store';\nimport {\n DEFAULT_RANGE,\n ensureQueries,\n getTimeRange,\n getTimeRangeFromUrl,\n lastUsedDatasourceKeyForOrgId,\n parseUrlState,\n} from 'app/core/utils/explore';\nimport { StoreState } from 'app/types';\nimport { ExploreId } from 'app/types/explore';\n\nimport { getFiscalYearStartMonth, getTimeZone } from '../profile/state/selectors';\n\nimport Explore from './Explore';\nimport { initializeExplore, refreshExplore } from './state/explorePane';\nimport { lastSavedUrl, cleanupPaneAction } from './state/main';\n\ninterface OwnProps {\n exploreId: ExploreId;\n urlQuery: string;\n split: boolean;\n}\n\ninterface Props extends OwnProps, ConnectedProps<typeof connector> {}\n\n/**\n * This component is responsible for handling initialization of an Explore pane and triggering synchronization\n * of state based on URL changes and preventing any infinite loops.\n */\nclass ExplorePaneContainerUnconnected extends React.PureComponent<Props> {\n el: any;\n exploreEvents: EventBusExtended;\n\n constructor(props: Props) {\n super(props);\n this.exploreEvents = new EventBusSrv();\n this.state = {\n openDrawer: undefined,\n };\n }\n\n componentDidMount() {\n const { initialized, exploreId, initialDatasource, initialQueries, initialRange, panelsState } = this.props;\n const width = this.el?.offsetWidth ?? 0;\n\n // initialize the whole explore first time we mount and if browser history contains a change in datasource\n if (!initialized) {\n this.props.initializeExplore(\n exploreId,\n initialDatasource,\n initialQueries,\n initialRange,\n width,\n this.exploreEvents,\n panelsState\n );\n }\n }\n\n componentWillUnmount() {\n this.exploreEvents.removeAllListeners();\n this.props.cleanupPaneAction({ exploreId: this.props.exploreId });\n }\n\n componentDidUpdate(prevProps: Props) {\n this.refreshExplore(prevProps.urlQuery);\n }\n\n refreshExplore = (prevUrlQuery: string) => {\n const { exploreId, urlQuery } = this.props;\n\n // Update state from url only if it changed and only if the change wasn't initialised by redux to prevent any loops\n if (urlQuery !== prevUrlQuery && urlQuery !== lastSavedUrl[exploreId]) {\n this.props.refreshExplore(exploreId, urlQuery);\n }\n };\n\n getRef = (el: any) => {\n this.el = el;\n };\n\n render() {\n const exploreClass = this.props.split ? 'explore explore-split' : 'explore';\n return (\n <div className={exploreClass} ref={this.getRef} data-testid={selectors.pages.Explore.General.container}>\n {this.props.initialized && <Explore exploreId={this.props.exploreId} />}\n </div>\n );\n }\n}\n\nconst ensureQueriesMemoized = memoizeOne(ensureQueries);\nconst getTimeRangeFromUrlMemoized = memoizeOne(getTimeRangeFromUrl);\n\nfunction mapStateToProps(state: StoreState, props: OwnProps) {\n const urlState = parseUrlState(props.urlQuery);\n const timeZone = getTimeZone(state.user);\n const fiscalYearStartMonth = getFiscalYearStartMonth(state.user);\n\n const { datasource, queries, range: urlRange, panelsState } = (urlState || {}) as ExploreUrlState;\n const initialDatasource = datasource || store.get(lastUsedDatasourceKeyForOrgId(state.user.orgId));\n const initialQueries: DataQuery[] = ensureQueriesMemoized(queries);\n const initialRange = urlRange\n ? getTimeRangeFromUrlMemoized(urlRange, timeZone, fiscalYearStartMonth)\n : getTimeRange(timeZone, DEFAULT_RANGE, fiscalYearStartMonth);\n\n return {\n initialized: state.explore[props.exploreId]?.initialized,\n initialDatasource,\n initialQueries,\n initialRange,\n panelsState,\n };\n}\n\nconst mapDispatchToProps = {\n initializeExplore,\n refreshExplore,\n cleanupPaneAction,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport const ExplorePaneContainer = connector(ExplorePaneContainerUnconnected);\n","import React, { PureComponent } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { locationService } from '@grafana/runtime';\nimport { ErrorBoundaryAlert } from '@grafana/ui';\nimport { GrafanaRouteComponentProps } from 'app/core/navigation/types';\nimport { StoreState } from 'app/types';\nimport { ExploreId, ExploreQueryParams } from 'app/types/explore';\n\nimport { Branding } from '../../core/components/Branding/Branding';\nimport { getNavModel } from '../../core/selectors/navModel';\n\nimport { ExploreActions } from './ExploreActions';\nimport { ExplorePaneContainer } from './ExplorePaneContainer';\nimport { lastSavedUrl, resetExploreAction, richHistoryUpdatedAction } from './state/main';\n\ninterface RouteProps extends GrafanaRouteComponentProps<{}, ExploreQueryParams> {}\ninterface OwnProps {}\n\nconst mapStateToProps = (state: StoreState) => {\n return {\n navModel: getNavModel(state.navIndex, 'explore'),\n exploreState: state.explore,\n };\n};\n\nconst mapDispatchToProps = {\n resetExploreAction,\n richHistoryUpdatedAction,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype Props = OwnProps & RouteProps & ConnectedProps<typeof connector>;\nclass WrapperUnconnected extends PureComponent<Props> {\n componentWillUnmount() {\n this.props.resetExploreAction({});\n }\n\n componentDidMount() {\n lastSavedUrl.left = undefined;\n lastSavedUrl.right = undefined;\n\n // timeSrv (which is used internally) on init reads `from` and `to` param from the URL and updates itself\n // using those value regardless of what is passed to the init method.\n // The updated value is then used by Explore to get the range for each pane.\n // This means that if `from` and `to` parameters are present in the URL,\n // it would be impossible to change the time range in Explore.\n // We are only doing this on mount for 2 reasons:\n // 1: Doing it on update means we'll enter a render loop.\n // 2: when parsing time in Explore (before feeding it to timeSrv) we make sure `from` is before `to` inside\n // each pane state in order to not trigger un URL update from timeSrv.\n const searchParams = locationService.getSearchObject();\n if (searchParams.from || searchParams.to) {\n locationService.partial({ from: undefined, to: undefined }, true);\n }\n }\n\n componentDidUpdate(prevProps: Props) {\n const { left, right } = this.props.queryParams;\n const hasSplit = Boolean(left) && Boolean(right);\n const datasourceTitle = hasSplit\n ? `${this.props.exploreState.left.datasourceInstance?.name} | ${this.props.exploreState.right?.datasourceInstance?.name}`\n : `${this.props.exploreState.left.datasourceInstance?.name}`;\n const documentTitle = `${this.props.navModel.main.text} - ${datasourceTitle} - ${Branding.AppTitle}`;\n document.title = documentTitle;\n }\n\n render() {\n const { left, right } = this.props.queryParams;\n const hasSplit = Boolean(left) && Boolean(right);\n\n return (\n <div className=\"page-scrollbar-wrapper\">\n <ExploreActions exploreIdLeft={ExploreId.left} exploreIdRight={ExploreId.right} />\n <div className=\"explore-wrapper\">\n <ErrorBoundaryAlert style=\"page\">\n <ExplorePaneContainer split={hasSplit} exploreId={ExploreId.left} urlQuery={left} />\n </ErrorBoundaryAlert>\n {hasSplit && (\n <ErrorBoundaryAlert style=\"page\">\n <ExplorePaneContainer split={hasSplit} exploreId={ExploreId.right} urlQuery={right} />\n </ErrorBoundaryAlert>\n )}\n </div>\n </div>\n );\n }\n}\n\nconst Wrapper = connector(WrapperUnconnected);\n\nexport default Wrapper;\n","import { ExploreId, StoreState } from 'app/types';\n\nexport const isSplit = (state: StoreState) => Boolean(state.explore[ExploreId.left] && state.explore[ExploreId.right]);\n\nexport const getExploreItemSelector = (exploreId: ExploreId) => (state: StoreState) => state.explore[exploreId];\n","import { useEffect, useRef } from 'react';\nexport default function usePrevious(state) {\n var ref = useRef();\n useEffect(function () {\n ref.current = state;\n });\n return ref.current;\n}\n","function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];if(\"production\"!==process.env.NODE_ENV){var i=Y[n],o=i?\"function\"==typeof i?i.apply(null,t):i:\"unknown error nr: \"+n;throw Error(\"[Immer] \"+o)}throw Error(\"[Immer] minified error nr: \"+n+(t.length?\" \"+t.map((function(n){return\"'\"+n+\"'\"})).join(\",\"):\"\")+\". Find the full error at: https://bit.ly/3cXEKWf\")}function r(n){return!!n&&!!n[Q]}function t(n){return!!n&&(function(n){if(!n||\"object\"!=typeof n)return!1;var r=Object.getPrototypeOf(n);if(null===r)return!0;var t=Object.hasOwnProperty.call(r,\"constructor\")&&r.constructor;return t===Object||\"function\"==typeof t&&Function.toString.call(t)===Z}(n)||Array.isArray(n)||!!n[L]||!!n.constructor[L]||s(n)||v(n))}function e(t){return r(t)||n(23,t),t[Q].t}function i(n,r,t){void 0===t&&(t=!1),0===o(n)?(t?Object.keys:nn)(n).forEach((function(e){t&&\"symbol\"==typeof e||r(e,n[e],n)})):n.forEach((function(t,e){return r(e,t,n)}))}function o(n){var r=n[Q];return r?r.i>3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?(n.delete(r),n.add(t)):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)?n:(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0),n)}function h(){n(2)}function y(n){return null==n||\"object\"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return\"production\"===process.env.NODE_ENV||U||n(0),U}function j(n,r){r&&(b(\"Patches\"),n.u=[],n.s=[],n.v=r)}function O(n){g(n),n.p.forEach(S),n.p=null}function g(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.O=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.g||b(\"ES5\").S(e,r,o),o?(i[Q].P&&(O(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b(\"Patches\").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),O(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o;i(3===e.i?new Set(o):o,(function(r,i){return A(n,e,o,r,i,t)})),x(n,o,!1),t&&n.u&&b(\"Patches\").R(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if(\"production\"!==process.env.NODE_ENV&&c===o&&n(5),r(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!r(v))return;e.m=!1}if(t(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),n.h.F&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function R(n,r,t){var e=s(r)?b(\"MapSet\").N(r,t):v(r)?b(\"MapSet\").T(r,t):n.g?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,D:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b(\"ES5\").J(r,t);return(t?t.A:_()).p.push(e),e}function D(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b(\"ES5\").K(u)))return u.t;u.I=!0,e=F(r,c),u.I=!1}else e=F(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function F(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return\"production\"!==process.env.NODE_ENV&&f(r),en.get(r,n)},set:function(r){var t=this[Q];\"production\"!==process.env.NODE_ENV&&f(t),en.set(t,n,r)}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t)}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return!0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return!0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return!0;for(var e=0;e<r.length;e++)if(!r.hasOwnProperty(e))return!0;return!1}function f(r){r.O&&n(3,JSON.stringify(p(r)))}var s={};m(\"ES5\",{J:function(n,r){var e=Array.isArray(n),i=function(n,r){if(n){for(var e=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(e,\"\"+i,t(i,!0));return e}var o=rn(r);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=t(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(r),o)}(e,n),o={i:e?5:4,A:r?r.A:_(),P:!1,I:!1,D:{},l:r,t:n,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,t,o){o?r(t)&&t[Q].A===n&&e(n.p):(n.u&&function n(r){if(r&&\"object\"==typeof r){var t=r[Q];if(t){var e=t.t,o=t.k,f=t.D,c=t.i;if(4===c)i(o,(function(r){r!==Q&&(void 0!==e[r]||u(e,r)?f[r]||n(o[r]):(f[r]=!0,k(t)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(t))}));else if(5===c){if(a(t)&&(k(t),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)o.hasOwnProperty(l)||(f[l]=!0),void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!t(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var r=Object.create(Object.getPrototypeOf(n));for(var i in n)r[i]=e(n[i]);return u(n,L)&&(r[L]=n[L]),r}function f(n){return r(n)?e(n):n}var c=\"add\";m(\"Patches\",{$:function(r,t){return t.forEach((function(t){for(var i=t.path,u=t.op,f=r,s=0;s<i.length-1;s++){var v=o(f),p=\"\"+i[s];0!==v&&1!==v||\"__proto__\"!==p&&\"constructor\"!==p||n(24),\"function\"==typeof f&&\"prototype\"===p&&n(24),\"object\"!=typeof(f=a(f,p))&&n(15,i.join(\"/\"))}var l=o(f),d=e(t.value),h=i[i.length-1];switch(u){case\"replace\":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return\"-\"===h?f.push(d):f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case\"remove\":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(t.value);default:return delete f[h]}default:n(17,u)}})),r},R:function(n,r,t,e){switch(n.i){case 0:case 4:case 2:return function(n,r,t,e){var o=n.t,s=n.o;i(n.D,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?\"replace\":c:\"remove\";if(v!==p||\"replace\"!==l){var d=r.concat(n);t.push(\"remove\"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:\"remove\",path:d}:\"remove\"===l?{op:c,path:d,value:f(v)}:{op:\"replace\",path:d,value:f(v)})}}))}(n,r,t,e);case 5:case 1:return function(n,r,t,e){var i=n.t,o=n.D,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,t];t=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=r.concat([v]);t.push({op:\"replace\",path:p,value:f(u[v])}),e.push({op:\"replace\",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=r.concat([l]);t.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:\"replace\",path:r.concat([\"length\"]),value:i.length})}(n,r,t,e);case 3:return function(n,r,t,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=r.concat([u]);t.push({op:\"remove\",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=r.concat([u]);t.push({op:c,path:o,value:n}),e.unshift({op:\"remove\",path:o,value:n})}u++}))}(n,r,t,e)}},M:function(n,r,t,e){t.push({op:\"replace\",path:[],value:r===H?void 0:r}),e.push({op:\"replace\",path:[],value:n})}})}function C(){function r(n,r){function t(){this.constructor=n}a(n,r),n.prototype=(t.prototype=r.prototype,new t)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(r){if(t(r)){var e=R(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.O&&n(3,JSON.stringify(p(r)))}var a=function(n,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var t in r)r.hasOwnProperty(t)&&(n[t]=r[t])})(n,r)},f=function(){function n(n,r){return this[Q]={i:2,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}r(n,Map);var o=n.prototype;return Object.defineProperty(o,\"size\",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,r){var t=this[Q];return u(t),p(t).has(n)&&p(t).get(n)===r||(e(t),k(t),t.D.set(n,!0),t.o.set(n,r),t.D.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),e(r),k(r),r.t.has(n)?r.D.set(n,!1):r.D.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.D=new Map,i(n.t,(function(r){n.D.set(r,!1)})),n.o.clear())},o.forEach=function(n,r){var t=this;p(this[Q]).forEach((function(e,i){n.call(r,t.get(i),i,t)}))},o.get=function(n){var r=this[Q];u(r);var i=p(r).get(n);if(r.I||!t(i))return i;if(i!==r.t.get(n))return i;var o=R(r.A.h,i,r);return e(r),r.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.values()},n.next=function(){var n=t.next();return n.done?n:{done:!1,value:r.get(n.value)}},n},o.entries=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.entries()},n.next=function(){var n=t.next();if(n.done)return n;var e=r.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,r){return this[Q]={i:3,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}r(n,Set);var t=n.prototype;return Object.defineProperty(t,\"size\",{get:function(){return p(this[Q]).size}}),t.has=function(n){var r=this[Q];return u(r),r.o?!!r.o.has(n)||!(!r.p.has(n)||!r.o.has(r.p.get(n))):r.t.has(n)},t.add=function(n){var r=this[Q];return u(r),this.has(n)||(o(r),k(r),r.o.add(n)),this},t.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),o(r),k(r),r.o.delete(n)||!!r.p.has(n)&&r.o.delete(r.p.get(n))},t.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},t.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},t.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},t.keys=function(){return this.values()},t[V]=function(){return this.values()},t.forEach=function(n,r){for(var t=this.values(),e=t.next();!e.done;)n.call(r,e.value,e.value,this),e=t.next()},n}();m(\"MapSet\",{N:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){N(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W=\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol(\"x\"),X=\"undefined\"!=typeof Map,q=\"undefined\"!=typeof Set,B=\"undefined\"!=typeof Proxy&&void 0!==Proxy.revocable&&\"undefined\"!=typeof Reflect,H=W?Symbol.for(\"immer-nothing\"):((G={})[\"immer-nothing\"]=!0,G),L=W?Symbol.for(\"immer-draftable\"):\"__$immer_draftable\",Q=W?Symbol.for(\"immer-state\"):\"__$immer_state\",V=\"undefined\"!=typeof Symbol&&Symbol.iterator||\"@@iterator\",Y={0:\"Illegal state\",1:\"Immer drafts cannot have computed properties\",2:\"This object has been frozen and should not be mutated\",3:function(n){return\"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \"+n},4:\"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\",5:\"Immer forbids circular references\",6:\"The first or second argument to `produce` must be a function\",7:\"The third argument to `produce` must be a function or undefined\",8:\"First argument to `createDraft` must be a plain object, an array, or an immerable object\",9:\"First argument to `finishDraft` must be a draft returned by `createDraft`\",10:\"The given draft is already finalized\",11:\"Object.defineProperty() cannot be used on an Immer draft\",12:\"Object.setPrototypeOf() cannot be used on an Immer draft\",13:\"Immer only supports deleting array indices\",14:\"Immer only supports setting array indices and the 'length' property\",15:function(n){return\"Cannot apply patch, path doesn't resolve: \"+n},16:'Sets cannot have \"replace\" patches.',17:function(n){return\"Unsupported patch operation: \"+n},18:function(n){return\"The plugin for '\"+n+\"' has not been loaded into Immer. To enable the plugin, import and call `enable\"+n+\"()` when initializing your application.\"},20:\"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available\",21:function(n){return\"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '\"+n+\"'\"},22:function(n){return\"'current' expects a draft, got: \"+n},23:function(n){return\"'original' expects a draft, got: \"+n},24:\"Patching reserved attributes like __proto__, prototype and constructor is not allowed\"},Z=\"\"+Object.prototype.constructor,nn=\"undefined\"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t)})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p(n);if(!u(e,r))return function(n,r,t){var e,i=I(r,t);return i?\"value\"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t(i)?i:i===z(n.t,r)?(E(n),n.o[r]=R(n.A.h,i,n)):i},has:function(n,r){return r in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,r,t){var e=I(p(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z(p(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.D[r]=!1,!0;if(c(t,i)&&(void 0!==t||u(n.t,r)))return!0;E(n),k(n)}return n.o[r]===t&&\"number\"!=typeof t&&(void 0!==t||r in n.o)||(n.o[r]=t,n.D[r]=!0,!0)},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.D[r]=!1,E(n),k(n)):delete n.D[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||\"length\"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}})),on.deleteProperty=function(r,t){return\"production\"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&n(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return\"production\"!==process.env.NODE_ENV&&\"length\"!==t&&isNaN(parseInt(t))&&n(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.g=B,this.F=!0,this.produce=function(r,i,o){if(\"function\"==typeof r&&\"function\"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return(t=i).call.apply(t,[r,n].concat(e))}))}}var f;if(\"function\"!=typeof i&&n(6),void 0!==o&&\"function\"!=typeof o&&n(7),t(r)){var c=w(e),s=R(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?O(c):g(c)}return\"undefined\"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(c),n})):(j(c,o),P(f,c))}if(!r||\"object\"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.F&&d(f,!0),o){var p=[],l=[];b(\"Patches\").M(r,f,p,l),o(p,l)}return f}n(21,r)},this.produceWithPatches=function(n,r){if(\"function\"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r}));return\"undefined\"!=typeof Promise&&o instanceof Promise?o.then((function(n){return[n,t,i]})):[o,t,i]},\"boolean\"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),\"boolean\"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){t(e)||n(8),r(e)&&(e=D(e));var i=w(this),o=R(this,e,void 0);return o[Q].C=!0,g(i),o},i.finishDraft=function(r,t){var e=r&&r[Q];\"production\"!==process.env.NODE_ENV&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.F=n},i.setUseProxies=function(r){r&&!B&&n(20),this.g=r},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&\"replace\"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b(\"Patches\").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);export default fn;export{un as Immer,pn as applyPatches,K as castDraft,$ as castImmutable,ln as createDraft,D as current,J as enableAllPlugins,N as enableES5,C as enableMapSet,T as enablePatches,dn as finishDraft,d as freeze,L as immerable,r as isDraft,t as isDraftable,H as nothing,e as original,fn as produce,cn as produceWithPatches,sn as setAutoFreeze,vn as setUseProxies};\n//# sourceMappingURL=immer.esm.js.map\n"],"names":["ExploreActions","exploreIdLeft","exploreIdRight","actions","setActions","useState","query","useKBar","dispatch","useDispatch","splitted","useSelector","isSplit","useEffect","exploreSection","name","priority","Priority","actionsArr","push","id","keywords","perform","runQueries","section","splitClose","splitOpen","useRegisterActions","ExploreGraph","data","height","width","timeZone","absoluteRange","onChangeTime","loadingState","annotations","onHiddenSeriesChanged","splitOpenFn","graphStyle","tooltipDisplayMode","TooltipDisplayMode","theme","useTheme2","showAllTimeSeries","setShowAllTimeSeries","baseStructureRev","setBaseStructureRev","previousData","usePrevious","structureChangesRef","useRef","compareArrayValues","compareDataFrameStructures","current","structureRev","fieldConfig","setFieldConfig","defaults","color","mode","FieldColorModeId","custom","drawStyle","GraphDrawStyle","fillOpacity","pointSize","overrides","style","useStyles2","getStyles","timeRange","from","dateTime","to","raw","dataWithConfig","useMemo","registry","createFieldConfigRegistry","getGraphFieldConfig","defaultGraphConfig","styledFieldConfig","config","produce","draft","undefined","stacking","group","StackingMode","Error","applyGraphStyle","applyFieldOverrides","replaceVariables","value","fieldConfigRegistry","hiddenFrames","forEach","frame","fields","map","field","hideFrom","viz","every","identity","getFrameDisplayName","seriesToShow","slice","panelContext","eventBus","appEvents","onSplitOpen","onToggleSeriesVisibility","label","r","seriesVisibilityConfigFactory","PanelContextProvider","length","className","cx","timeSeriesDisclaimer","Icon","disclaimerIcon","onClick","PanelRenderer","series","state","pluginId","title","onChangeTimeRange","options","tooltip","sort","SortOrder","legend","displayMode","LegendDisplayMode","placement","calcs","css","spacing","colors","background","primary","warning","main","text","link","ALL_GRAPH_STYLE_OPTIONS","EXPLORE_GRAPH_STYLES","toUpperCase","replace","display","justifyContent","ExploreGraphLabel","props","onChangeGraphStyle","RadioButtonGroup","size","onChange","extendStatics","__extends","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","apply","rowSizeBase","top","left","cursor","colSizeBase","edgeBase","position","styles","right","bottom","topRight","bottomRight","bottomLeft","topLeft","Resizer","_super","_this","onMouseDown","e","onResizeStart","direction","onTouchStart","render","userSelect","replaceStyles","children","DEFAULT_SIZE","clamp","min","max","Math","snap","round","hasDirection","dir","target","RegExp","test","isTouchEvent","event","Boolean","touches","findClosestSnap","snapArray","snapGap","closestGapIndex","reduce","prev","curr","index","abs","gap","getStringSize","toString","endsWith","getPixelSize","parentSize","innerWidth","innerHeight","Number","definedProps","baseClassName","Resizable","ratio","resizable","parentLeft","parentTop","resizableLeft","resizableRight","resizableTop","resizableBottom","targetLeft","targetTop","appendBase","window","parent","parentNode","element","document","createElement","transform","flex","classList","add","appendChild","removeBase","base","removeChild","ref","c","isResizing","propsSize","original","x","y","backgroundStyle","backgroundColor","opacity","zIndex","flexBasis","bind","onMouseMove","onMouseUp","defineProperty","get","enumerable","configurable","ownerDocument","defaultView","defaultSize","orgWidth","offsetWidth","orgHeight","offsetHeight","orgPosition","getSize","key","getParentSize","wrapChanged","wrap","flexWrap","minWidth","minHeight","bindEvents","addEventListener","capture","passive","unbindEvents","removeEventListener","componentDidMount","computedStyle","getComputedStyle","setState","componentWillUnmount","createSizeForCssProperty","newSize","kind","calculateNewMaxFromBoundary","maxWidth","maxHeight","boundWidth","boundHeight","boundsByDirection","widthByDirection","heightByDirection","bounds","parent_1","isFinite","calculateNewSizeFromDirection","clientX","clientY","scale","resizeRatio","_a","_b","lockAspectRatio","lockAspectRatioExtraHeight","lockAspectRatioExtraWidth","newWidth","newHeight","extraHeight","extraWidth","calculateNewSizeFromAspectRatio","computedMinWidth","computedMaxWidth","computedMinHeight","computedMaxHeight","extraMinWidth","extraMaxWidth","extraMinHeight","extraMaxHeight","lockedMinWidth","lockedMaxWidth","lockedMinHeight","lockedMaxHeight","setBoundingClientRect","parent_2","parentRect","getBoundingClientRect","targetRect","top_1","nativeEvent","isMouseEvent","parent_3","flexDirection","flexDir","startsWith","TouchEvent","preventDefault","stopPropagation","calculateNewMax","_c","boundaryMax","grid","newGridWidth","newGridHeight","delta","newState","flushSync","onResize","onResizeStop","updateSize","renderResizer","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","handleComponent","resizers","keys","extendsProps","acc","indexOf","sizeStyle","boxSizing","flexShrink","Wrapper","as","defaultProps","drawerSlide","keyframes","components","horizontalDrawer","defaultHeight","stylesFactory","container","border","weak","shadows","z3","sidemenu","drawerActive","rzHandle","secondary","shade","ExploreDrawer","drawerWidth","mapDispatchToProps","connect","exploreId","item","explore","loading","queryResponse","onClose","dataFrames","error","statsTab","icon","content","InspectStatsTab","request","timezone","jsonTab","InspectJSONTab","dataTab","InspectDataTab","isLoading","withTransforms","withFieldConfig","app","CoreApp","tabs","QueryInspector","onRefreshQuery","errorTab","InspectErrorTab","TabbedContainer","closeIconTooltip","TimeSyncButton","isSynced","Tooltip","ToolbarButton","variant","ExploreTimeControls","Component","range","getShiftedTimeRange","dateTimeForTimeZone","onMoveTimePicker","adjustedFrom","dateMath","adjustedTo","getZoomedTimeRange","fiscalYearStartMonth","syncedTimes","onChangeTimeSync","hideText","onChangeTimeZone","onChangeFiscalYearStartMonth","timeSyncButton","timePickerCommonProps","onMoveBackward","onMoveBack","onMoveForward","onZoom","TimePickerWithHistory","widthOverride","onChangeTimePicker","LiveTailButton","start","pause","resume","isLive","isPaused","stop","buttonVariant","onClickMain","ButtonGroup","iconOnly","CSSTransition","mountOnEnter","unmountOnExit","timeout","in","classNames","enter","stopButtonEnter","enterActive","stopButtonEnterActive","exit","stopButtonExit","exitActive","stopButtonExitActive","LiveTailControls","controls","useCallback","setPausedStateAction","changeRefreshInterval","RefreshPicker","useLiveTailControls","AddToDashboard","lazy","then","default","UnConnectedExploreToolbar","PureComponent","async","changeDatasource","dsSettings","uid","importQueries","cancelQueries","syncTimes","showSmallTimePicker","refreshInterval","refreshPickerTooltip","refreshPickerText","refreshPickerWidth","onIntervalChanged","onChangeRefreshInterval","intervals","getTimeSrv","getValidIntervals","defaultIntervals","onRefresh","onRunQuery","noIntervalPicker","datasourceMissing","closeSplit","split","hasLiveOption","containerWidth","topOfViewRef","showSmallDataSourcePicker","PageToolbar","ExploreId","pageIcon","leftItems","DashNavButton","createAndCopyShortLink","location","href","DataSourcePicker","onChangeDatasource","datasourceName","hideTextValue","filter","ToolbarButtonRow","disabled","Suspense","fallback","renderRefreshPicker","SetInterval","func","interval","reportInteraction","datasourceType","updateTimeZoneForSession","updateFiscalYearStartMonthForSession","ExploreToolbar","exploreItem","datasourceInstance","meta","streaming","type","getTimeZone","user","getFiscalYearStartMonth","connector","callback","delay","savedCallback","interval_1","setInterval","clearInterval","Time","timeInMs","humanize","formatTime","inSeconds","toFixed","duration","toDuration","hours","minutes","seconds","ElapsedTime","resetKey","elapsed","setElapsed","useInterval","LiveLogs","super","React","onPause","scrollTop","clientHeight","scrollHeight","currentTarget","logRowsToRender","rowsToRender","logRows","nextProps","onResume","logsRowsLive","typography","fontFamilyMonospace","bodySmall","fontSize","logsRowFade","tinycolor","info","transparent","setAlpha","logsRowsIndicator","h6","button","fullWidth","logsRow","logsRowLocalTime","logsRowMessage","getLogRowStyles","onScroll","scrollContainerRef","row","dateTimeFormat","timeEpochMs","hasAnsi","LogMessageAnsi","entry","liveEndDiv","scrollTo","Button","stopLive","LiveLogsWithTheme","withTheme2","metaContainer","metaItem","metaLabel","fontWeightMedium","metaValue","MetaInfoItem","memo","MetaInfoText","metaItems","LogsMetaRow","dedupStrategy","dedupCount","showDetectedFields","clearDetectedFields","hasUnescapedContent","forceEscape","onEscapeNewlines","logsMetaItem","LogsDedupStrategy","LogsMetaKind","some","MAX_CHARACTERS","renderMetaItem","LogLabels","labels","LogsNavigationPages","pages","currentPageIndex","oldestLogsFirst","changeTime","time","format","systemDateFormats","createPageContent","page","Spinner","logsRange","CustomScrollbar","autoHide","pagesWrapper","pagesContainer","pageType","pageNumber","queryRange","line","selectedBg","selectedText","displayName","v1","sm","LogsNavigation","logsSortOrder","scrollToTopLogs","visibleRange","queries","clearCache","addResultsToCache","setPages","setCurrentPageIndex","expectedQueriesRef","expectedRangeRef","rangeSpanRef","LogsSortOrder","onFirstPage","onLastPage","newPage","newPages","isEqual","a","sortPages","findIndex","olderLogsButton","navButton","indexChange","navButtonContent","newerLogsButton","navContainer","scrollToTopButton","SETTINGS_KEYS","UnthemedLogs","createRef","showLabels","store","showTime","wrapLogMessage","prettifyLogMessage","hiddenLogLevels","isFlipping","flipOrderTimer","setTimeout","prevState","newSortOrder","cancelFlippingTimer","deduplicationType","checked","hiddenRawLevels","level","LogLevel","onStartScanning","onStopScanning","concat","k","memoizeOne","dedupedRows","dedupLogRows","sum","duplicates","filterLogLevels","Set","firstTimeStamp","lastTimeStamp","topLogsRef","scrollIntoView","clearTimeout","logsMeta","logsSeries","onClickFilterLabel","onClickFilterOutLabel","scanning","scanRange","showContextToggle","getFieldLinks","logsQueries","hasData","checkUnescapedContent","filteredLogs","filterRows","dedupRows","navigationRange","createNavigationRange","scanText","rangeUtil","infoText","onToggleLogLevel","logOptions","InlineFieldRow","InlineField","horizontalInlineLabel","InlineSwitch","horizontalInlineSwitch","onChangeLabels","onChangeWrapLogMessage","onChangePrettifyLogMessage","values","dedupType","capitalize","description","LogsDedupDescription","onChangeDedup","radioButtons","onChangeLogsSortOrder","logsSection","LogRows","deduplicatedRows","getRowContext","enableLogDetails","onClickShowDetectedField","showDetectedField","onClickHideDetectedField","hideDetectedField","noData","fill","onClickScan","onClickStopScan","Logs","shape","borderRadius","medium","headerButton","logsEnter","logsEnterActive","logsExit","logsExitActive","LogsCrossFadeTransition","visible","transitionDuration","LogsContainer","updateTimeRange","hasLogsContextSupport","find","q","refId","dataFrame","datasource","getLogRowContext","rowIndex","getFieldLinksForExplore","styleOverridesForStickyNavigation","Collapse","isOpen","logsResult","logsVolumeDataProvider","logsVolumeData","rows","ErrorAlert","setIsOpen","message","showButton","Alert","severity","LogsVolumePanel","onUpdateTimeRange","onLoadLogsVolume","parseInt","LogsVolumePanelContent","LoadingState","zoomRatio","selectedTimeRange","dataRange","logsLevelZoomRatio","zoomLevelInfo","contentContainer","zoomInfoContainer","NoData","PanelContainer","wrapper","h2","NoDataSourceCallToAction","canCreateDataSource","contextSrv","AccessControlAction","footer","rel","ctaElement","LinkButton","cardClassName","breakpoints","lg","CallToActionCard","callToActionElement","warningText","NodeGraphContainer","withTraceView","getLinks","useLinks","frames","nodes","useCategorizeFrames","open","toggleOpen","useToggle","countWarning","Badge","collapsible","onToggle","expanded","NodeGraph","QueryRows","getQueries","getDatasourceInstanceSettings","getQueryResponse","getHistory","getEventBridge","exploreItemSelector","getExploreItemSelector","createSelector","history","eventBridge","getDatasourceSrv","getInstanceSettings","makeSelectors","onRunQueries","newQueries","changeQueriesAction","onAddQuery","getNextRefIdChar","QueryEditorRows","onQueriesChange","FadeIn","defaultStyle","transition","transitionStyles","exited","entering","entered","exiting","Transition","onExited","ErrorContainer","queryError","showError","topSpacing","ResponseErrorContainer","deleteHistoryItem","commentHistoryItem","starHistoryItem","setQueries","isRemoved","rigtColumnWidth","rigtColumnContentWidth","cardColor","bg2","queryCard","border1","radius","palette","orange","cardRow","xs","datasourceContainer","weight","semibold","queryActionButtons","queryContainer","queryRow","updateCommentContainer","comment","regular","commentButtonRow","textArea","runButton","md","dsImg","activeUpdateComment","setActiveUpdateComment","setComment","queryDsInstance","setQueryDsInstance","ds","getDataSourceSrv","getQueryDsInstance","useTheme","onUpdateComment","queryHistoryEnabled","onCancelUpdateComment","updateComment","TextArea","placeholder","IconButton","queriesToCopy","createQueryText","join","copyStringToClipboard","notifyApp","createSuccessNotification","createUrlFromRichHistory","performDelete","queryId","starred","ShowConfirmModalEvent","yesText","onConfirm","iconType","newValue","onKeyDown","keyEvent","shiftKey","ctrlKey","src","queryText","queriesToRun","differentDataSource","bgColor","isLight","gray5","dark4","sliderHeight","containerContent","containerSlider","slider","selectors","filterInput","multiselect","xxs","sessionName","heading","h4","light","RichHistoryQueriesTab","totalQueries","richHistorySearchFilters","updateFilters","clearRichHistoryResults","loadMoreRichHistory","richHistorySettings","activeDatasourceInstance","listOfDatasources","createDatasourcesList","datasourceFilters","activeDatasourceOnly","lastUsedDatasourceFilters","filters","search","sortOrder","retentionPeriod","mappedQueriesToHeadings","mapQueriesToHeadings","sortOrderOptions","getSortOrderOptions","partialResults","mapNumbertoTimeInSlider","RangeSlider","tooltipAlwaysVisible","orientation","formatTooltipResult","reverse","onAfterChange","MultiSelect","option","FilterInput","Select","order","idx","imgUrl","input","retentionPeriodOptions","RichHistorySettingsTab","starredTabAsFirstTab","onChangeRetentionPeriod","toggleStarredTabAsFirstTab","toggleactiveDatasourceOnly","deleteRichHistory","selectedOption","v","supportedFeatures","changeRetention","Field","MAX_HISTORY_ITEMS","onlyActiveDataSource","clearHistory","bold","RichHistoryStarredTab","Tabs","availableFilters","includes","UnThemedRichHistory","settingsToUpdate","updateHistorySettings","filtersToUpdate","updateHistorySearchFilters","loadRichHistory","debounce","updateSettings","componentDidUpdate","prevProps","snapshot","richHistory","richHistoryTotal","firstTab","RichHistory","Starred","Settings","toggleActiveDatasourceOnly","defaultTab","withTheme","initRichHistory","setHeight","_e","_dir","SecondaryActions","containerMargin","HorizontalGroup","addQueryRowButtonHidden","onClickAddQueryRowButton","addQueryRowButtonDisabled","richHistoryRowButtonHidden","richHistoryButtonActive","onClickRichHistoryButton","queryInspectorButtonActive","onClickQueryInspectorButton","loadingInState","tableResult","TableContainer","getTableHeight","onCellFilterAdded","ariaLabel","tableWidth","PANEL_BORDER","valueRowIndex","Table","TraceViewContainer","scrollElement","traceProp","transformDataFrames","setSearch","spanFindMatches","useSearch","spans","focusedSpanIdForSearch","setFocusedSpanIdForSearch","searchBarSuffix","setSearchBarSuffix","TracePageSearchBar","navigable","searchValue","TraceView","topOfViewRefType","TopOfViewRefType","Explore","rawRange","operator","FILTER_FOR_OPERATOR","FILTER_OUT_OPERATOR","onModifyQueries","queryKeys","addQueryRow","makeAbsoluteTime","action","modifyQuery","modifier","modification","modifyQueries","changeSize","scanStart","scanStopAction","changeGraphStyle","openDrawer","getNodeGraphDataFrames","absoluteTimeUnsubsciber","AbsoluteTimeEvent","onMakeAbsoluteTime","unsubscribe","renderEmptyState","exploreContainerStyles","renderNoData","renderGraphPanel","graphResult","renderLogsVolume","loadLogsVolumeData","renderTablePanel","renderLogsPanel","renderNodeGraphPanel","showTrace","memoizedGetNodeGraphDataFrames","renderTraceViewPanel","preferredVisualisationType","showMetrics","showTable","showLogs","showNodeGraph","exploreMain","exploreContainer","showPanels","showRichHistory","queryHistoryAvailable","showQueryInspector","showNoData","logsFrames","graphFrames","nodeGraphFrames","tableFrames","traceFrames","testId","autoHeightMin","scrollRefCallback","toggleShowRichHistory","toggleShowQueryInspector","disableHeight","ErrorBoundaryAlert","compose","ExplorePaneContainerUnconnected","prevUrlQuery","urlQuery","lastSavedUrl","refreshExplore","el","exploreEvents","EventBusSrv","initialized","initialDatasource","initialQueries","initialRange","panelsState","initializeExplore","removeAllListeners","cleanupPaneAction","exploreClass","getRef","ensureQueriesMemoized","ensureQueries","getTimeRangeFromUrlMemoized","getTimeRangeFromUrl","urlState","parseUrlState","urlRange","lastUsedDatasourceKeyForOrgId","orgId","getTimeRange","DEFAULT_RANGE","ExplorePaneContainer","resetExploreAction","richHistoryUpdatedAction","navModel","getNavModel","navIndex","exploreState","WrapperUnconnected","searchParams","locationService","queryParams","datasourceTitle","documentTitle","Branding","hasSplit","Q","getPrototypeOf","Function","Z","isArray","L","o","nn","u","has","f","set","delete","X","Map","l","rn","writable","clear","h","freeze","isFrozen","tn","_","U","j","O","g","S","w","m","P","M","H","A","I","R","D","F","z","getOwnPropertyDescriptor","E","N","T","C","en","on","Proxy","revocable","revoke","proxy","J","K","G","W","Symbol","B","Reflect","for","iterator","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","getOwnPropertyDescriptors","deleteProperty","un","Promise","produceWithPatches","useProxies","setUseProxies","autoFreeze","setAutoFreeze","createDraft","finishDraft","applyPatches","path","op","$","an","fn"],"sourceRoot":""}