Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
build
/
File Content:
explore.476912733278e2a99729.js.map
{"version":3,"file":"explore.476912733278e2a99729.js","mappings":"wJAmCO,SAASA,EACdC,EACoC,CACpC,OAAQA,EAAW,CACjB,KAAK,KAA4B,OAC/B,MAAO,CACL,SAAO,KAAE,0CAA2C,QAAQ,EAC5D,MAAO,KAA4B,OACnC,eAAa,KACX,gDACA,mDACF,EACA,kBAAmB,CAAE,KAAM,EAAM,EACjC,gBAAiB,CAAE,KAAM,EAAM,CACjC,EACF,KAAK,KAA4B,MAC/B,MAAO,CACL,SAAO,KAAE,yCAA0C,oBAAoB,EACvE,MAAO,KAA4B,MACnC,eAAa,KACX,+CACA,0LACF,EACA,kBAAmB,CACjB,KAAM,GACN,SAAU,GACV,YAAU,KACR,8CACA,uDACF,CACF,EACA,gBAAiB,CACf,KAAM,GACN,SAAU,GACV,YAAU,KACR,8CACA,qEACF,CACF,CACF,EACF,QACE,MAAO,CACL,MAAOA,EACP,MAAOA,EACP,kBAAmB,CAAE,KAAM,EAAM,EACjC,gBAAiB,CAAE,KAAM,EAAM,CACjC,CACJ,CACF,CAEO,MAAMC,EAAsB,IAC1B,OAAO,OAAO,IAA2B,EAAE,IAAKC,GAAuB,CAC5E,MAAMF,GAAYD,EAA6BG,CAAkB,EACjE,MAAO,CACL,MAAOF,GAAU,MACjB,MAAOA,GAAU,MACjB,YAAaA,GAAU,WACzB,CACF,CAAC,C,sLC3FCG,GAAkB,SAAUC,EAASC,EAAS,CAC1CD,IAAY,SAAUA,EAAU,IACpC,IAAIE,KAAU,eAAY,SAAUC,EAAO,CACvC,IAAIC,EAAe,OAAOJ,GAAY,WAAaA,EAAQ,EAAI,GAC/D,GAAKI,EAGL,OAAAD,EAAM,eAAe,EACjBF,IACAE,EAAM,YAAcF,GAEjBA,CACX,EAAG,CAACD,EAASC,CAAO,CAAC,KACrB,aAAU,UAAY,CAClB,GAAKD,EAGL,gBAAG,OAAQ,eAAgBE,CA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MAAgB,UAAO,UAAY,CAAE,CAAC,KAC1C,aAAU,UAAY,CAClBA,GAAc,QAAUF,CAC5B,CAAC,KACD,aAAU,UAAY,CAClB,GAAIC,IAAU,KAAM,CAChB,IAAIE,GAAa,YAAY,UAAY,CAAE,OAAOD,GAAc,QAAQ,CAAG,EAAGD,GAAS,CAAC,EACxF,OAAO,UAAY,CAAE,OAAO,cAAcE,EAAU,CAAG,EAG/D,EAAG,CAACF,CAAK,CAAC,CACd,EACA,QAAe1nB,C","sources":["webpack://grafana/./public/app/features/correlations/Forms/types.ts","webpack://grafana/./node_modules/react-use/esm/useBeforeUnload.js","webpack://grafana/./public/app/features/explore/CorrelationUnsavedChangesModal.tsx","webpack://grafana/./public/app/features/explore/correlationEditLogic.ts","webpack://grafana/./public/app/features/explore/CorrelationEditorModeBar.tsx","webpack://grafana/./public/app/features/explore/ExploreActions.tsx","webpack://grafana/./node_modules/react-use/esm/useScroll.js","webpack://grafana/./public/app/features/explore/ContentOutline/ContentOutlineContext.tsx","webpack://grafana/./public/app/features/explore/ContentOutline/ContentOutlineItemButton.tsx","webpack://grafana/./public/app/features/explore/ContentOutline/ContentOutline.tsx","webpack://grafana/./public/app/features/explore/ContentOutline/ContentOutlineItem.tsx","webpack://grafana/./public/app/features/explore/CorrelationTransformationAddModal.tsx","webpack://grafana/./public/app/features/explore/CorrelationHelper.tsx","webpack://grafana/./public/app/features/explore/CustomContainer.tsx","webpack://grafana/./node_modules/re-resizable/lib/resizer.js","webpack://grafana/./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/ShortLinkButtonMenu.tsx","webpack://grafana/./public/app/features/explore/extensions/ToolbarExtensionPoint.tsx","webpack://grafana/./public/app/features/explore/useLiveTailControls.ts","webpack://grafana/./public/app/features/explore/ExploreToolbar.tsx","webpack://grafana/./public/app/features/explore/FlameGraph/FlameGraphExploreContainer.tsx","webpack://grafana/./public/app/features/explore/ElapsedTime.tsx","webpack://grafana/./public/app/features/explore/Logs/LiveLogs.tsx","webpack://grafana/./public/app/features/logs/components/InfiniteScroll.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsFeedback.tsx","webpack://grafana/./public/app/features/explore/MetaInfoText.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsTable.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsMetaRow.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsNavigationPages.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsNavigation.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsColumnSearch.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsTableEmptyFields.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsTableNavField.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsTableActiveFields.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsTableAvailableFields.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsTableMultiSelect.tsx","webpack://grafana/./public/app/features/explore/Logs/utils/uFuzzy.ts","webpack://grafana/./public/app/features/explore/Logs/LogsTableWrap.tsx","webpack://grafana/./public/app/features/explore/SupplementaryResultError.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsVolumePanel.tsx","webpack://grafana/./public/app/features/explore/Logs/utils/logsVolumeResponse.ts","webpack://grafana/./public/app/features/explore/Logs/LogsVolumePanelList.tsx","webpack://grafana/./public/app/features/explore/Logs/Logs.tsx","webpack://grafana/./public/app/features/explore/Logs/utils/LogsCrossFadeTransition.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsContainer.tsx","webpack://grafana/./public/app/features/explore/Logs/LogsSamplePanel.tsx","webpack://grafana/./public/app/features/explore/NoData.tsx","webpack://grafana/./public/app/features/explore/NoDataSourceCallToAction.tsx","webpack://grafana/./public/app/features/explore/NodeGraph/NodeGraphContainer.tsx","webpack://grafana/./public/app/features/explore/QueryRows.tsx","webpack://grafana/./public/app/features/explore/PrometheusListView/RawListContainer.tsx","webpack://grafana/./public/app/features/explore/RawPrometheus/RawPrometheusContainer.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/Table/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/hooks/useExplorePageTitle.ts","webpack://grafana/./public/app/features/explore/hooks/useKeyboardShortcuts.ts","webpack://grafana/./public/app/features/explore/hooks/useSplitSizeUpdater.ts","webpack://grafana/./public/app/features/explore/hooks/useTimeSrvFix.ts","webpack://grafana/./public/app/features/explore/ExplorePage.tsx","webpack://grafana/./node_modules/react-use/esm/useInterval.js"],"sourcesContent":["import { SupportedTransformationType } from '@grafana/data';\nimport { t } from 'app/core/internationalization';\n\nimport { CorrelationConfig } from '../types';\n\nexport interface FormDTO {\n sourceUID: string;\n targetUID: string;\n label: string;\n description: string;\n config: CorrelationConfig;\n}\n\nexport type EditFormDTO = Omit<FormDTO, 'targetUID' | 'sourceUID'>;\n\nexport type TransformationDTO = {\n type: SupportedTransformationType;\n expression?: string;\n mapValue?: string;\n};\n\nexport interface TransformationFieldDetails {\n show: boolean;\n required?: boolean;\n helpText?: string;\n}\n\ninterface SupportedTransformationTypeDetails {\n label: string;\n value: SupportedTransformationType;\n description?: string;\n expressionDetails: TransformationFieldDetails;\n mapValueDetails: TransformationFieldDetails;\n}\n\nexport function getSupportedTransTypeDetails(\n transType: SupportedTransformationType\n): SupportedTransformationTypeDetails {\n switch (transType) {\n case SupportedTransformationType.Logfmt:\n return {\n label: t('correlations.trans-details.logfmt-label', 'Logfmt'),\n value: SupportedTransformationType.Logfmt,\n description: t(\n 'correlations.trans-details.logfmt-description',\n 'Parse provided field with logfmt to get variables'\n ),\n expressionDetails: { show: false },\n mapValueDetails: { show: false },\n };\n case SupportedTransformationType.Regex:\n return {\n label: t('correlations.trans-details.regex-label', 'Regular expression'),\n value: SupportedTransformationType.Regex,\n description: t(\n 'correlations.trans-details.regex-description',\n 'Field will be parsed with regex. Use named capture groups to return multiple variables, or a single unnamed capture group to add variable to named map value. Regex is case insensitive.'\n ),\n expressionDetails: {\n show: true,\n required: true,\n helpText: t(\n 'correlations.trans-details.regex-expression',\n 'Use capture groups to extract a portion of the field.'\n ),\n },\n mapValueDetails: {\n show: true,\n required: false,\n helpText: t(\n 'correlations.trans-details.regex-map-values',\n 'Defines the name of the variable if the capture group is not named.'\n ),\n },\n };\n default:\n return {\n label: transType,\n value: transType,\n expressionDetails: { show: false },\n mapValueDetails: { show: false },\n };\n }\n}\n\nexport const getTransformOptions = () => {\n return Object.values(SupportedTransformationType).map((transformationType) => {\n const transType = getSupportedTransTypeDetails(transformationType);\n return {\n label: transType.label,\n value: transType.value,\n description: transType.description,\n };\n });\n};\n","import { useCallback, useEffect } from 'react';\nimport { off, on } from './misc/util';\nvar useBeforeUnload = function (enabled, message) {\n if (enabled === void 0) { enabled = true; }\n var handler = useCallback(function (event) {\n var finalEnabled = typeof enabled === 'function' ? enabled() : true;\n if (!finalEnabled) {\n return;\n }\n event.preventDefault();\n if (message) {\n event.returnValue = message;\n }\n return message;\n }, [enabled, message]);\n useEffect(function () {\n if (!enabled) {\n return;\n }\n on(window, 'beforeunload', handler);\n return function () { return off(window, 'beforeunload', handler); };\n }, [enabled, handler]);\n};\nexport default useBeforeUnload;\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { Button, Modal } from '@grafana/ui';\n\ninterface UnsavedChangesModalProps {\n message: string;\n onDiscard: () => void;\n onCancel: () => void;\n onSave: () => void;\n}\n\nexport const CorrelationUnsavedChangesModal = ({ onSave, onDiscard, onCancel, message }: UnsavedChangesModalProps) => {\n return (\n <Modal\n isOpen={true}\n title={`Unsaved changes to correlation`}\n onDismiss={onCancel}\n icon=\"exclamation-triangle\"\n className={css({ width: '600px' })}\n >\n <h5>{message}</h5>\n <Modal.ButtonRow>\n <Button variant=\"secondary\" onClick={onCancel} fill=\"outline\">\n Cancel\n </Button>\n <Button variant=\"destructive\" onClick={onDiscard}>\n Continue without saving\n </Button>\n <Button variant=\"primary\" onClick={onSave}>\n Save correlation\n </Button>\n </Modal.ButtonRow>\n </Modal>\n );\n};\n","import { template } from 'lodash';\n\nimport { CORRELATION_EDITOR_POST_CONFIRM_ACTION } from 'app/types';\n\nenum CONSEQUENCES {\n SOURCE_TARGET_CHANGE = 'cause the query in the right pane to be re-ran and links added to that data',\n FULL_QUERY_LOSS = 'lose the changed query',\n FULL_CORR_LOSS = 'cause the correlation in progress to be lost',\n INVALID_VAR = 'remove the variables, and your changed query may no longer be valid',\n}\n\n// returns a string if the modal should show, with what the message string should be\n// returns undefined if the modal shouldn't show\nexport const showModalMessage = (\n action: CORRELATION_EDITOR_POST_CONFIRM_ACTION,\n isActionLeft: boolean,\n dirtyCorrelation: boolean,\n dirtyQueryEditor: boolean\n) => {\n const messageTemplate = template(\n '<%= actionStr %> will <%= consequenceStr %>. Would you like to save before continuing?'\n );\n let actionStr = '';\n let consequenceStr = '';\n\n // dirty correlation message always takes priority over dirty query\n if (action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CLOSE_PANE) {\n actionStr = 'Closing the pane';\n if (isActionLeft) {\n if (dirtyCorrelation) {\n consequenceStr = CONSEQUENCES.FULL_CORR_LOSS;\n } else if (dirtyQueryEditor) {\n consequenceStr = CONSEQUENCES.SOURCE_TARGET_CHANGE;\n } else {\n return undefined;\n }\n } else {\n // right pane close\n if (dirtyCorrelation) {\n consequenceStr = CONSEQUENCES.FULL_CORR_LOSS;\n } else if (dirtyQueryEditor) {\n consequenceStr = CONSEQUENCES.FULL_QUERY_LOSS;\n } else {\n return undefined;\n }\n }\n } else if (action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CHANGE_DATASOURCE) {\n actionStr = 'Changing the datasource';\n if (isActionLeft) {\n if (dirtyCorrelation) {\n consequenceStr = CONSEQUENCES.FULL_CORR_LOSS;\n } else {\n return undefined;\n }\n } else {\n // right datasource change\n if (dirtyQueryEditor) {\n consequenceStr = CONSEQUENCES.FULL_QUERY_LOSS;\n } else {\n return undefined;\n }\n }\n } else if (action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CLOSE_EDITOR) {\n actionStr = 'Closing the editor';\n if (dirtyCorrelation) {\n consequenceStr = CONSEQUENCES.FULL_CORR_LOSS;\n } else if (dirtyQueryEditor) {\n consequenceStr = CONSEQUENCES.INVALID_VAR;\n } else {\n return undefined;\n }\n }\n return messageTemplate({ actionStr, consequenceStr });\n};\n","import { css } from '@emotion/css';\nimport React, { useEffect, useState } from 'react';\nimport { Prompt } from 'react-router-dom';\nimport { useBeforeUnload, useUnmount } from 'react-use';\n\nimport { GrafanaTheme2, colorManipulator } from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime';\nimport { Button, HorizontalGroup, Icon, Tooltip, useStyles2 } from '@grafana/ui';\nimport { CORRELATION_EDITOR_POST_CONFIRM_ACTION, ExploreItemState, useDispatch, useSelector } from 'app/types';\n\nimport { CorrelationUnsavedChangesModal } from './CorrelationUnsavedChangesModal';\nimport { showModalMessage } from './correlationEditLogic';\nimport { saveCurrentCorrelation } from './state/correlations';\nimport { changeDatasource } from './state/datasource';\nimport { changeCorrelationHelperData } from './state/explorePane';\nimport { changeCorrelationEditorDetails, splitClose } from './state/main';\nimport { runQueries } from './state/query';\nimport { selectCorrelationDetails, selectIsHelperShowing } from './state/selectors';\n\nexport const CorrelationEditorModeBar = ({ panes }: { panes: Array<[string, ExploreItemState]> }) => {\n const dispatch = useDispatch();\n const styles = useStyles2(getStyles);\n const correlationDetails = useSelector(selectCorrelationDetails);\n const isHelperShowing = useSelector(selectIsHelperShowing);\n const [saveMessage, setSaveMessage] = useState<string | undefined>(undefined); // undefined means do not show\n\n // handle refreshing and closing the tab\n useBeforeUnload(correlationDetails?.correlationDirty || false, 'Save correlation?');\n useBeforeUnload(\n (!correlationDetails?.correlationDirty && correlationDetails?.queryEditorDirty) || false,\n 'The query editor was changed. Save correlation before continuing?'\n );\n\n // decide if we are displaying prompt, perform action if not\n useEffect(() => {\n if (correlationDetails?.isExiting) {\n const { correlationDirty, queryEditorDirty } = correlationDetails;\n let isActionLeft = undefined;\n let action = undefined;\n if (correlationDetails.postConfirmAction) {\n isActionLeft = correlationDetails.postConfirmAction.isActionLeft;\n action = correlationDetails.postConfirmAction.action;\n } else {\n // closing the editor only\n action = CORRELATION_EDITOR_POST_CONFIRM_ACTION.CLOSE_EDITOR;\n isActionLeft = false;\n }\n\n const modalMessage = showModalMessage(action, isActionLeft, correlationDirty, queryEditorDirty);\n if (modalMessage !== undefined) {\n setSaveMessage(modalMessage);\n } else {\n // if no prompt, perform action\n if (\n action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CHANGE_DATASOURCE &&\n correlationDetails.postConfirmAction\n ) {\n const { exploreId, changeDatasourceUid } = correlationDetails?.postConfirmAction;\n if (exploreId && changeDatasourceUid) {\n dispatch(\n changeDatasource({ exploreId, datasource: changeDatasourceUid, options: { importQueries: true } })\n );\n dispatch(\n changeCorrelationEditorDetails({\n isExiting: false,\n })\n );\n }\n } else if (\n action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CLOSE_PANE &&\n correlationDetails.postConfirmAction\n ) {\n const { exploreId } = correlationDetails?.postConfirmAction;\n if (exploreId !== undefined) {\n dispatch(splitClose(exploreId));\n dispatch(\n changeCorrelationEditorDetails({\n isExiting: false,\n })\n );\n }\n } else if (action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CLOSE_EDITOR) {\n dispatch(\n changeCorrelationEditorDetails({\n editorMode: false,\n })\n );\n }\n }\n }\n }, [correlationDetails, dispatch, isHelperShowing]);\n\n // clear data when unmounted\n useUnmount(() => {\n dispatch(\n changeCorrelationEditorDetails({\n editorMode: false,\n isExiting: false,\n correlationDirty: false,\n label: undefined,\n description: undefined,\n canSave: false,\n })\n );\n\n panes.forEach((pane) => {\n dispatch(\n changeCorrelationHelperData({\n exploreId: pane[0],\n correlationEditorHelperData: undefined,\n })\n );\n dispatch(runQueries({ exploreId: pane[0] }));\n });\n });\n\n const resetEditor = () => {\n dispatch(\n changeCorrelationEditorDetails({\n editorMode: true,\n isExiting: false,\n correlationDirty: false,\n label: undefined,\n description: undefined,\n canSave: false,\n })\n );\n\n panes.forEach((pane) => {\n dispatch(\n changeCorrelationHelperData({\n exploreId: pane[0],\n correlationEditorHelperData: undefined,\n })\n );\n dispatch(runQueries({ exploreId: pane[0] }));\n });\n };\n\n const closePane = (exploreId: string) => {\n setSaveMessage(undefined);\n dispatch(splitClose(exploreId));\n reportInteraction('grafana_explore_split_view_closed');\n };\n\n const changeDatasourcePostAction = (exploreId: string, datasourceUid: string) => {\n setSaveMessage(undefined);\n dispatch(changeDatasource({ exploreId, datasource: datasourceUid, options: { importQueries: true } }));\n };\n\n const saveCorrelationPostAction = (skipPostConfirmAction: boolean) => {\n dispatch(\n saveCurrentCorrelation(\n correlationDetails?.label,\n correlationDetails?.description,\n correlationDetails?.transformations\n )\n );\n if (!skipPostConfirmAction && correlationDetails?.postConfirmAction !== undefined) {\n const { exploreId, action, changeDatasourceUid } = correlationDetails?.postConfirmAction;\n if (action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CLOSE_PANE) {\n closePane(exploreId);\n resetEditor();\n } else if (\n action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CHANGE_DATASOURCE &&\n changeDatasourceUid !== undefined\n ) {\n changeDatasource({ exploreId, datasource: changeDatasourceUid });\n resetEditor();\n }\n } else {\n dispatch(changeCorrelationEditorDetails({ editorMode: false, correlationDirty: false, isExiting: false }));\n }\n };\n\n return (\n <>\n {/* Handle navigating outside of Explore */}\n <Prompt\n message={(location) => {\n if (\n location.pathname !== '/explore' &&\n (correlationDetails?.editorMode || false) &&\n (correlationDetails?.correlationDirty || false)\n ) {\n return 'You have unsaved correlation data. Continue?';\n } else {\n return true;\n }\n }}\n />\n\n {saveMessage !== undefined && (\n <CorrelationUnsavedChangesModal\n onDiscard={() => {\n if (correlationDetails?.postConfirmAction !== undefined) {\n const { exploreId, action, changeDatasourceUid } = correlationDetails?.postConfirmAction;\n if (action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CLOSE_PANE) {\n closePane(exploreId);\n } else if (\n action === CORRELATION_EDITOR_POST_CONFIRM_ACTION.CHANGE_DATASOURCE &&\n changeDatasourceUid !== undefined\n ) {\n changeDatasourcePostAction(exploreId, changeDatasourceUid);\n }\n dispatch(changeCorrelationEditorDetails({ isExiting: false }));\n } else {\n // exit correlations mode\n // if we are discarding the in progress correlation, reset everything\n // this modal only shows if the editorMode is false, so we just need to update the dirty state\n dispatch(\n changeCorrelationEditorDetails({\n editorMode: false,\n correlationDirty: false,\n isExiting: false,\n })\n );\n }\n }}\n onCancel={() => {\n // if we are cancelling the exit, set the editor mode back to true and hide the prompt\n dispatch(changeCorrelationEditorDetails({ isExiting: false }));\n setSaveMessage(undefined);\n }}\n onSave={() => {\n saveCorrelationPostAction(false);\n }}\n message={saveMessage}\n />\n )}\n <div className={styles.correlationEditorTop}>\n <HorizontalGroup spacing=\"md\" justify=\"flex-end\">\n <Tooltip content=\"Correlations editor in Explore is an experimental feature.\">\n <Icon className={styles.iconColor} name=\"info-circle\" size=\"xl\" />\n </Tooltip>\n <Button\n variant=\"secondary\"\n disabled={!correlationDetails?.canSave}\n fill=\"outline\"\n className={correlationDetails?.canSave ? styles.buttonColor : styles.disabledButtonColor}\n onClick={() => {\n saveCorrelationPostAction(true);\n }}\n >\n Save\n </Button>\n <Button\n variant=\"secondary\"\n fill=\"outline\"\n className={styles.buttonColor}\n icon=\"times\"\n onClick={() => {\n dispatch(changeCorrelationEditorDetails({ isExiting: true }));\n reportInteraction('grafana_explore_correlation_editor_exit_pressed');\n }}\n >\n Exit correlation editor\n </Button>\n </HorizontalGroup>\n </div>\n </>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => {\n const contrastColor = theme.colors.getContrastText(theme.colors.primary.main);\n const lighterBackgroundColor = colorManipulator.lighten(theme.colors.primary.main, 0.1);\n const darkerBackgroundColor = colorManipulator.darken(theme.colors.primary.main, 0.2);\n\n const disabledColor = colorManipulator.darken(contrastColor, 0.2);\n\n return {\n correlationEditorTop: css({\n backgroundColor: theme.colors.primary.main,\n marginTop: '3px',\n padding: theme.spacing(1),\n }),\n iconColor: css({\n color: contrastColor,\n }),\n buttonColor: css({\n color: contrastColor,\n borderColor: contrastColor,\n '&:hover': {\n color: contrastColor,\n borderColor: contrastColor,\n backgroundColor: lighterBackgroundColor,\n },\n }),\n // important needed to override disabled state styling\n disabledButtonColor: css({\n color: `${disabledColor} !important`,\n backgroundColor: `${darkerBackgroundColor} !important`,\n }),\n };\n};\n","import { useRegisterActions, useKBar, Action, Priority } from 'kbar';\nimport { useEffect, useState } from 'react';\n\nimport { config } from '@grafana/runtime';\nimport { contextSrv } from 'app/core/services/context_srv';\nimport { MIXED_DATASOURCE_NAME } from 'app/plugins/datasource/mixed/MixedDataSource';\nimport { AccessControlAction, useDispatch, useSelector } from 'app/types';\n\nimport { splitOpen, splitClose, changeCorrelationEditorDetails } from './state/main';\nimport { runQueries } from './state/query';\nimport { isSplit, selectPanes } from './state/selectors';\n\n// FIXME: this should use the new IDs\nexport const ExploreActions = () => {\n const [actions, setActions] = useState<Action[]>([]);\n const { query } = useKBar();\n const dispatch = useDispatch();\n const panes = useSelector(selectPanes);\n const splitted = useSelector(isSplit);\n\n const canWriteCorrelations = contextSrv.hasPermission(AccessControlAction.DataSourcesWrite);\n\n useEffect(() => {\n const keys = Object.keys(panes);\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({ exploreId: keys[0] }));\n },\n section: exploreSection,\n });\n if ([panes[1]]) {\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({ exploreId: keys[1] }));\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(keys[0]));\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(keys[1]));\n },\n section: exploreSection,\n });\n }\n } else {\n // command palette doesn't know what pane we're in, only show option if not split and no datasource is mixed\n const hasMixed = Object.values(panes).some((pane) => {\n return pane?.datasourceInstance?.uid === MIXED_DATASOURCE_NAME;\n });\n\n if (config.featureToggles.correlations && canWriteCorrelations && !hasMixed) {\n actionsArr.push({\n id: 'explore/correlations-editor',\n name: 'Correlations editor',\n perform: () => {\n dispatch(changeCorrelationEditorDetails({ editorMode: true }));\n dispatch(runQueries({ exploreId: keys[0] }));\n },\n section: exploreSection,\n });\n }\n\n actionsArr.push({\n id: 'explore/run-query',\n name: 'Run query',\n keywords: 'query',\n perform: () => {\n dispatch(runQueries({ exploreId: keys[0] }));\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 }, [panes, splitted, query, dispatch, canWriteCorrelations]);\n\n useRegisterActions(!query ? [] : actions, [actions, query]);\n\n return null;\n};\n","import { useEffect } from 'react';\nimport useRafState from './useRafState';\nimport { off, on } from './misc/util';\nvar useScroll = function (ref) {\n if (process.env.NODE_ENV === 'development') {\n if (typeof ref !== 'object' || typeof ref.current === 'undefined') {\n console.error('`useScroll` expects a single ref argument.');\n }\n }\n var _a = useRafState({\n x: 0,\n y: 0,\n }), state = _a[0], setState = _a[1];\n useEffect(function () {\n var handler = function () {\n if (ref.current) {\n setState({\n x: ref.current.scrollLeft,\n y: ref.current.scrollTop,\n });\n }\n };\n if (ref.current) {\n on(ref.current, 'scroll', handler, {\n capture: false,\n passive: true,\n });\n }\n return function () {\n if (ref.current) {\n off(ref.current, 'scroll', handler);\n }\n };\n }, [ref]);\n return state;\n};\nexport default useScroll;\n","import { uniqueId } from 'lodash';\nimport React, { useState, useContext, createContext, ReactNode, useCallback } from 'react';\n\nimport { ContentOutlineItemBaseProps } from './ContentOutlineItem';\n\nexport interface ContentOutlineItemContextProps extends ContentOutlineItemBaseProps {\n id: string;\n ref: HTMLElement | null;\n}\n\ntype RegisterFunction = ({ title, icon, ref }: Omit<ContentOutlineItemContextProps, 'id'>) => string;\n\nexport interface ContentOutlineContextProps {\n outlineItems: ContentOutlineItemContextProps[];\n register: RegisterFunction;\n unregister: (id: string) => void;\n}\n\nconst ContentOutlineContext = createContext<ContentOutlineContextProps | undefined>(undefined);\n\nexport const ContentOutlineContextProvider = ({ children }: { children: ReactNode }) => {\n const [outlineItems, setOutlineItems] = useState<ContentOutlineItemContextProps[]>([]);\n\n const register: RegisterFunction = useCallback(({ title, icon, ref }) => {\n const id = uniqueId(`${title}-${icon}_`);\n\n setOutlineItems((prevItems) => {\n const updatedItems = [...prevItems, { id, title, icon, ref }];\n\n return updatedItems.sort((a, b) => {\n if (a.ref && b.ref) {\n const diff = a.ref.compareDocumentPosition(b.ref);\n if (diff === Node.DOCUMENT_POSITION_PRECEDING) {\n return 1;\n } else if (diff === Node.DOCUMENT_POSITION_FOLLOWING) {\n return -1;\n }\n }\n return 0;\n });\n });\n\n return id;\n }, []);\n\n const unregister = useCallback((id: string) => {\n setOutlineItems((prevItems) => prevItems.filter((item) => item.id !== id));\n }, []);\n\n return (\n <ContentOutlineContext.Provider value={{ outlineItems, register, unregister }}>\n {children}\n </ContentOutlineContext.Provider>\n );\n};\n\nexport function useContentOutlineContext() {\n const ctx = useContext(ContentOutlineContext);\n\n if (!ctx) {\n throw new Error('useContentOutlineContext must be used within a ContentOutlineContextProvider');\n }\n return ctx;\n}\n","import { cx, css } from '@emotion/css';\nimport React, { ButtonHTMLAttributes } from 'react';\n\nimport { IconName, isIconName, GrafanaTheme2 } from '@grafana/data';\nimport { Icon, useStyles2, Tooltip } from '@grafana/ui';\n\ntype CommonProps = {\n title?: string;\n icon: string;\n tooltip?: string;\n className?: string;\n isActive?: boolean;\n};\n\nexport type ContentOutlineItemButtonProps = CommonProps & ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport function ContentOutlineItemButton({\n title,\n icon,\n tooltip,\n className,\n isActive,\n ...rest\n}: ContentOutlineItemButtonProps) {\n const styles = useStyles2(getStyles);\n\n const buttonStyles = cx(styles.button, className);\n\n const body = (\n <button\n className={cx(buttonStyles, {\n [styles.active]: isActive,\n })}\n aria-label={tooltip}\n {...rest}\n >\n {renderIcon(icon)}\n {title}\n </button>\n );\n\n return tooltip ? (\n <Tooltip content={tooltip} placement=\"bottom\">\n {body}\n </Tooltip>\n ) : (\n body\n );\n}\n\nfunction renderIcon(icon: IconName | React.ReactNode) {\n if (!icon) {\n return null;\n }\n\n if (isIconName(icon)) {\n return <Icon name={icon} size={'lg'} />;\n }\n\n return icon;\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n button: css({\n label: 'content-outline-item-button',\n display: 'flex',\n flexGrow: 1,\n alignItems: 'center',\n height: theme.spacing(theme.components.height.md),\n padding: theme.spacing(0, 1),\n gap: theme.spacing(1),\n color: theme.colors.text.secondary,\n background: 'transparent',\n border: 'none',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n '&:hover': {\n color: theme.colors.text.primary,\n background: theme.colors.background.secondary,\n textDecoration: 'underline',\n },\n }),\n active: css({\n backgroundColor: theme.colors.background.secondary,\n borderTopRightRadius: theme.shape.radius.default,\n borderBottomRightRadius: theme.shape.radius.default,\n position: 'relative',\n\n '&::before': {\n backgroundImage: theme.colors.gradients.brandVertical,\n borderRadius: theme.shape.radius.default,\n content: '\" \"',\n display: 'block',\n height: '100%',\n position: 'absolute',\n transform: 'translateX(-50%)',\n width: theme.spacing(0.5),\n left: '2px',\n },\n }),\n };\n};\n","import { css } from '@emotion/css';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useToggle, useScroll } from 'react-use';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime';\nimport { useStyles2, PanelContainer, CustomScrollbar } from '@grafana/ui';\n\nimport { useContentOutlineContext } from './ContentOutlineContext';\nimport { ContentOutlineItemButton } from './ContentOutlineItemButton';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n wrapper: css({\n label: 'wrapper',\n position: 'relative',\n display: 'flex',\n justifyContent: 'center',\n marginRight: theme.spacing(1),\n height: '100%',\n backgroundColor: theme.colors.background.primary,\n }),\n content: css({\n label: 'content',\n top: 0,\n }),\n buttonStyles: css({\n textAlign: 'left',\n width: '100%',\n padding: theme.spacing(0, 1.5),\n }),\n };\n};\n\nexport function ContentOutline({ scroller, panelId }: { scroller: HTMLElement | undefined; panelId: string }) {\n const { outlineItems } = useContentOutlineContext();\n const [expanded, toggleExpanded] = useToggle(false);\n const [activeItemId, setActiveItemId] = useState<string | undefined>(outlineItems[0]?.id);\n const styles = useStyles2((theme) => getStyles(theme));\n const scrollerRef = useRef(scroller || null);\n const { y: verticalScroll } = useScroll(scrollerRef);\n\n const scrollIntoView = (ref: HTMLElement | null, buttonTitle: string) => {\n let scrollValue = 0;\n let el: HTMLElement | null | undefined = ref;\n\n do {\n scrollValue += el?.offsetTop || 0;\n el = el?.offsetParent as HTMLElement;\n } while (el && el !== scroller);\n\n scroller?.scroll({\n top: scrollValue,\n behavior: 'smooth',\n });\n\n reportInteraction('explore_toolbar_contentoutline_clicked', {\n item: 'select_section',\n type: buttonTitle,\n });\n };\n\n const toggle = () => {\n toggleExpanded();\n reportInteraction('explore_toolbar_contentoutline_clicked', {\n item: 'outline',\n type: expanded ? 'minimize' : 'expand',\n });\n };\n\n useEffect(() => {\n const activeItem = outlineItems.find((item) => {\n const top = item?.ref?.getBoundingClientRect().top;\n\n if (!top) {\n return false;\n }\n\n return top >= 0;\n });\n\n if (!activeItem) {\n return;\n }\n\n setActiveItemId(activeItem.id);\n }, [outlineItems, verticalScroll]);\n\n return (\n <PanelContainer className={styles.wrapper} id={panelId}>\n <CustomScrollbar>\n <div className={styles.content}>\n <ContentOutlineItemButton\n title={expanded ? 'Collapse outline' : undefined}\n icon={expanded ? 'angle-left' : 'angle-right'}\n onClick={toggle}\n tooltip={!expanded ? 'Expand content outline' : undefined}\n className={styles.buttonStyles}\n aria-expanded={expanded}\n />\n\n {outlineItems.map((item) => {\n return (\n <ContentOutlineItemButton\n key={item.id}\n title={expanded ? item.title : undefined}\n className={styles.buttonStyles}\n icon={item.icon}\n onClick={() => scrollIntoView(item.ref, item.title)}\n tooltip={!expanded ? item.title : undefined}\n isActive={activeItemId === item.id}\n />\n );\n })}\n </div>\n </CustomScrollbar>\n </PanelContainer>\n );\n}\n","import React, { useEffect, useRef, ReactNode } from 'react';\n\nimport { useContentOutlineContext } from './ContentOutlineContext';\n\nexport interface ContentOutlineItemBaseProps {\n title: string;\n icon: string;\n}\n\ninterface ContentOutlineItemProps extends ContentOutlineItemBaseProps {\n children: ReactNode;\n className?: string;\n}\n\nexport function ContentOutlineItem({ title, icon, children, className }: ContentOutlineItemProps) {\n const { register, unregister } = useContentOutlineContext();\n const ref = useRef(null);\n\n useEffect(() => {\n // When the component mounts, register it and get its unique ID.\n const id = register({ title: title, icon: icon, ref: ref.current });\n\n // When the component unmounts, unregister it using its unique ID.\n return () => unregister(id);\n }, [title, icon, register, unregister]);\n\n return (\n <div className={className} ref={ref}>\n {children}\n </div>\n );\n}\n","import { css } from '@emotion/css';\nimport React, { useId, useState, useMemo, useEffect } from 'react';\nimport Highlighter from 'react-highlight-words';\nimport { useForm } from 'react-hook-form';\n\nimport { DataLinkTransformationConfig, ScopedVars } from '@grafana/data';\nimport { Button, Field, Icon, Input, InputControl, Label, Modal, Select, Tooltip, Stack } from '@grafana/ui';\n\nimport {\n getSupportedTransTypeDetails,\n getTransformOptions,\n TransformationFieldDetails,\n} from '../correlations/Forms/types';\nimport { getTransformationVars } from '../correlations/transformations';\n\ninterface CorrelationTransformationAddModalProps {\n onCancel: () => void;\n onSave: (transformation: DataLinkTransformationConfig) => void;\n fieldList: Record<string, string>;\n transformationToEdit?: DataLinkTransformationConfig;\n}\n\ninterface ShowFormFields {\n expressionDetails: TransformationFieldDetails;\n mapValueDetails: TransformationFieldDetails;\n}\n\nconst LabelWithTooltip = ({ label, tooltipText }: { label: string; tooltipText: string }) => (\n <Stack gap={1} direction=\"row\" wrap=\"wrap\" alignItems=\"flex-start\">\n <Label>{label}</Label>\n <Tooltip content={tooltipText}>\n <Icon name=\"info-circle\" size=\"sm\" />\n </Tooltip>\n </Stack>\n);\n\nexport const CorrelationTransformationAddModal = ({\n onSave,\n onCancel,\n fieldList,\n transformationToEdit,\n}: CorrelationTransformationAddModalProps) => {\n const [exampleValue, setExampleValue] = useState<string | undefined>(undefined);\n const [transformationVars, setTransformationVars] = useState<ScopedVars>({});\n const [formFieldsVis, setFormFieldsVis] = useState<ShowFormFields>({\n mapValueDetails: { show: false },\n expressionDetails: { show: false },\n });\n const [isExpValid, setIsExpValid] = useState(false); // keep the highlighter from erroring on bad expressions\n const [validToSave, setValidToSave] = useState(false);\n const { getValues, control, register, watch } = useForm<DataLinkTransformationConfig>({\n defaultValues: useMemo(() => {\n if (transformationToEdit) {\n const exampleVal = fieldList[transformationToEdit?.field!];\n setExampleValue(exampleVal);\n if (transformationToEdit?.expression) {\n setIsExpValid(true);\n }\n const transformationTypeDetails = getSupportedTransTypeDetails(transformationToEdit?.type!);\n setFormFieldsVis({\n mapValueDetails: transformationTypeDetails.mapValueDetails,\n expressionDetails: transformationTypeDetails.expressionDetails,\n });\n\n const transformationVars = getTransformationVars(\n {\n type: transformationToEdit?.type!,\n expression: transformationToEdit?.expression,\n mapValue: transformationToEdit?.mapValue,\n },\n exampleVal || '',\n transformationToEdit?.field!\n );\n setTransformationVars({ ...transformationVars });\n setValidToSave(true);\n return {\n type: transformationToEdit?.type,\n field: transformationToEdit?.field,\n mapValue: transformationToEdit?.mapValue,\n expression: transformationToEdit?.expression,\n };\n } else {\n return undefined;\n }\n }, [fieldList, transformationToEdit]),\n });\n const id = useId();\n\n useEffect(() => {\n const subscription = watch((formValues) => {\n const expression = formValues.expression;\n let isExpressionValid = false;\n if (expression !== undefined) {\n isExpressionValid = true;\n try {\n new RegExp(expression);\n } catch (e) {\n isExpressionValid = false;\n }\n } else {\n isExpressionValid = !formFieldsVis.expressionDetails.show;\n }\n setIsExpValid(isExpressionValid);\n let transKeys = [];\n if (formValues.type) {\n const transformationVars = getTransformationVars(\n {\n type: formValues.type,\n expression: isExpressionValid ? expression : '',\n mapValue: formValues.mapValue,\n },\n fieldList[formValues.field!] || '',\n formValues.field!\n );\n\n transKeys = Object.keys(transformationVars);\n setTransformationVars(transKeys.length > 0 ? { ...transformationVars } : {});\n }\n\n if (transKeys.length === 0 || !isExpressionValid) {\n setValidToSave(false);\n } else {\n setValidToSave(true);\n }\n });\n return () => subscription.unsubscribe();\n }, [fieldList, formFieldsVis.expressionDetails.show, watch]);\n\n return (\n <Modal\n isOpen={true}\n title={`${transformationToEdit ? 'Edit' : 'Add'} transformation`}\n onDismiss={onCancel}\n className={css({ width: '700px' })}\n >\n <p>\n A transformation extracts variables out of a single field. These variables will be available along with your\n field variables.\n </p>\n <Field label=\"Field\">\n <InputControl\n control={control}\n render={({ field: { onChange, ref, ...field } }) => (\n <Select\n {...field}\n onChange={(value) => {\n if (value.value) {\n onChange(value.value);\n setExampleValue(fieldList[value.value]);\n }\n }}\n options={Object.entries(fieldList).map((entry) => {\n return { label: entry[0], value: entry[0] };\n })}\n aria-label=\"field\"\n />\n )}\n name={`field` as const}\n />\n </Field>\n\n {exampleValue && (\n <>\n <pre>\n <Highlighter\n textToHighlight={exampleValue}\n searchWords={[isExpValid ? getValues('expression') ?? '' : '']}\n autoEscape={false}\n />\n </pre>\n <Field label=\"Type\">\n <InputControl\n control={control}\n render={({ field: { onChange, ref, ...field } }) => (\n <Select\n {...field}\n onChange={(value) => {\n onChange(value.value);\n const transformationTypeDetails = getSupportedTransTypeDetails(value.value!);\n setFormFieldsVis({\n mapValueDetails: transformationTypeDetails.mapValueDetails,\n expressionDetails: transformationTypeDetails.expressionDetails,\n });\n }}\n options={getTransformOptions()}\n aria-label=\"type\"\n />\n )}\n name={`type` as const}\n />\n </Field>\n {formFieldsVis.expressionDetails.show && (\n <Field\n label={\n formFieldsVis.expressionDetails.helpText ? (\n <LabelWithTooltip label=\"Expression\" tooltipText={formFieldsVis.expressionDetails.helpText} />\n ) : (\n 'Expression'\n )\n }\n htmlFor={`${id}-expression`}\n required={formFieldsVis.expressionDetails.required}\n >\n <Input {...register('expression')} id={`${id}-expression`} />\n </Field>\n )}\n {formFieldsVis.mapValueDetails.show && (\n <Field\n label={\n formFieldsVis.mapValueDetails.helpText ? (\n <LabelWithTooltip label=\"Variable Name\" tooltipText={formFieldsVis.mapValueDetails.helpText} />\n ) : (\n 'Variable Name'\n )\n }\n htmlFor={`${id}-mapValue`}\n >\n <Input {...register('mapValue')} id={`${id}-mapValue`} />\n </Field>\n )}\n {Object.entries(transformationVars).length > 0 && (\n <>\n This transformation will add the following variables:\n <pre>\n {Object.entries(transformationVars).map((entry) => {\n return `\\$\\{${entry[0]}\\} = ${entry[1]?.value}\\n`;\n })}\n </pre>\n </>\n )}\n </>\n )}\n <Modal.ButtonRow>\n <Button variant=\"secondary\" onClick={onCancel} fill=\"outline\">\n Cancel\n </Button>\n <Button variant=\"primary\" onClick={() => onSave(getValues())} disabled={!validToSave}>\n {transformationToEdit ? 'Edit transformation' : 'Add transformation to correlation'}\n </Button>\n </Modal.ButtonRow>\n </Modal>\n );\n};\n","import { css } from '@emotion/css';\nimport React, { useState, useEffect, useId } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useAsync } from 'react-use';\n\nimport { DataLinkTransformationConfig, ExploreCorrelationHelperData, GrafanaTheme2 } from '@grafana/data';\nimport {\n Collapse,\n Alert,\n Field,\n Input,\n Button,\n Card,\n IconButton,\n useStyles2,\n DeleteButton,\n Tooltip,\n Icon,\n Stack,\n} from '@grafana/ui';\nimport { useDispatch, useSelector } from 'app/types';\n\nimport { getTransformationVars } from '../correlations/transformations';\nimport { generateDefaultLabel } from '../correlations/utils';\n\nimport { CorrelationTransformationAddModal } from './CorrelationTransformationAddModal';\nimport { changeCorrelationHelperData } from './state/explorePane';\nimport { changeCorrelationEditorDetails } from './state/main';\nimport { selectCorrelationDetails, selectPanes } from './state/selectors';\n\ninterface Props {\n exploreId: string;\n correlations: ExploreCorrelationHelperData;\n}\n\ninterface FormValues {\n label: string;\n description: string;\n}\n\nexport const CorrelationHelper = ({ exploreId, correlations }: Props) => {\n const dispatch = useDispatch();\n const styles = useStyles2(getStyles);\n const panes = useSelector(selectPanes);\n const panesVals = Object.values(panes);\n const { value: defaultLabel, loading: loadingLabel } = useAsync(\n async () => await generateDefaultLabel(panesVals[0]!, panesVals[1]!),\n [\n panesVals[0]?.datasourceInstance,\n panesVals[0]?.queries[0].datasource,\n panesVals[1]?.datasourceInstance,\n panesVals[1]?.queries[0].datasource,\n ]\n );\n\n const { register, watch, getValues, setValue } = useForm<FormValues>();\n const [isLabelDescOpen, setIsLabelDescOpen] = useState(false);\n const [isTransformOpen, setIsTransformOpen] = useState(false);\n const [showTransformationAddModal, setShowTransformationAddModal] = useState(false);\n const [transformations, setTransformations] = useState<DataLinkTransformationConfig[]>([]);\n const [transformationIdxToEdit, setTransformationIdxToEdit] = useState<number | undefined>(undefined);\n const correlationDetails = useSelector(selectCorrelationDetails);\n const id = useId();\n\n // only fire once on mount to allow save button to enable / disable when unmounted\n useEffect(() => {\n dispatch(changeCorrelationEditorDetails({ canSave: true }));\n return () => {\n dispatch(changeCorrelationEditorDetails({ canSave: false }));\n };\n }, [dispatch]);\n\n useEffect(() => {\n if (\n !loadingLabel &&\n defaultLabel !== undefined &&\n !correlationDetails?.correlationDirty &&\n getValues('label') !== ''\n ) {\n setValue('label', defaultLabel);\n }\n }, [correlationDetails?.correlationDirty, defaultLabel, getValues, loadingLabel, setValue]);\n\n useEffect(() => {\n const subscription = watch((value) => {\n let dirty = correlationDetails?.correlationDirty || false;\n let description = value.description || '';\n if (!dirty && (value.label !== defaultLabel || description !== '')) {\n dirty = true;\n } else if (dirty && value.label === defaultLabel && description.trim() === '') {\n dirty = false;\n }\n dispatch(\n changeCorrelationEditorDetails({ label: value.label, description: value.description, correlationDirty: dirty })\n );\n });\n return () => subscription.unsubscribe();\n }, [correlationDetails?.correlationDirty, defaultLabel, dispatch, watch]);\n\n useEffect(() => {\n const dirty =\n !correlationDetails?.correlationDirty && transformations.length > 0 ? true : correlationDetails?.correlationDirty;\n dispatch(changeCorrelationEditorDetails({ transformations: transformations, correlationDirty: dirty }));\n let transVarRecords: Record<string, string> = {};\n transformations.forEach((transformation) => {\n const transformationVars = getTransformationVars(\n {\n type: transformation.type,\n expression: transformation.expression,\n mapValue: transformation.mapValue,\n },\n correlations.vars[transformation.field!],\n transformation.field!\n );\n\n Object.keys(transformationVars).forEach((key) => {\n transVarRecords[key] = transformationVars[key]?.value;\n });\n });\n\n dispatch(\n changeCorrelationHelperData({\n exploreId: exploreId,\n correlationEditorHelperData: {\n resultField: correlations.resultField,\n origVars: correlations.origVars,\n vars: { ...correlations.origVars, ...transVarRecords },\n },\n })\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dispatch, transformations]);\n\n return (\n <>\n {showTransformationAddModal && (\n <CorrelationTransformationAddModal\n onCancel={() => {\n setTransformationIdxToEdit(undefined);\n setShowTransformationAddModal(false);\n }}\n onSave={(transformation: DataLinkTransformationConfig) => {\n if (transformationIdxToEdit !== undefined) {\n const editTransformations = [...transformations];\n editTransformations[transformationIdxToEdit] = transformation;\n setTransformations(editTransformations);\n setTransformationIdxToEdit(undefined);\n } else {\n setTransformations([...transformations, transformation]);\n }\n setShowTransformationAddModal(false);\n }}\n fieldList={correlations.origVars}\n transformationToEdit={\n transformationIdxToEdit !== undefined ? transformations[transformationIdxToEdit] : undefined\n }\n />\n )}\n <Alert title=\"Correlation details\" severity=\"info\">\n The correlation link will appear by the <code>{correlations.resultField}</code> field. You can use the following\n variables to set up your correlations:\n <pre>\n {Object.entries(correlations.vars).map((entry) => {\n return `\\$\\{${entry[0]}\\} = ${entry[1]}\\n`;\n })}\n </pre>\n <Collapse\n collapsible\n isOpen={isLabelDescOpen}\n onToggle={() => {\n setIsLabelDescOpen(!isLabelDescOpen);\n }}\n label={\n <Stack gap={1} direction=\"row\" wrap=\"wrap\" alignItems=\"center\">\n Label / Description\n {!isLabelDescOpen && !loadingLabel && (\n <span className={styles.labelCollapseDetails}>{`Label: ${getValues('label') || defaultLabel}`}</span>\n )}\n </Stack>\n }\n >\n <Field label=\"Label\" htmlFor={`${id}-label`}>\n <Input\n {...register('label')}\n id={`${id}-label`}\n onBlur={() => {\n if (getValues('label') === '' && defaultLabel !== undefined) {\n setValue('label', defaultLabel);\n }\n }}\n />\n </Field>\n <Field label=\"Description\" htmlFor={`${id}-description`}>\n <Input {...register('description')} id={`${id}-description`} />\n </Field>\n </Collapse>\n <Collapse\n collapsible\n isOpen={isTransformOpen}\n onToggle={() => {\n setIsTransformOpen(!isTransformOpen);\n }}\n label={\n <Stack gap={1} direction=\"row\" wrap=\"wrap\" alignItems=\"center\">\n Transformations\n <Tooltip content=\"A transformation extracts one or more variables out of a single field.\">\n <Icon name=\"info-circle\" size=\"sm\" />\n </Tooltip>\n </Stack>\n }\n >\n <Button\n variant=\"secondary\"\n fill=\"outline\"\n onClick={() => {\n setShowTransformationAddModal(true);\n }}\n className={styles.transformationAction}\n >\n Add transformation\n </Button>\n {transformations.map((transformation, i) => {\n const { type, field, expression, mapValue } = transformation;\n const detailsString = [\n (mapValue ?? '').length > 0 ? `Variable name: ${mapValue}` : undefined,\n (expression ?? '').length > 0 ? (\n <>\n Expression: <code>{expression}</code>\n </>\n ) : undefined,\n ].filter((val) => val);\n return (\n <Card key={`trans-${i}`}>\n <Card.Heading>\n {field}: {type}\n </Card.Heading>\n {detailsString.length > 0 && (\n <Card.Meta className={styles.transformationMeta}>{detailsString}</Card.Meta>\n )}\n <Card.SecondaryActions>\n <IconButton\n key=\"edit\"\n name=\"edit\"\n aria-label=\"edit transformation\"\n onClick={() => {\n setTransformationIdxToEdit(i);\n setShowTransformationAddModal(true);\n }}\n />\n <DeleteButton\n aria-label=\"delete transformation\"\n onConfirm={() => setTransformations(transformations.filter((_, idx) => i !== idx))}\n closeOnConfirm\n />\n </Card.SecondaryActions>\n </Card>\n );\n })}\n </Collapse>\n </Alert>\n </>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n labelCollapseDetails: css({\n marginLeft: theme.spacing(2),\n ...theme.typography['bodySmall'],\n fontStyle: 'italic',\n }),\n transformationAction: css({\n marginBottom: theme.spacing(2),\n }),\n transformationMeta: css({\n alignItems: 'baseline',\n }),\n };\n};\n","import React, { useMemo } from 'react';\n\nimport { AbsoluteTimeRange, DataFrame, dateTime, EventBus, LoadingState, SplitOpen } from '@grafana/data';\nimport { PanelRenderer } from '@grafana/runtime';\nimport { PanelChrome, PanelContext, PanelContextProvider } from '@grafana/ui';\n\nimport { getPanelPluginMeta } from '../plugins/importPanelPlugin';\n\nimport { useExploreDataLinkPostProcessor } from './hooks/useExploreDataLinkPostProcessor';\n\nexport interface Props {\n width: number;\n height: number;\n timeZone: string;\n pluginId: string;\n frames: DataFrame[];\n absoluteRange: AbsoluteTimeRange;\n state: LoadingState;\n splitOpenFn: SplitOpen;\n eventBus: EventBus;\n}\n\nexport function CustomContainer({\n width,\n height,\n timeZone,\n state,\n pluginId,\n frames,\n absoluteRange,\n splitOpenFn,\n eventBus,\n}: Props) {\n const timeRange = useMemo(\n () => ({\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 [absoluteRange.from, absoluteRange.to]\n );\n\n const plugin = getPanelPluginMeta(pluginId);\n\n const dataLinkPostProcessor = useExploreDataLinkPostProcessor(splitOpenFn, timeRange);\n\n const panelContext: PanelContext = {\n dataLinkPostProcessor,\n eventBus,\n eventsScope: 'explore',\n };\n\n return (\n <PanelContextProvider value={panelContext}>\n <PanelChrome title={plugin.name} width={width} height={height} loadingState={state}>\n {(innerWidth, innerHeight) => (\n <PanelRenderer\n data={{ series: frames, state: state, timeRange }}\n pluginId={pluginId}\n title=\"\"\n width={innerWidth}\n height={innerHeight}\n timeZone={timeZone}\n />\n )}\n </PanelChrome>\n </PanelContextProvider>\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 { getDragStyles, useStyles2, useTheme2 } from '@grafana/ui';\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 = useStyles2(getStyles);\n const dragStyles = getDragStyles(theme);\n const drawerWidth = `${width + 31.5}px`;\n\n return (\n <Resizable\n className={cx(styles.fixed, styles.container, styles.drawerActive)}\n defaultSize={{ width: drawerWidth, height: `${theme.components.horizontalDrawer.defaultHeight}px` }}\n handleClasses={{ top: dragStyles.dragHandleHorizontal }}\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\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 = (theme: GrafanaTheme2) => ({\n // @ts-expect-error csstype doesn't allow !important. see https://github.com/frenic/csstype/issues/114\n fixed: css({\n position: 'fixed !important',\n }),\n container: css({\n bottom: 0,\n background: theme.colors.background.primary,\n borderTop: `1px solid ${theme.colors.border.weak}`,\n margin: theme.spacing(0, -2, 0, -2),\n boxShadow: theme.shadows.z3,\n zIndex: theme.zIndex.navbarFixed,\n }),\n drawerActive: css({\n opacity: 1,\n animation: `0.5s ease-out ${drawerSlide(theme)}`,\n }),\n});\n","import React, { useEffect, useState } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { CoreApp, LoadingState } from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime/src';\nimport { defaultTimeZone, TimeZone } from '@grafana/schema';\nimport { TabbedContainer, TabConfig } from '@grafana/ui';\nimport { requestIdGenerator } from 'app/core/utils/explore';\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 { mixedRequestId } from 'app/plugins/datasource/mixed/MixedDataSource';\nimport { StoreState, ExploreItemState } from 'app/types';\n\nimport { GetDataOptions } from '../query/state/PanelQueryRunner';\n\nimport { runQueries } from './state/query';\n\ninterface DispatchProps {\n width: number;\n exploreId: string;\n timeZone: TimeZone;\n onClose: () => void;\n isMixed: boolean;\n}\n\ntype Props = DispatchProps & ConnectedProps<typeof connector>;\n\nexport function ExploreQueryInspector(props: Props) {\n const { width, onClose, queryResponse, timeZone, isMixed, exploreId } = props;\n const [dataOptions, setDataOptions] = useState<GetDataOptions>({\n withTransforms: false,\n withFieldConfig: true,\n });\n const dataFrames = queryResponse?.series || [];\n let errors = queryResponse?.errors;\n if (!errors?.length && queryResponse?.error) {\n errors = [queryResponse.error];\n }\n\n useEffect(() => {\n reportInteraction('grafana_explore_query_inspector_opened');\n }, []);\n\n const statsTab: TabConfig = {\n label: 'Stats',\n value: 'stats',\n icon: 'chart-line',\n content: <InspectStatsTab data={queryResponse!} timeZone={queryResponse?.request?.timezone ?? defaultTimeZone} />,\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 dataName={'Explore'}\n isLoading={queryResponse.state === LoadingState.Loading}\n options={dataOptions}\n timeZone={timeZone}\n app={CoreApp.Explore}\n formattedDataDescription=\"Matches the format in the panel\"\n onOptionsChange={setDataOptions}\n />\n ),\n };\n\n const queryTab: TabConfig = {\n label: 'Query',\n value: 'query',\n icon: 'info-circle',\n content: (\n <QueryInspector\n instanceId={isMixed ? mixedRequestId(0, requestIdGenerator(exploreId)) : requestIdGenerator(exploreId)}\n data={queryResponse}\n onRefreshQuery={() => props.runQueries({ exploreId })}\n />\n ),\n };\n\n const tabs = [statsTab, queryTab, jsonTab, dataTab];\n if (errors?.length) {\n const errorTab: TabConfig = {\n label: 'Error',\n value: 'error',\n icon: 'exclamation-triangle',\n content: <InspectErrorTab errors={errors} />,\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: string }) {\n const explore = state.explore;\n const item: ExploreItemState = explore.panes[exploreId]!;\n const { queryResponse } = item;\n\n return {\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' : 'canvas'}\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, RawTimeRange, dateTimeForTimeZone, dateMath } from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime';\nimport { TimeZone } from '@grafana/schema';\nimport { TimePickerWithHistory } from 'app/core/components/TimePicker/TimePickerWithHistory';\nimport { getShiftedTimeRange, getZoomedTimeRange } from 'app/core/utils/timePicker';\n\nimport { TimeSyncButton } from './TimeSyncButton';\n\nexport interface Props {\n exploreId: string;\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 reportInteraction('grafana_explore_time_picker_time_range_changed', {\n timeRangeFrom: adjustedFrom,\n timeRangeTo: 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 isOnCanvas\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' : 'canvas';\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, { useState } from 'react';\n\nimport { IconName } from '@grafana/data';\nimport { reportInteraction, config } from '@grafana/runtime';\nimport { ToolbarButton, Dropdown, Menu, Stack, ToolbarButtonRow, MenuGroup } from '@grafana/ui';\nimport { t } from 'app/core/internationalization';\nimport { copyStringToClipboard } from 'app/core/utils/explore';\nimport { createAndCopyShortLink } from 'app/core/utils/shortLinks';\nimport { useSelector } from 'app/types';\n\nimport { selectPanes } from './state/selectors';\nimport { constructAbsoluteUrl } from './utils/links';\n\ninterface ShortLinkGroupData {\n key: string;\n label: string;\n items: ShortLinkMenuItemData[];\n}\n\ninterface ShortLinkMenuItemData {\n key: string;\n label: string;\n icon: IconName;\n getUrl: Function;\n shorten: boolean;\n absTime: boolean;\n}\n\nconst defaultMode: ShortLinkMenuItemData = {\n key: 'copy-link',\n label: t('explore.toolbar.copy-shortened-link', 'Copy shortened URL'),\n icon: 'share-alt',\n getUrl: () => undefined,\n shorten: true,\n absTime: false,\n};\n\nexport function ShortLinkButtonMenu() {\n const panes = useSelector(selectPanes);\n const [isOpen, setIsOpen] = useState(false);\n const [lastSelected, setLastSelected] = useState(defaultMode);\n const onCopyLink = (shorten: boolean, absTime: boolean, url?: string) => {\n if (shorten) {\n createAndCopyShortLink(url || global.location.href);\n reportInteraction('grafana_explore_shortened_link_clicked', { isAbsoluteTime: absTime });\n } else {\n copyStringToClipboard(\n url !== undefined\n ? `${window.location.protocol}//${window.location.host}${config.appSubUrl}${url}`\n : global.location.href\n );\n reportInteraction('grafana_explore_copy_link_clicked', { isAbsoluteTime: absTime });\n }\n };\n\n const menuOptions: ShortLinkGroupData[] = [\n {\n key: 'normal',\n label: t('explore.toolbar.copy-links-normal-category', 'Normal URL links'),\n items: [\n {\n key: 'copy-shortened-link',\n icon: 'link',\n label: t('explore.toolbar.copy-shortened-link', 'Copy shortened URL'),\n getUrl: () => undefined,\n shorten: true,\n absTime: false,\n },\n {\n key: 'copy-link',\n icon: 'link',\n label: t('explore.toolbar.copy-link', 'Copy URL'),\n getUrl: () => undefined,\n shorten: false,\n absTime: false,\n },\n ],\n },\n {\n key: 'timesync',\n label: t('explore.toolbar.copy-links-absolute-category', 'Time-sync URL links (share with time range intact)'),\n items: [\n {\n key: 'copy-short-link-abs-time',\n icon: 'clock-nine',\n label: t('explore.toolbar.copy-shortened-link-abs-time', 'Copy Absolute Shortened URL'),\n shorten: true,\n getUrl: () => {\n return constructAbsoluteUrl(panes);\n },\n absTime: true,\n },\n {\n key: 'copy-link-abs-time',\n icon: 'clock-nine',\n label: t('explore.toolbar.copy-link-abs-time', 'Copy Absolute Shortened URL'),\n shorten: false,\n getUrl: () => {\n return constructAbsoluteUrl(panes);\n },\n absTime: true,\n },\n ],\n },\n ];\n\n const MenuActions = (\n <Menu>\n {menuOptions.map((groupOption) => {\n return (\n <MenuGroup key={groupOption.key} label={groupOption.label}>\n {groupOption.items.map((option) => {\n return (\n <Menu.Item\n key={option.key}\n label={option.label}\n icon={option.icon}\n onClick={() => {\n const url = option.getUrl();\n onCopyLink(option.shorten, option.absTime, url);\n setLastSelected(option);\n }}\n />\n );\n })}\n </MenuGroup>\n );\n })}\n </Menu>\n );\n\n // we need the Toolbar button click to be an action separate from opening/closing the menu\n return (\n <ToolbarButtonRow>\n <Stack gap={0} direction=\"row\" alignItems=\"center\" wrap=\"nowrap\">\n <ToolbarButton\n tooltip={lastSelected.label}\n icon={lastSelected.icon}\n iconOnly={true}\n narrow={true}\n onClick={() => {\n const url = lastSelected.getUrl();\n onCopyLink(lastSelected.shorten, lastSelected.absTime, url);\n }}\n aria-label={t('explore.toolbar.copy-shortened-link', 'Copy shortened URL')}\n />\n <Dropdown overlay={MenuActions} placement=\"bottom-end\" onVisibleChange={setIsOpen}>\n <ToolbarButton\n narrow={true}\n isOpen={isOpen}\n aria-label={t('explore.toolbar.copy-shortened-link-menu', 'Open copy link options')}\n />\n </Dropdown>\n </Stack>\n </ToolbarButtonRow>\n );\n}\n","import React, { lazy, ReactElement, Suspense, useMemo, useState } from 'react';\n\nimport { type PluginExtensionLink, PluginExtensionPoints, RawTimeRange, getTimeZone } from '@grafana/data';\nimport { getPluginLinkExtensions, config } from '@grafana/runtime';\nimport { DataQuery, TimeZone } from '@grafana/schema';\nimport { Dropdown, ToolbarButton } from '@grafana/ui';\nimport { contextSrv } from 'app/core/services/context_srv';\nimport { AccessControlAction, ExplorePanelData, useSelector } from 'app/types';\n\nimport { getExploreItemSelector, isLeftPaneSelector, selectCorrelationDetails } from '../state/selectors';\n\nimport { ConfirmNavigationModal } from './ConfirmNavigationModal';\nimport { ToolbarExtensionPointMenu } from './ToolbarExtensionPointMenu';\n\nconst AddToDashboard = lazy(() =>\n import('./AddToDashboard').then(({ AddToDashboard }) => ({ default: AddToDashboard }))\n);\n\ntype Props = {\n exploreId: string;\n timeZone: TimeZone;\n splitted: boolean;\n};\n\nexport function ToolbarExtensionPoint(props: Props): ReactElement | null {\n const { exploreId, splitted } = props;\n const [selectedExtension, setSelectedExtension] = useState<PluginExtensionLink | undefined>();\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const context = useExtensionPointContext(props);\n const extensions = useExtensionLinks(context);\n const selectExploreItem = getExploreItemSelector(exploreId);\n const noQueriesInPane = useSelector(selectExploreItem)?.queries?.length;\n\n // If we only have the explore core extension point registered we show the old way of\n // adding a query to a dashboard.\n if (extensions.length <= 1) {\n const canAddPanelToDashboard =\n contextSrv.hasPermission(AccessControlAction.DashboardsCreate) ||\n contextSrv.hasPermission(AccessControlAction.DashboardsWrite);\n\n if (!canAddPanelToDashboard) {\n return null;\n }\n\n return (\n <Suspense fallback={null}>\n <AddToDashboard exploreId={exploreId} />\n </Suspense>\n );\n }\n\n const menu = <ToolbarExtensionPointMenu extensions={extensions} onSelect={setSelectedExtension} />;\n\n return (\n <>\n <Dropdown onVisibleChange={setIsOpen} placement=\"bottom-start\" overlay={menu}>\n <ToolbarButton\n aria-label=\"Add\"\n icon=\"plus\"\n disabled={!Boolean(noQueriesInPane)}\n variant=\"canvas\"\n isOpen={isOpen}\n >\n {splitted ? ' ' : 'Add'}\n </ToolbarButton>\n </Dropdown>\n {!!selectedExtension && !!selectedExtension.path && (\n <ConfirmNavigationModal\n path={selectedExtension.path}\n title={selectedExtension.title}\n onDismiss={() => setSelectedExtension(undefined)}\n />\n )}\n </>\n );\n}\n\nexport type PluginExtensionExploreContext = {\n exploreId: string;\n targets: DataQuery[];\n data: ExplorePanelData;\n timeRange: RawTimeRange;\n timeZone: TimeZone;\n shouldShowAddCorrelation: boolean;\n};\n\nfunction useExtensionPointContext(props: Props): PluginExtensionExploreContext {\n const { exploreId, timeZone } = props;\n const isCorrelationDetails = useSelector(selectCorrelationDetails);\n const isCorrelationsEditorMode = isCorrelationDetails?.editorMode || false;\n const { queries, queryResponse, range } = useSelector(getExploreItemSelector(exploreId))!;\n const isLeftPane = useSelector(isLeftPaneSelector(exploreId));\n\n const datasourceUids = queries.map((query) => query?.datasource?.uid).filter((uid) => uid !== undefined);\n const numUniqueIds = [...new Set(datasourceUids)].length;\n const canWriteCorrelations = contextSrv.hasPermission(AccessControlAction.DataSourcesWrite);\n\n return useMemo(() => {\n return {\n exploreId,\n targets: queries,\n data: queryResponse,\n timeRange: range.raw,\n timeZone: getTimeZone({ timeZone }),\n shouldShowAddCorrelation:\n config.featureToggles.correlations === true &&\n canWriteCorrelations &&\n !isCorrelationsEditorMode &&\n isLeftPane &&\n numUniqueIds === 1,\n };\n }, [\n exploreId,\n queries,\n queryResponse,\n range.raw,\n timeZone,\n canWriteCorrelations,\n isCorrelationsEditorMode,\n isLeftPane,\n numUniqueIds,\n ]);\n}\n\nfunction useExtensionLinks(context: PluginExtensionExploreContext): PluginExtensionLink[] {\n return useMemo(() => {\n const { extensions } = getPluginLinkExtensions({\n extensionPointId: PluginExtensionPoints.ExploreToolbarAction,\n context: context,\n limitPerPlugin: 3,\n });\n\n return extensions;\n }, [context]);\n}\n","import React, { useCallback } from 'react';\n\nimport { RefreshPicker } from '@grafana/ui';\nimport { useDispatch } from 'app/types';\n\nimport { setPausedStateAction, runQueries, clearLogs } 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: string) {\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, refreshInterval: RefreshPicker.offOption.value }));\n dispatch(runQueries({ exploreId }));\n }, [exploreId, dispatch, pause]);\n\n const start = useCallback(() => {\n dispatch(changeRefreshInterval({ exploreId, refreshInterval: RefreshPicker.liveOption.value }));\n }, [exploreId, dispatch]);\n\n const clear = useCallback(() => {\n dispatch(clearLogs({ exploreId }));\n }, [exploreId, dispatch]);\n\n return {\n pause,\n resume,\n stop,\n start,\n clear,\n };\n}\n\ntype Props = {\n exploreId: string;\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 { css, cx } from '@emotion/css';\nimport { pick } from 'lodash';\nimport React, { useMemo } from 'react';\nimport { shallowEqual } from 'react-redux';\n\nimport { DataSourceInstanceSettings, RawTimeRange, GrafanaTheme2 } from '@grafana/data';\nimport { reportInteraction, config } from '@grafana/runtime';\nimport {\n defaultIntervals,\n PageToolbar,\n RefreshPicker,\n SetInterval,\n ToolbarButton,\n ButtonGroup,\n useStyles2,\n} from '@grafana/ui';\nimport { AppChromeUpdate } from 'app/core/components/AppChrome/AppChromeUpdate';\nimport { t, Trans } from 'app/core/internationalization';\nimport { DataSourcePicker } from 'app/features/datasources/components/picker/DataSourcePicker';\nimport { CORRELATION_EDITOR_POST_CONFIRM_ACTION } from 'app/types/explore';\nimport { StoreState, useDispatch, useSelector } from 'app/types/store';\n\nimport { contextSrv } from '../../core/core';\nimport { updateFiscalYearStartMonthForSession, updateTimeZoneForSession } from '../profile/state/reducers';\nimport { getFiscalYearStartMonth, getTimeZone } from '../profile/state/selectors';\n\nimport { ExploreTimeControls } from './ExploreTimeControls';\nimport { LiveTailButton } from './LiveTailButton';\nimport { ShortLinkButtonMenu } from './ShortLinkButtonMenu';\nimport { ToolbarExtensionPoint } from './extensions/ToolbarExtensionPoint';\nimport { changeDatasource } from './state/datasource';\nimport { changeCorrelationHelperData } from './state/explorePane';\nimport {\n splitClose,\n splitOpen,\n maximizePaneAction,\n evenPaneResizeAction,\n changeCorrelationEditorDetails,\n} from './state/main';\nimport { cancelQueries, runQueries, selectIsWaitingForData } from './state/query';\nimport { isLeftPaneSelector, isSplit, selectCorrelationDetails, selectPanesEntries } from './state/selectors';\nimport { syncTimes, changeRefreshInterval } from './state/time';\nimport { LiveTailControls } from './useLiveTailControls';\n\nconst getStyles = (theme: GrafanaTheme2, splitted: Boolean) => ({\n rotateIcon: css({\n '> div > svg': {\n transform: 'rotate(180deg)',\n },\n }),\n toolbarButton: css({\n display: 'flex',\n justifyContent: 'center',\n marginRight: theme.spacing(0.5),\n width: splitted && theme.spacing(6),\n }),\n});\n\ninterface Props {\n exploreId: string;\n onChangeTime: (range: RawTimeRange, changedByScanner?: boolean) => void;\n onContentOutlineToogle: () => void;\n isContentOutlineOpen: boolean;\n}\n\nexport function ExploreToolbar({ exploreId, onChangeTime, onContentOutlineToogle, isContentOutlineOpen }: Props) {\n const dispatch = useDispatch();\n const splitted = useSelector(isSplit);\n const styles = useStyles2(getStyles, splitted);\n\n const timeZone = useSelector((state: StoreState) => getTimeZone(state.user));\n const fiscalYearStartMonth = useSelector((state: StoreState) => getFiscalYearStartMonth(state.user));\n const { refreshInterval, datasourceInstance, range, isLive, isPaused, syncedTimes } = useSelector(\n (state: StoreState) => ({\n ...pick(state.explore.panes[exploreId]!, 'refreshInterval', 'datasourceInstance', 'range', 'isLive', 'isPaused'),\n syncedTimes: state.explore.syncedTimes,\n }),\n shallowEqual\n );\n const loading = useSelector(selectIsWaitingForData(exploreId));\n const isLargerPane = useSelector((state: StoreState) => state.explore.largerExploreId === exploreId);\n const showSmallTimePicker = useSelector((state) => splitted || state.explore.panes[exploreId]!.containerWidth < 1210);\n const showSmallDataSourcePicker = useSelector(\n (state) => state.explore.panes[exploreId]!.containerWidth < (splitted ? 700 : 800)\n );\n\n const panes = useSelector(selectPanesEntries);\n const correlationDetails = useSelector(selectCorrelationDetails);\n const isCorrelationsEditorMode = correlationDetails?.editorMode || false;\n const isLeftPane = useSelector(isLeftPaneSelector(exploreId));\n\n const shouldRotateSplitIcon = useMemo(\n () => (isLeftPane && isLargerPane) || (!isLeftPane && !isLargerPane),\n [isLeftPane, isLargerPane]\n );\n\n const refreshPickerLabel = loading\n ? t('explore.toolbar.refresh-picker-cancel', 'Cancel')\n : t('explore.toolbar.refresh-picker-run', 'Run query');\n\n const onChangeDatasource = async (dsSettings: DataSourceInstanceSettings) => {\n if (!isCorrelationsEditorMode) {\n dispatch(changeDatasource({ exploreId, datasource: dsSettings.uid, options: { importQueries: true } }));\n } else {\n if (correlationDetails?.correlationDirty || correlationDetails?.queryEditorDirty) {\n // prompt will handle datasource change if needed\n dispatch(\n changeCorrelationEditorDetails({\n isExiting: true,\n postConfirmAction: {\n exploreId: exploreId,\n action: CORRELATION_EDITOR_POST_CONFIRM_ACTION.CHANGE_DATASOURCE,\n changeDatasourceUid: dsSettings.uid,\n isActionLeft: isLeftPane,\n },\n })\n );\n } else {\n // if the left pane is changing, clear helper data for right pane\n if (isLeftPane) {\n panes.forEach((pane) => {\n dispatch(\n changeCorrelationHelperData({\n exploreId: pane[0],\n correlationEditorHelperData: undefined,\n })\n );\n });\n }\n\n dispatch(changeDatasource({ exploreId, datasource: dsSettings.uid, options: { importQueries: true } }));\n }\n }\n };\n\n const onRunQuery = (loading = false) => {\n if (loading) {\n return dispatch(cancelQueries(exploreId));\n } else {\n return dispatch(runQueries({ exploreId }));\n }\n };\n\n const onChangeTimeZone = (timezone: string) => dispatch(updateTimeZoneForSession(timezone));\n\n const onOpenSplitView = () => {\n dispatch(splitOpen());\n reportInteraction('grafana_explore_split_view_opened', { origin: 'menu' });\n };\n\n const onCloseSplitView = () => {\n if (isCorrelationsEditorMode) {\n if (correlationDetails?.correlationDirty || correlationDetails?.queryEditorDirty) {\n // if dirty, prompt\n dispatch(\n changeCorrelationEditorDetails({\n isExiting: true,\n postConfirmAction: {\n exploreId: exploreId,\n action: CORRELATION_EDITOR_POST_CONFIRM_ACTION.CLOSE_PANE,\n isActionLeft: isLeftPane,\n },\n })\n );\n } else {\n // otherwise, clear helper data and close\n panes.forEach((pane) => {\n dispatch(\n changeCorrelationHelperData({\n exploreId: pane[0],\n correlationEditorHelperData: undefined,\n })\n );\n });\n dispatch(splitClose(exploreId));\n reportInteraction('grafana_explore_split_view_closed');\n }\n } else {\n dispatch(splitClose(exploreId));\n reportInteraction('grafana_explore_split_view_closed');\n }\n };\n\n const onClickResize = () => {\n if (isLargerPane) {\n dispatch(evenPaneResizeAction());\n } else {\n dispatch(maximizePaneAction({ exploreId }));\n }\n };\n\n const onChangeTimeSync = () => {\n dispatch(syncTimes(exploreId));\n };\n\n const onChangeFiscalYearStartMonth = (fiscalyearStartMonth: number) =>\n dispatch(updateFiscalYearStartMonthForSession(fiscalyearStartMonth));\n\n const onChangeRefreshInterval = (refreshInterval: string) => {\n dispatch(changeRefreshInterval({ exploreId, refreshInterval }));\n };\n\n const navBarActions = [<ShortLinkButtonMenu key=\"share\" />, <div style={{ flex: 1 }} key=\"spacer0\" />];\n\n return (\n <div>\n {refreshInterval && <SetInterval func={onRunQuery} interval={refreshInterval} loading={loading} />}\n <div>\n <AppChromeUpdate actions={navBarActions} />\n </div>\n <PageToolbar\n aria-label={t('explore.toolbar.aria-label', 'Explore toolbar')}\n leftItems={[\n config.featureToggles.exploreContentOutline && (\n <ToolbarButton\n key=\"content-outline\"\n variant=\"canvas\"\n tooltip=\"Content outline\"\n icon=\"list-ui-alt\"\n iconOnly={splitted}\n onClick={onContentOutlineToogle}\n aria-expanded={isContentOutlineOpen}\n aria-controls={isContentOutlineOpen ? 'content-outline-container' : undefined}\n className={styles.toolbarButton}\n >\n Outline\n </ToolbarButton>\n ),\n <DataSourcePicker\n key={`${exploreId}-ds-picker`}\n mixed={!isCorrelationsEditorMode}\n onChange={onChangeDatasource}\n current={datasourceInstance?.getRef()}\n hideTextValue={showSmallDataSourcePicker}\n width={showSmallDataSourcePicker ? 8 : undefined}\n />,\n ].filter(Boolean)}\n forceShowLeftItems\n >\n {[\n !splitted ? (\n <ToolbarButton\n variant=\"canvas\"\n key=\"split\"\n tooltip={t('explore.toolbar.split-tooltip', 'Split the pane')}\n onClick={onOpenSplitView}\n icon=\"columns\"\n disabled={isLive}\n >\n <Trans i18nKey=\"explore.toolbar.split-title\">Split</Trans>\n </ToolbarButton>\n ) : (\n <ButtonGroup key=\"split-controls\">\n <ToolbarButton\n variant=\"canvas\"\n tooltip={\n isLargerPane\n ? t('explore.toolbar.split-narrow', 'Narrow pane')\n : t('explore.toolbar.split-widen', 'Widen pane')\n }\n onClick={onClickResize}\n icon={isLargerPane ? 'gf-movepane-left' : 'gf-movepane-right'}\n iconOnly={true}\n className={cx(shouldRotateSplitIcon && styles.rotateIcon)}\n />\n <ToolbarButton\n tooltip={t('explore.toolbar.split-close-tooltip', 'Close split pane')}\n onClick={onCloseSplitView}\n icon=\"times\"\n variant=\"canvas\"\n >\n <Trans i18nKey=\"explore.toolbar.split-close\"> Close </Trans>\n </ToolbarButton>\n </ButtonGroup>\n ),\n <ToolbarExtensionPoint\n splitted={splitted}\n key=\"toolbar-extension-point\"\n exploreId={exploreId}\n timeZone={timeZone}\n />,\n !isLive && (\n <ExploreTimeControls\n key=\"timeControls\"\n exploreId={exploreId}\n range={range}\n timeZone={timeZone}\n fiscalYearStartMonth={fiscalYearStartMonth}\n onChangeTime={onChangeTime}\n splitted={splitted}\n syncedTimes={syncedTimes}\n onChangeTimeSync={onChangeTimeSync}\n hideText={showSmallTimePicker}\n onChangeTimeZone={onChangeTimeZone}\n onChangeFiscalYearStartMonth={onChangeFiscalYearStartMonth}\n />\n ),\n <RefreshPicker\n key=\"refreshPicker\"\n onIntervalChanged={onChangeRefreshInterval}\n value={refreshInterval}\n isLoading={loading}\n text={showSmallTimePicker ? undefined : refreshPickerLabel}\n tooltip={showSmallTimePicker ? refreshPickerLabel : undefined}\n intervals={contextSrv.getValidIntervals(defaultIntervals)}\n isLive={isLive}\n onRefresh={() => onRunQuery(loading)}\n noIntervalPicker={isLive}\n primary={true}\n width={(showSmallTimePicker ? 35 : 108) + 'px'}\n />,\n datasourceInstance?.meta.streaming && (\n <LiveTailControls key=\"liveControls\" exploreId={exploreId}>\n {(c) => {\n const controls = {\n ...c,\n start: () => {\n reportInteraction('grafana_explore_logs_live_tailing_clicked', {\n datasourceType: datasourceInstance?.type,\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 ].filter(Boolean)}\n </PageToolbar>\n </div>\n );\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { DataFrame, GrafanaTheme2, CoreApp } from '@grafana/data';\nimport { FlameGraph } from '@grafana/flamegraph';\nimport { reportInteraction, config } from '@grafana/runtime';\nimport { useStyles2 } from '@grafana/ui';\n\ninterface Props {\n dataFrames: DataFrame[];\n}\n\nfunction interaction(name: string, context: Record<string, string | number> = {}) {\n reportInteraction(`grafana_flamegraph_${name}`, {\n app: CoreApp.Unknown,\n grafana_version: config.buildInfo.version,\n ...context,\n });\n}\n\nexport const FlameGraphExploreContainer = (props: Props) => {\n const styles = useStyles2((theme) => getStyles(theme));\n\n return (\n <div className={styles.container}>\n <FlameGraph\n data={props.dataFrames[0]}\n stickyHeader={true}\n getTheme={() => config.theme2}\n onTableSymbolClick={() => interaction('table_item_selected')}\n onViewSelected={(view: string) => interaction('view_selected', { view })}\n onTextAlignSelected={(align: string) => interaction('text_align_selected', { align })}\n onTableSort={(sort: string) => interaction('table_sort_selected', { sort })}\n disableCollapsing={!config.featureToggles.flameGraphItemCollapsing}\n />\n </div>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n container: css({\n background: theme.colors.background.primary,\n display: 'flow-root',\n padding: theme.spacing(0, 1, 1, 1),\n border: `1px solid ${theme.components.panel.borderColor}`,\n borderRadius: theme.shape.radius.default,\n }),\n});\n","import React, { 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?: unknown;\n}\n\nexport const ElapsedTime = ({ resetKey, humanize, className }: ElapsedTimeProps) => {\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, dateTimeFormat, GrafanaTheme2, LogsSortOrder } from '@grafana/data';\nimport { TimeZone } from '@grafana/schema';\nimport { Button, Themeable2, withTheme2 } from '@grafana/ui';\n\nimport { LogMessageAnsi } from '../../logs/components/LogMessageAnsi';\nimport { getLogRowStyles } from '../../logs/components/getLogRowStyles';\nimport { sortLogRows } from '../../logs/utils';\nimport { ElapsedTime } from '../ElapsedTime';\nimport { filterLogRowsByIndex } from '../state/utils';\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 onClear: () => void;\n clearedAtIndex: number | null;\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 && nextProps.clearedAtIndex) {\n return {\n logRowsToRender: filterLogRowsByIndex(nextProps.clearedAtIndex, state.logRowsToRender),\n };\n }\n\n if (nextProps.isPaused) {\n return null;\n }\n\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 }\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 = sortLogRows(rowsToRender, LogsSortOrder.Ascending).slice(-100);\n }\n return rowsToRender;\n };\n\n render() {\n const { theme, timeZone, onPause, onResume, onClear, 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={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={logsRowLocalTime}>{dateTimeFormat(row.timeEpochMs, { timeZone })}</td>\n <td className={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\n icon={isPaused ? 'play' : 'pause'}\n variant=\"secondary\"\n onClick={isPaused ? onResume : onPause}\n className={styles.button}\n >\n {isPaused ? 'Resume' : 'Pause'}\n </Button>\n <Button icon=\"trash-alt\" variant=\"secondary\" onClick={onClear} className={styles.button}>\n Clear logs\n </Button>\n <Button icon=\"square-shape\" variant=\"secondary\" onClick={this.props.stopLive} className={styles.button}>\n Exit live mode\n </Button>\n {isPaused ||\n (this.rowsToRender().length > 0 && (\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, { ReactNode, useEffect, useRef, useState } from 'react';\n\nimport { AbsoluteTimeRange, LogRowModel, TimeRange } from '@grafana/data';\nimport { convertRawToRange, isRelativeTime, isRelativeTimeRange } from '@grafana/data/src/datetime/rangeutil';\nimport { config, reportInteraction } from '@grafana/runtime';\nimport { LogsSortOrder, TimeZone } from '@grafana/schema';\n\nimport { LoadingIndicator } from './LoadingIndicator';\n\nexport type Props = {\n children: ReactNode;\n loading: boolean;\n loadMoreLogs?: (range: AbsoluteTimeRange) => void;\n range: TimeRange;\n rows: LogRowModel[];\n scrollElement?: HTMLDivElement;\n sortOrder: LogsSortOrder;\n timeZone: TimeZone;\n};\n\nexport const InfiniteScroll = ({\n children,\n loading,\n loadMoreLogs,\n range,\n rows,\n scrollElement,\n sortOrder,\n timeZone,\n}: Props) => {\n const [upperOutOfRange, setUpperOutOfRange] = useState(false);\n const [lowerOutOfRange, setLowerOutOfRange] = useState(false);\n const [upperLoading, setUpperLoading] = useState(false);\n const [lowerLoading, setLowerLoading] = useState(false);\n const rowsRef = useRef<LogRowModel[]>(rows);\n const lastScroll = useRef<number>(scrollElement?.scrollTop || 0);\n\n // Reset messages when range/order/rows change\n useEffect(() => {\n setUpperOutOfRange(false);\n setLowerOutOfRange(false);\n }, [range, rows, sortOrder]);\n\n // Reset loading messages when loading stops\n useEffect(() => {\n if (!loading) {\n setUpperLoading(false);\n setLowerLoading(false);\n }\n }, [loading]);\n\n // Ensure bottom loader visibility\n useEffect(() => {\n if (lowerLoading && scrollElement) {\n scrollElement.scrollTo(0, scrollElement.scrollHeight - scrollElement.clientHeight);\n }\n }, [lowerLoading, scrollElement]);\n\n // Request came back with no new past rows\n useEffect(() => {\n if (rows !== rowsRef.current && rows.length === rowsRef.current.length && (upperLoading || lowerLoading)) {\n if (sortOrder === LogsSortOrder.Descending && lowerLoading) {\n setLowerOutOfRange(true);\n } else if (sortOrder === LogsSortOrder.Ascending && upperLoading) {\n setUpperOutOfRange(true);\n }\n }\n rowsRef.current = rows;\n }, [lowerLoading, rows, sortOrder, upperLoading]);\n\n useEffect(() => {\n if (!scrollElement || !loadMoreLogs) {\n return;\n }\n\n function handleScroll(event: Event | WheelEvent) {\n if (!scrollElement || !loadMoreLogs || !rows.length || loading || !config.featureToggles.logsInfiniteScrolling) {\n return;\n }\n event.stopImmediatePropagation();\n const scrollDirection = shouldLoadMore(event, scrollElement, lastScroll.current);\n lastScroll.current = scrollElement.scrollTop;\n if (scrollDirection === ScrollDirection.NoScroll) {\n return;\n } else if (scrollDirection === ScrollDirection.Top) {\n scrollTop();\n } else {\n scrollBottom();\n }\n }\n\n function scrollTop() {\n const newRange = canScrollTop(getVisibleRange(rows), range, timeZone, sortOrder);\n if (!newRange) {\n setUpperOutOfRange(true);\n return;\n }\n setUpperOutOfRange(false);\n loadMoreLogs?.(newRange);\n setUpperLoading(true);\n reportInteraction('grafana_logs_infinite_scrolling', {\n direction: 'top',\n sort_order: sortOrder,\n });\n }\n\n function scrollBottom() {\n const newRange = canScrollBottom(getVisibleRange(rows), range, timeZone, sortOrder);\n if (!newRange) {\n setLowerOutOfRange(true);\n return;\n }\n setLowerOutOfRange(false);\n loadMoreLogs?.(newRange);\n setLowerLoading(true);\n reportInteraction('grafana_logs_infinite_scrolling', {\n direction: 'bottom',\n sort_order: sortOrder,\n });\n }\n\n scrollElement.addEventListener('scroll', handleScroll);\n scrollElement.addEventListener('wheel', handleScroll);\n\n return () => {\n scrollElement.removeEventListener('scroll', handleScroll);\n scrollElement.removeEventListener('wheel', handleScroll);\n };\n }, [loadMoreLogs, loading, range, rows, scrollElement, sortOrder, timeZone]);\n\n // We allow \"now\" to move when using relative time, so we hide the message so it doesn't flash.\n const hideTopMessage = sortOrder === LogsSortOrder.Descending && isRelativeTime(range.raw.to);\n const hideBottomMessage = sortOrder === LogsSortOrder.Ascending && isRelativeTime(range.raw.to);\n\n return (\n <>\n {upperLoading && <LoadingIndicator adjective={sortOrder === LogsSortOrder.Descending ? 'newer' : 'older'} />}\n {!hideTopMessage && upperOutOfRange && outOfRangeMessage}\n {children}\n {!hideBottomMessage && lowerOutOfRange && outOfRangeMessage}\n {lowerLoading && <LoadingIndicator adjective={sortOrder === LogsSortOrder.Descending ? 'older' : 'newer'} />}\n </>\n );\n};\n\nconst styles = {\n messageContainer: css({\n textAlign: 'center',\n padding: 0.25,\n }),\n};\n\nconst outOfRangeMessage = (\n <div className={styles.messageContainer} data-testid=\"end-of-range\">\n End of the selected time range.\n </div>\n);\n\nenum ScrollDirection {\n Top = -1,\n Bottom = 1,\n NoScroll = 0,\n}\nfunction shouldLoadMore(event: Event | WheelEvent, element: HTMLDivElement, lastScroll: number): ScrollDirection {\n // Disable behavior if there is no scroll\n if (element.scrollHeight <= element.clientHeight) {\n return ScrollDirection.NoScroll;\n }\n const delta = event instanceof WheelEvent ? event.deltaY : element.scrollTop - lastScroll;\n if (delta === 0) {\n return ScrollDirection.NoScroll;\n }\n const scrollDirection = delta < 0 ? ScrollDirection.Top : ScrollDirection.Bottom;\n const diff =\n scrollDirection === ScrollDirection.Top\n ? element.scrollTop\n : element.scrollHeight - element.scrollTop - element.clientHeight;\n\n return diff <= 1 ? scrollDirection : ScrollDirection.NoScroll;\n}\n\nfunction getVisibleRange(rows: LogRowModel[]) {\n const firstTimeStamp = rows[0].timeEpochMs;\n const lastTimeStamp = rows[rows.length - 1].timeEpochMs;\n\n const visibleRange =\n lastTimeStamp < firstTimeStamp\n ? { from: lastTimeStamp, to: firstTimeStamp }\n : { from: firstTimeStamp, to: lastTimeStamp };\n\n return visibleRange;\n}\n\nfunction getPrevRange(visibleRange: AbsoluteTimeRange, currentRange: TimeRange) {\n return { from: currentRange.from.valueOf(), to: visibleRange.from };\n}\n\nfunction getNextRange(visibleRange: AbsoluteTimeRange, currentRange: TimeRange, timeZone: TimeZone) {\n // When requesting new logs, update the current range if using relative time ranges.\n currentRange = updateCurrentRange(currentRange, timeZone);\n return { from: visibleRange.to, to: currentRange.to.valueOf() };\n}\n\nexport const SCROLLING_THRESHOLD = 1e3;\n\n// To get more logs, the difference between the visible range and the current range should be 1 second or more.\nfunction canScrollTop(\n visibleRange: AbsoluteTimeRange,\n currentRange: TimeRange,\n timeZone: TimeZone,\n sortOrder: LogsSortOrder\n): AbsoluteTimeRange | undefined {\n if (sortOrder === LogsSortOrder.Descending) {\n // When requesting new logs, update the current range if using relative time ranges.\n currentRange = updateCurrentRange(currentRange, timeZone);\n const canScroll = currentRange.to.valueOf() - visibleRange.to > SCROLLING_THRESHOLD;\n return canScroll ? getNextRange(visibleRange, currentRange, timeZone) : undefined;\n }\n\n const canScroll = Math.abs(currentRange.from.valueOf() - visibleRange.from) > SCROLLING_THRESHOLD;\n return canScroll ? getPrevRange(visibleRange, currentRange) : undefined;\n}\n\nfunction canScrollBottom(\n visibleRange: AbsoluteTimeRange,\n currentRange: TimeRange,\n timeZone: TimeZone,\n sortOrder: LogsSortOrder\n): AbsoluteTimeRange | undefined {\n if (sortOrder === LogsSortOrder.Descending) {\n const canScroll = Math.abs(currentRange.from.valueOf() - visibleRange.from) > SCROLLING_THRESHOLD;\n return canScroll ? getPrevRange(visibleRange, currentRange) : undefined;\n }\n // When requesting new logs, update the current range if using relative time ranges.\n currentRange = updateCurrentRange(currentRange, timeZone);\n const canScroll = currentRange.to.valueOf() - visibleRange.to > SCROLLING_THRESHOLD;\n return canScroll ? getNextRange(visibleRange, currentRange, timeZone) : undefined;\n}\n\n// Given a TimeRange, returns a new instance if using relative time, or else the same.\nfunction updateCurrentRange(timeRange: TimeRange, timeZone: TimeZone) {\n return isRelativeTimeRange(timeRange.raw) ? convertRawToRange(timeRange.raw, timeZone) : timeRange;\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Icon, Stack, useStyles2 } from '@grafana/ui';\n\ninterface Props {\n feedbackUrl?: string;\n}\n\nexport function LogsFeedback({ feedbackUrl }: Props) {\n const styles = useStyles2(getStyles);\n return (\n <Stack>\n <a\n href={feedbackUrl}\n className={styles.link}\n title=\"The logs table is new, please let us know how we can improve it\"\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n >\n <Icon name=\"comment-alt-message\" /> Give feedback\n </a>\n </Stack>\n );\n}\n\nfunction getStyles(theme: GrafanaTheme2) {\n return {\n link: css({\n color: theme.colors.text.secondary,\n fontSize: theme.typography.bodySmall.fontSize,\n ':hover': {\n color: theme.colors.text.link,\n },\n }),\n };\n}\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 marginBottom: theme.spacing(2),\n minWidth: '30%',\n display: 'flex',\n flexWrap: 'wrap',\n }),\n metaItem: css({\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(0.5),\n display: 'flex',\n alignItems: 'center',\n ['.logs-meta-item__error']: {\n color: theme.colors.error.text,\n },\n }),\n metaLabel: css({\n marginRight: `calc(${theme.spacing(2)} / 2)`,\n fontSize: theme.typography.bodySmall.fontSize,\n fontWeight: theme.typography.fontWeightMedium,\n }),\n metaValue: css({\n fontFamily: theme.typography.fontFamilyMonospace,\n fontSize: 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, { useCallback, useEffect, useState } from 'react';\nimport { lastValueFrom } from 'rxjs';\n\nimport {\n applyFieldOverrides,\n CustomTransformOperator,\n DataFrame,\n DataFrameType,\n DataTransformerConfig,\n Field,\n FieldType,\n guessFieldTypeForField,\n LogsSortOrder,\n sortDataFrame,\n SplitOpen,\n TimeRange,\n transformDataFrame,\n ValueLinkConfig,\n} from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { AdHocFilterItem, Table } from '@grafana/ui';\nimport { FILTER_FOR_OPERATOR, FILTER_OUT_OPERATOR } from '@grafana/ui/src/components/Table/types';\nimport { LogsFrame } from 'app/features/logs/logsFrame';\n\nimport { getFieldLinksForExplore } from '../utils/links';\n\nimport { FieldNameMeta } from './LogsTableWrap';\n\ninterface Props {\n dataFrame: DataFrame;\n width: number;\n timeZone: string;\n splitOpen: SplitOpen;\n range: TimeRange;\n logsSortOrder: LogsSortOrder;\n columnsWithMeta: Record<string, FieldNameMeta>;\n height: number;\n onClickFilterLabel?: (key: string, value: string, frame?: DataFrame) => void;\n onClickFilterOutLabel?: (key: string, value: string, frame?: DataFrame) => void;\n logsFrame: LogsFrame | null;\n}\n\nexport function LogsTable(props: Props) {\n const { timeZone, splitOpen, range, logsSortOrder, width, dataFrame, columnsWithMeta, logsFrame } = props;\n const [tableFrame, setTableFrame] = useState<DataFrame | undefined>(undefined);\n const timeIndex = logsFrame?.timeField.index;\n\n const prepareTableFrame = useCallback(\n (frame: DataFrame): DataFrame => {\n if (!frame.length) {\n return frame;\n }\n\n const sortedFrame = sortDataFrame(frame, timeIndex, logsSortOrder === LogsSortOrder.Descending);\n\n const [frameWithOverrides] = applyFieldOverrides({\n data: [sortedFrame],\n timeZone,\n theme: config.theme2,\n replaceVariables: (v: string) => v,\n fieldConfig: {\n defaults: {\n custom: {},\n },\n overrides: [],\n },\n });\n // `getLinks` and `applyFieldOverrides` are taken from TableContainer.tsx\n for (const field of frameWithOverrides.fields) {\n field.getLinks = (config: ValueLinkConfig) => {\n return getFieldLinksForExplore({\n field,\n rowIndex: config.valueRowIndex!,\n splitOpenFn: splitOpen,\n range: range,\n dataFrame: sortedFrame!,\n });\n };\n field.config = {\n ...field.config,\n custom: {\n inspect: true,\n filterable: true, // This sets the columns to be filterable\n width: getInitialFieldWidth(field),\n ...field.config.custom,\n },\n // This sets the individual field value as filterable\n filterable: isFieldFilterable(field, logsFrame?.bodyField.name ?? '', logsFrame?.timeField.name ?? ''),\n };\n\n // If it's a string, then try to guess for a better type for numeric support in viz\n field.type = field.type === FieldType.string ? guessFieldTypeForField(field) ?? FieldType.string : field.type;\n }\n\n return frameWithOverrides;\n },\n [logsSortOrder, timeZone, splitOpen, range, logsFrame?.bodyField.name, logsFrame?.timeField.name, timeIndex]\n );\n\n useEffect(() => {\n const prepare = async () => {\n if (!logsFrame?.timeField.name || !logsFrame?.bodyField.name) {\n setTableFrame(undefined);\n return;\n }\n\n // create extract JSON transformation for every field that is `json.RawMessage`\n const transformations: Array<DataTransformerConfig | CustomTransformOperator> = getLogsExtractFields(dataFrame);\n\n let labelFilters = buildLabelFilters(columnsWithMeta);\n\n // Add the label filters to the transformations\n const transform = getLabelFiltersTransform(labelFilters);\n if (transform) {\n transformations.push(transform);\n } else {\n // If no fields are filtered, filter the default fields, so we don't render all columns\n transformations.push({\n id: 'organize',\n options: {\n indexByName: {\n [logsFrame.bodyField.name]: 0,\n [logsFrame.timeField.name]: 1,\n },\n includeByName: {\n [logsFrame.bodyField.name]: true,\n [logsFrame.timeField.name]: true,\n },\n },\n });\n }\n\n if (transformations.length > 0) {\n const transformedDataFrame = await lastValueFrom(transformDataFrame(transformations, [dataFrame]));\n const tableFrame = prepareTableFrame(transformedDataFrame[0]);\n setTableFrame(tableFrame);\n } else {\n setTableFrame(prepareTableFrame(dataFrame));\n }\n };\n prepare();\n }, [\n columnsWithMeta,\n dataFrame,\n logsSortOrder,\n prepareTableFrame,\n logsFrame?.bodyField.name,\n logsFrame?.timeField.name,\n ]);\n\n if (!tableFrame) {\n return null;\n }\n\n const onCellFilterAdded = (filter: AdHocFilterItem) => {\n const { value, key, operator } = filter;\n const { onClickFilterLabel, onClickFilterOutLabel } = props;\n if (!onClickFilterLabel || !onClickFilterOutLabel) {\n return;\n }\n if (operator === FILTER_FOR_OPERATOR) {\n onClickFilterLabel(key, value, dataFrame);\n }\n\n if (operator === FILTER_OUT_OPERATOR) {\n onClickFilterOutLabel(key, value, dataFrame);\n }\n };\n\n return (\n <Table\n data={tableFrame}\n width={width}\n onCellFilterAdded={props.onClickFilterLabel && props.onClickFilterOutLabel ? onCellFilterAdded : undefined}\n height={props.height}\n footerOptions={{ show: true, reducer: ['count'], countRows: true }}\n />\n );\n}\n\nconst isFieldFilterable = (field: Field, bodyName: string, timeName: string) => {\n if (!bodyName || !timeName) {\n return false;\n }\n if (bodyName === field.name) {\n return false;\n }\n if (timeName === field.name) {\n return false;\n }\n if (field.config.links?.length) {\n return false;\n }\n\n return true;\n};\n\n// TODO: explore if `logsFrame.ts` can help us with getting the right fields\n// TODO Why is typeInfo not defined on the Field interface?\nexport function getLogsExtractFields(dataFrame: DataFrame) {\n return dataFrame.fields\n .filter((field: Field & { typeInfo?: { frame: string } }) => {\n const isFieldLokiLabels =\n field.typeInfo?.frame === 'json.RawMessage' &&\n field.name === 'labels' &&\n dataFrame?.meta?.type !== DataFrameType.LogLines;\n const isFieldDataplaneLabels =\n field.name === 'labels' && field.type === FieldType.other && dataFrame?.meta?.type === DataFrameType.LogLines;\n return isFieldLokiLabels || isFieldDataplaneLabels;\n })\n .flatMap((field: Field) => {\n return [\n {\n id: 'extractFields',\n options: {\n format: 'json',\n keepTime: false,\n replace: false,\n source: field.name,\n },\n },\n ];\n });\n}\n\nfunction buildLabelFilters(columnsWithMeta: Record<string, FieldNameMeta>) {\n // Create object of label filters to include columns selected by the user\n let labelFilters: Record<string, number> = {};\n Object.keys(columnsWithMeta)\n .filter((key) => columnsWithMeta[key].active)\n .forEach((key) => {\n const index = columnsWithMeta[key].index;\n // Index should always be defined for any active column\n if (index !== undefined) {\n labelFilters[key] = index;\n }\n });\n\n return labelFilters;\n}\n\nfunction getLabelFiltersTransform(labelFilters: Record<string, number>) {\n let labelFiltersInclude: Record<string, boolean> = {};\n\n for (const key in labelFilters) {\n labelFiltersInclude[key] = true;\n }\n\n if (Object.keys(labelFilters).length > 0) {\n return {\n id: 'organize',\n options: {\n indexByName: labelFilters,\n includeByName: labelFiltersInclude,\n },\n };\n }\n return null;\n}\n\nfunction getInitialFieldWidth(field: Field): number | undefined {\n if (field.type === FieldType.time) {\n return 200;\n }\n return undefined;\n}\n","import { css } from '@emotion/css';\nimport saveAs from 'file-saver';\nimport React from 'react';\nimport { lastValueFrom } from 'rxjs';\n\nimport {\n LogsDedupStrategy,\n LogsMetaItem,\n LogsMetaKind,\n LogRowModel,\n CoreApp,\n dateTimeFormat,\n transformDataFrame,\n DataTransformerConfig,\n CustomTransformOperator,\n} from '@grafana/data';\nimport { DataFrame } from '@grafana/data/';\nimport { reportInteraction } from '@grafana/runtime';\nimport { Button, Dropdown, Menu, ToolbarButton, Tooltip, useStyles2 } from '@grafana/ui';\n\nimport { downloadDataFrameAsCsv, downloadLogsModelAsTxt } from '../../inspector/utils/download';\nimport { LogLabels } from '../../logs/components/LogLabels';\nimport { MAX_CHARACTERS } from '../../logs/components/LogRowMessage';\nimport { logRowsToReadableJson } from '../../logs/utils';\nimport { MetaInfoText, MetaItemProps } from '../MetaInfoText';\n\nimport { getLogsExtractFields } from './LogsTable';\n\nconst getStyles = () => ({\n metaContainer: css`\n flex: 1;\n display: flex;\n flex-wrap: wrap;\n `,\n});\n\nexport type Props = {\n meta: LogsMetaItem[];\n dedupStrategy: LogsDedupStrategy;\n dedupCount: number;\n displayedFields: string[];\n hasUnescapedContent: boolean;\n forceEscape: boolean;\n logRows: LogRowModel[];\n onEscapeNewlines: () => void;\n clearDetectedFields: () => void;\n};\n\nenum DownloadFormat {\n Text = 'text',\n Json = 'json',\n CSV = 'csv',\n}\n\nexport const LogsMetaRow = React.memo(\n ({\n meta,\n dedupStrategy,\n dedupCount,\n displayedFields,\n clearDetectedFields,\n hasUnescapedContent,\n forceEscape,\n onEscapeNewlines,\n logRows,\n }: Props) => {\n const style = useStyles2(getStyles);\n\n const downloadLogs = async (format: DownloadFormat) => {\n reportInteraction('grafana_logs_download_logs_clicked', {\n app: CoreApp.Explore,\n format,\n area: 'logs-meta-row',\n });\n\n switch (format) {\n case DownloadFormat.Text:\n downloadLogsModelAsTxt({ meta, rows: logRows }, 'Explore');\n break;\n case DownloadFormat.Json:\n const jsonLogs = logRowsToReadableJson(logRows);\n const blob = new Blob([JSON.stringify(jsonLogs)], {\n type: 'application/json;charset=utf-8',\n });\n const fileName = `Explore-logs-${dateTimeFormat(new Date())}.json`;\n saveAs(blob, fileName);\n break;\n case DownloadFormat.CSV:\n const dataFrameMap = new Map<string, DataFrame>();\n logRows.forEach((row) => {\n if (row.dataFrame?.refId && !dataFrameMap.has(row.dataFrame?.refId)) {\n dataFrameMap.set(row.dataFrame?.refId, row.dataFrame);\n }\n });\n dataFrameMap.forEach(async (dataFrame) => {\n const transforms: Array<DataTransformerConfig | CustomTransformOperator> = getLogsExtractFields(dataFrame);\n transforms.push({\n id: 'organize',\n options: {\n excludeByName: {\n ['labels']: true,\n ['labelTypes']: true,\n },\n },\n });\n const transformedDataFrame = await lastValueFrom(transformDataFrame(transforms, [dataFrame]));\n downloadDataFrameAsCsv(transformedDataFrame[0], `Explore-logs-${dataFrame.refId}`);\n });\n }\n };\n\n const logsMetaItem: Array<LogsMetaItem | MetaItemProps> = [...meta];\n\n // Add deduplication info\n if (dedupStrategy !== LogsDedupStrategy.none) {\n logsMetaItem.push({\n label: 'Deduplication 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 (displayedFields?.length > 0) {\n logsMetaItem.push(\n {\n label: 'Showing only selected fields',\n value: renderMetaItem(displayedFields, 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 {forceEscape ? 'Remove escaping' : 'Escape newlines'}\n </Button>\n </Tooltip>\n ),\n });\n }\n const downloadMenu = (\n <Menu>\n <Menu.Item label=\"txt\" onClick={() => downloadLogs(DownloadFormat.Text)} />\n <Menu.Item label=\"json\" onClick={() => downloadLogs(DownloadFormat.Json)} />\n <Menu.Item label=\"csv\" onClick={() => downloadLogs(DownloadFormat.CSV)} />\n </Menu>\n );\n return (\n <>\n {logsMetaItem && (\n <div className={style.metaContainer}>\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 <Dropdown overlay={downloadMenu}>\n <ToolbarButton isOpen={false} variant=\"canvas\" icon=\"download-alt\">\n Download\n </ToolbarButton>\n </Dropdown>\n </div>\n )}\n </>\n );\n }\n);\n\nLogsMetaRow.displayName = 'LogsMetaRow';\n\nfunction renderMetaItem(value: any, kind: LogsMetaKind) {\n if (kind === LogsMetaKind.LabelsMap) {\n return <LogLabels labels={value} />;\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, GrafanaTheme2 } from '@grafana/data';\nimport { TimeZone } from '@grafana/schema';\nimport { CustomScrollbar, Spinner, useTheme2, clearButtonStyles } 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 onClick: (page: LogsPage, pageNumber: number) => void;\n};\n\nexport function LogsNavigationPages({ pages, currentPageIndex, oldestLogsFirst, timeZone, loading, onClick }: 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 <button\n type=\"button\"\n data-testid={`page${index + 1}`}\n className={cx(clearButtonStyles(theme), styles.page)}\n key={page.queryRange.to}\n onClick={() => {\n onClick(page, index + 1);\n }}\n disabled={loading}\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 </button>\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, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { AbsoluteTimeRange, GrafanaTheme2, LogsSortOrder } from '@grafana/data';\nimport { config, reportInteraction } from '@grafana/runtime';\nimport { DataQuery, TimeZone } from '@grafana/schema';\nimport { Button, Icon, Spinner, useTheme2 } from '@grafana/ui';\nimport { TOP_BAR_LEVEL_HEIGHT } from 'app/core/components/AppChrome/types';\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\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 currentPageIndex = useMemo(\n () =>\n pages.findIndex((page) => {\n return page.queryRange.to === absoluteRange.to;\n }),\n [absoluteRange.to, pages]\n );\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);\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 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 return newPages;\n });\n }\n }, [visibleRange, absoluteRange, logsSortOrder, queries, clearCache, addResultsToCache]);\n\n const changeTime = useCallback(\n ({ from, to }: AbsoluteTimeRange) => {\n addResultsToCache();\n expectedRangeRef.current = { from, to };\n onChangeTime({ from, to });\n },\n [onChangeTime, addResultsToCache]\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 scrollToTopLogs();\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 scrollToTopLogs();\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 const onPageClick = useCallback(\n (page: LogsPage, pageNumber: number) => {\n reportInteraction('grafana_explore_logs_pagination_clicked', {\n pageType: 'page',\n pageNumber,\n });\n changeTime({ from: page.queryRange.from, to: page.queryRange.to });\n scrollToTopLogs();\n },\n [changeTime, scrollToTopLogs]\n );\n\n return (\n <div className={styles.navContainer}>\n {!config.featureToggles.logsInfiniteScrolling && (\n <>\n {oldestLogsFirst ? olderLogsButton : newerLogsButton}\n <LogsNavigationPages\n pages={pages}\n currentPageIndex={currentPageIndex}\n oldestLogsFirst={oldestLogsFirst}\n timeZone={timeZone}\n loading={loading}\n onClick={onPageClick}\n />\n {oldestLogsFirst ? newerLogsButton : olderLogsButton}\n </>\n )}\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) => {\n const navContainerHeight = `calc(100vh - 2*${theme.spacing(2)} - 2*${TOP_BAR_LEVEL_HEIGHT}px)`;\n return {\n navContainer: css`\n max-height: ${navContainerHeight};\n display: flex;\n flex-direction: column;\n ${config.featureToggles.logsInfiniteScrolling\n ? `justify-content: flex-end;`\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 React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data/src';\nimport { Field, Input, useTheme2 } from '@grafana/ui/src';\n\nfunction getStyles(theme: GrafanaTheme2) {\n return {\n searchWrap: css({\n padding: `${theme.spacing(0.4)} 0 ${theme.spacing(0.4)} ${theme.spacing(0.4)}`,\n }),\n };\n}\n\nexport function LogsColumnSearch(props: { onChange: (e: React.FormEvent<HTMLInputElement>) => void; value: string }) {\n const theme = useTheme2();\n const styles = getStyles(theme);\n return (\n <Field className={styles.searchWrap}>\n <Input value={props.value} type={'text'} placeholder={'Search fields by name'} onChange={props.onChange} />\n </Field>\n );\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useTheme2 } from '@grafana/ui';\n\nfunction getStyles(theme: GrafanaTheme2) {\n return {\n empty: css({\n marginBottom: theme.spacing(2),\n marginLeft: theme.spacing(1.75),\n fontSize: theme.typography.fontSize,\n }),\n };\n}\n\nexport function LogsTableEmptyFields() {\n const theme = useTheme2();\n const styles = getStyles(theme);\n return <div className={styles.empty}>No fields</div>;\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Checkbox, Icon, useTheme2 } from '@grafana/ui';\n\nimport { FieldNameMeta } from './LogsTableWrap';\n\nfunction getStyles(theme: GrafanaTheme2) {\n return {\n dragIcon: css({\n cursor: 'drag',\n marginLeft: theme.spacing(1),\n opacity: 0.4,\n }),\n labelCount: css({\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n appearance: 'none',\n background: 'none',\n border: 'none',\n fontSize: theme.typography.pxToRem(11),\n opacity: 0.6,\n }),\n contentWrap: css({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n }),\n // Hide text that overflows, had to select elements within the Checkbox component, so this is a bit fragile\n checkboxLabel: css({\n '> span': {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n display: 'block',\n maxWidth: '100%',\n },\n }),\n };\n}\n\nexport function LogsTableNavField(props: {\n label: string;\n onChange: () => void;\n labels: Record<string, FieldNameMeta>;\n draggable?: boolean;\n showCount?: boolean;\n}): React.JSX.Element | undefined {\n const theme = useTheme2();\n const styles = getStyles(theme);\n\n if (props.labels[props.label]) {\n return (\n <>\n <div className={styles.contentWrap}>\n <Checkbox\n className={styles.checkboxLabel}\n label={props.label}\n onChange={props.onChange}\n checked={props.labels[props.label]?.active ?? false}\n />\n {props.showCount && (\n <button className={styles.labelCount} onClick={props.onChange}>\n {props.labels[props.label]?.percentOfLinesWithLabel}%\n </button>\n )}\n </div>\n {props.draggable && (\n <Icon\n aria-label=\"Drag and drop icon\"\n title=\"Drag and drop to reorder\"\n name=\"draggabledots\"\n size=\"lg\"\n className={styles.dragIcon}\n />\n )}\n </>\n );\n }\n return undefined;\n}\n","import { css, cx } from '@emotion/css';\nimport React from 'react';\nimport { DragDropContext, Draggable, DraggableProvided, Droppable, DropResult } from 'react-beautiful-dnd';\n\nimport { GrafanaTheme2 } from '@grafana/data/src';\nimport { useTheme2 } from '@grafana/ui/src';\n\nimport { LogsTableEmptyFields } from './LogsTableEmptyFields';\nimport { LogsTableNavField } from './LogsTableNavField';\nimport { FieldNameMeta } from './LogsTableWrap';\n\nexport function getLogsFieldsStyles(theme: GrafanaTheme2) {\n return {\n wrap: css({\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n display: 'flex',\n background: theme.colors.background.primary,\n }),\n dragging: css({\n background: theme.colors.background.secondary,\n }),\n columnWrapper: css({\n marginBottom: theme.spacing(1.5),\n // need some space or the outline of the checkbox is cut off\n paddingLeft: theme.spacing(0.5),\n }),\n };\n}\n\nfunction sortLabels(labels: Record<string, FieldNameMeta>) {\n return (a: string, b: string) => {\n const la = labels[a];\n const lb = labels[b];\n\n // Sort by index\n if (la.index != null && lb.index != null) {\n return la.index - lb.index;\n }\n\n // otherwise do not sort\n return 0;\n };\n}\n\nexport const LogsTableActiveFields = (props: {\n labels: Record<string, FieldNameMeta>;\n valueFilter: (value: string) => boolean;\n toggleColumn: (columnName: string) => void;\n reorderColumn: (sourceIndex: number, destinationIndex: number) => void;\n id: string;\n}): JSX.Element => {\n const { reorderColumn, labels, valueFilter, toggleColumn } = props;\n const theme = useTheme2();\n const styles = getLogsFieldsStyles(theme);\n const labelKeys = Object.keys(labels).filter((labelName) => valueFilter(labelName));\n\n const onDragEnd = (result: DropResult) => {\n if (!result.destination) {\n return;\n }\n reorderColumn(result.source.index, result.destination.index);\n };\n\n const renderTitle = (labelName: string) => {\n const label = labels[labelName];\n if (label) {\n return `${labelName} appears in ${label?.percentOfLinesWithLabel}% of log lines`;\n }\n\n return undefined;\n };\n\n if (labelKeys.length) {\n return (\n <DragDropContext onDragEnd={onDragEnd}>\n <Droppable droppableId=\"order-fields\" direction=\"vertical\">\n {(provided) => (\n <div className={styles.columnWrapper} {...provided.droppableProps} ref={provided.innerRef}>\n {labelKeys.sort(sortLabels(labels)).map((labelName, index) => (\n <Draggable draggableId={labelName} key={labelName} index={index}>\n {(provided: DraggableProvided, snapshot) => (\n <div\n className={cx(styles.wrap, snapshot.isDragging ? styles.dragging : undefined)}\n ref={provided.innerRef}\n {...provided.draggableProps}\n {...provided.dragHandleProps}\n title={renderTitle(labelName)}\n >\n <LogsTableNavField\n label={labelName}\n onChange={() => toggleColumn(labelName)}\n labels={labels}\n draggable={true}\n />\n </div>\n )}\n </Draggable>\n ))}\n {provided.placeholder}\n </div>\n )}\n </Droppable>\n </DragDropContext>\n );\n }\n\n return <LogsTableEmptyFields />;\n};\n","import React from 'react';\n\nimport { useTheme2 } from '@grafana/ui/src';\n\nimport { getLogsFieldsStyles } from './LogsTableActiveFields';\nimport { LogsTableEmptyFields } from './LogsTableEmptyFields';\nimport { LogsTableNavField } from './LogsTableNavField';\nimport { FieldNameMeta } from './LogsTableWrap';\n\nconst collator = new Intl.Collator(undefined, { sensitivity: 'base' });\n\nfunction sortLabels(labels: Record<string, FieldNameMeta>) {\n return (a: string, b: string) => {\n const la = labels[a];\n const lb = labels[b];\n\n // ...sort by type and alphabetically\n if (la != null && lb != null) {\n return (\n Number(lb.type === 'TIME_FIELD') - Number(la.type === 'TIME_FIELD') ||\n Number(lb.type === 'BODY_FIELD') - Number(la.type === 'BODY_FIELD') ||\n collator.compare(a, b)\n );\n }\n\n // otherwise do not sort\n return 0;\n };\n}\n\nexport const LogsTableAvailableFields = (props: {\n labels: Record<string, FieldNameMeta>;\n valueFilter: (value: string) => boolean;\n toggleColumn: (columnName: string) => void;\n}): JSX.Element => {\n const { labels, valueFilter, toggleColumn } = props;\n const theme = useTheme2();\n const styles = getLogsFieldsStyles(theme);\n const labelKeys = Object.keys(labels).filter((labelName) => valueFilter(labelName));\n if (labelKeys.length) {\n // Otherwise show list with a hardcoded order\n return (\n <div className={styles.columnWrapper}>\n {labelKeys.sort(sortLabels(labels)).map((labelName, index) => (\n <div\n key={labelName}\n className={styles.wrap}\n title={`${labelName} appears in ${labels[labelName]?.percentOfLinesWithLabel}% of log lines`}\n >\n <LogsTableNavField\n showCount={true}\n label={labelName}\n onChange={() => toggleColumn(labelName)}\n labels={labels}\n />\n </div>\n ))}\n </div>\n );\n }\n\n return <LogsTableEmptyFields />;\n};\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data/src';\nimport { useTheme2 } from '@grafana/ui/src';\n\nimport { LogsTableActiveFields } from './LogsTableActiveFields';\nimport { LogsTableAvailableFields } from './LogsTableAvailableFields';\nimport { FieldNameMeta } from './LogsTableWrap';\n\nfunction getStyles(theme: GrafanaTheme2) {\n return {\n sidebarWrap: css({\n overflowY: 'scroll',\n height: 'calc(100% - 50px)',\n /* Hide scrollbar for Chrome, Safari, and Opera */\n '&::-webkit-scrollbar': {\n display: 'none',\n },\n /* Hide scrollbar for Firefox */\n scrollbarWidth: 'none',\n }),\n columnHeaderButton: css({\n appearance: 'none',\n background: 'none',\n border: 'none',\n fontSize: theme.typography.pxToRem(11),\n }),\n columnHeader: css({\n display: 'flex',\n justifyContent: 'space-between',\n fontSize: theme.typography.h6.fontSize,\n background: theme.colors.background.secondary,\n position: 'sticky',\n top: 0,\n left: 0,\n paddingTop: theme.spacing(0.75),\n paddingRight: theme.spacing(0.75),\n paddingBottom: theme.spacing(0.75),\n paddingLeft: theme.spacing(1.5),\n zIndex: 3,\n marginBottom: theme.spacing(2),\n }),\n };\n}\n\nexport const LogsTableMultiSelect = (props: {\n toggleColumn: (columnName: string) => void;\n filteredColumnsWithMeta: Record<string, FieldNameMeta> | undefined;\n columnsWithMeta: Record<string, FieldNameMeta>;\n clear: () => void;\n reorderColumn: (oldIndex: number, newIndex: number) => void;\n}) => {\n const theme = useTheme2();\n const styles = getStyles(theme);\n\n return (\n <div className={styles.sidebarWrap}>\n {/* Sidebar columns */}\n <>\n <div className={styles.columnHeader}>\n Selected fields\n <button onClick={props.clear} className={styles.columnHeaderButton}>\n Reset\n </button>\n </div>\n <LogsTableActiveFields\n reorderColumn={props.reorderColumn}\n toggleColumn={props.toggleColumn}\n labels={props.filteredColumnsWithMeta ?? props.columnsWithMeta}\n valueFilter={(value) => props.columnsWithMeta[value]?.active ?? false}\n id={'selected-fields'}\n />\n\n <div className={styles.columnHeader}>Fields</div>\n <LogsTableAvailableFields\n toggleColumn={props.toggleColumn}\n labels={props.filteredColumnsWithMeta ?? props.columnsWithMeta}\n valueFilter={(value) => !props.columnsWithMeta[value]?.active}\n />\n </>\n </div>\n );\n};\n","import uFuzzy from '@leeoniya/ufuzzy';\nimport { debounce as debounceLodash } from 'lodash';\n\nconst uf = new uFuzzy({\n intraMode: 1,\n intraIns: 1,\n intraSub: 1,\n intraTrn: 1,\n intraDel: 1,\n});\n\nexport function fuzzySearch(haystack: string[], query: string, dispatcher: (data: string[][]) => void) {\n const [idxs, info, order] = uf.search(haystack, query, 0, 1e5);\n\n let haystackOrder: string[] = [];\n let matchesSet: Set<string> = new Set();\n if (idxs && order) {\n /**\n * get the fuzzy matches for hilighting\n * @param part\n * @param matched\n */\n const mark = (part: string, matched: boolean) => {\n if (matched) {\n matchesSet.add(part);\n }\n };\n\n // Iterate to create the order of needles(queries) and the matches\n for (let i = 0; i < order.length; i++) {\n let infoIdx = order[i];\n\n /** Evaluate the match, get the matches for highlighting */\n uFuzzy.highlight(haystack[info.idx[infoIdx]], info.ranges[infoIdx], mark);\n /** Get the order */\n haystackOrder.push(haystack[info.idx[infoIdx]]);\n }\n\n dispatcher([haystackOrder, [...matchesSet]]);\n } else if (!query) {\n dispatcher([[], []]);\n }\n}\n\nexport const debouncedFuzzySearch = debounceLodash(fuzzySearch, 300);\n","import { css } from '@emotion/css';\nimport { Resizable, ResizeCallback } from 're-resizable';\nimport React, { useCallback, useEffect, useState } from 'react';\n\nimport {\n DataFrame,\n ExploreLogsPanelState,\n GrafanaTheme2,\n Labels,\n LogsSortOrder,\n SelectableValue,\n SplitOpen,\n TimeRange,\n} from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime/src';\nimport { InlineField, Select, Themeable2 } from '@grafana/ui/';\n\nimport { parseLogsFrame } from '../../logs/logsFrame';\n\nimport { LogsColumnSearch } from './LogsColumnSearch';\nimport { LogsTable } from './LogsTable';\nimport { LogsTableMultiSelect } from './LogsTableMultiSelect';\nimport { fuzzySearch } from './utils/uFuzzy';\n\ninterface Props extends Themeable2 {\n logsFrames: DataFrame[];\n width: number;\n timeZone: string;\n splitOpen: SplitOpen;\n range: TimeRange;\n logsSortOrder: LogsSortOrder;\n panelState: ExploreLogsPanelState | undefined;\n updatePanelState: (panelState: Partial<ExploreLogsPanelState>) => void;\n onClickFilterLabel?: (key: string, value: string, frame?: DataFrame) => void;\n onClickFilterOutLabel?: (key: string, value: string, frame?: DataFrame) => void;\n datasourceType?: string;\n}\n\ntype ActiveFieldMeta = {\n active: false;\n index: undefined; // if undefined the column is not selected\n};\n\ntype InactiveFieldMeta = {\n active: true;\n index: number; // if undefined the column is not selected\n};\n\ntype GenericMeta = {\n percentOfLinesWithLabel: number;\n type?: 'BODY_FIELD' | 'TIME_FIELD';\n};\n\nexport type FieldNameMeta = (InactiveFieldMeta | ActiveFieldMeta) & GenericMeta;\n\ntype FieldName = string;\ntype FieldNameMetaStore = Record<FieldName, FieldNameMeta>;\n\nexport function LogsTableWrap(props: Props) {\n const { logsFrames, updatePanelState, panelState } = props;\n const propsColumns = panelState?.columns;\n // Save the normalized cardinality of each label\n const [columnsWithMeta, setColumnsWithMeta] = useState<FieldNameMetaStore | undefined>(undefined);\n\n // Filtered copy of columnsWithMeta that only includes matching results\n const [filteredColumnsWithMeta, setFilteredColumnsWithMeta] = useState<FieldNameMetaStore | undefined>(undefined);\n const [searchValue, setSearchValue] = useState<string>('');\n\n const height = getLogsTableHeight();\n const panelStateRefId = props?.panelState?.refId;\n\n // The current dataFrame containing the refId of the current query\n const [currentDataFrame, setCurrentDataFrame] = useState<DataFrame>(\n logsFrames.find((f) => f.refId === panelStateRefId) ?? logsFrames[0]\n );\n\n const getColumnsFromProps = useCallback(\n (fieldNames: FieldNameMetaStore) => {\n const previouslySelected = props.panelState?.columns;\n if (previouslySelected) {\n Object.values(previouslySelected).forEach((key, index) => {\n if (fieldNames[key]) {\n fieldNames[key].active = true;\n fieldNames[key].index = index;\n }\n });\n }\n return fieldNames;\n },\n [props.panelState?.columns]\n );\n const logsFrame = parseLogsFrame(currentDataFrame);\n\n useEffect(() => {\n if (logsFrame?.timeField.name && logsFrame?.bodyField.name && !propsColumns) {\n const defaultColumns = { 0: logsFrame?.timeField.name ?? '', 1: logsFrame?.bodyField.name ?? '' };\n updatePanelState({\n columns: Object.values(defaultColumns),\n visualisationType: 'table',\n labelFieldName: logsFrame?.getLabelFieldName() ?? undefined,\n });\n }\n }, [logsFrame, propsColumns, updatePanelState]);\n\n /**\n * When logs frame updates (e.g. query|range changes), we need to set the selected frame to state\n */\n useEffect(() => {\n const newFrame = logsFrames.find((f) => f.refId === panelStateRefId) ?? logsFrames[0];\n if (newFrame) {\n setCurrentDataFrame(newFrame);\n }\n }, [logsFrames, panelStateRefId]);\n\n /**\n * Keeps the filteredColumnsWithMeta state in sync with the columnsWithMeta state,\n * which can be updated by explore browser history state changes\n * This prevents an edge case bug where the user is navigating while a search is open.\n */\n useEffect(() => {\n if (!columnsWithMeta || !filteredColumnsWithMeta) {\n return;\n }\n let newFiltered = { ...filteredColumnsWithMeta };\n let flag = false;\n Object.keys(columnsWithMeta).forEach((key) => {\n if (newFiltered[key] && newFiltered[key].active !== columnsWithMeta[key].active) {\n newFiltered[key] = columnsWithMeta[key];\n flag = true;\n }\n });\n if (flag) {\n setFilteredColumnsWithMeta(newFiltered);\n }\n }, [columnsWithMeta, filteredColumnsWithMeta]);\n\n /**\n * when the query results change, we need to update the columnsWithMeta state\n * and reset any local search state\n *\n * This will also find all the unique labels, and calculate how many log lines have each label into the labelCardinality Map\n * Then it normalizes the counts\n *\n */\n useEffect(() => {\n // If the data frame is empty, there's nothing to viz, it could mean the user has unselected all columns\n if (!currentDataFrame.length) {\n return;\n }\n const numberOfLogLines = currentDataFrame ? currentDataFrame.length : 0;\n const logsFrame = parseLogsFrame(currentDataFrame);\n const labels = logsFrame?.getLogFrameLabelsAsLabels();\n\n const otherFields = [];\n\n if (logsFrame) {\n otherFields.push(...logsFrame.extraFields.filter((field) => !field?.config?.custom?.hidden));\n }\n if (logsFrame?.severityField) {\n otherFields.push(logsFrame?.severityField);\n }\n if (logsFrame?.bodyField) {\n otherFields.push(logsFrame?.bodyField);\n }\n if (logsFrame?.timeField) {\n otherFields.push(logsFrame?.timeField);\n }\n\n // Use a map to dedupe labels and count their occurrences in the logs\n const labelCardinality = new Map<FieldName, FieldNameMeta>();\n\n // What the label state will look like\n let pendingLabelState: FieldNameMetaStore = {};\n\n // If we have labels and log lines\n if (labels?.length && numberOfLogLines) {\n // Iterate through all of Labels\n labels.forEach((labels: Labels) => {\n const labelsArray = Object.keys(labels);\n // Iterate through the label values\n labelsArray.forEach((label) => {\n // If it's already in our map, increment the count\n if (labelCardinality.has(label)) {\n const value = labelCardinality.get(label);\n if (value) {\n if (value?.active) {\n labelCardinality.set(label, {\n percentOfLinesWithLabel: value.percentOfLinesWithLabel + 1,\n active: true,\n index: value.index,\n });\n } else {\n labelCardinality.set(label, {\n percentOfLinesWithLabel: value.percentOfLinesWithLabel + 1,\n active: false,\n index: undefined,\n });\n }\n }\n // Otherwise add it\n } else {\n labelCardinality.set(label, { percentOfLinesWithLabel: 1, active: false, index: undefined });\n }\n });\n });\n\n // Converting the map to an object\n pendingLabelState = Object.fromEntries(labelCardinality);\n\n // Convert count to percent of log lines\n Object.keys(pendingLabelState).forEach((key) => {\n pendingLabelState[key].percentOfLinesWithLabel = normalize(\n pendingLabelState[key].percentOfLinesWithLabel,\n numberOfLogLines\n );\n });\n }\n\n // Normalize the other fields\n otherFields.forEach((field) => {\n const isActive = pendingLabelState[field.name]?.active;\n const index = pendingLabelState[field.name]?.index;\n if (isActive && index !== undefined) {\n pendingLabelState[field.name] = {\n percentOfLinesWithLabel: normalize(\n field.values.filter((value) => value !== null && value !== undefined).length,\n numberOfLogLines\n ),\n active: true,\n index: index,\n };\n } else {\n pendingLabelState[field.name] = {\n percentOfLinesWithLabel: normalize(\n field.values.filter((value) => value !== null && value !== undefined).length,\n numberOfLogLines\n ),\n active: false,\n index: undefined,\n };\n }\n });\n\n pendingLabelState = getColumnsFromProps(pendingLabelState);\n\n // Get all active columns\n const active = Object.keys(pendingLabelState).filter((key) => pendingLabelState[key].active);\n\n // If nothing is selected, then select the default columns\n if (active.length === 0) {\n if (logsFrame?.bodyField?.name) {\n pendingLabelState[logsFrame.bodyField.name].active = true;\n }\n if (logsFrame?.timeField?.name) {\n pendingLabelState[logsFrame.timeField.name].active = true;\n }\n }\n\n if (logsFrame?.bodyField?.name && logsFrame?.timeField?.name) {\n pendingLabelState[logsFrame.bodyField.name].type = 'BODY_FIELD';\n pendingLabelState[logsFrame.timeField.name].type = 'TIME_FIELD';\n }\n\n setColumnsWithMeta(pendingLabelState);\n\n // The panel state is updated when the user interacts with the multi-select sidebar\n }, [currentDataFrame, getColumnsFromProps]);\n\n const [sidebarWidth, setSidebarWidth] = useState(220);\n const tableWidth = props.width - sidebarWidth;\n\n if (!columnsWithMeta) {\n return null;\n }\n\n function columnFilterEvent(columnName: string) {\n if (columnsWithMeta) {\n const newState = !columnsWithMeta[columnName]?.active;\n const priorActiveCount = Object.keys(columnsWithMeta).filter((column) => columnsWithMeta[column]?.active)?.length;\n const event = {\n columnAction: newState ? 'add' : 'remove',\n columnCount: newState ? priorActiveCount + 1 : priorActiveCount - 1,\n datasourceType: props.datasourceType,\n };\n reportInteraction('grafana_explore_logs_table_column_filter_clicked', event);\n }\n }\n\n function searchFilterEvent(searchResultCount: number) {\n reportInteraction('grafana_explore_logs_table_text_search_result_count', {\n resultCount: searchResultCount,\n datasourceType: props.datasourceType ?? 'unknown',\n });\n }\n\n const clearSelection = () => {\n const pendingLabelState = { ...columnsWithMeta };\n let index = 0;\n Object.keys(pendingLabelState).forEach((key) => {\n const isDefaultField = !!pendingLabelState[key].type;\n // after reset the only active fields are the special time and body fields\n pendingLabelState[key].active = isDefaultField;\n // reset the index\n pendingLabelState[key].index = isDefaultField ? index++ : undefined;\n });\n setColumnsWithMeta(pendingLabelState);\n };\n\n const reorderColumn = (sourceIndex: number, destinationIndex: number) => {\n if (sourceIndex === destinationIndex) {\n return;\n }\n\n const pendingLabelState = { ...columnsWithMeta };\n\n const keys = Object.keys(pendingLabelState)\n .filter((key) => pendingLabelState[key].active)\n .map((key) => ({\n fieldName: key,\n index: pendingLabelState[key].index ?? 0,\n }))\n .sort((a, b) => a.index - b.index);\n\n const [source] = keys.splice(sourceIndex, 1);\n keys.splice(destinationIndex, 0, source);\n\n keys.forEach((key, index) => {\n pendingLabelState[key.fieldName].index = index;\n });\n\n // Set local state\n setColumnsWithMeta(pendingLabelState);\n\n // Sync the explore state\n updateExploreState(pendingLabelState);\n };\n\n function updateExploreState(pendingLabelState: FieldNameMetaStore) {\n // Get all active columns and sort by index\n const newColumnsArray = Object.keys(pendingLabelState)\n // Only include active filters\n .filter((key) => pendingLabelState[key]?.active)\n .sort((a, b) => {\n const pa = pendingLabelState[a];\n const pb = pendingLabelState[b];\n if (pa.index !== undefined && pb.index !== undefined) {\n return pa.index - pb.index; // sort by index\n }\n return 0;\n });\n\n const newColumns: Record<number, string> = Object.assign(\n {},\n // Get the keys of the object as an array\n newColumnsArray\n );\n\n const defaultColumns = { 0: logsFrame?.timeField.name ?? '', 1: logsFrame?.bodyField.name ?? '' };\n const newPanelState: ExploreLogsPanelState = {\n ...props.panelState,\n // URL format requires our array of values be an object, so we convert it using object.assign\n columns: Object.keys(newColumns).length ? newColumns : defaultColumns,\n refId: currentDataFrame.refId,\n visualisationType: 'table',\n labelFieldName: logsFrame?.getLabelFieldName() ?? undefined,\n };\n\n // Update url state\n updatePanelState(newPanelState);\n }\n\n // Toggle a column on or off when the user interacts with an element in the multi-select sidebar\n const toggleColumn = (columnName: FieldName) => {\n if (!columnsWithMeta || !(columnName in columnsWithMeta)) {\n console.warn('failed to get column', columnsWithMeta);\n return;\n }\n\n const length = Object.keys(columnsWithMeta).filter((c) => columnsWithMeta[c].active).length;\n const isActive = !columnsWithMeta[columnName].active ? true : undefined;\n\n let pendingLabelState: FieldNameMetaStore;\n if (isActive) {\n pendingLabelState = {\n ...columnsWithMeta,\n [columnName]: {\n ...columnsWithMeta[columnName],\n active: isActive,\n index: length,\n },\n };\n } else {\n pendingLabelState = {\n ...columnsWithMeta,\n [columnName]: {\n ...columnsWithMeta[columnName],\n active: false,\n index: undefined,\n },\n };\n }\n\n // Analytics\n columnFilterEvent(columnName);\n\n // Set local state\n setColumnsWithMeta(pendingLabelState);\n\n // If user is currently filtering, update filtered state\n if (filteredColumnsWithMeta) {\n const active = !filteredColumnsWithMeta[columnName]?.active;\n let pendingFilteredLabelState: FieldNameMetaStore;\n if (active) {\n pendingFilteredLabelState = {\n ...filteredColumnsWithMeta,\n [columnName]: {\n ...filteredColumnsWithMeta[columnName],\n active: active,\n index: length,\n },\n };\n } else {\n pendingFilteredLabelState = {\n ...filteredColumnsWithMeta,\n [columnName]: {\n ...filteredColumnsWithMeta[columnName],\n active: false,\n index: undefined,\n },\n };\n }\n\n setFilteredColumnsWithMeta(pendingFilteredLabelState);\n }\n\n updateExploreState(pendingLabelState);\n };\n\n // uFuzzy search dispatcher, adds any matches to the local state\n const dispatcher = (data: string[][]) => {\n const matches = data[0];\n let newColumnsWithMeta: FieldNameMetaStore = {};\n let numberOfResults = 0;\n matches.forEach((match) => {\n if (match in columnsWithMeta) {\n newColumnsWithMeta[match] = columnsWithMeta[match];\n numberOfResults++;\n }\n });\n setFilteredColumnsWithMeta(newColumnsWithMeta);\n searchFilterEvent(numberOfResults);\n };\n\n // uFuzzy search\n const search = (needle: string) => {\n fuzzySearch(Object.keys(columnsWithMeta), needle, dispatcher);\n };\n\n // onChange handler for search input\n const onSearchInputChange = (e: React.FormEvent<HTMLInputElement>) => {\n const value = e.currentTarget?.value;\n setSearchValue(value);\n if (value) {\n search(value);\n } else {\n // If the search input is empty, reset the local search state.\n setFilteredColumnsWithMeta(undefined);\n }\n };\n\n const onFrameSelectorChange = (value: SelectableValue<string>) => {\n const matchingDataFrame = logsFrames.find((frame) => frame.refId === value.value);\n if (matchingDataFrame) {\n setCurrentDataFrame(logsFrames.find((frame) => frame.refId === value.value) ?? logsFrames[0]);\n }\n props.updatePanelState({ refId: value.value, labelFieldName: logsFrame?.getLabelFieldName() ?? undefined });\n };\n\n const styles = getStyles(props.theme, height, sidebarWidth);\n\n const getOnResize: ResizeCallback = (event, direction, ref) => {\n const newSidebarWidth = Number(ref.style.width.slice(0, -2));\n if (!isNaN(newSidebarWidth)) {\n setSidebarWidth(newSidebarWidth);\n }\n };\n\n return (\n <>\n <div>\n {logsFrames.length > 1 && (\n <div>\n <InlineField\n label=\"Select query\"\n htmlFor=\"explore_logs_table_frame_selector\"\n labelWidth={22}\n tooltip=\"Select a query to visualize in the table.\"\n >\n <Select\n inputId={'explore_logs_table_frame_selector'}\n aria-label={'Select query by name'}\n value={currentDataFrame.refId}\n options={logsFrames.map((frame) => {\n return {\n label: frame.refId,\n value: frame.refId,\n };\n })}\n onChange={onFrameSelectorChange}\n />\n </InlineField>\n </div>\n )}\n </div>\n <div className={styles.wrapper}>\n <Resizable\n enable={{\n right: true,\n }}\n handleClasses={{ right: styles.rzHandle }}\n onResize={getOnResize}\n >\n <section className={styles.sidebar}>\n <LogsColumnSearch value={searchValue} onChange={onSearchInputChange} />\n <LogsTableMultiSelect\n reorderColumn={reorderColumn}\n toggleColumn={toggleColumn}\n filteredColumnsWithMeta={filteredColumnsWithMeta}\n columnsWithMeta={columnsWithMeta}\n clear={clearSelection}\n />\n </section>\n </Resizable>\n <LogsTable\n logsFrame={logsFrame}\n onClickFilterLabel={props.onClickFilterLabel}\n onClickFilterOutLabel={props.onClickFilterOutLabel}\n logsSortOrder={props.logsSortOrder}\n range={props.range}\n splitOpen={props.splitOpen}\n timeZone={props.timeZone}\n width={tableWidth}\n dataFrame={currentDataFrame}\n columnsWithMeta={columnsWithMeta}\n height={height}\n />\n </div>\n </>\n );\n}\n\nconst normalize = (value: number, total: number): number => {\n return Math.ceil((100 * value) / total);\n};\n\nfunction getStyles(theme: GrafanaTheme2, height: number, width: number) {\n return {\n wrapper: css({\n display: 'flex',\n }),\n sidebar: css({\n height: height,\n fontSize: theme.typography.pxToRem(11),\n overflowY: 'hidden',\n width: width,\n paddingRight: theme.spacing(3),\n }),\n rzHandle: css({\n background: theme.colors.secondary.main,\n transition: '0.3s background ease-in-out',\n position: 'relative',\n height: '50% !important',\n width: `${theme.spacing(1)} !important`,\n top: '25% !important',\n right: `${theme.spacing(1)} !important`,\n cursor: 'grab',\n borderRadius: theme.shape.radius.pill,\n ['&:hover']: {\n background: theme.colors.secondary.shade,\n },\n }),\n };\n}\n\nexport const getLogsTableHeight = () => {\n // Instead of making the height of the table based on the content (like in the table panel itself), let's try to use the vertical space that is available.\n // Since this table is in explore, we can expect the user to be running multiple queries that return disparate numbers of rows and labels in the same session\n // Also changing the height of the table between queries can be and cause content to jump, so we'll set a minimum height of 500px, and a max based on the innerHeight\n // Ideally the table container should always be able to fit in the users viewport without needing to scroll\n return Math.max(window.innerHeight - 500, 500);\n};\n","import { css } from '@emotion/css';\nimport React, { useState } from 'react';\n\nimport { DataQueryError, GrafanaTheme2 } from '@grafana/data';\nimport { Alert, AlertVariant, Button, useTheme2 } from '@grafana/ui';\n\ntype Props = {\n error?: DataQueryError;\n title: string;\n severity?: AlertVariant;\n suggestedAction?: string;\n onSuggestedAction?(): void;\n onRemove?(): void;\n};\nexport function SupplementaryResultError(props: Props) {\n const [isOpen, setIsOpen] = useState(false);\n const SHORT_ERROR_MESSAGE_LIMIT = 100;\n const { error, title, suggestedAction, onSuggestedAction, onRemove, severity = 'warning' } = props;\n // generic get-error-message-logic, taken from\n // /public/app/features/explore/ErrorContainer.tsx\n const message = error?.message || error?.data?.message || '';\n const showButton = !isOpen && message.length > SHORT_ERROR_MESSAGE_LIMIT;\n const theme = useTheme2();\n const styles = getStyles(theme);\n\n return (\n <div className={styles.supplementaryErrorContainer}>\n <Alert title={title} severity={severity} onRemove={onRemove}>\n <div className={styles.suggestedActionWrapper}>\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 {suggestedAction && onSuggestedAction && (\n <div className={styles.suggestedActionWrapper}>\n <Button variant=\"primary\" size=\"xs\" onClick={onSuggestedAction}>\n {suggestedAction}\n </Button>\n </div>\n )}\n </div>\n </Alert>\n </div>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n supplementaryErrorContainer: css({\n width: '50%',\n minWidth: `${theme.breakpoints.values.sm}px`,\n margin: '0 auto',\n }),\n suggestedActionWrapper: css({\n height: theme.spacing(6),\n ['button']: {\n position: 'absolute',\n right: theme.spacing(2),\n top: theme.spacing(7),\n },\n }),\n };\n};\n","import { css } from '@emotion/css';\nimport { identity } from 'lodash';\nimport React from 'react';\n\nimport {\n AbsoluteTimeRange,\n DataQueryResponse,\n LoadingState,\n SplitOpen,\n EventBus,\n GrafanaTheme2,\n DataFrame,\n} from '@grafana/data';\nimport { TimeZone } from '@grafana/schema';\nimport { Icon, Tooltip, TooltipDisplayMode, useStyles2, useTheme2 } from '@grafana/ui';\n\nimport { getLogsVolumeDataSourceInfo, isLogsVolumeLimited } from '../../logs/utils';\nimport { ExploreGraph } from '../Graph/ExploreGraph';\n\ntype Props = {\n logsVolumeData: DataQueryResponse;\n allLogsVolumeMaximum: number;\n absoluteRange: AbsoluteTimeRange;\n timeZone: TimeZone;\n splitOpen: SplitOpen;\n width: number;\n onUpdateTimeRange: (timeRange: AbsoluteTimeRange) => void;\n onLoadLogsVolume: () => void;\n onHiddenSeriesChanged: (hiddenSeries: string[]) => void;\n eventBus: EventBus;\n annotations: DataFrame[];\n};\n\nexport function LogsVolumePanel(props: Props) {\n const { width, timeZone, splitOpen, onUpdateTimeRange, onHiddenSeriesChanged, allLogsVolumeMaximum } = 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 const logsVolumeData = props.logsVolumeData;\n\n const logsVolumeInfo = getLogsVolumeDataSourceInfo(logsVolumeData?.data);\n let extraInfo = logsVolumeInfo ? `${logsVolumeInfo.name}` : '';\n\n if (isLogsVolumeLimited(logsVolumeData.data)) {\n extraInfo = [\n extraInfo,\n 'This datasource does not support full-range histograms. The graph below is based on the logs seen in the response.',\n ]\n .filter(identity)\n .join('. ');\n }\n\n let extraInfoComponent = <span>{extraInfo}</span>;\n\n if (logsVolumeData.state === LoadingState.Streaming) {\n extraInfoComponent = (\n <>\n {extraInfoComponent}\n <Tooltip content=\"Streaming\">\n <Icon name=\"circle-mono\" size=\"md\" className={styles.streaming} data-testid=\"logs-volume-streaming\" />\n </Tooltip>\n </>\n );\n }\n\n return (\n <div style={{ height }} className={styles.contentContainer}>\n <ExploreGraph\n vizLegendOverrides={{\n calcs: ['sum'],\n }}\n graphStyle=\"lines\"\n loadingState={logsVolumeData.state ?? LoadingState.Done}\n data={logsVolumeData.data}\n height={height}\n width={width - spacing * 2}\n absoluteRange={props.absoluteRange}\n onChangeTime={onUpdateTimeRange}\n timeZone={timeZone}\n splitOpenFn={splitOpen}\n tooltipDisplayMode={TooltipDisplayMode.Multi}\n onHiddenSeriesChanged={onHiddenSeriesChanged}\n anchorToZero\n yAxisMaximum={allLogsVolumeMaximum}\n eventBus={props.eventBus}\n annotations={props.annotations}\n />\n {extraInfoComponent && <div className={styles.extraInfoContainer}>{extraInfoComponent}</div>}\n </div>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n extraInfoContainer: css`\n display: flex;\n justify-content: end;\n position: absolute;\n right: 5px;\n top: -10px;\n font-size: ${theme.typography.bodySmall.fontSize};\n color: ${theme.colors.text.secondary};\n `,\n contentContainer: css`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n `,\n streaming: css`\n color: ${theme.colors.success.text};\n `,\n };\n};\n","import { DataQueryError, DataQueryResponse } from '@grafana/data';\n\n// Currently we can only infer if an error response is a timeout or not.\nexport function isTimeoutErrorResponse(response: DataQueryResponse | undefined): boolean {\n if (!response) {\n return false;\n }\n if (!response.error && !response.errors) {\n return false;\n }\n\n const errors = response.error ? [response.error] : response.errors || [];\n\n return errors.some((error: DataQueryError) => {\n const message = `${error.message || error.data?.message}`?.toLowerCase();\n return message.includes('timeout');\n });\n}\n","import { css } from '@emotion/css';\nimport { flatten, groupBy, mapValues, sortBy } from 'lodash';\nimport React, { useMemo } from 'react';\n\nimport {\n AbsoluteTimeRange,\n DataFrame,\n DataQueryResponse,\n DataTopic,\n EventBus,\n GrafanaTheme2,\n LoadingState,\n SplitOpen,\n TimeZone,\n} from '@grafana/data';\nimport { Button, InlineField, Alert, useStyles2 } from '@grafana/ui';\n\nimport { mergeLogsVolumeDataFrames, isLogsVolumeLimited, getLogsVolumeMaximumRange } from '../../logs/utils';\nimport { SupplementaryResultError } from '../SupplementaryResultError';\n\nimport { LogsVolumePanel } from './LogsVolumePanel';\nimport { isTimeoutErrorResponse } from './utils/logsVolumeResponse';\n\ntype Props = {\n logsVolumeData: DataQueryResponse | undefined;\n absoluteRange: AbsoluteTimeRange;\n timeZone: TimeZone;\n splitOpen: SplitOpen;\n width: number;\n onUpdateTimeRange: (timeRange: AbsoluteTimeRange) => void;\n onLoadLogsVolume: () => void;\n onHiddenSeriesChanged: (hiddenSeries: string[]) => void;\n eventBus: EventBus;\n onClose?(): void;\n};\n\nexport const LogsVolumePanelList = ({\n logsVolumeData,\n absoluteRange,\n onUpdateTimeRange,\n width,\n onLoadLogsVolume,\n onHiddenSeriesChanged,\n eventBus,\n splitOpen,\n timeZone,\n onClose,\n}: Props) => {\n const {\n logVolumes,\n maximumValue: allLogsVolumeMaximumValue,\n maximumRange: allLogsVolumeMaximumRange,\n annotations,\n } = useMemo(() => {\n let maximumValue = -Infinity;\n const data = logsVolumeData?.data.filter((frame: DataFrame) => frame.meta?.dataTopic !== DataTopic.Annotations);\n const annotations =\n logsVolumeData?.data.filter((frame: DataFrame) => frame.meta?.dataTopic === DataTopic.Annotations) || [];\n const sorted = sortBy(data || [], 'meta.custom.datasourceName');\n const grouped = groupBy(sorted, 'meta.custom.datasourceName');\n const logVolumes = mapValues(grouped, (value) => {\n const mergedData = mergeLogsVolumeDataFrames(value);\n maximumValue = Math.max(maximumValue, mergedData.maximum);\n return mergedData.dataFrames;\n });\n const maximumRange = getLogsVolumeMaximumRange(flatten(Object.values(logVolumes)));\n return {\n maximumValue,\n maximumRange,\n logVolumes,\n annotations,\n };\n }, [logsVolumeData]);\n\n const styles = useStyles2(getStyles);\n\n const numberOfLogVolumes = Object.keys(logVolumes).length;\n\n const containsZoomed = Object.values(logVolumes).some((data: DataFrame[]) => {\n const zoomRatio = logsLevelZoomRatio(data, absoluteRange);\n return !isLogsVolumeLimited(data) && zoomRatio && zoomRatio < 1;\n });\n\n const timeoutError = isTimeoutErrorResponse(logsVolumeData);\n\n const visibleRange = {\n from: Math.max(absoluteRange.from, allLogsVolumeMaximumRange.from),\n to: Math.min(absoluteRange.to, allLogsVolumeMaximumRange.to),\n };\n\n if (logsVolumeData?.state === LoadingState.Loading) {\n return <span>Loading...</span>;\n } else if (timeoutError) {\n return (\n <SupplementaryResultError\n title=\"The logs volume query has timed out\"\n // Using info to avoid users thinking that the actual query has failed.\n severity=\"info\"\n suggestedAction=\"Retry\"\n onSuggestedAction={onLoadLogsVolume}\n onRemove={onClose}\n />\n );\n } else if (logsVolumeData?.error !== undefined) {\n return <SupplementaryResultError error={logsVolumeData.error} title=\"Failed to load log volume for this query\" />;\n }\n\n if (numberOfLogVolumes === 0) {\n return (\n <div className={styles.alertContainer}>\n <Alert severity=\"info\" title=\"No logs volume available\">\n No volume information available for the current queries and time range.\n </Alert>\n </div>\n );\n }\n\n return (\n <div className={styles.listContainer}>\n {Object.keys(logVolumes).map((name, index) => {\n const logsVolumeData = { data: logVolumes[name] };\n return (\n <LogsVolumePanel\n key={index}\n absoluteRange={visibleRange}\n allLogsVolumeMaximum={allLogsVolumeMaximumValue}\n width={width}\n logsVolumeData={logsVolumeData}\n onUpdateTimeRange={onUpdateTimeRange}\n timeZone={timeZone}\n splitOpen={splitOpen}\n onLoadLogsVolume={onLoadLogsVolume}\n // TODO: Support filtering level from multiple log levels\n onHiddenSeriesChanged={numberOfLogVolumes > 1 ? () => {} : onHiddenSeriesChanged}\n eventBus={eventBus}\n annotations={annotations}\n />\n );\n })}\n {containsZoomed && (\n <div className={styles.extraInfoContainer}>\n <InlineField label=\"Reload log volume\" transparent>\n <Button size=\"xs\" icon=\"sync\" variant=\"secondary\" onClick={onLoadLogsVolume} id=\"reload-volume\" />\n </InlineField>\n </div>\n )}\n </div>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n listContainer: css`\n padding-top: 10px;\n `,\n extraInfoContainer: css`\n display: flex;\n justify-content: end;\n position: absolute;\n right: 5px;\n top: 5px;\n `,\n oldInfoText: css`\n font-size: ${theme.typography.bodySmall.fontSize};\n color: ${theme.colors.text.secondary};\n `,\n alertContainer: css`\n width: 50%;\n min-width: ${theme.breakpoints.values.sm}px;\n margin: 0 auto;\n `,\n };\n};\n\nfunction logsLevelZoomRatio(\n logsVolumeData: DataFrame[] | undefined,\n selectedTimeRange: AbsoluteTimeRange\n): number | undefined {\n const dataRange = logsVolumeData && logsVolumeData[0] && logsVolumeData[0].meta?.custom?.absoluteRange;\n return dataRange ? (selectedTimeRange.from - selectedTimeRange.to) / (dataRange.from - dataRange.to) : undefined;\n}\n","import { css, cx } from '@emotion/css';\nimport { capitalize } from 'lodash';\nimport memoizeOne from 'memoize-one';\nimport React, { createRef, PureComponent } from 'react';\n\nimport {\n AbsoluteTimeRange,\n CoreApp,\n DataFrame,\n DataHoverClearEvent,\n DataHoverEvent,\n DataQueryResponse,\n EventBus,\n ExploreLogsPanelState,\n ExplorePanelsState,\n Field,\n GrafanaTheme2,\n LinkModel,\n LoadingState,\n LogLevel,\n LogRowContextOptions,\n LogRowModel,\n LogsDedupDescription,\n LogsDedupStrategy,\n LogsMetaItem,\n LogsSortOrder,\n rangeUtil,\n RawTimeRange,\n serializeStateToUrlParam,\n SplitOpen,\n TimeRange,\n urlUtil,\n} from '@grafana/data';\nimport { config, reportInteraction } from '@grafana/runtime';\nimport { DataQuery, TimeZone } from '@grafana/schema';\nimport {\n Button,\n InlineField,\n InlineFieldRow,\n InlineSwitch,\n PanelChrome,\n RadioButtonGroup,\n Themeable2,\n withTheme2,\n} from '@grafana/ui';\nimport store from 'app/core/store';\nimport { createAndCopyShortLink } from 'app/core/utils/shortLinks';\nimport { InfiniteScroll } from 'app/features/logs/components/InfiniteScroll';\nimport { getLogLevelFromKey } from 'app/features/logs/utils';\nimport { dispatch, getState } from 'app/store/store';\n\nimport { ExploreItemState } from '../../../types';\nimport { LogRows } from '../../logs/components/LogRows';\nimport { LogRowContextModal } from '../../logs/components/log-context/LogRowContextModal';\nimport { dedupLogRows, filterLogLevels } from '../../logs/logsModel';\nimport { getUrlStateFromPaneState } from '../hooks/useStateSync';\nimport { changePanelState } from '../state/explorePane';\n\nimport { LogsFeedback } from './LogsFeedback';\nimport { LogsMetaRow } from './LogsMetaRow';\nimport LogsNavigation from './LogsNavigation';\nimport { getLogsTableHeight, LogsTableWrap } from './LogsTableWrap';\nimport { LogsVolumePanelList } from './LogsVolumePanelList';\nimport { SETTINGS_KEYS, visualisationTypeKey } from './utils/logs';\n\ninterface Props extends Themeable2 {\n width: number;\n splitOpen: SplitOpen;\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: string;\n datasourceType?: string;\n logsVolumeEnabled: boolean;\n logsVolumeData: DataQueryResponse | undefined;\n onSetLogsVolumeEnabled: (enabled: boolean) => void;\n loadLogsVolumeData: () => void;\n showContextToggle?: (row: LogRowModel) => boolean;\n onChangeTime: (range: AbsoluteTimeRange) => void;\n onClickFilterLabel?: (key: string, value: string, frame?: DataFrame) => void;\n onClickFilterOutLabel?: (key: string, value: string, frame?: DataFrame) => void;\n onStartScanning?: () => void;\n onStopScanning?: () => void;\n getRowContext?: (row: LogRowModel, origRow: LogRowModel, options: LogRowContextOptions) => Promise<any>;\n getRowContextQuery?: (\n row: LogRowModel,\n options?: LogRowContextOptions,\n cacheFilters?: boolean\n ) => Promise<DataQuery | null>;\n getLogRowContextUi?: (row: LogRowModel, runContextQuery?: () => void) => React.ReactNode;\n getFieldLinks: (field: Field, rowIndex: number, dataFrame: DataFrame) => Array<LinkModel<Field>>;\n addResultsToCache: () => void;\n clearCache: () => void;\n eventBus: EventBus;\n panelState?: ExplorePanelsState;\n scrollElement?: HTMLDivElement;\n isFilterLabelActive?: (key: string, value: string, refId?: string) => Promise<boolean>;\n logsFrames?: DataFrame[];\n range: TimeRange;\n onClickFilterValue?: (value: string, refId?: string) => void;\n onClickFilterOutValue?: (value: string, refId?: string) => void;\n loadMoreLogs?(range: AbsoluteTimeRange): void;\n}\n\nexport type LogsVisualisationType = 'table' | 'logs';\n\ninterface State {\n showLabels: boolean;\n showTime: boolean;\n wrapLogMessage: boolean;\n prettifyLogMessage: boolean;\n dedupStrategy: LogsDedupStrategy;\n hiddenLogLevels: LogLevel[];\n logsSortOrder: LogsSortOrder;\n isFlipping: boolean;\n displayedFields: string[];\n forceEscape: boolean;\n contextOpen: boolean;\n contextRow?: LogRowModel;\n tableFrame?: DataFrame;\n visualisationType?: LogsVisualisationType;\n logsContainer?: HTMLDivElement;\n}\n\n// we need to define the order of these explicitly\nconst DEDUP_OPTIONS = [\n LogsDedupStrategy.none,\n LogsDedupStrategy.exact,\n LogsDedupStrategy.numbers,\n LogsDedupStrategy.signature,\n];\n\nconst getDefaultVisualisationType = (): LogsVisualisationType => {\n const visualisationType = store.get(visualisationTypeKey);\n if (visualisationType === 'table') {\n return 'table';\n }\n return 'logs';\n};\n\nclass UnthemedLogs extends PureComponent<Props, State> {\n flipOrderTimer?: number;\n cancelFlippingTimer?: number;\n topLogsRef = createRef<HTMLDivElement>();\n logsVolumeEventBus: EventBus;\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 displayedFields: [],\n forceEscape: false,\n contextOpen: false,\n contextRow: undefined,\n tableFrame: undefined,\n visualisationType: this.props.panelState?.logs?.visualisationType ?? getDefaultVisualisationType(),\n logsContainer: undefined,\n };\n\n constructor(props: Props) {\n super(props);\n this.logsVolumeEventBus = props.eventBus.newScopedBus('logsvolume', { onlyLocal: 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 // If we're unmounting logs (e.g. switching to another datasource), we need to remove the table specific panel state, otherwise it will persist in the explore url\n if (\n this.props?.panelState?.logs?.columns ||\n this.props?.panelState?.logs?.refId ||\n this.props?.panelState?.logs?.labelFieldName\n ) {\n dispatch(\n changePanelState(this.props.exploreId, 'logs', {\n ...this.props.panelState?.logs,\n columns: undefined,\n visualisationType: this.state.visualisationType,\n labelFieldName: undefined,\n refId: undefined,\n })\n );\n }\n }\n\n updatePanelState = (logsPanelState: Partial<ExploreLogsPanelState>) => {\n const state: ExploreItemState | undefined = getState().explore.panes[this.props.exploreId];\n if (state?.panelsState) {\n dispatch(\n changePanelState(this.props.exploreId, 'logs', {\n ...state.panelsState.logs,\n columns: logsPanelState.columns ?? this.props.panelState?.logs?.columns,\n visualisationType: logsPanelState.visualisationType ?? this.state.visualisationType,\n labelFieldName: logsPanelState.labelFieldName,\n refId: logsPanelState.refId ?? this.props.panelState?.logs?.refId,\n })\n );\n }\n };\n\n componentDidUpdate(prevProps: Readonly<Props>): void {\n if (this.props.loading && !prevProps.loading && this.props.panelState?.logs?.id) {\n // loading stopped, so we need to remove any permalinked log lines\n delete this.props.panelState.logs.id;\n\n dispatch(\n changePanelState(this.props.exploreId, 'logs', {\n ...this.props.panelState,\n })\n );\n }\n if (this.props.panelState?.logs?.visualisationType !== prevProps.panelState?.logs?.visualisationType) {\n const visualisationType = this.props.panelState?.logs?.visualisationType ?? getDefaultVisualisationType();\n\n this.setState({\n visualisationType: visualisationType,\n });\n store.set(visualisationTypeKey, visualisationType);\n }\n }\n\n onLogRowHover = (row?: LogRowModel) => {\n if (!row) {\n this.props.eventBus.publish(new DataHoverClearEvent());\n } else {\n this.props.eventBus.publish(\n new DataHoverEvent({\n point: {\n time: row.timeEpochMs,\n },\n })\n );\n }\n };\n\n onLogsContainerRef = (node: HTMLDivElement) => {\n this.setState({ logsContainer: node });\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 onChangeVisualisation = (visualisation: LogsVisualisationType) => {\n this.setState(() => ({\n visualisationType: visualisation,\n }));\n const payload = {\n ...this.props.panelState?.logs,\n visualisationType: visualisation,\n };\n this.updatePanelState(payload);\n\n reportInteraction('grafana_explore_logs_visualisation_changed', {\n newVisualizationType: visualisation,\n datasourceType: this.props.datasourceType ?? 'unknown',\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) => getLogLevelFromKey(level));\n this.setState({ hiddenLogLevels });\n };\n\n onToggleLogsVolumeCollapse = (collapsed: boolean) => {\n this.props.onSetLogsVolumeEnabled(!collapsed);\n reportInteraction('grafana_explore_logs_histogram_toggle_clicked', {\n datasourceType: this.props.datasourceType,\n type: !collapsed ? 'open' : 'close',\n });\n };\n\n onClickScan = (event: React.SyntheticEvent) => {\n event.preventDefault();\n if (this.props.onStartScanning) {\n this.props.onStartScanning();\n reportInteraction('grafana_explore_logs_scanning_button_clicked', {\n type: 'start',\n datasourceType: this.props.datasourceType,\n });\n }\n };\n\n onClickStopScan = (event: React.SyntheticEvent) => {\n event.preventDefault();\n if (this.props.onStopScanning) {\n this.props.onStopScanning();\n }\n };\n\n showField = (key: string) => {\n const index = this.state.displayedFields.indexOf(key);\n\n if (index === -1) {\n this.setState((state) => {\n return {\n displayedFields: state.displayedFields.concat(key),\n };\n });\n }\n };\n\n hideField = (key: string) => {\n const index = this.state.displayedFields.indexOf(key);\n if (index > -1) {\n this.setState((state) => {\n return {\n displayedFields: state.displayedFields.filter((k) => key !== k),\n };\n });\n }\n };\n\n clearDetectedFields = () => {\n this.setState((state) => {\n return {\n displayedFields: [],\n };\n });\n };\n\n onCloseContext = () => {\n this.setState({\n contextOpen: false,\n contextRow: undefined,\n });\n };\n\n onOpenContext = (row: LogRowModel, onClose: () => void) => {\n // we are setting the `contextOpen` open state and passing it down to the `LogRow` in order to highlight the row when a LogContext is open\n this.setState({\n contextOpen: true,\n contextRow: row,\n });\n reportInteraction('grafana_explore_logs_log_context_opened', {\n datasourceType: row.datasourceType,\n logRowUid: row.uid,\n });\n this.onCloseContext = () => {\n this.setState({\n contextOpen: false,\n contextRow: undefined,\n });\n reportInteraction('grafana_explore_logs_log_context_closed', {\n datasourceType: row.datasourceType,\n logRowUid: row.uid,\n });\n onClose();\n };\n };\n\n getPermalinkRange(row: LogRowModel) {\n const range = {\n from: new Date(this.props.absoluteRange.from).toISOString(),\n to: new Date(this.props.absoluteRange.to).toISOString(),\n };\n if (!config.featureToggles.logsInfiniteScrolling) {\n return range;\n }\n\n // With infinite scrolling, the time range of the log line can be after the absolute range or beyond the request line limit, so we need to adjust\n // Look for the previous sibling log, and use its timestamp\n const allLogs = this.props.logRows.filter((logRow) => logRow.dataFrame.refId === row.dataFrame.refId);\n const prevLog = allLogs[allLogs.indexOf(row) - 1];\n\n if (row.timeEpochMs > this.props.absoluteRange.to && !prevLog) {\n // Because there's no sibling and the current `to` is oldest than the log, we have no reference we can use for the interval\n // This only happens when you scroll into the future and you want to share the first log of the list\n return {\n from: new Date(this.props.absoluteRange.from).toISOString(),\n // Slide 1ms otherwise it's very likely to be omitted in the results\n to: new Date(row.timeEpochMs + 1).toISOString(),\n };\n }\n\n return {\n from: new Date(this.props.absoluteRange.from).toISOString(),\n to: new Date(prevLog ? prevLog.timeEpochMs : this.props.absoluteRange.to).toISOString(),\n };\n }\n\n onPermalinkClick = async (row: LogRowModel) => {\n // this is an extra check, to be sure that we are not\n // creating permalinks for logs without an id-field.\n // normally it should never happen, because we do not\n // display the permalink button in such cases.\n if (row.rowId === undefined) {\n return;\n }\n\n // get explore state, add log-row-id and make timerange absolute\n const urlState = getUrlStateFromPaneState(getState().explore.panes[this.props.exploreId]!);\n urlState.panelsState = {\n ...this.props.panelState,\n logs: { id: row.uid, visualisationType: this.state.visualisationType ?? getDefaultVisualisationType() },\n };\n urlState.range = this.getPermalinkRange(row);\n\n // append changed urlState to baseUrl\n const serializedState = serializeStateToUrlParam(urlState);\n const baseUrl = /.*(?=\\/explore)/.exec(`${window.location.href}`)![0];\n const url = urlUtil.renderUrl(`${baseUrl}/explore`, { left: serializedState });\n await createAndCopyShortLink(url);\n\n reportInteraction('grafana_explore_logs_permalink_clicked', {\n datasourceType: row.datasourceType ?? 'unknown',\n logRowUid: row.uid,\n logRowLevel: row.logLevel,\n });\n };\n\n scrollIntoView = (element: HTMLElement) => {\n if (config.featureToggles.logsInfiniteScrolling) {\n if (this.state.logsContainer) {\n this.topLogsRef.current?.scrollIntoView();\n this.state.logsContainer.scroll({\n behavior: 'smooth',\n top: this.state.logsContainer.scrollTop + element.getBoundingClientRect().top - window.innerHeight / 2,\n });\n }\n\n return;\n }\n const { scrollElement } = this.props;\n\n if (scrollElement) {\n scrollElement.scroll({\n behavior: 'smooth',\n top: scrollElement.scrollTop + element.getBoundingClientRect().top - window.innerHeight / 2,\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 = () => {\n if (config.featureToggles.logsInfiniteScrolling) {\n if (this.state.logsContainer) {\n this.state.logsContainer.scroll({\n behavior: 'auto',\n top: 0,\n });\n }\n }\n this.topLogsRef.current?.scrollIntoView();\n };\n\n render() {\n const {\n width,\n splitOpen,\n logRows,\n logsMeta,\n logsVolumeEnabled,\n logsVolumeData,\n loadLogsVolumeData,\n loading = false,\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 getRowContext,\n getLogRowContextUi,\n getRowContextQuery,\n loadMoreLogs,\n } = this.props;\n\n const {\n showLabels,\n showTime,\n wrapLogMessage,\n prettifyLogMessage,\n dedupStrategy,\n hiddenLogLevels,\n logsSortOrder,\n isFlipping,\n displayedFields,\n forceEscape,\n contextOpen,\n contextRow,\n } = this.state;\n\n const tableHeight = getLogsTableHeight();\n const styles = getStyles(theme, wrapLogMessage, tableHeight);\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 {getRowContext && contextRow && (\n <LogRowContextModal\n open={contextOpen}\n row={contextRow}\n onClose={this.onCloseContext}\n getRowContext={(row, options) => getRowContext(row, contextRow, options)}\n getRowContextQuery={getRowContextQuery}\n getLogRowContextUi={getLogRowContextUi}\n logsSortOrder={logsSortOrder}\n timeZone={timeZone}\n />\n )}\n <PanelChrome\n title=\"Logs volume\"\n collapsible\n collapsed={!logsVolumeEnabled}\n onToggleCollapse={this.onToggleLogsVolumeCollapse}\n >\n {logsVolumeEnabled && (\n <LogsVolumePanelList\n absoluteRange={absoluteRange}\n width={width}\n logsVolumeData={logsVolumeData}\n onUpdateTimeRange={onChangeTime}\n timeZone={timeZone}\n splitOpen={splitOpen}\n onLoadLogsVolume={loadLogsVolumeData}\n onHiddenSeriesChanged={this.onToggleLogLevel}\n eventBus={this.logsVolumeEventBus}\n onClose={() => this.onToggleLogsVolumeCollapse(true)}\n />\n )}\n </PanelChrome>\n <PanelChrome\n titleItems={[\n config.featureToggles.logsExploreTableVisualisation ? (\n this.state.visualisationType === 'logs' ? null : (\n <PanelChrome.TitleItem title=\"Feedback\" key=\"A\">\n <LogsFeedback feedbackUrl=\"https://forms.gle/5YyKdRQJ5hzq4c289\" />\n </PanelChrome.TitleItem>\n )\n ) : null,\n ]}\n title={'Logs'}\n actions={\n <>\n {config.featureToggles.logsExploreTableVisualisation && (\n <div className={styles.visualisationType}>\n <RadioButtonGroup\n className={styles.visualisationTypeRadio}\n options={[\n {\n label: 'Logs',\n value: 'logs',\n description: 'Show results in logs visualisation',\n },\n {\n label: 'Table',\n value: 'table',\n description: 'Show results in table visualisation',\n },\n ]}\n size=\"sm\"\n value={this.state.visualisationType}\n onChange={this.onChangeVisualisation}\n />\n </div>\n )}\n </>\n }\n loadingState={loading ? LoadingState.Loading : LoadingState.Done}\n >\n <div className={styles.stickyNavigation}>\n {this.state.visualisationType !== 'table' && (\n <div className={styles.logOptions}>\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=\"Deduplication\" className={styles.horizontalInlineLabel} transparent>\n <RadioButtonGroup\n options={DEDUP_OPTIONS.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\n <div>\n <InlineField\n label=\"Display results\"\n className={styles.horizontalInlineLabel}\n transparent\n disabled={isFlipping || loading}\n >\n <RadioButtonGroup\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 )}\n <div ref={this.topLogsRef} />\n <LogsMetaRow\n logRows={logRows}\n meta={logsMeta || []}\n dedupStrategy={dedupStrategy}\n dedupCount={dedupCount}\n hasUnescapedContent={hasUnescapedContent}\n forceEscape={forceEscape}\n displayedFields={displayedFields}\n onEscapeNewlines={this.onEscapeNewlines}\n clearDetectedFields={this.clearDetectedFields}\n />\n </div>\n <div\n className={cx(styles.logsSection, this.state.visualisationType === 'table' ? styles.logsTable : undefined)}\n >\n {this.state.visualisationType === 'table' && hasData && (\n <div className={styles.logRows} data-testid=\"logRowsTable\">\n {/* Width should be full width minus logs navigation and padding */}\n <LogsTableWrap\n logsSortOrder={this.state.logsSortOrder}\n range={this.props.range}\n splitOpen={this.props.splitOpen}\n timeZone={timeZone}\n width={width - 80}\n logsFrames={this.props.logsFrames ?? []}\n onClickFilterLabel={onClickFilterLabel}\n onClickFilterOutLabel={onClickFilterOutLabel}\n panelState={this.props.panelState?.logs}\n theme={theme}\n updatePanelState={this.updatePanelState}\n datasourceType={this.props.datasourceType}\n />\n </div>\n )}\n {this.state.visualisationType === 'logs' && hasData && (\n <div\n className={config.featureToggles.logsInfiniteScrolling ? styles.scrollableLogRows : styles.logRows}\n data-testid=\"logRows\"\n ref={this.onLogsContainerRef}\n >\n <InfiniteScroll\n loading={loading}\n loadMoreLogs={loadMoreLogs}\n range={this.props.range}\n timeZone={timeZone}\n rows={logRows}\n scrollElement={this.state.logsContainer}\n sortOrder={logsSortOrder}\n >\n <LogRows\n logRows={logRows}\n deduplicatedRows={dedupedRows}\n dedupStrategy={dedupStrategy}\n onClickFilterLabel={onClickFilterLabel}\n onClickFilterOutLabel={onClickFilterOutLabel}\n showContextToggle={showContextToggle}\n getRowContextQuery={getRowContextQuery}\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 displayedFields={displayedFields}\n onClickShowField={this.showField}\n onClickHideField={this.hideField}\n app={CoreApp.Explore}\n onLogRowHover={this.onLogRowHover}\n onOpenContext={this.onOpenContext}\n onPermalinkClick={this.onPermalinkClick}\n permalinkedRowId={this.props.panelState?.logs?.id}\n scrollIntoView={this.scrollIntoView}\n isFilterLabelActive={this.props.isFilterLabelActive}\n containerRendered={!!this.state.logsContainer}\n onClickFilterValue={this.props.onClickFilterValue}\n onClickFilterOutValue={this.props.onClickFilterOutValue}\n />\n </InfiniteScroll>\n </div>\n )}\n {!loading && !hasData && !scanning && (\n <div className={styles.logRows}>\n <div className={styles.noData}>\n No logs found.\n <Button size=\"sm\" variant=\"secondary\" onClick={this.onClickScan}>\n Scan for older logs\n </Button>\n </div>\n </div>\n )}\n {scanning && (\n <div className={styles.logRows}>\n <div className={styles.noData}>\n <span>{scanText}</span>\n <Button size=\"sm\" variant=\"secondary\" onClick={this.onClickStopScan}>\n Stop scan\n </Button>\n </div>\n </div>\n )}\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 </PanelChrome>\n </>\n );\n }\n}\n\nexport const Logs = withTheme2(UnthemedLogs);\n\nconst getStyles = (theme: GrafanaTheme2, wrapLogMessage: boolean, tableHeight: number) => {\n return {\n noData: css({\n '& > *': {\n marginLeft: '0.5em',\n },\n }),\n logOptions: css({\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'baseline',\n flexWrap: 'wrap',\n backgroundColor: theme.colors.background.primary,\n padding: `${theme.spacing(1)} ${theme.spacing(2)}`,\n borderRadius: theme.shape.radius.default,\n margin: `${theme.spacing(0, 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 marginRight: '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 flexDirection: 'row',\n justifyContent: 'space-between',\n }),\n logsTable: css({\n maxHeight: `${tableHeight}px`,\n }),\n scrollableLogRows: css({\n overflowY: 'scroll',\n width: '100%',\n maxHeight: '75vh',\n }),\n logRows: css({\n overflowX: `${wrapLogMessage ? 'unset' : 'scroll'}`,\n overflowY: 'visible',\n width: '100%',\n }),\n visualisationType: css({\n display: 'flex',\n flex: '1',\n justifyContent: 'space-between',\n }),\n visualisationTypeRadio: css({\n margin: `0 0 0 ${theme.spacing(1)}`,\n }),\n stickyNavigation: css({\n overflow: 'visible',\n ...(config.featureToggles.logsInfiniteScrolling && { marginBottom: '0px' }),\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 React, { PureComponent } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport {\n AbsoluteTimeRange,\n Field,\n hasLogsContextSupport,\n hasLogsContextUiSupport,\n LoadingState,\n LogRowModel,\n RawTimeRange,\n EventBus,\n SplitOpen,\n DataFrame,\n SupplementaryQueryType,\n DataQueryResponse,\n LogRowContextOptions,\n DataSourceWithLogsContextSupport,\n DataSourceApi,\n hasToggleableQueryFiltersSupport,\n DataSourceWithQueryModificationSupport,\n hasQueryModificationSupport,\n} from '@grafana/data';\nimport { getDataSourceSrv } from '@grafana/runtime';\nimport { DataQuery } from '@grafana/schema';\nimport { Collapse } from '@grafana/ui';\nimport { MIXED_DATASOURCE_NAME } from 'app/plugins/datasource/mixed/MixedDataSource';\nimport { StoreState } from 'app/types';\nimport { ExploreItemState } from 'app/types/explore';\n\nimport { getTimeZone } from '../../profile/state/selectors';\nimport {\n addResultsToCache,\n clearCache,\n loadSupplementaryQueryData,\n selectIsWaitingForData,\n setSupplementaryQueryEnabled,\n} from '../state/query';\nimport { updateTimeRange, loadMoreLogs } from '../state/time';\nimport { LiveTailControls } from '../useLiveTailControls';\nimport { getFieldLinksForExplore } from '../utils/links';\n\nimport { LiveLogsWithTheme } from './LiveLogs';\nimport { Logs } from './Logs';\nimport { LogsCrossFadeTransition } from './utils/LogsCrossFadeTransition';\n\ninterface LogsContainerProps extends PropsFromRedux {\n width: number;\n exploreId: string;\n scanRange?: RawTimeRange;\n syncedTimes: boolean;\n loadingState: LoadingState;\n onClickFilterLabel: (key: string, value: string, frame?: DataFrame) => void;\n onClickFilterOutLabel: (key: string, value: string, frame?: DataFrame) => void;\n onStartScanning: () => void;\n onStopScanning: () => void;\n eventBus: EventBus;\n splitOpenFn: SplitOpen;\n scrollElement?: HTMLDivElement;\n isFilterLabelActive: (key: string, value: string, refId?: string) => Promise<boolean>;\n onClickFilterValue: (value: string, refId?: string) => void;\n onClickFilterOutValue: (value: string, refId?: string) => void;\n}\n\ntype DataSourceInstance =\n | DataSourceApi<DataQuery>\n | (DataSourceApi<DataQuery> & DataSourceWithLogsContextSupport<DataQuery>)\n | (DataSourceApi<DataQuery> & DataSourceWithQueryModificationSupport<DataQuery>);\n\ninterface LogsContainerState {\n dsInstances: Record<string, DataSourceInstance>;\n}\n\nclass LogsContainer extends PureComponent<LogsContainerProps, LogsContainerState> {\n state: LogsContainerState = {\n dsInstances: {},\n };\n\n componentDidMount() {\n this.updateDataSourceInstances();\n }\n\n componentDidUpdate(prevProps: LogsContainerProps) {\n if (prevProps.logsQueries !== this.props.logsQueries) {\n this.updateDataSourceInstances();\n }\n }\n\n private updateDataSourceInstances() {\n const { logsQueries, datasourceInstance } = this.props;\n if (!logsQueries || !datasourceInstance) {\n return;\n }\n\n const dsInstances: Record<string, DataSourceInstance> = {};\n\n // Not in mixed mode.\n if (datasourceInstance.uid !== MIXED_DATASOURCE_NAME) {\n logsQueries.forEach(({ refId }) => {\n dsInstances[refId] = datasourceInstance;\n });\n this.setState({ dsInstances });\n return;\n }\n\n // Mixed mode.\n const dsPromises: Array<Promise<{ ds: DataSourceApi; refId: string }>> = [];\n for (const query of logsQueries) {\n if (!query.datasource) {\n continue;\n }\n const mustCheck = !dsInstances[query.refId] || dsInstances[query.refId].uid !== query.datasource.uid;\n if (mustCheck) {\n dsPromises.push(\n new Promise((resolve) => {\n getDataSourceSrv()\n .get(query.datasource)\n .then((ds) => {\n resolve({ ds, refId: query.refId });\n });\n })\n );\n }\n }\n\n if (!dsPromises.length) {\n return;\n }\n\n Promise.all(dsPromises).then((instances) => {\n instances.forEach(({ ds, refId }) => {\n dsInstances[refId] = ds;\n });\n this.setState({ dsInstances });\n });\n }\n\n onChangeTime = (absoluteRange: AbsoluteTimeRange) => {\n const { exploreId, updateTimeRange } = this.props;\n updateTimeRange({ exploreId, absoluteRange });\n };\n\n loadMoreLogs = (absoluteRange: AbsoluteTimeRange) => {\n const { exploreId, loadMoreLogs } = this.props;\n loadMoreLogs({ exploreId, absoluteRange });\n };\n\n private getQuery(\n logsQueries: DataQuery[] | undefined,\n row: LogRowModel,\n datasourceInstance: DataSourceApi<DataQuery> & DataSourceWithLogsContextSupport<DataQuery>\n ) {\n // we need to find the query, and we need to be very sure that it's a query\n // from this datasource\n return (logsQueries ?? []).find(\n (q) => q.refId === row.dataFrame.refId && q.datasource != null && q.datasource.type === datasourceInstance.type\n );\n }\n\n getLogRowContext = async (\n row: LogRowModel,\n origRow: LogRowModel,\n options: LogRowContextOptions\n ): Promise<DataQueryResponse | []> => {\n const { logsQueries } = this.props;\n\n if (!origRow.dataFrame.refId || !this.state.dsInstances[origRow.dataFrame.refId]) {\n return Promise.resolve([]);\n }\n\n const ds = this.state.dsInstances[origRow.dataFrame.refId];\n if (!hasLogsContextSupport(ds)) {\n return Promise.resolve([]);\n }\n\n const query = this.getQuery(logsQueries, origRow, ds);\n return query ? ds.getLogRowContext(row, options, query) : Promise.resolve([]);\n };\n\n getLogRowContextQuery = async (\n row: LogRowModel,\n options?: LogRowContextOptions,\n cacheFilters = true\n ): Promise<DataQuery | null> => {\n const { logsQueries } = this.props;\n\n if (!row.dataFrame.refId || !this.state.dsInstances[row.dataFrame.refId]) {\n return Promise.resolve(null);\n }\n\n const ds = this.state.dsInstances[row.dataFrame.refId];\n if (!hasLogsContextSupport(ds)) {\n return Promise.resolve(null);\n }\n\n const query = this.getQuery(logsQueries, row, ds);\n return query && ds.getLogRowContextQuery\n ? ds.getLogRowContextQuery(row, options, query, cacheFilters)\n : Promise.resolve(null);\n };\n\n getLogRowContextUi = (row: LogRowModel, runContextQuery?: () => void): React.ReactNode => {\n const { logsQueries } = this.props;\n\n if (!row.dataFrame.refId || !this.state.dsInstances[row.dataFrame.refId]) {\n return <></>;\n }\n\n const ds = this.state.dsInstances[row.dataFrame.refId];\n if (!hasLogsContextSupport(ds)) {\n return <></>;\n }\n\n const query = this.getQuery(logsQueries, row, ds);\n return query && hasLogsContextUiSupport(ds) && ds.getLogRowContextUi ? (\n ds.getLogRowContextUi(row, runContextQuery, query)\n ) : (\n <></>\n );\n };\n\n showContextToggle = (row?: LogRowModel): boolean => {\n if (!row?.dataFrame.refId || !this.state.dsInstances[row.dataFrame.refId]) {\n return false;\n }\n return hasLogsContextSupport(this.state.dsInstances[row.dataFrame.refId]);\n };\n\n getFieldLinks = (field: Field, rowIndex: number, dataFrame: DataFrame) => {\n const { splitOpenFn, range } = this.props;\n return getFieldLinksForExplore({ field, rowIndex, splitOpenFn, range, dataFrame });\n };\n\n logDetailsFilterAvailable = () => {\n return Object.values(this.state.dsInstances).some(\n (ds) => ds?.modifyQuery || hasQueryModificationSupport(ds) || hasToggleableQueryFiltersSupport(ds)\n );\n };\n\n filterValueAvailable = () => {\n return Object.values(this.state.dsInstances).some(\n (ds) => hasQueryModificationSupport(ds) && ds?.getSupportedQueryModifications().includes('ADD_STRING_FILTER')\n );\n };\n\n filterOutValueAvailable = () => {\n return Object.values(this.state.dsInstances).some(\n (ds) => hasQueryModificationSupport(ds) && ds?.getSupportedQueryModifications().includes('ADD_STRING_FILTER_OUT')\n );\n };\n\n addResultsToCache = () => {\n this.props.addResultsToCache(this.props.exploreId);\n };\n\n clearCache = () => {\n this.props.clearCache(this.props.exploreId);\n };\n\n render() {\n const {\n loading,\n loadingState,\n logRows,\n logsMeta,\n logsSeries,\n logsQueries,\n loadSupplementaryQueryData,\n setSupplementaryQueryEnabled,\n onClickFilterLabel,\n onClickFilterOutLabel,\n onStartScanning,\n onStopScanning,\n absoluteRange,\n timeZone,\n visibleRange,\n scanning,\n range,\n width,\n splitOpenFn,\n isLive,\n exploreId,\n logsVolume,\n scrollElement,\n } = this.props;\n\n if (!logRows) {\n return null;\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 onClear={controls.clear}\n clearedAtIndex={this.props.clearedAtIndex}\n />\n )}\n </LiveTailControls>\n </Collapse>\n </LogsCrossFadeTransition>\n <LogsCrossFadeTransition visible={!isLive}>\n <Logs\n exploreId={exploreId}\n datasourceType={this.props.datasourceInstance?.type}\n logRows={logRows}\n logsMeta={logsMeta}\n logsSeries={logsSeries}\n logsVolumeEnabled={logsVolume.enabled}\n onSetLogsVolumeEnabled={(enabled) =>\n setSupplementaryQueryEnabled(exploreId, enabled, SupplementaryQueryType.LogsVolume)\n }\n logsVolumeData={logsVolume.data}\n logsQueries={logsQueries}\n width={width}\n splitOpen={splitOpenFn}\n loading={loading}\n loadingState={loadingState}\n loadLogsVolumeData={() => loadSupplementaryQueryData(exploreId, SupplementaryQueryType.LogsVolume)}\n onChangeTime={this.onChangeTime}\n loadMoreLogs={this.loadMoreLogs}\n onClickFilterLabel={this.logDetailsFilterAvailable() ? onClickFilterLabel : undefined}\n onClickFilterOutLabel={this.logDetailsFilterAvailable() ? onClickFilterOutLabel : undefined}\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 getRowContextQuery={this.getLogRowContextQuery}\n getLogRowContextUi={this.getLogRowContextUi}\n getFieldLinks={this.getFieldLinks}\n addResultsToCache={this.addResultsToCache}\n clearCache={this.clearCache}\n eventBus={this.props.eventBus}\n panelState={this.props.panelState}\n logsFrames={this.props.logsFrames}\n scrollElement={scrollElement}\n isFilterLabelActive={this.logDetailsFilterAvailable() ? this.props.isFilterLabelActive : undefined}\n range={range}\n onClickFilterValue={this.filterValueAvailable() ? this.props.onClickFilterValue : undefined}\n onClickFilterOutValue={this.filterOutValueAvailable() ? this.props.onClickFilterOutValue : undefined}\n />\n </LogsCrossFadeTransition>\n </>\n );\n }\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: string }) {\n const explore = state.explore;\n const item: ExploreItemState = explore.panes[exploreId]!;\n const {\n logsResult,\n scanning,\n datasourceInstance,\n isLive,\n isPaused,\n clearedAtIndex,\n range,\n absoluteRange,\n supplementaryQueries,\n } = item;\n const loading = selectIsWaitingForData(exploreId)(state);\n const panelState = item.panelsState;\n const timeZone = getTimeZone(state.user);\n const logsVolume = supplementaryQueries[SupplementaryQueryType.LogsVolume];\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 clearedAtIndex,\n range,\n absoluteRange,\n logsVolume,\n panelState,\n logsFrames: item.queryResponse.logsFrames,\n };\n}\n\nconst mapDispatchToProps = {\n updateTimeRange,\n loadMoreLogs,\n addResultsToCache,\n clearCache,\n loadSupplementaryQueryData,\n setSupplementaryQueryEnabled,\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 from 'react';\n\nimport {\n DataQueryResponse,\n DataSourceApi,\n GrafanaTheme2,\n hasSupplementaryQuerySupport,\n LoadingState,\n LogsDedupStrategy,\n SplitOpen,\n SupplementaryQueryType,\n} from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime';\nimport { DataQuery, TimeZone } from '@grafana/schema';\nimport { Button, Collapse, Icon, Tooltip, useStyles2 } from '@grafana/ui';\nimport store from 'app/core/store';\n\nimport { LogRows } from '../../logs/components/LogRows';\nimport { dataFrameToLogsModel } from '../../logs/logsModel';\nimport { SupplementaryResultError } from '../SupplementaryResultError';\n\nimport { SETTINGS_KEYS } from './utils/logs';\n\ntype Props = {\n queryResponse: DataQueryResponse | undefined;\n enabled: boolean;\n timeZone: TimeZone;\n queries: DataQuery[];\n datasourceInstance: DataSourceApi | null | undefined;\n splitOpen: SplitOpen;\n setLogsSampleEnabled: (enabled: boolean) => void;\n};\n\nexport function LogsSamplePanel(props: Props) {\n const { queryResponse, timeZone, enabled, setLogsSampleEnabled, datasourceInstance, queries, splitOpen } = props;\n\n const styles = useStyles2(getStyles);\n const onToggleLogsSampleCollapse = (isOpen: boolean) => {\n setLogsSampleEnabled(isOpen);\n reportInteraction('grafana_explore_logs_sample_toggle_clicked', {\n datasourceType: datasourceInstance?.type ?? 'unknown',\n type: isOpen ? 'open' : 'close',\n });\n };\n\n const OpenInSplitViewButton = () => {\n if (!datasourceInstance) {\n return null;\n }\n if (!hasSupplementaryQuerySupport(datasourceInstance, SupplementaryQueryType.LogsSample)) {\n return null;\n }\n\n const logSampleQueries = queries\n .map((query) => datasourceInstance.getSupplementaryQuery({ type: SupplementaryQueryType.LogsSample }, query))\n .filter((query): query is DataQuery => !!query);\n\n if (!logSampleQueries.length) {\n return null;\n }\n\n const onSplitOpen = () => {\n splitOpen({ queries: logSampleQueries, datasourceUid: datasourceInstance.uid });\n reportInteraction('grafana_explore_logs_sample_split_button_clicked', {\n datasourceType: datasourceInstance?.type ?? 'unknown',\n queriesCount: logSampleQueries.length,\n });\n };\n\n return (\n <Button size=\"sm\" className={styles.logSamplesButton} onClick={onSplitOpen}>\n Open logs in split view\n </Button>\n );\n };\n\n let LogsSamplePanelContent: JSX.Element | null;\n\n if (queryResponse === undefined) {\n LogsSamplePanelContent = null;\n } else if (queryResponse.error !== undefined) {\n LogsSamplePanelContent = (\n <SupplementaryResultError error={queryResponse.error} title=\"Failed to load logs sample for this query\" />\n );\n } else if (queryResponse.state === LoadingState.Loading) {\n LogsSamplePanelContent = <span>Logs sample is loading...</span>;\n } else if (queryResponse.data.length === 0 || queryResponse.data.every((frame) => frame.length === 0)) {\n LogsSamplePanelContent = <span>No logs sample data.</span>;\n } else {\n const logs = dataFrameToLogsModel(queryResponse.data);\n LogsSamplePanelContent = (\n <>\n <OpenInSplitViewButton />\n <div className={styles.logContainer}>\n <LogRows\n logRows={logs.rows}\n dedupStrategy={LogsDedupStrategy.none}\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 timeZone={timeZone}\n enableLogDetails={true}\n />\n </div>\n </>\n );\n }\n\n return queryResponse?.state !== LoadingState.NotStarted ? (\n <Collapse\n label={\n <div>\n Logs sample\n <Tooltip content=\"Show log lines that contributed to visualized metrics\">\n <Icon name=\"info-circle\" className={styles.infoTooltip} />\n </Tooltip>\n </div>\n }\n isOpen={enabled}\n collapsible={true}\n onToggle={onToggleLogsSampleCollapse}\n >\n {LogsSamplePanelContent}\n </Collapse>\n ) : null;\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n logSamplesButton: css`\n position: absolute;\n top: ${theme.spacing(1)};\n right: ${theme.spacing(1)};\n `,\n logContainer: css`\n overflow: scroll;\n `,\n infoTooltip: css`\n margin-left: ${theme.spacing(1)};\n `,\n };\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 borderRadius: theme.shape.radius.default,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n flexGrow: 1,\n }),\n message: css({\n fontSize: 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 { GrafanaTheme2 } from '@grafana/data';\nimport { LinkButton, CallToActionCard, Icon, useStyles2 } from '@grafana/ui';\nimport { contextSrv } from 'app/core/core';\nimport { AccessControlAction } from 'app/types';\n\nfunction getCardStyles(theme: GrafanaTheme2) {\n return css({\n maxWidth: `${theme.breakpoints.values.lg}px`,\n marginTop: theme.spacing(2),\n alignSelf: 'center',\n });\n}\n\nexport const NoDataSourceCallToAction = () => {\n const cardStyles = useStyles2(getCardStyles);\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/?utm_source=explore#data-sources\"\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 return <CallToActionCard callToActionElement={ctaElement} className={cardStyles} footer={footer} message={message} />;\n};\n","import { css } from '@emotion/css';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\nimport { useToggle, useWindowSize } from 'react-use';\n\nimport { applyFieldOverrides, DataFrame, GrafanaTheme2, SplitOpen } from '@grafana/data';\nimport { config, reportInteraction } from '@grafana/runtime';\nimport { useStyles2, useTheme2, PanelChrome } from '@grafana/ui';\n\nimport { NodeGraph } from '../../../plugins/panel/nodeGraph';\nimport { useCategorizeFrames } from '../../../plugins/panel/nodeGraph/useCategorizeFrames';\nimport { StoreState } from '../../../types';\nimport { useLinks } from '../utils/links';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n warningText: css`\n label: warningText;\n display: flex;\n align-items: center;\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: string;\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 splitOpenFn: SplitOpen;\n}\n\ntype Props = OwnProps & ConnectedProps<typeof connector>;\n\nexport function UnconnectedNodeGraphContainer(props: Props) {\n const { dataFrames, range, splitOpenFn, withTraceView, datasourceType } = props;\n const getLinks = useLinks(range, splitOpenFn);\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 [collapsed, toggleCollapsed] = useToggle(true);\n\n const toggled = () => {\n toggleCollapsed();\n reportInteraction('grafana_traces_node_graph_panel_clicked', {\n datasourceType: datasourceType,\n grafana_version: config.buildInfo.version,\n isExpanded: !open,\n });\n };\n\n // Calculate node graph height based on window and top position, with some padding\n const { height: windowHeight } = useWindowSize();\n const containerRef = useRef<HTMLDivElement>(null);\n const [top, setTop] = useState(250);\n useEffect(() => {\n if (containerRef.current) {\n const { top } = containerRef.current.getBoundingClientRect();\n setTop(top);\n }\n }, [containerRef]);\n const height = windowHeight - top - 32;\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 <PanelChrome\n title={`Node graph`}\n titleItems={countWarning}\n // We allow collapsing this only when it is shown together with trace view.\n collapsible={!!withTraceView}\n collapsed={withTraceView ? collapsed : false}\n onToggleCollapse={withTraceView ? toggled : undefined}\n >\n <div\n ref={containerRef}\n style={\n withTraceView\n ? { height: 500 }\n : {\n minHeight: 600,\n height,\n }\n }\n >\n <NodeGraph dataFrames={frames} getLinks={getLinks} />\n </div>\n </PanelChrome>\n );\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: OwnProps) {\n return {\n range: state.explore.panes[exploreId]!.range,\n };\n}\n\nconst connector = connect(mapStateToProps, {});\nexport const NodeGraphContainer = connector(UnconnectedNodeGraphContainer);\n","import { createSelector } from '@reduxjs/toolkit';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { CoreApp } from '@grafana/data';\nimport { reportInteraction } from '@grafana/runtime';\nimport { DataQuery } from '@grafana/schema';\nimport { getNextRefIdChar } from 'app/core/utils/query';\nimport { useDispatch, useSelector } from 'app/types';\n\nimport { getDatasourceSrv } from '../plugins/datasource_srv';\nimport { QueryEditorRows } from '../query/components/QueryEditorRows';\n\nimport { changeQueries, runQueries } from './state/query';\nimport { getExploreItemSelector } from './state/selectors';\n\ninterface Props {\n exploreId: string;\n}\n\nconst makeSelectors = (exploreId: string) => {\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(changeQueries({ exploreId, queries: newQueries }));\n },\n [dispatch, exploreId]\n );\n\n const onAddQuery = useCallback(\n (query: DataQuery) => {\n onChange([...queries, { ...query, refId: getNextRefIdChar(queries) }]);\n },\n [onChange, queries]\n );\n\n const onQueryCopied = () => {\n reportInteraction('grafana_explore_query_row_copy');\n };\n\n const onQueryRemoved = () => {\n reportInteraction('grafana_explore_query_row_remove');\n };\n\n const onQueryToggled = (queryStatus?: boolean) => {\n reportInteraction('grafana_query_row_toggle', queryStatus === undefined ? {} : { queryEnabled: queryStatus });\n };\n\n return (\n <QueryEditorRows\n dsSettings={dsSettings}\n queries={queries}\n onQueriesChange={onChange}\n onAddQuery={onAddQuery}\n onRunQueries={onRunQueries}\n onQueryCopied={onQueryCopied}\n onQueryRemoved={onQueryRemoved}\n onQueryToggled={onQueryToggled}\n data={queryResponse}\n app={CoreApp.Explore}\n history={history}\n eventBus={eventBridge}\n />\n );\n};\n","import { css } from '@emotion/css';\nimport { cloneDeep } from 'lodash';\nimport React, { useEffect, useId, useRef, useState } from 'react';\nimport { useWindowSize } from 'react-use';\nimport { VariableSizeList as List } from 'react-window';\n\nimport { DataFrame, Field as DataFrameField } from '@grafana/data/';\nimport { reportInteraction } from '@grafana/runtime/src';\nimport { Field, Switch } from '@grafana/ui/';\n\nimport { ItemLabels } from './ItemLabels';\nimport RawListItem from './RawListItem';\nimport {\n getRawPrometheusListItemsFromDataFrame,\n RawPrometheusListItemEmptyValue,\n} from './utils/getRawPrometheusListItemsFromDataFrame';\n\nexport type instantQueryRawVirtualizedListData = { Value: string; __name__: string; [index: string]: string };\n\nexport interface RawListContainerProps {\n tableResult: DataFrame;\n}\n\nconst styles = {\n wrapper: css`\n height: 100%;\n overflow: scroll;\n `,\n switchWrapper: css`\n display: flex;\n flex-direction: row;\n margin-bottom: 0;\n `,\n switchLabel: css`\n margin-left: 15px;\n margin-bottom: 0;\n `,\n switch: css`\n margin-left: 10px;\n `,\n resultCount: css`\n margin-bottom: 4px;\n `,\n header: css`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px 0;\n font-size: 12px;\n line-height: 1.25;\n `,\n};\n\nconst mobileWidthThreshold = 480;\nconst numberOfColumnsBeforeExpandedViewIsDefault = 2;\n\n/**\n * The container that provides the virtualized list to the child components\n * @param props\n * @constructor\n */\nconst RawListContainer = (props: RawListContainerProps) => {\n const { tableResult } = props;\n const dataFrame = cloneDeep(tableResult);\n const listRef = useRef<List | null>(null);\n\n const valueLabels = dataFrame.fields.filter((field) => field.name.includes('Value'));\n const items = getRawPrometheusListItemsFromDataFrame(dataFrame);\n const { width } = useWindowSize();\n const [isExpandedView, setIsExpandedView] = useState(\n width <= mobileWidthThreshold || valueLabels.length > numberOfColumnsBeforeExpandedViewIsDefault\n );\n\n const onContentClick = () => {\n setIsExpandedView(!isExpandedView);\n const props = {\n isExpanded: !isExpandedView,\n };\n reportInteraction('grafana_explore_prometheus_instant_query_ui_raw_toggle_expand', props);\n };\n\n useEffect(() => {\n // After the expanded view has updated, tell the list to re-render\n listRef.current?.resetAfterIndex(0, true);\n }, [isExpandedView]);\n\n const calculateInitialHeight = (length: number): number => {\n const maxListHeight = 600;\n const shortListLength = 10;\n\n if (length < shortListLength) {\n let sum = 0;\n for (let i = 0; i < length; i++) {\n sum += getListItemHeight(i, true);\n }\n\n return Math.min(maxListHeight, sum);\n }\n\n return maxListHeight;\n };\n\n const getListItemHeight = (itemIndex: number, isExpandedView: boolean) => {\n const singleLineHeight = 32;\n const additionalLineHeight = 22;\n if (!isExpandedView) {\n return singleLineHeight;\n }\n const item = items[itemIndex];\n\n // Height of 1.5 lines, plus the number of non-value attributes times the height of additional lines\n return 1.5 * singleLineHeight + (Object.keys(item).length - valueLabels.length) * additionalLineHeight;\n };\n\n const switchId = `isExpandedView ${useId()}`;\n\n return (\n <section>\n <header className={styles.header}>\n <Field className={styles.switchWrapper} label={`Expand results`} htmlFor={'isExpandedView'}>\n <div className={styles.switch}>\n <Switch onChange={onContentClick} id={switchId} value={isExpandedView} label={`Expand results`} />\n </div>\n </Field>\n\n <div className={styles.resultCount}>Result series: {items.length}</div>\n </header>\n\n <div role={'table'}>\n {\n <>\n {/* Show the value headings above all the values, but only if we're in the contracted view */}\n {valueLabels.length > 1 && !isExpandedView && (\n <ItemLabels valueLabels={valueLabels} expanded={isExpandedView} />\n )}\n <List\n ref={listRef}\n itemCount={items.length}\n className={styles.wrapper}\n itemSize={(index) => getListItemHeight(index, isExpandedView)}\n height={calculateInitialHeight(items.length)}\n width=\"100%\"\n >\n {({ index, style }) => {\n let filteredValueLabels: DataFrameField[] | undefined;\n if (isExpandedView) {\n filteredValueLabels = valueLabels.filter((valueLabel) => {\n const itemWithValue = items[index][valueLabel.name];\n return itemWithValue && itemWithValue !== RawPrometheusListItemEmptyValue;\n });\n }\n\n return (\n <div role=\"row\" style={{ ...style, overflow: 'hidden' }}>\n <RawListItem\n isExpandedView={isExpandedView}\n valueLabels={filteredValueLabels}\n totalNumberOfValues={valueLabels.length}\n listKey={items[index].__name__}\n listItemData={items[index]}\n />\n </div>\n );\n }}\n </List>\n </>\n }\n </div>\n </section>\n );\n};\n\nexport default RawListContainer;\n","import { css } from '@emotion/css';\nimport React, { PureComponent } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { applyFieldOverrides, DataFrame, SelectableValue, SplitOpen } from '@grafana/data';\nimport { getTemplateSrv, reportInteraction } from '@grafana/runtime';\nimport { TimeZone } from '@grafana/schema';\nimport { RadioButtonGroup, Table, AdHocFilterItem, PanelChrome } from '@grafana/ui';\nimport { config } from 'app/core/config';\nimport { PANEL_BORDER } from 'app/core/constants';\nimport { StoreState, TABLE_RESULTS_STYLE } from 'app/types';\nimport { ExploreItemState, TABLE_RESULTS_STYLES, TableResultsStyle } from 'app/types/explore';\n\nimport { MetaInfoText } from '../MetaInfoText';\nimport RawListContainer from '../PrometheusListView/RawListContainer';\nimport { exploreDataLinkPostProcessorFactory } from '../utils/links';\n\ninterface RawPrometheusContainerProps {\n ariaLabel?: string;\n exploreId: string;\n width: number;\n timeZone: TimeZone;\n onCellFilterAdded?: (filter: AdHocFilterItem) => void;\n showRawPrometheus?: boolean;\n splitOpenFn: SplitOpen;\n}\n\ninterface PrometheusContainerState {\n resultsStyle: TableResultsStyle;\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: RawPrometheusContainerProps) {\n const explore = state.explore;\n const item: ExploreItemState = explore.panes[exploreId]!;\n const { tableResult, rawPrometheusResult, range, queryResponse } = item;\n const rawPrometheusFrame: DataFrame[] = rawPrometheusResult ? [rawPrometheusResult] : [];\n const result = (tableResult?.length ?? 0) > 0 && rawPrometheusResult ? tableResult : rawPrometheusFrame;\n const loading = queryResponse.state;\n\n return { loading, tableResult: result, range };\n}\n\nconst connector = connect(mapStateToProps, {});\n\ntype Props = RawPrometheusContainerProps & ConnectedProps<typeof connector>;\n\nexport class RawPrometheusContainer extends PureComponent<Props, PrometheusContainerState> {\n constructor(props: Props) {\n super(props);\n\n // If resultsStyle is undefined we won't render the toggle, and the default table will be rendered\n if (props.showRawPrometheus) {\n this.state = {\n resultsStyle: TABLE_RESULTS_STYLE.raw,\n };\n }\n }\n\n onChangeResultsStyle = (resultsStyle: TableResultsStyle) => {\n this.setState({ resultsStyle });\n };\n\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[0].length * 35) + 35);\n }\n\n renderLabel = () => {\n const spacing = css({\n display: 'flex',\n justifyContent: 'space-between',\n flex: '1',\n });\n const ALL_GRAPH_STYLE_OPTIONS: Array<SelectableValue<TableResultsStyle>> = TABLE_RESULTS_STYLES.map((style) => ({\n value: style,\n // capital-case it and switch `_` to ` `\n label: style[0].toUpperCase() + style.slice(1).replace(/_/, ' '),\n }));\n\n return (\n <div className={spacing}>\n <RadioButtonGroup\n onClick={() => {\n const props = {\n state:\n this.state.resultsStyle === TABLE_RESULTS_STYLE.table\n ? TABLE_RESULTS_STYLE.raw\n : TABLE_RESULTS_STYLE.table,\n };\n reportInteraction('grafana_explore_prometheus_instant_query_ui_toggle_clicked', props);\n }}\n size=\"sm\"\n options={ALL_GRAPH_STYLE_OPTIONS}\n value={this.state?.resultsStyle}\n onChange={this.onChangeResultsStyle}\n />\n </div>\n );\n };\n\n render() {\n const { loading, onCellFilterAdded, tableResult, width, splitOpenFn, range, ariaLabel, timeZone } = this.props;\n const height = this.getTableHeight();\n const tableWidth = width - config.theme.panelPadding * 2 - PANEL_BORDER;\n\n let dataFrames = tableResult;\n\n const dataLinkPostProcessor = exploreDataLinkPostProcessorFactory(splitOpenFn, range);\n\n if (dataFrames?.length) {\n dataFrames = applyFieldOverrides({\n data: dataFrames,\n timeZone,\n theme: config.theme2,\n replaceVariables: getTemplateSrv().replace.bind(getTemplateSrv()),\n fieldConfig: {\n defaults: {},\n overrides: [],\n },\n dataLinkPostProcessor,\n });\n }\n\n const frames = dataFrames?.filter(\n (frame: DataFrame | undefined): frame is DataFrame => !!frame && frame.length !== 0\n );\n\n const title = this.state.resultsStyle === TABLE_RESULTS_STYLE.raw ? 'Raw' : 'Table';\n const label = this.state?.resultsStyle !== undefined ? this.renderLabel() : 'Table';\n\n // Render table as default if resultsStyle is not set.\n const renderTable = !this.state?.resultsStyle || this.state?.resultsStyle === TABLE_RESULTS_STYLE.table;\n\n return (\n <PanelChrome title={title} actions={label} loadingState={loading}>\n {frames?.length && (\n <>\n {renderTable && (\n <Table\n ariaLabel={ariaLabel}\n data={frames[0]}\n width={tableWidth}\n height={height}\n onCellFilterAdded={onCellFilterAdded}\n />\n )}\n {this.state?.resultsStyle === TABLE_RESULTS_STYLE.raw && <RawListContainer tableResult={frames[0]} />}\n </>\n )}\n {!frames?.length && <MetaInfoText metaItems={[{ value: '0 series returned' }]} />}\n </PanelChrome>\n );\n }\n}\n\nexport default connector(RawPrometheusContainer);\n","import React, { 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 = (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 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 = (props: ErrorContainerProps) => {\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';\n\nimport { LoadingState } from '@grafana/data';\nimport { useSelector } from 'app/types';\n\nimport { ErrorContainer } from './ErrorContainer';\n\ninterface Props {\n exploreId: string;\n}\nexport function ResponseErrorContainer(props: Props) {\n const queryResponse = useSelector((state) => state.explore.panes[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, { useCallback, useState } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\nimport { useAsync } from 'react-use';\n\nimport { GrafanaTheme2, DataSourceApi } from '@grafana/data';\nimport { config, getDataSourceSrv, reportInteraction, getAppEvents } from '@grafana/runtime';\nimport { DataQuery } from '@grafana/schema';\nimport { TextArea, Button, IconButton, useStyles2, LoadingPlaceholder } from '@grafana/ui';\nimport { notifyApp } from 'app/core/actions';\nimport { createSuccessNotification } from 'app/core/copy/appNotification';\nimport { Trans, t } from 'app/core/internationalization';\nimport { copyStringToClipboard } from 'app/core/utils/explore';\nimport { createUrlFromRichHistory, createQueryText } from 'app/core/utils/richHistory';\nimport { createAndCopyShortLink } from 'app/core/utils/shortLinks';\nimport { changeDatasource } from 'app/features/explore/state/datasource';\nimport { starHistoryItem, commentHistoryItem, deleteHistoryItem } from 'app/features/explore/state/history';\nimport { setQueries } from 'app/features/explore/state/query';\nimport { dispatch } from 'app/store/store';\nimport { StoreState } from 'app/types';\nimport { ShowConfirmModalEvent } from 'app/types/events';\nimport { RichHistoryQuery } from 'app/types/explore';\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: string }) {\n const explore = state.explore;\n const { datasourceInstance } = explore.panes[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 queryHistoryItem: RichHistoryQuery<T>;\n}\n\nexport type Props<T extends DataQuery = DataQuery> = ConnectedProps<typeof connector> & OwnProps<T>;\n\nconst getStyles = (theme: GrafanaTheme2) => {\n /* Hard-coded value so all buttons and icons on right side of card are aligned */\n const rightColumnWidth = '240px';\n const rightColumnContentWidth = '170px';\n\n /* If datasource was removed, card will have inactive color */\n const cardColor = theme.colors.background.secondary;\n\n return {\n queryCard: css`\n position: relative;\n display: flex;\n flex-direction: column;\n border: 1px solid ${theme.colors.border.weak};\n margin: ${theme.spacing(1)} 0;\n background-color: ${cardColor};\n border-radius: ${theme.shape.radius.default};\n .starred {\n color: ${theme.v1.palette.orange};\n }\n `,\n cardRow: css`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ${theme.spacing(1)};\n border-bottom: none;\n :first-of-type {\n border-bottom: 1px solid ${theme.colors.border.weak};\n padding: ${theme.spacing(0.5, 1)};\n }\n img {\n height: ${theme.typography.fontSize}px;\n max-width: ${theme.typography.fontSize}px;\n margin-right: ${theme.spacing(1)};\n }\n `,\n queryActionButtons: css`\n max-width: ${rightColumnContentWidth};\n display: flex;\n justify-content: flex-end;\n font-size: ${theme.typography.size.base};\n button {\n margin-left: ${theme.spacing(1)};\n }\n `,\n queryContainer: css`\n font-weight: ${theme.typography.fontWeightMedium};\n width: calc(100% - ${rightColumnWidth});\n `,\n updateCommentContainer: css`\n width: calc(100% + ${rightColumnWidth});\n margin-top: ${theme.spacing(1)};\n `,\n comment: css`\n overflow-wrap: break-word;\n font-size: ${theme.typography.bodySmall.fontSize};\n font-weight: ${theme.typography.fontWeightRegular};\n margin-top: ${theme.spacing(0.5)};\n `,\n commentButtonRow: css`\n > * {\n margin-top: ${theme.spacing(1)};\n margin-right: ${theme.spacing(1)};\n }\n `,\n textArea: css`\n width: 100%;\n `,\n runButton: css`\n max-width: ${rightColumnContentWidth};\n display: flex;\n justify-content: flex-end;\n button {\n height: auto;\n padding: ${theme.spacing(0.5, 2)};\n line-height: 1.4;\n span {\n white-space: normal !important;\n }\n }\n `,\n loader: css`\n position: absolute;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ${theme.colors.background.secondary};\n `,\n };\n};\n\nexport function RichHistoryCard(props: Props) {\n const {\n queryHistoryItem,\n commentHistoryItem,\n starHistoryItem,\n deleteHistoryItem,\n changeDatasource,\n exploreId,\n datasourceInstance,\n setQueries,\n } = props;\n\n const [activeUpdateComment, setActiveUpdateComment] = useState(false);\n const [comment, setComment] = useState<string | undefined>(queryHistoryItem.comment);\n const { value: historyCardData, loading } = useAsync(async () => {\n let datasourceInstance: DataSourceApi | undefined;\n try {\n datasourceInstance = await getDataSourceSrv().get(queryHistoryItem.datasourceUid);\n } catch (e) {}\n\n return {\n datasourceInstance,\n queries: await Promise.all(\n queryHistoryItem.queries.map(async (query) => {\n let datasource;\n if (datasourceInstance?.meta.mixed) {\n try {\n datasource = await getDataSourceSrv().get(query.datasource);\n } catch (e) {}\n } else {\n datasource = datasourceInstance;\n }\n\n return {\n query,\n datasource,\n };\n })\n ),\n };\n }, [queryHistoryItem.datasourceUid, queryHistoryItem.queries]);\n\n const styles = useStyles2(getStyles);\n\n const onRunQuery = async () => {\n const queriesToRun = queryHistoryItem.queries;\n const differentDataSource = queryHistoryItem.datasourceUid !== datasourceInstance?.uid;\n if (differentDataSource) {\n await changeDatasource({ exploreId, datasource: queryHistoryItem.datasourceUid });\n }\n setQueries(exploreId, queriesToRun);\n\n reportInteraction('grafana_explore_query_history_run', {\n queryHistoryEnabled: config.queryHistoryEnabled,\n differentDataSource,\n });\n };\n\n const onCopyQuery = async () => {\n const datasources = [...queryHistoryItem.queries.map((query) => query.datasource?.type || 'unknown')];\n reportInteraction('grafana_explore_query_history_copy_query', {\n datasources,\n mixed: Boolean(historyCardData?.datasourceInstance?.meta.mixed),\n });\n\n if (loading || !historyCardData) {\n return;\n }\n\n const queriesText = historyCardData.queries\n .map((query) => {\n return createQueryText(query.query, query.datasource);\n })\n .join('\\n');\n\n copyStringToClipboard(queriesText);\n dispatch(\n notifyApp(\n createSuccessNotification(t('explore.rich-history-notification.query-copied', 'Query copied to clipboard'))\n )\n );\n };\n\n const onCreateShortLink = async () => {\n const link = createUrlFromRichHistory(queryHistoryItem);\n await createAndCopyShortLink(link);\n };\n\n const onDeleteQuery = () => {\n const performDelete = (queryId: string) => {\n deleteHistoryItem(queryId);\n dispatch(\n notifyApp(createSuccessNotification(t('explore.rich-history-notification.query-deleted', 'Query deleted')))\n );\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 (queryHistoryItem.starred) {\n getAppEvents().publish(\n new ShowConfirmModalEvent({\n title: t('explore.rich-history-card.delete-query-confirmation-title', 'Delete'),\n text: t(\n 'explore.rich-history-card.delete-starred-query-confirmation-text',\n 'Are you sure you want to permanently delete your starred query?'\n ),\n yesText: t('explore.rich-history-card.confirm-delete', 'Delete'),\n icon: 'trash-alt',\n onConfirm: () => performDelete(queryHistoryItem.id),\n })\n );\n } else {\n performDelete(queryHistoryItem.id);\n }\n };\n\n const onStarrQuery = () => {\n starHistoryItem(queryHistoryItem.id, !queryHistoryItem.starred);\n reportInteraction('grafana_explore_query_history_starred', {\n queryHistoryEnabled: config.queryHistoryEnabled,\n newValue: !queryHistoryItem.starred,\n });\n };\n\n const toggleActiveUpdateComment = () => setActiveUpdateComment(!activeUpdateComment);\n\n const onUpdateComment = () => {\n commentHistoryItem(queryHistoryItem.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(queryHistoryItem.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\n className={styles.updateCommentContainer}\n aria-label={\n comment\n ? t('explore.rich-history-card.update-comment-form', 'Update comment form')\n : t('explore.rich-history-card.add-comment-form', 'Add comment form')\n }\n >\n <TextArea\n onKeyDown={onKeyDown}\n value={comment}\n placeholder={\n comment\n ? undefined\n : t('explore.rich-history-card.optional-description', 'An optional description of what the query does.')\n }\n onChange={(e) => setComment(e.currentTarget.value)}\n className={styles.textArea}\n />\n <div className={styles.commentButtonRow}>\n <Button onClick={onUpdateComment}>\n <Trans i18nKey=\"explore.rich-history-card.save-comment\">Save comment</Trans>\n </Button>\n <Button variant=\"secondary\" onClick={onCancelUpdateComment}>\n <Trans i18nKey=\"explore.rich-history-card.cancel\">Cancel</Trans>\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 tooltip={\n queryHistoryItem.comment?.length > 0\n ? t('explore.rich-history-card.edit-comment-tooltip', 'Edit comment')\n : t('explore.rich-history-card.add-comment-tooltip', 'Add comment')\n }\n />\n <IconButton\n name=\"copy\"\n onClick={onCopyQuery}\n tooltip={t('explore.rich-history-card.copy-query-tooltip', 'Copy query to clipboard')}\n />\n {historyCardData?.datasourceInstance && (\n <IconButton\n name=\"share-alt\"\n onClick={onCreateShortLink}\n tooltip={\n <Trans i18nKey=\"explore.rich-history-card.copy-shortened-link-tooltip\">\n Copy shortened link to clipboard\n </Trans>\n }\n />\n )}\n <IconButton\n name=\"trash-alt\"\n title={t('explore.rich-history-card.delete-query-title', 'Delete query')}\n tooltip={t('explore.rich-history-card.delete-query-tooltip', 'Delete query')}\n onClick={onDeleteQuery}\n />\n <IconButton\n name={queryHistoryItem.starred ? 'favorite' : 'star'}\n iconType={queryHistoryItem.starred ? 'mono' : 'default'}\n onClick={onStarrQuery}\n tooltip={\n queryHistoryItem.starred\n ? t('explore.rich-history-card.unstar-query-tooltip', 'Unstar query')\n : t('explore.rich-history-card.star-query-tooltip', 'Star query')\n }\n />\n </div>\n );\n\n return (\n <div className={styles.queryCard}>\n <div className={styles.cardRow}>\n <DatasourceInfo dsApi={historyCardData?.datasourceInstance} size=\"sm\" />\n\n {queryActionButtons}\n </div>\n <div className={cx(styles.cardRow)}>\n <div className={styles.queryContainer}>\n {historyCardData?.queries.map((q, i) => {\n return <Query query={q} key={`${q}-${i}`} showDsInfo={historyCardData?.datasourceInstance?.meta.mixed} />;\n })}\n {!activeUpdateComment && queryHistoryItem.comment && (\n <div\n aria-label={t('explore.rich-history-card.query-comment-label', 'Query comment')}\n className={styles.comment}\n >\n {queryHistoryItem.comment}\n </div>\n )}\n {activeUpdateComment && updateComment}\n </div>\n {!activeUpdateComment && (\n <div className={styles.runButton}>\n <Button\n variant=\"secondary\"\n onClick={onRunQuery}\n disabled={\n !historyCardData?.datasourceInstance || historyCardData.queries.some((query) => !query.datasource)\n }\n >\n {datasourceInstance?.uid === queryHistoryItem.datasourceUid ? (\n <Trans i18nKey=\"explore.rich-history-card.run-query-button\">Run query</Trans>\n ) : (\n <Trans i18nKey=\"explore.rich-history-card.switch-datasource-button\">\n Switch data source and run query\n </Trans>\n )}\n </Button>\n </div>\n )}\n </div>\n {loading && (\n <LoadingPlaceholder\n text={t('explore.rich-history-card.loading-text', 'loading...')}\n className={styles.loader}\n />\n )}\n </div>\n );\n}\n\nconst getQueryStyles = (theme: GrafanaTheme2) => ({\n queryRow: css`\n border-top: 1px solid ${theme.colors.border.weak};\n display: flex;\n flex-direction: row;\n padding: 4px 0px;\n gap: 4px;\n :first-child {\n border-top: none;\n }\n `,\n dsInfoContainer: css`\n display: flex;\n align-items: center;\n `,\n queryText: css`\n word-break: break-all;\n `,\n});\n\ninterface QueryProps {\n query: {\n query: DataQuery;\n datasource?: DataSourceApi;\n };\n /** Show datasource info (icon+name) alongside the query text */\n showDsInfo?: boolean;\n}\n\nconst Query = ({ query, showDsInfo = false }: QueryProps) => {\n const styles = useStyles2(getQueryStyles);\n\n return (\n <div className={styles.queryRow}>\n {showDsInfo && (\n <div className={styles.dsInfoContainer}>\n <DatasourceInfo dsApi={query.datasource} size=\"md\" />\n {': '}\n </div>\n )}\n <span aria-label={t('explore.rich-history-card.query-text-label', 'Query text')} className={styles.queryText}>\n {createQueryText(query.query, query.datasource)}\n </span>\n </div>\n );\n};\n\nconst getDsInfoStyles = (size: 'sm' | 'md') => (theme: GrafanaTheme2) => css`\n display: flex;\n align-items: center;\n font-size: ${theme.typography[size === 'sm' ? 'bodySmall' : 'body'].fontSize};\n font-weight: ${theme.typography.fontWeightMedium};\n white-space: nowrap;\n`;\n\nfunction DatasourceInfo({ dsApi, size }: { dsApi?: DataSourceApi; size: 'sm' | 'md' }) {\n const getStyles = useCallback((theme: GrafanaTheme2) => getDsInfoStyles(size)(theme), [size]);\n const styles = useStyles2(getStyles);\n\n return (\n <div className={styles}>\n <img\n src={dsApi?.meta.info.logos.small || 'public/img/icn-datasource.svg'}\n alt={dsApi?.type || t('explore.rich-history-card.datasource-not-exist', 'Data source does not exist anymore')}\n aria-label={t('explore.rich-history-card.datasource-icon-label', 'Data source icon')}\n />\n <div aria-label={t('explore.rich-history-card.datasource-name-label', 'Data source name')}>\n {dsApi?.name || t('explore.rich-history-card.datasource-not-exist', 'Data source does not exist anymore')}\n </div>\n </div>\n );\n}\n\nexport default connector(RichHistoryCard);\n","import { css } from '@emotion/css';\nimport React, { useEffect } from 'react';\n\nimport { GrafanaTheme2, SelectableValue } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { Button, FilterInput, MultiSelect, RangeSlider, Select, useStyles2 } from '@grafana/ui';\nimport { Trans, t } from 'app/core/internationalization';\nimport {\n createDatasourcesList,\n mapNumbertoTimeInSlider,\n mapQueriesToHeadings,\n SortOrder,\n RichHistorySearchFilters,\n RichHistorySettings,\n} from 'app/core/utils/richHistory';\nimport { RichHistoryQuery } from 'app/types/explore';\n\nimport { getSortOrderOptions } from './RichHistory';\nimport RichHistoryCard from './RichHistoryCard';\n\nexport interface RichHistoryQueriesTabProps {\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: string;\n height: number;\n}\n\nconst getStyles = (theme: GrafanaTheme2, height: number) => {\n return {\n container: css`\n display: flex;\n `,\n labelSlider: css`\n font-size: ${theme.typography.bodySmall.fontSize};\n &:last-of-type {\n margin-top: ${theme.spacing(3)};\n }\n &:first-of-type {\n font-weight: ${theme.typography.fontWeightMedium};\n margin-bottom: ${theme.spacing(2)};\n }\n `,\n containerContent: css`\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 width: calc(100% - 134px);\n `,\n containerSlider: css`\n width: 129px;\n margin-right: ${theme.spacing(1)};\n `,\n fixedSlider: css`\n position: fixed;\n `,\n slider: css`\n bottom: 10px;\n height: ${height - 180}px;\n width: 129px;\n padding: ${theme.spacing(1)} 0;\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(1)};\n `,\n multiselect: css`\n width: 100%;\n margin-bottom: ${theme.spacing(1)};\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(3)};\n h4 {\n margin: 0 10px 0 0;\n }\n `,\n heading: css`\n font-size: ${theme.typography.h4.fontSize};\n margin: ${theme.spacing(2, 0.25, 1, 0.25)};\n `,\n footer: css`\n height: 60px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: ${theme.typography.fontWeightLight};\n font-size: ${theme.typography.bodySmall.fontSize};\n a {\n font-weight: ${theme.typography.fontWeightMedium};\n margin-left: ${theme.spacing(0.25)};\n }\n `,\n queries: css`\n font-size: ${theme.typography.bodySmall.fontSize};\n font-weight: ${theme.typography.fontWeightRegular};\n margin-left: ${theme.spacing(0.5)};\n `,\n };\n};\n\nexport function RichHistoryQueriesTab(props: RichHistoryQueriesTabProps) {\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 styles = useStyles2(getStyles, 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 (\n <span>\n <Trans i18nKey=\"explore.rich-history-queries-tab.loading\">Loading...</Trans>;\n </span>\n );\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.fixedSlider}>\n <div className={styles.labelSlider}>\n <Trans i18nKey=\"explore.rich-history-queries-tab.filter-history\">Filter history</Trans>\n </div>\n <div className={styles.labelSlider}>{mapNumbertoTimeInSlider(richHistorySearchFilters.from)}</div>\n <div className={styles.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={styles.labelSlider}>{mapNumbertoTimeInSlider(richHistorySearchFilters.to)}</div>\n </div>\n </div>\n\n <div className={styles.containerContent} data-testid=\"query-history-queries-tab\">\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={t(\n 'explore.rich-history-queries-tab.filter-placeholder',\n 'Filter queries for data sources(s)'\n )}\n aria-label={t('explore.rich-history-queries-tab.filter-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 escapeRegex={false}\n placeholder={t('explore.rich-history-queries-tab.search-placeholder', 'Search queries')}\n value={richHistorySearchFilters.search}\n onChange={(search: string) => updateFilters({ search })}\n />\n </div>\n <div\n aria-label={t('explore.rich-history-queries-tab.sort-aria-label', 'Sort queries')}\n className={styles.sort}\n >\n <Select\n value={sortOrderOptions.filter((order) => order.value === richHistorySearchFilters.sortOrder)}\n options={sortOrderOptions}\n placeholder={t('explore.rich-history-queries-tab.sort-placeholder', 'Sort queries by')}\n onChange={(e: SelectableValue<SortOrder>) => updateFilters({ sortOrder: e.value })}\n />\n </div>\n </div>\n\n {loading && (\n <span>\n <Trans i18nKey=\"explore.rich-history-queries-tab.loading-results\">Loading results...</Trans>\n </span>\n )}\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 ? (\n <Trans\n i18nKey=\"explore.rich-history-queries-tab.displaying-partial-queries\"\n defaults=\"Displaying {{ count }} queries\"\n values={{ count: mappedQueriesToHeadings[heading].length }}\n />\n ) : (\n <Trans\n i18nKey=\"explore.rich-history-queries-tab.displaying-queries\"\n defaults=\"{{ count }} queries\"\n values={{ count: mappedQueriesToHeadings[heading].length }}\n />\n )}\n </span>\n </div>\n {mappedQueriesToHeadings[heading].map((q) => {\n return <RichHistoryCard queryHistoryItem={q} key={q.id} exploreId={exploreId} />;\n })}\n </div>\n );\n })}\n {partialResults ? (\n <div>\n <Trans\n i18nKey=\"explore.rich-history-queries-tab.showing-queries\"\n defaults=\"Showing {{ shown }} of {{ total }} <0>Load more</0>\"\n values={{ shown: queries.length, total: totalQueries }}\n components={[\n <Button onClick={loadMoreRichHistory} key=\"loadMoreButton\">\n Load more\n </Button>,\n ]}\n />\n </div>\n ) : null}\n <div className={styles.footer}>\n {!config.queryHistoryEnabled\n ? t(\n 'explore.rich-history-queries-tab.history-local',\n 'The history is local to your browser and is not shared with others.'\n )\n : ''}\n </div>\n </div>\n </div>\n );\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2, SelectableValue } from '@grafana/data';\nimport { getAppEvents } from '@grafana/runtime';\nimport { useStyles2, Select, Button, Field, InlineField, InlineSwitch, Alert } from '@grafana/ui';\nimport { notifyApp } from 'app/core/actions';\nimport { createSuccessNotification } from 'app/core/copy/appNotification';\nimport { MAX_HISTORY_ITEMS } from 'app/core/history/RichHistoryLocalStorage';\nimport { Trans, t } from 'app/core/internationalization';\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 = (theme: GrafanaTheme2) => {\n return {\n container: css`\n font-size: ${theme.typography.bodySmall.fontSize};\n `,\n spaceBetween: css`\n margin-bottom: ${theme.spacing(3)};\n `,\n input: css`\n max-width: 200px;\n `,\n bold: css`\n font-weight: ${theme.typography.fontWeightBold};\n `,\n bottomMargin: css`\n margin-bottom: ${theme.spacing(1)};\n `,\n };\n};\n\nconst retentionPeriodOptions = [\n { value: 2, label: t('explore.rich-history-settings-tab.retention-period.2-days', '2 days') },\n { value: 5, label: t('explore.rich-history-settings-tab.retention-period.5-days', '5 days') },\n { value: 7, label: t('explore.rich-history-settings-tab.retention-period.1-week', '1 week') },\n { value: 14, label: t('explore.rich-history-settings-tab.retention-period.2-weeks', '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 styles = useStyles2(getStyles);\n const selectedOption = retentionPeriodOptions.find((v) => v.value === retentionPeriod);\n\n const onDelete = () => {\n getAppEvents().publish(\n new ShowConfirmModalEvent({\n title: t('explore.rich-history-settings-tab.delete-title', 'Delete'),\n text: t(\n 'explore.rich-history-settings-tab.delete-confirm-text',\n 'Are you sure you want to permanently delete your query history?'\n ),\n yesText: t('explore.rich-history-settings-tab.delete-confirm', 'Delete'),\n icon: 'trash-alt',\n onConfirm: () => {\n deleteRichHistory();\n dispatch(\n notifyApp(\n createSuccessNotification(\n t('explore.rich-history-settings-tab.query-history-deleted', 'Query history deleted')\n )\n )\n );\n },\n })\n );\n };\n\n return (\n <div className={styles.container}>\n {supportedFeatures().changeRetention ? (\n <Field\n label={t('explore.rich-history-settings-tab.history-time-span', 'History time span')}\n description={t(\n 'explore.rich-history-settings-tab.history-time-span-description',\n 'Select the period of time for which Grafana will save your query history. Up to {{MAX_HISTORY_ITEMS}} entries will be stored.',\n { MAX_HISTORY_ITEMS }\n )}\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={t('explore.rich-history-settings-tab.history-time-span', 'History time span')}>\n {t(\n 'explore.rich-history-settings-tab.alert-info',\n \"Grafana will keep entries up to {{optionLabel}}.Starred entries won't be deleted.\",\n {\n optionLabel: selectedOption?.label,\n }\n )}\n </Alert>\n )}\n <InlineField\n label={t(\n 'explore.rich-history-settings-tab.change-default-tab',\n 'Change the default active tab from “Query history” to “Starred”'\n )}\n className={styles.spaceBetween}\n >\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\n label={t(\n 'explore.rich-history-settings-tab.only-show-active-datasource',\n 'Only show queries for data source currently active in Explore'\n )}\n className={styles.spaceBetween}\n >\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 className={styles.bold}>\n <Trans i18nKey=\"explore.rich-history-settings-tab.clear-query-history\">Clear query history</Trans>\n </div>\n <div className={styles.bottomMargin}>\n <Trans i18nKey=\"explore.rich-history-settings-tab.clear-history-info\">\n Delete all of your query history, permanently.\n </Trans>\n </div>\n <Button variant=\"destructive\" onClick={onDelete}>\n <Trans i18nKey=\"explore.rich-history-settings-tab.clear-query-history-button\">Clear query history</Trans>\n </Button>\n </div>\n )}\n </div>\n );\n}\n","import { css } from '@emotion/css';\nimport React, { useEffect } from 'react';\n\nimport { GrafanaTheme2, SelectableValue } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { useStyles2, Select, MultiSelect, FilterInput, Button } from '@grafana/ui';\nimport { Trans, t } from 'app/core/internationalization';\nimport {\n createDatasourcesList,\n SortOrder,\n RichHistorySearchFilters,\n RichHistorySettings,\n} from 'app/core/utils/richHistory';\nimport { RichHistoryQuery } from 'app/types/explore';\n\nimport { getSortOrderOptions } from './RichHistory';\nimport RichHistoryCard from './RichHistoryCard';\n\nexport interface RichHistoryStarredTabProps {\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: string;\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\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(1)};\n `,\n filterInput: css`\n margin-bottom: ${theme.spacing(1)};\n `,\n sort: css`\n width: 170px;\n `,\n footer: css`\n height: 60px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: ${theme.typography.fontWeightLight};\n font-size: ${theme.typography.bodySmall.fontSize};\n a {\n font-weight: ${theme.typography.fontWeightMedium};\n margin-left: ${theme.spacing(0.25)};\n }\n `,\n };\n};\n\nexport function RichHistoryStarredTab(props: RichHistoryStarredTabProps) {\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 styles = useStyles2(getStyles);\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 (\n <span>\n <Trans i18nKey=\"explore.rich-history-starred-tab.loading\">Loading...</Trans>;\n </span>\n );\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={t(\n 'explore.rich-history-starred-tab.filter-queries-placeholder',\n 'Filter queries for data sources(s)'\n )}\n aria-label={t(\n 'explore.rich-history-starred-tab.filter-queries-aria-label',\n 'Filter queries for data sources(s)'\n )}\n onChange={(options: SelectableValue[]) => {\n updateFilters({ datasourceFilters: options.map((option) => option.value) });\n }}\n />\n )}\n <div className={styles.filterInput}>\n <FilterInput\n escapeRegex={false}\n placeholder={t('explore.rich-history-starred-tab.search-queries-placeholder', 'Search queries')}\n value={richHistorySearchFilters.search}\n onChange={(search: string) => updateFilters({ search })}\n />\n </div>\n <div\n aria-label={t('explore.rich-history-starred-tab.sort-queries-aria-label', 'Sort queries')}\n className={styles.sort}\n >\n <Select\n value={sortOrderOptions.filter((order) => order.value === richHistorySearchFilters.sortOrder)}\n options={sortOrderOptions}\n placeholder={t('explore.rich-history-starred-tab.sort-queries-placeholder', 'Sort queries by')}\n onChange={(e: SelectableValue<SortOrder>) => updateFilters({ sortOrder: e.value })}\n />\n </div>\n </div>\n {loading && (\n <span>\n <Trans i18nKey=\"explore.rich-history-starred-tab.loading-results\">Loading results...</Trans>\n </span>\n )}\n {!loading &&\n queries.map((q) => {\n return <RichHistoryCard queryHistoryItem={q} key={q.id} exploreId={exploreId} />;\n })}\n {queries.length && queries.length !== totalQueries ? (\n <div>\n <Trans\n i18nKey=\"explore.rich-history-starred-tab.showing-queries\"\n defaults=\"Showing {{ shown }} of {{ total }} <0>Load more</0>\"\n values={{ shown: queries.length, total: totalQueries }}\n components={[\n <Button onClick={loadMoreRichHistory} key=\"loadMoreButton\">\n Load more\n </Button>,\n ]}\n />\n </div>\n ) : null}\n <div className={styles.footer}>\n {!config.queryHistoryEnabled\n ? t(\n 'explore.rich-history-starred-tab.local-history-message',\n 'The history is local to your browser and is not shared with others.'\n )\n : ''}\n </div>\n </div>\n </div>\n );\n}\n","import { debounce } from 'lodash';\nimport React, { useState, useEffect } from 'react';\n\nimport { SelectableValue } from '@grafana/data';\nimport { TabbedContainer, TabConfig } from '@grafana/ui';\nimport { t } from 'app/core/internationalization';\nimport { SortOrder, RichHistorySearchFilters, RichHistorySettings } from 'app/core/utils/richHistory';\nimport { RichHistoryQuery } 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: t('explore.rich-history.newest-first', 'Newest first'), value: SortOrder.Descending },\n { label: t('explore.rich-history.oldest-first', 'Oldest first'), value: SortOrder.Ascending },\n { label: t('explore.rich-history.datasource-a-z', 'Data source A-Z'), value: SortOrder.DatasourceAZ },\n { label: t('explore.rich-history.datasource-z-a', 'Data source Z-A'), value: SortOrder.DatasourceZA },\n ].filter((option) => supportedFeatures().availableFilters.includes(option.value));\n\nexport interface RichHistoryProps {\n richHistory: RichHistoryQuery[];\n richHistoryTotal?: number;\n richHistorySettings: RichHistorySettings;\n richHistorySearchFilters?: RichHistorySearchFilters;\n updateHistorySettings: (settings: RichHistorySettings) => void;\n updateHistorySearchFilters: (exploreId: string, filters: RichHistorySearchFilters) => void;\n loadRichHistory: (exploreId: string) => void;\n loadMoreRichHistory: (exploreId: string) => void;\n clearRichHistoryResults: (exploreId: string) => void;\n deleteRichHistory: () => void;\n activeDatasourceInstance: string;\n firstTab: Tabs;\n exploreId: string;\n height: number;\n onClose: () => void;\n}\n\nexport function RichHistory(props: RichHistoryProps) {\n const {\n richHistory,\n richHistoryTotal,\n height,\n exploreId,\n deleteRichHistory,\n onClose,\n firstTab,\n activeDatasourceInstance,\n } = props;\n\n const [loading, setLoading] = useState(false);\n\n const updateSettings = (settingsToUpdate: Partial<RichHistorySettings>) => {\n props.updateHistorySettings({ ...props.richHistorySettings, ...settingsToUpdate });\n };\n\n const updateFilters = (filtersToUpdate?: Partial<RichHistorySearchFilters>) => {\n const filters = {\n ...props.richHistorySearchFilters!,\n ...filtersToUpdate,\n page: 1, // always load fresh results when updating filters\n };\n props.updateHistorySearchFilters(props.exploreId, filters);\n loadRichHistory();\n };\n\n const loadRichHistory = debounce(() => {\n props.loadRichHistory(props.exploreId);\n setLoading(true);\n }, 300);\n\n const onChangeRetentionPeriod = (retentionPeriod: SelectableValue<number>) => {\n if (retentionPeriod.value !== undefined) {\n updateSettings({ retentionPeriod: retentionPeriod.value });\n }\n };\n\n const toggleStarredTabAsFirstTab = () =>\n updateSettings({ starredTabAsFirstTab: !props.richHistorySettings.starredTabAsFirstTab });\n\n const toggleActiveDatasourceOnly = () =>\n updateSettings({ activeDatasourceOnly: !props.richHistorySettings.activeDatasourceOnly });\n\n useEffect(() => {\n setLoading(false);\n }, [richHistory]);\n\n const QueriesTab: TabConfig = {\n label: t('explore.rich-history.query-history', 'Query history'),\n value: Tabs.RichHistory,\n content: (\n <RichHistoryQueriesTab\n queries={richHistory}\n totalQueries={richHistoryTotal || 0}\n loading={loading}\n updateFilters={updateFilters}\n clearRichHistoryResults={() => props.clearRichHistoryResults(props.exploreId)}\n loadMoreRichHistory={() => props.loadMoreRichHistory(props.exploreId)}\n activeDatasourceInstance={activeDatasourceInstance}\n richHistorySettings={props.richHistorySettings}\n richHistorySearchFilters={props.richHistorySearchFilters}\n exploreId={exploreId}\n height={height}\n />\n ),\n icon: 'history',\n };\n\n const StarredTab: TabConfig = {\n label: t('explore.rich-history.starred', 'Starred'),\n value: Tabs.Starred,\n content: (\n <RichHistoryStarredTab\n queries={richHistory}\n totalQueries={richHistoryTotal || 0}\n loading={loading}\n activeDatasourceInstance={activeDatasourceInstance}\n updateFilters={updateFilters}\n clearRichHistoryResults={() => props.clearRichHistoryResults(props.exploreId)}\n loadMoreRichHistory={() => props.loadMoreRichHistory(props.exploreId)}\n richHistorySettings={props.richHistorySettings}\n richHistorySearchFilters={props.richHistorySearchFilters}\n exploreId={exploreId}\n />\n ),\n icon: 'star',\n };\n\n const SettingsTab: TabConfig = {\n label: t('explore.rich-history.settings', 'Settings'),\n value: Tabs.Settings,\n content: (\n <RichHistorySettingsTab\n retentionPeriod={props.richHistorySettings.retentionPeriod}\n starredTabAsFirstTab={props.richHistorySettings.starredTabAsFirstTab}\n activeDatasourceOnly={props.richHistorySettings.activeDatasourceOnly}\n onChangeRetentionPeriod={onChangeRetentionPeriod}\n toggleStarredTabAsFirstTab={toggleStarredTabAsFirstTab}\n toggleactiveDatasourceOnly={toggleActiveDatasourceOnly}\n deleteRichHistory={deleteRichHistory}\n />\n ),\n icon: 'sliders-v-alt',\n };\n\n let tabs = [QueriesTab, StarredTab, SettingsTab];\n return (\n <TabbedContainer\n tabs={tabs}\n onClose={onClose}\n defaultTab={firstTab}\n closeIconTooltip={t('explore.rich-history.close-tooltip', 'Close query history')}\n />\n );\n}\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';\nimport { Trans } from 'app/core/internationalization';\n// Types\nimport { ExploreItemState, StoreState } from 'app/types';\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: string }) {\n const explore = state.explore;\n const item: ExploreItemState = explore.panes[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: string;\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 (\n <span>\n <Trans i18nKey=\"explore.rich-history-container.loading\">Loading...</Trans>\n </span>\n );\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 } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Components } from '@grafana/e2e-selectors';\nimport { ToolbarButton, useTheme2 } from '@grafana/ui';\nimport { t, Trans } from 'app/core/internationalization';\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 display: 'flex',\n flexWrap: 'wrap',\n gap: theme.spacing(1),\n marginTop: theme.spacing(2),\n }),\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 {!props.addQueryRowButtonHidden && (\n <ToolbarButton\n variant=\"canvas\"\n aria-label={t('explore.secondary-actions.query-add-button-aria-label', 'Add query')}\n onClick={props.onClickAddQueryRowButton}\n disabled={props.addQueryRowButtonDisabled}\n icon=\"plus\"\n >\n <Trans i18nKey=\"explore.secondary-actions.query-add-button\">Add query</Trans>\n </ToolbarButton>\n )}\n {!props.richHistoryRowButtonHidden && (\n <ToolbarButton\n variant={props.richHistoryButtonActive ? 'active' : 'canvas'}\n aria-label={t('explore.secondary-actions.query-history-button-aria-label', 'Query history')}\n onClick={props.onClickRichHistoryButton}\n data-testid={Components.QueryTab.queryHistoryButton}\n icon=\"history\"\n >\n <Trans i18nKey=\"explore.secondary-actions.query-history-button\">Query history</Trans>\n </ToolbarButton>\n )}\n <ToolbarButton\n variant={props.queryInspectorButtonActive ? 'active' : 'canvas'}\n aria-label={t('explore.secondary-actions.query-inspector-button-aria-label', 'Query inspector')}\n onClick={props.onClickQueryInspectorButton}\n icon=\"info-circle\"\n >\n <Trans i18nKey=\"explore.secondary-actions.query-inspector-button\">Query inspector</Trans>\n </ToolbarButton>\n </div>\n );\n}\n","import { css } from '@emotion/css';\nimport React, { PureComponent } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { applyFieldOverrides, SplitOpen, DataFrame, LoadingState, FieldType } from '@grafana/data';\nimport { getTemplateSrv } from '@grafana/runtime';\nimport { TimeZone } from '@grafana/schema';\nimport { Table, AdHocFilterItem, PanelChrome, withTheme2, Themeable2 } from '@grafana/ui';\nimport { config } from 'app/core/config';\nimport { t, Trans } from 'app/core/internationalization';\nimport {\n hasDeprecatedParentRowIndex,\n migrateFromParentRowIndexToNestedFrames,\n} from 'app/plugins/panel/table/migrations';\nimport { StoreState } from 'app/types';\nimport { ExploreItemState } from 'app/types/explore';\n\nimport { MetaInfoText } from '../MetaInfoText';\nimport { selectIsWaitingForData } from '../state/query';\nimport { exploreDataLinkPostProcessorFactory } from '../utils/links';\n\ninterface TableContainerProps extends Themeable2 {\n ariaLabel?: string;\n exploreId: string;\n width: number;\n timeZone: TimeZone;\n onCellFilterAdded?: (filter: AdHocFilterItem) => void;\n splitOpenFn: SplitOpen;\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: TableContainerProps) {\n const explore = state.explore;\n const item: ExploreItemState = explore.panes[exploreId]!;\n const { tableResult, range } = item;\n const loadingInState = selectIsWaitingForData(exploreId);\n const loading = tableResult && tableResult.length > 0 ? false : loadingInState;\n return { loading, tableResult, range };\n}\n\nconst connector = connect(mapStateToProps, {});\n\ntype Props = TableContainerProps & ConnectedProps<typeof connector>;\n\nexport class TableContainer extends PureComponent<Props> {\n hasSubFrames = (data: DataFrame) => data.fields.some((f) => f.type === FieldType.nestedFrames);\n\n getTableHeight(rowCount: number, hasSubFrames: boolean) {\n if (rowCount === 0) {\n return 200;\n }\n // tries to estimate table height, with a min of 300 and a max of 600\n // if there are multiple tables, there is no min\n return Math.min(600, Math.max(rowCount * 36, hasSubFrames ? 300 : 0) + 40 + 46);\n }\n\n getTableTitle(dataFrames: DataFrame[] | null, data: DataFrame, i: number) {\n let name = data.name;\n if (!name && (dataFrames?.length ?? 0) > 1) {\n name = data.refId || `${i}`;\n }\n\n return name ? (\n <Trans i18nKey=\"explore.table.title-with-name\">Table - {{ name }}</Trans>\n ) : (\n t('explore.table.title', 'Table')\n );\n }\n\n render() {\n const { loading, onCellFilterAdded, tableResult, width, splitOpenFn, range, ariaLabel, timeZone, theme } =\n this.props;\n\n let dataFrames = hasDeprecatedParentRowIndex(tableResult)\n ? migrateFromParentRowIndexToNestedFrames(tableResult)\n : tableResult;\n const dataLinkPostProcessor = exploreDataLinkPostProcessorFactory(splitOpenFn, range);\n\n if (dataFrames?.length) {\n dataFrames = applyFieldOverrides({\n data: dataFrames,\n timeZone,\n theme: config.theme2,\n replaceVariables: getTemplateSrv().replace.bind(getTemplateSrv()),\n fieldConfig: {\n defaults: {},\n overrides: [],\n },\n dataLinkPostProcessor,\n });\n }\n\n const frames = dataFrames?.filter(\n (frame: DataFrame | undefined): frame is DataFrame => !!frame && frame.length !== 0\n );\n\n return (\n <>\n {frames && frames.length === 0 && (\n <PanelChrome title={t('explore.table.title', 'Table')} width={width} height={200}>\n {() => <MetaInfoText metaItems={[{ value: t('explore.table.no-data', '0 series returned') }]} />}\n </PanelChrome>\n )}\n {frames && frames.length > 0 && (\n <div className={css({ display: 'flex', flexDirection: 'column', gap: theme.spacing(1) })}>\n {frames.map((data, i) => (\n <PanelChrome\n key={data.refId || `table-${i}`}\n title={this.getTableTitle(dataFrames, data, i)}\n width={width}\n height={this.getTableHeight(data.length, this.hasSubFrames(data))}\n loadingState={loading ? LoadingState.Loading : undefined}\n >\n {(innerWidth, innerHeight) => (\n <Table\n ariaLabel={ariaLabel}\n data={data}\n width={innerWidth}\n height={innerHeight}\n onCellFilterAdded={onCellFilterAdded}\n />\n )}\n </PanelChrome>\n ))}\n </div>\n )}\n </>\n );\n }\n}\n\nexport const TableContainerWithTheme = withTheme2(TableContainer);\n\nexport default withTheme2(connector(TableContainer));\n","import React, { useMemo } from 'react';\n\nimport { DataFrame, SplitOpen } from '@grafana/data';\nimport { PanelChrome } from '@grafana/ui';\nimport { StoreState, useSelector } from 'app/types';\n\nimport { TraceView } from './TraceView';\nimport { transformDataFrames } from './utils/transform';\n\ninterface Props {\n dataFrames: DataFrame[];\n splitOpenFn: SplitOpen;\n exploreId: string;\n scrollElement?: Element;\n}\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 } = props;\n const traceProp = useMemo(() => transformDataFrames(frame), [frame]);\n const datasource = useSelector(\n (state: StoreState) => state.explore.panes[props.exploreId]?.datasourceInstance ?? undefined\n );\n\n if (!traceProp) {\n return null;\n }\n\n return (\n <PanelChrome padding=\"none\" title=\"Trace\">\n <TraceView\n exploreId={exploreId}\n dataFrames={dataFrames}\n splitOpenFn={splitOpenFn}\n scrollElement={scrollElement}\n traceProp={traceProp}\n datasource={datasource}\n />\n </PanelChrome>\n );\n}\n","import { css, cx } from '@emotion/css';\nimport { get, groupBy } from 'lodash';\nimport memoizeOne from 'memoize-one';\nimport React from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\nimport AutoSizer, { HorizontalSize } from 'react-virtualized-auto-sizer';\n\nimport {\n AbsoluteTimeRange,\n DataFrame,\n EventBus,\n GrafanaTheme2,\n hasToggleableQueryFiltersSupport,\n LoadingState,\n QueryFixAction,\n RawTimeRange,\n SplitOpenOptions,\n SupplementaryQueryType,\n} from '@grafana/data';\nimport { selectors } from '@grafana/e2e-selectors';\nimport { getDataSourceSrv, reportInteraction } from '@grafana/runtime';\nimport { DataQuery } from '@grafana/schema';\nimport {\n AdHocFilterItem,\n CustomScrollbar,\n ErrorBoundaryAlert,\n PanelContainer,\n Themeable2,\n withTheme2,\n} from '@grafana/ui';\nimport { FILTER_FOR_OPERATOR, FILTER_OUT_OPERATOR } from '@grafana/ui/src/components/Table/types';\nimport { supportedFeatures } from 'app/core/history/richHistoryStorageProvider';\nimport { MIXED_DATASOURCE_NAME } from 'app/plugins/datasource/mixed/MixedDataSource';\nimport { getNodeGraphDataFrames } from 'app/plugins/panel/nodeGraph/utils';\nimport { StoreState } from 'app/types';\n\nimport { getTimeZone } from '../profile/state/selectors';\n\nimport { ContentOutline } from './ContentOutline/ContentOutline';\nimport { ContentOutlineContextProvider } from './ContentOutline/ContentOutlineContext';\nimport { ContentOutlineItem } from './ContentOutline/ContentOutlineItem';\nimport { CorrelationHelper } from './CorrelationHelper';\nimport { CustomContainer } from './CustomContainer';\nimport ExploreQueryInspector from './ExploreQueryInspector';\nimport { ExploreToolbar } from './ExploreToolbar';\nimport { FlameGraphExploreContainer } from './FlameGraph/FlameGraphExploreContainer';\nimport { GraphContainer } from './Graph/GraphContainer';\nimport LogsContainer from './Logs/LogsContainer';\nimport { LogsSamplePanel } from './Logs/LogsSamplePanel';\nimport { NoData } from './NoData';\nimport { NoDataSourceCallToAction } from './NoDataSourceCallToAction';\nimport { NodeGraphContainer } from './NodeGraph/NodeGraphContainer';\nimport { QueryRows } from './QueryRows';\nimport RawPrometheusContainer from './RawPrometheus/RawPrometheusContainer';\nimport { ResponseErrorContainer } from './ResponseErrorContainer';\nimport RichHistoryContainer from './RichHistory/RichHistoryContainer';\nimport { SecondaryActions } from './SecondaryActions';\nimport TableContainer from './Table/TableContainer';\nimport { TraceViewContainer } from './TraceView/TraceViewContainer';\nimport { changeSize } from './state/explorePane';\nimport { splitOpen } from './state/main';\nimport {\n addQueryRow,\n modifyQueries,\n scanStart,\n scanStopAction,\n selectIsWaitingForData,\n setQueries,\n setSupplementaryQueryEnabled,\n} from './state/query';\nimport { isSplit } from './state/selectors';\nimport { 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 marginTop: '21px',\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(1),\n }),\n queryContainer: css({\n label: 'queryContainer',\n padding: theme.spacing(1),\n }),\n exploreContainer: css({\n label: 'exploreContainer',\n display: 'flex',\n flexDirection: 'column',\n paddingRight: theme.spacing(2),\n marginBottom: theme.spacing(2),\n }),\n left: css({\n marginBottom: theme.spacing(2),\n }),\n wrapper: css({\n position: 'absolute',\n top: 0,\n left: theme.spacing(2),\n right: 0,\n bottom: 0,\n display: 'flex',\n }),\n };\n};\n\nexport interface ExploreProps extends Themeable2 {\n exploreId: string;\n theme: GrafanaTheme2;\n eventBus: EventBus;\n}\n\nenum ExploreDrawer {\n RichHistory,\n QueryInspector,\n}\n\ninterface ExploreState {\n openDrawer?: ExploreDrawer;\n contentOutlineVisible: boolean;\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 */\n\nexport class Explore extends React.PureComponent<Props, ExploreState> {\n scrollElement: HTMLDivElement | undefined;\n graphEventBus: EventBus;\n logsEventBus: EventBus;\n memoizedGetNodeGraphDataFrames = memoizeOne(getNodeGraphDataFrames);\n\n constructor(props: Props) {\n super(props);\n this.state = {\n openDrawer: undefined,\n contentOutlineVisible: false,\n };\n this.graphEventBus = props.eventBus.newScopedBus('graph', { onlyLocal: false });\n this.logsEventBus = props.eventBus.newScopedBus('logs', { onlyLocal: false });\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: AdHocFilterItem) => {\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 onContentOutlineToogle = () => {\n this.setState((state) => {\n reportInteraction('explore_toolbar_contentoutline_clicked', {\n item: 'outline',\n type: state.contentOutlineVisible ? 'close' : 'open',\n });\n return {\n contentOutlineVisible: !state.contentOutlineVisible,\n };\n });\n };\n\n /**\n * Used by Logs details.\n * Returns true if all queries have the filter, otherwise false.\n * TODO: In the future, we would like to return active filters based the query that produced the log line.\n * @alpha\n */\n isFilterLabelActive = async (key: string, value: string | number, refId?: string) => {\n const query = this.props.queries.find((q) => q.refId === refId);\n if (!query) {\n return false;\n }\n const ds = await getDataSourceSrv().get(query.datasource);\n if (hasToggleableQueryFiltersSupport(ds) && ds.queryHasFilter(query, { key, value: value.toString() })) {\n return true;\n }\n return false;\n };\n\n /**\n * Used by Logs details.\n */\n onClickFilterLabel = (key: string, value: string | number, frame?: DataFrame) => {\n this.onModifyQueries(\n {\n type: 'ADD_FILTER',\n options: { key, value: value.toString() },\n frame,\n },\n frame?.refId\n );\n };\n\n /**\n * Used by Logs details.\n */\n onClickFilterOutLabel = (key: string, value: string | number, frame?: DataFrame) => {\n this.onModifyQueries(\n {\n type: 'ADD_FILTER_OUT',\n options: { key, value: value.toString() },\n frame,\n },\n frame?.refId\n );\n };\n\n /**\n * Used by Logs Popover Menu.\n */\n onClickFilterValue = (value: string | number, refId?: string) => {\n this.onModifyQueries({ type: 'ADD_STRING_FILTER', options: { value: value.toString() } }, refId);\n };\n\n /**\n * Used by Logs Popover Menu.\n */\n onClickFilterOutValue = (value: string | number, refId?: string) => {\n this.onModifyQueries({ type: 'ADD_STRING_FILTER_OUT', options: { value: value.toString() } }, refId);\n };\n\n onClickAddQueryRowButton = () => {\n const { exploreId, queryKeys } = this.props;\n this.props.addQueryRow(exploreId, queryKeys.length);\n };\n\n /**\n * Used by Logs details.\n */\n onModifyQueries = (action: QueryFixAction, refId?: string) => {\n const modifier = async (query: DataQuery, modification: QueryFixAction) => {\n // This gives Logs Details support to modify the query that produced the log line.\n // If not present, all queries are modified.\n if (refId && refId !== query.refId) {\n return query;\n }\n const { datasource } = query;\n if (datasource == null) {\n return query;\n }\n const ds = await getDataSourceSrv().get(datasource);\n const toggleableFilters = ['ADD_FILTER', 'ADD_FILTER_OUT'];\n if (hasToggleableQueryFiltersSupport(ds) && toggleableFilters.includes(modification.type)) {\n return ds.toggleQueryFilter(query, {\n type: modification.type === 'ADD_FILTER' ? 'FILTER_FOR' : 'FILTER_OUT',\n options: modification.options ?? {},\n frame: modification.frame,\n });\n }\n if (ds.modifyQuery) {\n return ds.modifyQuery(query, modification);\n } else {\n return query;\n }\n };\n this.props.modifyQueries(this.props.exploreId, action, modifier);\n };\n\n onResize = (size: HorizontalSize) => {\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 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 onSplitOpen = (panelType: string) => {\n return async (options?: SplitOpenOptions) => {\n this.props.splitOpen(options);\n if (options && this.props.datasourceInstance) {\n const target = (await getDataSourceSrv().get(options.datasourceUid)).type;\n const source =\n this.props.datasourceInstance.uid === MIXED_DATASOURCE_NAME\n ? get(this.props.queries, '0.datasource.type')\n : this.props.datasourceInstance.type;\n const tracking = {\n origin: 'panel',\n panelType,\n source,\n target,\n exploreId: this.props.exploreId,\n };\n reportInteraction('grafana_explore_split_view_opened', tracking);\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 renderCustom(width: number) {\n const { timeZone, queryResponse, absoluteRange, eventBus } = this.props;\n\n const groupedByPlugin = groupBy(queryResponse?.customFrames, 'meta.preferredVisualisationPluginId');\n\n return Object.entries(groupedByPlugin).map(([pluginId, frames], index) => {\n return (\n <ContentOutlineItem title={pluginId} icon=\"plug\" key={index}>\n <CustomContainer\n key={index}\n timeZone={timeZone}\n pluginId={pluginId}\n frames={frames}\n state={queryResponse.state}\n absoluteRange={absoluteRange}\n height={400}\n width={width}\n splitOpenFn={this.onSplitOpen(pluginId)}\n eventBus={eventBus}\n />\n </ContentOutlineItem>\n );\n });\n }\n\n renderGraphPanel(width: number) {\n const { graphResult, absoluteRange, timeZone, queryResponse, showFlameGraph } = this.props;\n\n return (\n <ContentOutlineItem title=\"Graph\" icon=\"graph-bar\">\n <GraphContainer\n data={graphResult!}\n height={showFlameGraph ? 180 : 400}\n width={width}\n absoluteRange={absoluteRange}\n timeZone={timeZone}\n onChangeTime={this.onUpdateTimeRange}\n annotations={queryResponse.annotations}\n splitOpenFn={this.onSplitOpen('graph')}\n loadingState={queryResponse.state}\n eventBus={this.graphEventBus}\n />\n </ContentOutlineItem>\n );\n }\n\n renderTablePanel(width: number) {\n const { exploreId, timeZone } = this.props;\n return (\n <ContentOutlineItem title=\"Table\" icon=\"table\">\n <TableContainer\n ariaLabel={selectors.pages.Explore.General.table}\n width={width}\n exploreId={exploreId}\n onCellFilterAdded={this.onCellFilterAdded}\n timeZone={timeZone}\n splitOpenFn={this.onSplitOpen('table')}\n />\n </ContentOutlineItem>\n );\n }\n\n renderRawPrometheus(width: number) {\n const { exploreId, datasourceInstance, timeZone } = this.props;\n return (\n <ContentOutlineItem title=\"Raw Prometheus\" icon=\"gf-prometheus\">\n <RawPrometheusContainer\n showRawPrometheus={true}\n ariaLabel={selectors.pages.Explore.General.table}\n width={width}\n exploreId={exploreId}\n onCellFilterAdded={datasourceInstance?.modifyQuery ? this.onCellFilterAdded : undefined}\n timeZone={timeZone}\n splitOpenFn={this.onSplitOpen('table')}\n />\n </ContentOutlineItem>\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 // Need to make ContentOutlineItem a flex container so the gap works\n const logsContentOutlineWrapper = css({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(1),\n });\n return (\n <ContentOutlineItem title=\"Logs\" icon=\"gf-logs\" className={logsContentOutlineWrapper}>\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 eventBus={this.logsEventBus}\n splitOpenFn={this.onSplitOpen('logs')}\n scrollElement={this.scrollElement}\n isFilterLabelActive={this.isFilterLabelActive}\n onClickFilterValue={this.onClickFilterValue}\n onClickFilterOutValue={this.onClickFilterOutValue}\n />\n </ContentOutlineItem>\n );\n }\n\n renderLogsSamplePanel() {\n const { logsSample, timeZone, setSupplementaryQueryEnabled, exploreId, datasourceInstance, queries } = this.props;\n\n return (\n <ContentOutlineItem title=\"Logs Sample\" icon=\"gf-logs\">\n <LogsSamplePanel\n queryResponse={logsSample.data}\n timeZone={timeZone}\n enabled={logsSample.enabled}\n queries={queries}\n datasourceInstance={datasourceInstance}\n splitOpen={this.onSplitOpen('logsSample')}\n setLogsSampleEnabled={(enabled: boolean) =>\n setSupplementaryQueryEnabled(exploreId, enabled, SupplementaryQueryType.LogsSample)\n }\n />\n </ContentOutlineItem>\n );\n }\n\n renderNodeGraphPanel() {\n const { exploreId, showTrace, queryResponse, datasourceInstance } = this.props;\n const datasourceType = datasourceInstance ? datasourceInstance?.type : 'unknown';\n\n return (\n <ContentOutlineItem title=\"Node Graph\" icon=\"code-branch\">\n <NodeGraphContainer\n dataFrames={this.memoizedGetNodeGraphDataFrames(queryResponse.series)}\n exploreId={exploreId}\n withTraceView={showTrace}\n datasourceType={datasourceType}\n splitOpenFn={this.onSplitOpen('nodeGraph')}\n />\n </ContentOutlineItem>\n );\n }\n\n renderFlameGraphPanel() {\n const { queryResponse } = this.props;\n return (\n <ContentOutlineItem title=\"Flame Graph\" icon=\"fire\">\n <FlameGraphExploreContainer dataFrames={queryResponse.flameGraphFrames} />\n </ContentOutlineItem>\n );\n }\n\n renderTraceViewPanel() {\n const { queryResponse, 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 <ContentOutlineItem title=\"Traces\" icon=\"file-alt\">\n <TraceViewContainer\n exploreId={exploreId}\n dataFrames={dataFrames}\n splitOpenFn={this.onSplitOpen('traceView')}\n scrollElement={this.scrollElement}\n />\n </ContentOutlineItem>\n )\n );\n }\n\n render() {\n const {\n datasourceInstance,\n exploreId,\n graphResult,\n queryResponse,\n isLive,\n theme,\n showMetrics,\n showTable,\n showRawPrometheus,\n showLogs,\n showTrace,\n showCustom,\n showNodeGraph,\n showFlameGraph,\n timeZone,\n showLogsSample,\n correlationEditorDetails,\n correlationEditorHelperData,\n } = this.props;\n const { openDrawer, contentOutlineVisible } = 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.flameGraphFrames,\n queryResponse.tableFrames,\n queryResponse.rawPrometheusFrames,\n queryResponse.traceFrames,\n queryResponse.customFrames,\n ].every((e) => e.length === 0);\n\n let correlationsBox = undefined;\n const isCorrelationsEditorMode = correlationEditorDetails?.editorMode;\n const showCorrelationHelper = Boolean(isCorrelationsEditorMode || correlationEditorDetails?.correlationDirty);\n if (showCorrelationHelper && correlationEditorHelperData !== undefined) {\n correlationsBox = <CorrelationHelper exploreId={exploreId} correlations={correlationEditorHelperData} />;\n }\n\n return (\n <ContentOutlineContextProvider>\n <ExploreToolbar\n exploreId={exploreId}\n onChangeTime={this.onChangeTime}\n onContentOutlineToogle={this.onContentOutlineToogle}\n isContentOutlineOpen={contentOutlineVisible}\n />\n <div\n style={{\n position: 'relative',\n height: '100%',\n paddingLeft: theme.spacing(2),\n }}\n >\n <div className={styles.wrapper}>\n {contentOutlineVisible && (\n <div className={styles.left}>\n <ContentOutline scroller={this.scrollElement} panelId={`content-outline-container-${exploreId}`} />\n </div>\n )}\n <CustomScrollbar\n testId={selectors.pages.Explore.General.scrollView}\n scrollRefCallback={(scrollElement) => (this.scrollElement = scrollElement || undefined)}\n hideHorizontalTrack\n >\n <div className={styles.exploreContainer}>\n {datasourceInstance ? (\n <>\n <ContentOutlineItem title=\"Queries\" icon=\"arrow\">\n <PanelContainer className={styles.queryContainer}>\n {correlationsBox}\n <QueryRows exploreId={exploreId} />\n <SecondaryActions\n // do not allow people to add queries with potentially different datasources in correlations editor mode\n addQueryRowButtonDisabled={\n isLive || (isCorrelationsEditorMode && datasourceInstance.meta.mixed)\n }\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 </ContentOutlineItem>\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 {showRawPrometheus && (\n <ErrorBoundaryAlert>{this.renderRawPrometheus(width)}</ErrorBoundaryAlert>\n )}\n {showTable && <ErrorBoundaryAlert>{this.renderTablePanel(width)}</ErrorBoundaryAlert>}\n {showLogs && <ErrorBoundaryAlert>{this.renderLogsPanel(width)}</ErrorBoundaryAlert>}\n {showNodeGraph && (\n <ErrorBoundaryAlert>{this.renderNodeGraphPanel()}</ErrorBoundaryAlert>\n )}\n {showFlameGraph && (\n <ErrorBoundaryAlert>{this.renderFlameGraphPanel()}</ErrorBoundaryAlert>\n )}\n {showTrace && <ErrorBoundaryAlert>{this.renderTraceViewPanel()}</ErrorBoundaryAlert>}\n {showLogsSample && (\n <ErrorBoundaryAlert>{this.renderLogsSamplePanel()}</ErrorBoundaryAlert>\n )}\n {showCustom && <ErrorBoundaryAlert>{this.renderCustom(width)}</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 isMixed={datasourceInstance.meta.mixed || false}\n />\n )}\n </ErrorBoundaryAlert>\n </main>\n );\n }}\n </AutoSizer>\n </>\n ) : (\n this.renderEmptyState(styles.exploreContainer)\n )}\n </div>\n </CustomScrollbar>\n </div>\n </div>\n </ContentOutlineContextProvider>\n );\n }\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: ExploreProps) {\n const explore = state.explore;\n const { syncedTimes } = explore;\n const item = explore.panes[exploreId]!;\n\n const timeZone = getTimeZone(state.user);\n const {\n datasourceInstance,\n queryKeys,\n queries,\n isLive,\n graphResult,\n tableResult,\n logsResult,\n showLogs,\n showMetrics,\n showTable,\n showTrace,\n showCustom,\n absoluteRange,\n queryResponse,\n showNodeGraph,\n showFlameGraph,\n showRawPrometheus,\n supplementaryQueries,\n correlationEditorHelperData,\n } = item;\n\n const loading = selectIsWaitingForData(exploreId)(state);\n const logsSample = supplementaryQueries[SupplementaryQueryType.LogsSample];\n // We want to show logs sample only if there are no log results and if there is already graph or table result\n const showLogsSample = !!(logsSample.dataProvider !== undefined && !logsResult && (graphResult || tableResult));\n\n return {\n datasourceInstance,\n queryKeys,\n queries,\n isLive,\n graphResult,\n logsResult: logsResult ?? undefined,\n absoluteRange,\n queryResponse,\n syncedTimes,\n timeZone,\n showLogs,\n showMetrics,\n showTable,\n showTrace,\n showCustom,\n showNodeGraph,\n showRawPrometheus,\n showFlameGraph,\n splitted: isSplit(state),\n loading,\n logsSample,\n showLogsSample,\n correlationEditorHelperData,\n correlationEditorDetails: explore.correlationEditorDetails,\n };\n}\n\nconst mapDispatchToProps = {\n changeSize,\n modifyQueries,\n scanStart,\n scanStopAction,\n setQueries,\n updateTimeRange,\n addQueryRow,\n splitOpen,\n setSupplementaryQueryEnabled,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default withTheme2(connector(Explore));\n","import { css } from '@emotion/css';\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport { connect } from 'react-redux';\n\nimport { EventBusSrv } from '@grafana/data';\nimport { selectors } from '@grafana/e2e-selectors';\nimport { CustomScrollbar } from '@grafana/ui';\nimport { stopQueryState } from 'app/core/utils/explore';\nimport { StoreState, useSelector } from 'app/types';\n\nimport Explore from './Explore';\nimport { getExploreItemSelector } from './state/selectors';\n\nconst containerStyles = css({\n label: 'explorePaneContainer',\n display: 'flex',\n flexDirection: 'column',\n minWidth: '600px',\n height: '100%',\n});\n\ninterface Props {\n exploreId: string;\n}\n\n/*\n Connected components subscribe to the store before function components (using hooks) and can react to store changes. Thus, this connector function is called before the parent component (ExplorePage) is rerendered.\n This means that child components' mapStateToProps will be executed with a zombie `exploreId` that is not present anymore in the store if the pane gets closed.\n By connecting this component and returning the pane we workaround the zombie children issue here instead of modifying every children.\n This is definitely not the ideal solution and we should in the future invest more time in exploring other approaches to better handle this scenario, potentially by refactoring panels to be function components \n (therefore immune to this behaviour), or by forbidding them to access the store directly and instead pass them all the data they need via props or context.\n\n You can read more about this issue here: https://react-redux.js.org/api/hooks#stale-props-and-zombie-children\n*/\nfunction ExplorePaneContainerUnconnected({ exploreId }: Props) {\n useStopQueries(exploreId);\n const eventBus = useRef(new EventBusSrv());\n const ref = useRef(null);\n\n useEffect(() => {\n const bus = eventBus.current;\n return () => bus.removeAllListeners();\n }, []);\n\n return (\n <CustomScrollbar hideVerticalTrack>\n <div className={containerStyles} ref={ref} data-testid={selectors.pages.Explore.General.container}>\n <Explore exploreId={exploreId} eventBus={eventBus.current} />\n </div>\n </CustomScrollbar>\n );\n}\n\nfunction mapStateToProps(state: StoreState, props: Props) {\n const pane = state.explore.panes[props.exploreId];\n\n return { pane };\n}\n\nconst connector = connect(mapStateToProps);\n\nexport const ExplorePaneContainer = connector(ExplorePaneContainerUnconnected);\n\nfunction useStopQueries(exploreId: string) {\n const paneSelector = useMemo(() => getExploreItemSelector(exploreId), [exploreId]);\n const paneRef = useRef<ReturnType<typeof paneSelector>>();\n paneRef.current = useSelector(paneSelector);\n\n useEffect(() => {\n return () => {\n stopQueryState(paneRef.current?.querySubscription);\n };\n }, []);\n}\n","import { useEffect, useRef } from 'react';\n\nimport { NavModel } from '@grafana/data';\nimport { Branding } from 'app/core/components/Branding/Branding';\nimport { useNavModel } from 'app/core/hooks/useNavModel';\nimport { getDatasourceSrv } from 'app/features/plugins/datasource_srv';\nimport { ExploreQueryParams } from 'app/types';\n\nimport { isFulfilled, hasKey } from './utils';\n\nexport function useExplorePageTitle(params: ExploreQueryParams) {\n const navModel = useRef<NavModel>();\n navModel.current = useNavModel('explore');\n const dsService = useRef(getDatasourceSrv());\n\n useEffect(() => {\n if (!params.panes || typeof params.panes !== 'string') {\n return;\n }\n\n let panesObject: unknown;\n try {\n panesObject = JSON.parse(params.panes);\n } catch {\n return;\n }\n\n if (typeof panesObject !== 'object' || panesObject === null) {\n return;\n }\n\n Promise.allSettled(\n Object.values(panesObject).map((pane) => {\n if (\n !pane ||\n typeof pane !== 'object' ||\n !hasKey('datasource', pane) ||\n !pane.datasource ||\n typeof pane.datasource !== 'string'\n ) {\n return Promise.reject();\n }\n\n return dsService.current.get(pane.datasource);\n })\n )\n .then((results) => results.filter(isFulfilled).map((result) => result.value))\n .then((datasources) => {\n if (!navModel.current) {\n return;\n }\n\n const names = datasources.map((ds) => ds.name);\n\n if (names.length === 0) {\n global.document.title = `${navModel.current.main.text} - ${Branding.AppTitle}`;\n return;\n }\n\n global.document.title = `${navModel.current.main.text} - ${names.join(' | ')} - ${Branding.AppTitle}`;\n });\n }, [params.panes]);\n}\n","import { useEffect } from 'react';\nimport { Unsubscribable } from 'rxjs';\n\nimport { getAppEvents } from '@grafana/runtime';\nimport { useGrafana } from 'app/core/context/GrafanaContext';\nimport { useDispatch } from 'app/types';\nimport { AbsoluteTimeEvent, CopyTimeEvent, PasteTimeEvent, ShiftTimeEvent, ZoomOutEvent } from 'app/types/events';\n\nimport {\n copyTimeRangeToClipboard,\n makeAbsoluteTime,\n pasteTimeRangeFromClipboard,\n shiftTime,\n zoomOut,\n} from '../state/time';\n\nexport function useKeyboardShortcuts() {\n const { keybindings } = useGrafana();\n const dispatch = useDispatch();\n\n useEffect(() => {\n keybindings.setupTimeRangeBindings(false);\n\n const tearDown: Unsubscribable[] = [];\n\n tearDown.push(\n getAppEvents().subscribe(AbsoluteTimeEvent, () => {\n dispatch(makeAbsoluteTime());\n })\n );\n\n tearDown.push(\n getAppEvents().subscribe(ShiftTimeEvent, (event) => {\n dispatch(shiftTime(event.payload.direction));\n })\n );\n\n tearDown.push(\n getAppEvents().subscribe(ZoomOutEvent, (event) => {\n dispatch(zoomOut(event.payload.scale));\n })\n );\n\n tearDown.push(\n getAppEvents().subscribe(CopyTimeEvent, () => {\n dispatch(copyTimeRangeToClipboard());\n })\n );\n\n tearDown.push(\n getAppEvents().subscribe(PasteTimeEvent, () => {\n dispatch(pasteTimeRangeFromClipboard());\n })\n );\n\n return () => {\n tearDown.forEach((u) => u.unsubscribe());\n };\n }, [dispatch, keybindings]);\n}\n","import { inRange } from 'lodash';\nimport { useState } from 'react';\nimport { useWindowSize } from 'react-use';\n\nimport { useDispatch, useSelector } from 'app/types';\n\nimport { splitSizeUpdateAction } from '../state/main';\nimport { isSplit, selectPanesEntries } from '../state/selectors';\n\nexport const useSplitSizeUpdater = (minWidth: number) => {\n const dispatch = useDispatch();\n const { width: windowWidth } = useWindowSize();\n const panes = useSelector(selectPanesEntries);\n const hasSplit = useSelector(isSplit);\n const [rightPaneWidthRatio, setRightPaneWidthRatio] = useState(0.5);\n\n const exploreState = useSelector((state) => state.explore);\n\n const updateSplitSize = (size: number) => {\n const evenSplitWidth = windowWidth / 2;\n const areBothSimilar = inRange(size, evenSplitWidth - 100, evenSplitWidth + 100);\n if (areBothSimilar) {\n dispatch(splitSizeUpdateAction({ largerExploreId: undefined }));\n } else {\n dispatch(\n splitSizeUpdateAction({\n largerExploreId: size > evenSplitWidth ? panes[1][0] : panes[0][0],\n })\n );\n }\n\n setRightPaneWidthRatio(size / windowWidth);\n };\n\n let widthCalc = 0;\n if (hasSplit) {\n if (!exploreState.evenSplitPanes && exploreState.maxedExploreId) {\n widthCalc = exploreState.maxedExploreId === panes[1][0] ? windowWidth - minWidth : minWidth;\n } else if (exploreState.evenSplitPanes) {\n widthCalc = Math.floor(windowWidth / 2);\n } else if (rightPaneWidthRatio !== undefined) {\n widthCalc = windowWidth * rightPaneWidthRatio;\n }\n }\n\n return { updateSplitSize, widthCalc };\n};\n","import { useEffect } from 'react';\n\nimport { useGrafana } from 'app/core/context/GrafanaContext';\n\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 */\nexport function useTimeSrvFix() {\n const { location } = useGrafana();\n\n useEffect(() => {\n const searchParams = location.getSearchObject();\n if (searchParams.from || searchParams.to) {\n location.partial({ from: undefined, to: undefined }, true);\n }\n }, [location]);\n}\n","import { css, cx } from '@emotion/css';\nimport React, { useEffect } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { ErrorBoundaryAlert, useStyles2, useTheme2 } from '@grafana/ui';\nimport { SplitPaneWrapper } from 'app/core/components/SplitPaneWrapper/SplitPaneWrapper';\nimport { useGrafana } from 'app/core/context/GrafanaContext';\nimport { useNavModel } from 'app/core/hooks/useNavModel';\nimport { GrafanaRouteComponentProps } from 'app/core/navigation/types';\nimport { useSelector } from 'app/types';\nimport { ExploreQueryParams } from 'app/types/explore';\n\nimport { CorrelationEditorModeBar } from './CorrelationEditorModeBar';\nimport { ExploreActions } from './ExploreActions';\nimport { ExplorePaneContainer } from './ExplorePaneContainer';\nimport { useExplorePageTitle } from './hooks/useExplorePageTitle';\nimport { useKeyboardShortcuts } from './hooks/useKeyboardShortcuts';\nimport { useSplitSizeUpdater } from './hooks/useSplitSizeUpdater';\nimport { useStateSync } from './hooks/useStateSync';\nimport { useTimeSrvFix } from './hooks/useTimeSrvFix';\nimport { isSplit, selectCorrelationDetails, selectPanesEntries } from './state/selectors';\n\nconst MIN_PANE_WIDTH = 200;\n\nexport default function ExplorePage(props: GrafanaRouteComponentProps<{}, ExploreQueryParams>) {\n const styles = useStyles2(getStyles);\n const theme = useTheme2();\n useTimeSrvFix();\n useStateSync(props.queryParams);\n // We want to set the title according to the URL and not to the state because the URL itself may lag\n // (due to how useStateSync above works) by a few milliseconds.\n // When a URL is pushed to the history, the browser also saves the title of the page and\n // if we were to update the URL on state change, the title would not match the URL.\n // Ultimately the URL is the single source of truth from which state is derived, the page title is not different\n useExplorePageTitle(props.queryParams);\n const { chrome } = useGrafana();\n const navModel = useNavModel('explore');\n const { updateSplitSize, widthCalc } = useSplitSizeUpdater(MIN_PANE_WIDTH);\n\n const panes = useSelector(selectPanesEntries);\n const hasSplit = useSelector(isSplit);\n const correlationDetails = useSelector(selectCorrelationDetails);\n const showCorrelationEditorBar = config.featureToggles.correlations && (correlationDetails?.editorMode || false);\n\n useEffect(() => {\n //This is needed for breadcrumbs and topnav.\n //We should probably abstract this out at some point\n chrome.update({ sectionNav: navModel });\n }, [chrome, navModel]);\n\n useKeyboardShortcuts();\n\n return (\n <div\n className={cx(styles.pageScrollbarWrapper, {\n [styles.correlationsEditorIndicator]: showCorrelationEditorBar,\n })}\n >\n <ExploreActions />\n {showCorrelationEditorBar && <CorrelationEditorModeBar panes={panes} />}\n <SplitPaneWrapper\n splitOrientation=\"vertical\"\n paneSize={widthCalc}\n minSize={MIN_PANE_WIDTH}\n maxSize={MIN_PANE_WIDTH * -1}\n primary=\"second\"\n splitVisible={hasSplit}\n parentStyle={showCorrelationEditorBar ? { height: `calc(100% - ${theme.spacing(6)}` } : {}} // button = 4, padding = 1 x 2\n paneStyle={{ overflow: 'auto', display: 'flex', flexDirection: 'column' }}\n onDragFinished={(size) => size && updateSplitSize(size)}\n >\n {panes.map(([exploreId]) => {\n return (\n <ErrorBoundaryAlert key={exploreId} style=\"page\">\n <ExplorePaneContainer exploreId={exploreId} />\n </ErrorBoundaryAlert>\n );\n })}\n </SplitPaneWrapper>\n </div>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n pageScrollbarWrapper: css({\n width: '100%',\n flexGrow: 1,\n minHeight: 0,\n height: '100%',\n position: 'relative',\n }),\n correlationsEditorIndicator: css({\n borderLeft: `4px solid ${theme.colors.primary.main}`,\n borderRight: `4px solid ${theme.colors.primary.main}`,\n borderBottom: `4px solid ${theme.colors.primary.main}`,\n overflow: 'scroll',\n }),\n };\n};\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"],"names":["getSupportedTransTypeDetails","transType","getTransformOptions","transformationType","useBeforeUnload","enabled","message","handler","event","finalEnabled","CorrelationUnsavedChangesModal","onSave","onDiscard","onCancel","Modal","Button","CONSEQUENCES","showModalMessage","action","isActionLeft","dirtyCorrelation","dirtyQueryEditor","messageTemplate","actionStr","consequenceStr","CorrelationEditorModeBar","panes","dispatch","styles","getStyles","correlationDetails","isHelperShowing","saveMessage","setSaveMessage","correlationDirty","queryEditorDirty","modalMessage","exploreId","changeDatasourceUid","useUnmount","pane","resetEditor","closePane","changeDatasourcePostAction","datasourceUid","saveCorrelationPostAction","skipPostConfirmAction","location","Tooltip","Icon","theme","contrastColor","lighterBackgroundColor","colorManipulator","darkerBackgroundColor","disabledColor","ExploreActions","actions","setActions","query","splitted","canWriteCorrelations","keys","exploreSection","actionsArr","hasMixed","config","useScroll","ref","_a","useRafState","state","setState","ContentOutlineContext","ContentOutlineContextProvider","children","outlineItems","setOutlineItems","register","title","icon","id","prevItems","a","b","diff","unregister","item","useContentOutlineContext","ctx","ContentOutlineItemButton","tooltip","className","isActive","rest","buttonStyles","body","renderIcon","ContentOutline","scroller","panelId","expanded","toggleExpanded","useToggle","activeItemId","setActiveItemId","scrollerRef","verticalScroll","scrollIntoView","buttonTitle","scrollValue","el","toggle","activeItem","top","PanelContainer","CustomScrollbar","ContentOutlineItem","LabelWithTooltip","label","tooltipText","Stack","Label","CorrelationTransformationAddModal","fieldList","transformationToEdit","exampleValue","setExampleValue","transformationVars","setTransformationVars","formFieldsVis","setFormFieldsVis","isExpValid","setIsExpValid","validToSave","setValidToSave","getValues","control","watch","exampleVal","transformationTypeDetails","subscription","formValues","expression","isExpressionValid","transKeys","Field","InputControl","onChange","field","Select","value","entry","Input","CorrelationHelper","correlations","panesVals","defaultLabel","loadingLabel","useAsync","setValue","isLabelDescOpen","setIsLabelDescOpen","isTransformOpen","setIsTransformOpen","showTransformationAddModal","setShowTransformationAddModal","transformations","setTransformations","transformationIdxToEdit","setTransformationIdxToEdit","dirty","description","transVarRecords","transformation","key","editTransformations","Alert","Collapse","i","type","mapValue","detailsString","val","Card","IconButton","DeleteButton","_","idx","CustomContainer","width","height","timeZone","pluginId","frames","absoluteRange","splitOpenFn","eventBus","timeRange","plugin","panelContext","useExploreDataLinkPostProcessor","PanelContext","PanelChrome","innerWidth","innerHeight","PanelRenderer","__extends","extendStatics","d","p","__","__assign","t","s","n","rowSizeBase","colSizeBase","edgeBase","Resizer","_super","_this","e","DEFAULT_SIZE","clamp","min","max","snap","size","hasDirection","dir","target","isTouchEvent","isMouseEvent","findClosestSnap","snapArray","snapGap","closestGapIndex","prev","curr","index","gap","getStringSize","getPixelSize","parentSize","ratio","calculateNewMax","maxWidth","maxHeight","minWidth","minHeight","definedProps","baseClassName","Resizable","props","parent","element","base","c","orgWidth","orgHeight","orgPosition","getSize","percent","wrapChanged","wrap","computedStyle","newSize","kind","propsSize","boundsByDirection","direction","widthByDirection","heightByDirection","boundWidth","boundHeight","parent_1","clientX","clientY","scale","resizeRatio","original","_b","lockAspectRatio","lockAspectRatioExtraHeight","lockAspectRatioExtraWidth","newWidth","newHeight","extraHeight","extraWidth","computedMinWidth","computedMaxWidth","computedMinHeight","computedMaxHeight","extraMinWidth","extraMaxWidth","extraMinHeight","extraMaxHeight","lockedMinWidth","lockedMaxWidth","lockedMinHeight","lockedMaxHeight","parent_2","parentRect","targetRect","left","top_1","right","bottom","startResize","flexBasis","parent_3","_c","boundaryMax","newGridWidth","newGridHeight","delta","vw","vh","newState","isResizing","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","handleComponent","resizers","extendsProps","acc","style","Wrapper","ExploreDrawer","onResize","dragStyles","drawerWidth","drawerSlide","ExploreQueryInspector","onClose","queryResponse","isMixed","dataOptions","setDataOptions","dataFrames","errors","statsTab","InspectStatsTab","jsonTab","InspectJSONTab","dataTab","InspectDataTab","queryTab","QueryInspector","tabs","errorTab","InspectErrorTab","TabbedContainer","mapStateToProps","mapDispatchToProps","TimeSyncButton","onClick","isSynced","syncTimesTooltip","ToolbarButton","ExploreTimeControls","range","onChangeTime","from","to","nextTimeRange","adjustedFrom","adjustedTo","fiscalYearStartMonth","syncedTimes","onChangeTimeSync","hideText","onChangeTimeZone","onChangeFiscalYearStartMonth","timeSyncButton","timePickerCommonProps","TimePickerWithHistory","LiveTailButton","start","pause","resume","isLive","isPaused","stop","buttonVariant","onClickMain","ButtonGroup","CSSTransition","defaultMode","ShortLinkButtonMenu","isOpen","setIsOpen","lastSelected","setLastSelected","onCopyLink","shorten","absTime","url","menuOptions","MenuActions","Menu","groupOption","MenuGroup","option","ToolbarButtonRow","Dropdown","AddToDashboard","ToolbarExtensionPoint","selectedExtension","setSelectedExtension","context","useExtensionPointContext","extensions","useExtensionLinks","selectExploreItem","noQueriesInPane","menu","ToolbarExtensionPointMenu","ConfirmNavigationModal","isCorrelationsEditorMode","queries","isLeftPane","datasourceUids","uid","numUniqueIds","useLiveTailControls","RefreshPicker","clear","LiveTailControls","controls","ExploreToolbar","onContentOutlineToogle","isContentOutlineOpen","refreshInterval","datasourceInstance","loading","isLargerPane","showSmallTimePicker","showSmallDataSourcePicker","shouldRotateSplitIcon","refreshPickerLabel","onChangeDatasource","dsSettings","onRunQuery","timezone","onOpenSplitView","onCloseSplitView","onClickResize","fiscalyearStartMonth","onChangeRefreshInterval","navBarActions","SetInterval","AppChromeUpdate","PageToolbar","DataSourcePicker","interaction","name","FlameGraphExploreContainer","view","align","sort","INTERVAL","ElapsedTime","resetKey","humanize","elapsed","setElapsed","useInterval","Time","tinycolor","LiveLogs","onPause","scrollTop","clientHeight","scrollHeight","rowsToRender","nextProps","onResume","onClear","logsRow","logsRowLocalTime","logsRowMessage","getLogRowStyles","row","LogMessageAnsi","LiveLogsWithTheme","InfiniteScroll","loadMoreLogs","rows","scrollElement","sortOrder","upperOutOfRange","setUpperOutOfRange","lowerOutOfRange","setLowerOutOfRange","upperLoading","setUpperLoading","lowerLoading","setLowerLoading","rowsRef","lastScroll","handleScroll","scrollDirection","shouldLoadMore","scrollBottom","newRange","canScrollTop","getVisibleRange","canScrollBottom","hideTopMessage","hideBottomMessage","LoadingIndicator","outOfRangeMessage","ScrollDirection","firstTimeStamp","lastTimeStamp","getPrevRange","visibleRange","currentRange","getNextRange","updateCurrentRange","SCROLLING_THRESHOLD","LogsFeedback","feedbackUrl","MetaInfoItem","MetaInfoText","metaItems","LogsTable","splitOpen","logsSortOrder","dataFrame","columnsWithMeta","logsFrame","tableFrame","setTableFrame","timeIndex","prepareTableFrame","frame","sortedFrame","frameWithOverrides","v","getInitialFieldWidth","isFieldFilterable","getLogsExtractFields","labelFilters","buildLabelFilters","transform","getLabelFiltersTransform","transformedDataFrame","lastValueFrom","transformDataFrame","onCellFilterAdded","filter","operator","onClickFilterLabel","onClickFilterOutLabel","Table","bodyName","timeName","isFieldLokiLabels","isFieldDataplaneLabels","labelFiltersInclude","DownloadFormat","LogsMetaRow","meta","dedupStrategy","dedupCount","displayedFields","clearDetectedFields","hasUnescapedContent","forceEscape","onEscapeNewlines","logRows","downloadLogs","format","download","jsonLogs","blob","fileName","dataFrameMap","transforms","logsMetaItem","r","renderMetaItem","downloadMenu","LogLabels","LogsNavigationPages","pages","currentPageIndex","oldestLogsFirst","formatTime","time","createPageContent","page","Spinner","topContent","bottomContent","LogsNavigation","scrollToTopLogs","clearCache","addResultsToCache","setPages","expectedQueriesRef","expectedRangeRef","rangeSpanRef","onFirstPage","onLastPage","newPage","newPages","sortPages","changeTime","olderLogsButton","indexChange","newerLogsButton","onPageClick","pageNumber","navContainerHeight","LogsColumnSearch","LogsTableEmptyFields","LogsTableNavField","Checkbox","getLogsFieldsStyles","sortLabels","labels","la","lb","LogsTableActiveFields","reorderColumn","valueFilter","toggleColumn","labelKeys","labelName","onDragEnd","result","renderTitle","provided","snapshot","collator","LogsTableAvailableFields","LogsTableMultiSelect","uf","fuzzySearch","haystack","dispatcher","idxs","info","order","haystackOrder","matchesSet","mark","part","matched","infoIdx","debouncedFuzzySearch","LogsTableWrap","logsFrames","updatePanelState","panelState","propsColumns","setColumnsWithMeta","filteredColumnsWithMeta","setFilteredColumnsWithMeta","searchValue","setSearchValue","getLogsTableHeight","panelStateRefId","currentDataFrame","setCurrentDataFrame","f","getColumnsFromProps","fieldNames","previouslySelected","defaultColumns","newFrame","newFiltered","flag","numberOfLogLines","otherFields","labelCardinality","pendingLabelState","normalize","sidebarWidth","setSidebarWidth","tableWidth","columnFilterEvent","columnName","priorActiveCount","column","searchFilterEvent","searchResultCount","clearSelection","isDefaultField","sourceIndex","destinationIndex","source","updateExploreState","newColumnsArray","pa","pb","newColumns","newPanelState","length","active","pendingFilteredLabelState","data","matches","newColumnsWithMeta","numberOfResults","match","search","needle","onSearchInputChange","onFrameSelectorChange","getOnResize","newSidebarWidth","InlineField","total","SupplementaryResultError","SHORT_ERROR_MESSAGE_LIMIT","error","suggestedAction","onSuggestedAction","onRemove","severity","showButton","LogsVolumePanel","onUpdateTimeRange","onHiddenSeriesChanged","allLogsVolumeMaximum","spacing","logsVolumeData","logsVolumeInfo","extraInfo","extraInfoComponent","ExploreGraph","isTimeoutErrorResponse","response","LogsVolumePanelList","onLoadLogsVolume","logVolumes","allLogsVolumeMaximumValue","allLogsVolumeMaximumRange","annotations","maximumValue","sorted","grouped","mergedData","maximumRange","numberOfLogVolumes","containsZoomed","zoomRatio","logsLevelZoomRatio","timeoutError","selectedTimeRange","dataRange","DEDUP_OPTIONS","getDefaultVisualisationType","UnthemedLogs","logsPanelState","node","prevState","newSortOrder","visualisation","payload","showLabels","showTime","wrapLogMessage","prettifyLogMessage","hiddenRawLevels","hiddenLogLevels","level","collapsed","k","urlState","serializedState","baseUrl","dedupedRows","sum","prevProps","visualisationType","allLogs","logRow","prevLog","logsMeta","logsVolumeEnabled","loadLogsVolumeData","scanning","scanRange","showContextToggle","getFieldLinks","logsQueries","getRowContext","getLogRowContextUi","getRowContextQuery","isFlipping","contextOpen","contextRow","tableHeight","hasData","filteredLogs","navigationRange","scanText","LogRowContextModal","options","RadioButtonGroup","InlineFieldRow","dedupType","LogRows","Logs","transitionDuration","transitionDelay","LogsCrossFadeTransition","visible","LogsContainer","updateTimeRange","origRow","ds","cacheFilters","runContextQuery","rowIndex","dsInstances","refId","dsPromises","resolve","instances","q","loadingState","logsSeries","loadSupplementaryQueryData","setSupplementaryQueryEnabled","onStartScanning","onStopScanning","logsVolume","logsResult","clearedAtIndex","supplementaryQueries","LogsSamplePanel","setLogsSampleEnabled","onToggleLogsSampleCollapse","OpenInSplitViewButton","logSampleQueries","onSplitOpen","LogsSamplePanelContent","logs","NoData","css","getCardStyles","NoDataSourceCallToAction","cardStyles","canCreateDataSource","footer","ctaElement","CallToActionCard","UnconnectedNodeGraphContainer","withTraceView","datasourceType","getLinks","nodes","useCategorizeFrames","toggleCollapsed","toggled","windowHeight","useWindowSize","containerRef","setTop","countWarning","NodeGraph","NodeGraphContainer","makeSelectors","exploreItemSelector","QueryRows","getQueries","getDatasourceInstanceSettings","getQueryResponse","getHistory","getEventBridge","history","eventBridge","onRunQueries","newQueries","onAddQuery","onQueryCopied","onQueryRemoved","onQueryToggled","queryStatus","QueryEditorRows","mobileWidthThreshold","numberOfColumnsBeforeExpandedViewIsDefault","tableResult","listRef","valueLabels","items","getRawPrometheusListItemsFromDataFrame","isExpandedView","setIsExpandedView","onContentClick","calculateInitialHeight","getListItemHeight","itemIndex","switchId","Switch","ItemLabels","filteredValueLabels","valueLabel","itemWithValue","RawListItem","rawPrometheusResult","rawPrometheusFrame","RawPrometheusContainer","resultsStyle","ALL_GRAPH_STYLE_OPTIONS","ariaLabel","dataLinkPostProcessor","renderTable","FadeIn","defaultStyle","transitionStyles","Transition","ErrorContainer","queryError","showError","duration","ResponseErrorContainer","explore","rightColumnWidth","rightColumnContentWidth","cardColor","RichHistoryCard","queryHistoryItem","commentHistoryItem","starHistoryItem","deleteHistoryItem","changeDatasource","setQueries","activeUpdateComment","setActiveUpdateComment","comment","setComment","historyCardData","datasource","queriesToRun","differentDataSource","onCopyQuery","datasources","queriesText","onCreateShortLink","link","onDeleteQuery","performDelete","queryId","onStarrQuery","toggleActiveUpdateComment","onUpdateComment","onCancelUpdateComment","onKeyDown","keyEvent","updateComment","TextArea","queryActionButtons","DatasourceInfo","Query","LoadingPlaceholder","getQueryStyles","showDsInfo","getDsInfoStyles","dsApi","RichHistoryQueriesTab","totalQueries","richHistorySearchFilters","updateFilters","clearRichHistoryResults","loadMoreRichHistory","richHistorySettings","activeDatasourceInstance","listOfDatasources","datasourceFilters","filters","mappedQueriesToHeadings","sortOrderOptions","getSortOrderOptions","partialResults","RangeSlider","FilterInput","heading","retentionPeriodOptions","RichHistorySettingsTab","retentionPeriod","starredTabAsFirstTab","activeDatasourceOnly","onChangeRetentionPeriod","toggleStarredTabAsFirstTab","toggleactiveDatasourceOnly","deleteRichHistory","selectedOption","onDelete","RichHistoryStarredTab","Tabs","RichHistory","richHistory","richHistoryTotal","firstTab","setLoading","updateSettings","settingsToUpdate","filtersToUpdate","loadRichHistory","toggleActiveDatasourceOnly","QueriesTab","StarredTab","SettingsTab","RichHistoryContainer","setHeight","initRichHistory","updateHistorySettings","updateHistorySearchFilters","_e","_dir","SecondaryActions","loadingInState","TableContainer","rowCount","hasSubFrames","TableContainerWithTheme","TraceViewContainer","traceProp","TraceView","Explore","rawRange","queryKeys","modifier","modification","toggleableFilters","panelType","tracking","exploreContainerStyles","groupedByPlugin","graphResult","showFlameGraph","GraphContainer","logsContentOutlineWrapper","logsSample","showTrace","series","showMetrics","showTable","showRawPrometheus","showLogs","showCustom","showNodeGraph","showLogsSample","correlationEditorDetails","correlationEditorHelperData","openDrawer","contentOutlineVisible","showPanels","showRichHistory","richHistoryRowButtonHidden","showQueryInspector","showNoData","correlationsBox","ErrorBoundary","containerStyles","ExplorePaneContainerUnconnected","useStopQueries","EventBus","bus","ExplorePaneContainer","paneSelector","paneRef","useExplorePageTitle","params","navModel","useNavModel","dsService","panesObject","results","names","Branding","useKeyboardShortcuts","keybindings","tearDown","u","useSplitSizeUpdater","windowWidth","hasSplit","rightPaneWidthRatio","setRightPaneWidthRatio","exploreState","updateSplitSize","evenSplitWidth","areBothSimilar","widthCalc","useTimeSrvFix","searchParams","MIN_PANE_WIDTH","ExplorePage","useStateSync","chrome","showCorrelationEditorBar","SplitPaneWrapper","callback","delay","savedCallback","interval_1"],"sourceRoot":""}
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
static
---
0755
0.c88fc16b6533c8976681.js
11857 bytes
0644
0.c88fc16b6533c8976681.js.map
46011 bytes
0644
1118.6d1cbbd2070e00a7483d.js
9459 bytes
0644
1118.6d1cbbd2070e00a7483d.js.map
22012 bytes
0644
1121.6c31bf81768d3312b0d4.js
11557 bytes
0644
1121.6c31bf81768d3312b0d4.js.map
40274 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js
4310 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js.map
9301 bytes
0644
1133.cd705902767ed2e9bf55.js
107191 bytes
0644
1133.cd705902767ed2e9bf55.js.map
459177 bytes
0644
1216.ddb58ad09e0c4e3f4079.js
12860 bytes
0644
1216.ddb58ad09e0c4e3f4079.js.map
47906 bytes
0644
1282.2347f27d5b3a18a42a1e.js
2965 bytes
0644
1282.2347f27d5b3a18a42a1e.js.map
6699 bytes
0644
1345.8570fef914aafab94513.js
2223 bytes
0644
1345.8570fef914aafab94513.js.map
5201 bytes
0644
1347.8ad23b870a6e21306189.js
32035 bytes
0644
1347.8ad23b870a6e21306189.js.map
89851 bytes
0644
1420.f2553cafc235b7c32261.js
14576 bytes
0644
1420.f2553cafc235b7c32261.js.map
32839 bytes
0644
1438.897db349b7f48a15b9eb.js
2830 bytes
0644
1438.897db349b7f48a15b9eb.js.map
6911 bytes
0644
1446.babd36e7134aac1046c4.js
1832 bytes
0644
1446.babd36e7134aac1046c4.js.map
3282 bytes
0644
1488.ff35935a06f41b02b6cc.js
316 bytes
0644
1488.ff35935a06f41b02b6cc.js.map
1206 bytes
0644
1560.30962127c91e5eae9982.js
8916 bytes
0644
1560.30962127c91e5eae9982.js.map
20515 bytes
0644
1660.e1f66118fb028d12074f.js
21866 bytes
0644
1660.e1f66118fb028d12074f.js.map
71039 bytes
0644
1698.68ff1ef08e94a87836b3.js
12570 bytes
0644
1698.68ff1ef08e94a87836b3.js.map
46006 bytes
0644
1708.f42a783c0f6c7a317d49.js
2249 bytes
0644
1708.f42a783c0f6c7a317d49.js.map
2954 bytes
0644
1710.d96221051fceaf8c89dd.js
10172 bytes
0644
1710.d96221051fceaf8c89dd.js.map
22097 bytes
0644
1740.e57d920c47a11759ade4.js
6204 bytes
0644
1740.e57d920c47a11759ade4.js.map
13740 bytes
0644
1888.0ede69d3190c536744b9.js
6822 bytes
0644
1888.0ede69d3190c536744b9.js.map
15421 bytes
0644
1914.58113477b565d57e8bfe.js
10710 bytes
0644
1914.58113477b565d57e8bfe.js.map
23555 bytes
0644
198.b84c0e4f5759344ae05a.js
8267 bytes
0644
198.b84c0e4f5759344ae05a.js.map
19446 bytes
0644
205.6c51b5e35c8147226738.js
3542 bytes
0644
205.6c51b5e35c8147226738.js.map
8376 bytes
0644
2058.0e5df44647184aaf02e2.js
1252 bytes
0644
2058.0e5df44647184aaf02e2.js.map
4744 bytes
0644
2077.12b2df3682085a92a810.js
34133 bytes
0644
2077.12b2df3682085a92a810.js.map
122011 bytes
0644
2094.259625d8acf28b9c7361.js
16518 bytes
0644
2094.259625d8acf28b9c7361.js.map
41269 bytes
0644
21.afca69f2d336e287a655.js
6172 bytes
0644
21.afca69f2d336e287a655.js.map
17305 bytes
0644
2136.9c8dcd43d3af327f51f5.js
498667 bytes
0644
2136.9c8dcd43d3af327f51f5.js.map
1908011 bytes
0644
2228.cf629cf4a83c5b6c2671.js
269 bytes
0644
2228.cf629cf4a83c5b6c2671.js.map
457 bytes
0644
2244.9324c28eca7d2ffb7568.js
3396 bytes
0644
2244.9324c28eca7d2ffb7568.js.map
7683 bytes
0644
2261.ac6a26854d5acee00776.js
106373 bytes
0644
2261.ac6a26854d5acee00776.js.map
478562 bytes
0644
2278.bdd73b14b6337c6b14e4.js
5754 bytes
0644
2278.bdd73b14b6337c6b14e4.js.map
13399 bytes
0644
2398.3de0e7aa3057b7dcf9da.js
8016 bytes
0644
2398.3de0e7aa3057b7dcf9da.js.map
18383 bytes
0644
2514.c86950e9813e27962050.js
1983 bytes
0644
2514.c86950e9813e27962050.js.map
4863 bytes
0644
2571.345ecfd2b82551018f2e.js
162139 bytes
0644
2571.345ecfd2b82551018f2e.js.map
2046 bytes
0644
2586.972e9a7d564398afee76.js
6385 bytes
0644
2586.972e9a7d564398afee76.js.map
14676 bytes
0644
2658.f4100815829c4d37d35c.js
5432 bytes
0644
2658.f4100815829c4d37d35c.js.map
13650 bytes
0644
2686.2fbaa7db9c01d59cad8d.js
2815 bytes
0644
2686.2fbaa7db9c01d59cad8d.js.map
6564 bytes
0644
2692.20098ad0182743d98d62.js
2282 bytes
0644
2692.20098ad0182743d98d62.js.map
5680 bytes
0644
2694.a31d749361a36eb167da.js
2726 bytes
0644
2694.a31d749361a36eb167da.js.map
3618 bytes
0644
2745.2e5ec1fdf377d2940fb4.js
33584 bytes
0644
2745.2e5ec1fdf377d2940fb4.js.map
120277 bytes
0644
2962.4c3147d8ee365fe296ef.js
7640 bytes
0644
2962.4c3147d8ee365fe296ef.js.map
17621 bytes
0644
3042.248a4194805a8500fd28.js
19010 bytes
0644
3042.248a4194805a8500fd28.js.map
38148 bytes
0644
3062.4e9a427c2a59d53f902e.js
4663 bytes
0644
3062.4e9a427c2a59d53f902e.js.map
10650 bytes
0644
3082.c09cff56c35d736ee8b6.js
52872 bytes
0644
3082.c09cff56c35d736ee8b6.js.map
56822 bytes
0644
3096.8d41728a4f5010bc56a2.js
4378 bytes
0644
3096.8d41728a4f5010bc56a2.js.map
10739 bytes
0644
3098.f22ad6dab13d06477be0.js
31462 bytes
0644
3098.f22ad6dab13d06477be0.js.map
85588 bytes
0644
3182.1d531f28507c00e391fc.js
13817 bytes
0644
3182.1d531f28507c00e391fc.js.map
26653 bytes
0644
3407.666eb88a718e66b93f72.js
34425 bytes
0644
3407.666eb88a718e66b93f72.js.map
103716 bytes
0644
3418.d31d882b87bd5a2ef66f.js
33061 bytes
0644
3418.d31d882b87bd5a2ef66f.js.map
114234 bytes
0644
3541.8d063e3d43d55745d89b.js
20582 bytes
0644
3541.8d063e3d43d55745d89b.js.map
67154 bytes
0644
3543.eecef49ce94da5ee0418.js
136752 bytes
0644
3543.eecef49ce94da5ee0418.js.map
446118 bytes
0644
3622.976b1aef94b333e450b9.js
1260 bytes
0644
3622.976b1aef94b333e450b9.js.map
2819 bytes
0644
3686.102abfc00452299017bb.js
87 bytes
0644
3718.3993946b7a0eb8f64b4d.js
23620 bytes
0644
3718.3993946b7a0eb8f64b4d.js.map
92024 bytes
0644
3726.3adfe210678d2cd26969.js
31765 bytes
0644
3726.3adfe210678d2cd26969.js.map
118227 bytes
0644
398.4e93ffb675609ea7a9c6.js
2990 bytes
0644
398.4e93ffb675609ea7a9c6.js.map
7145 bytes
0644
4114.953b39a9ce57caa0e87a.js
2536 bytes
0644
4114.953b39a9ce57caa0e87a.js.map
6028 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js
3229 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js.map
7533 bytes
0644
4209.c7060d489834063658f5.js
17352 bytes
0644
4209.c7060d489834063658f5.js.map
30980 bytes
0644
4254.c5f4a5512b252e3a5796.js
71716 bytes
0644
4254.c5f4a5512b252e3a5796.js.map
237783 bytes
0644
4289.d5662b0904798ff437e9.js
16496 bytes
0644
4289.d5662b0904798ff437e9.js.map
32015 bytes
0644
4334.bc078c368a20ed3257b6.js
2598 bytes
0644
4334.bc078c368a20ed3257b6.js.map
6308 bytes
0644
4630.b604ea691184ba563d59.js
5585 bytes
0644
4630.b604ea691184ba563d59.js.map
11866 bytes
0644
4680.358dfdd92851f69ecc97.js
4573 bytes
0644
4680.358dfdd92851f69ecc97.js.map
10841 bytes
0644
4698.696713071ff5d9929a11.js
3682 bytes
0644
4698.696713071ff5d9929a11.js.map
8967 bytes
0644
4787.bd938ea7cb58d64ee246.js
738 bytes
0644
4787.bd938ea7cb58d64ee246.js.map
2168 bytes
0644
4839.17a10e0ceca3eb8954b4.js
39585 bytes
0644
4839.17a10e0ceca3eb8954b4.js.map
145699 bytes
0644
494.8cf705bc1ea509187c88.js
3796 bytes
0644
494.8cf705bc1ea509187c88.js.map
8987 bytes
0644
4958.cd447d877778fc5af081.js
4923 bytes
0644
4958.cd447d877778fc5af081.js.map
11000 bytes
0644
4962.0da526ad79f816a15985.js
2242 bytes
0644
4962.0da526ad79f816a15985.js.map
4978 bytes
0644
50.7b1e44d5b9dbbed566be.js
617497 bytes
0644
50.7b1e44d5b9dbbed566be.js.map
2271464 bytes
0644
5017.003cacead1bba1cba035.js
3567142 bytes
0644
5017.003cacead1bba1cba035.js.map
13214665 bytes
0644
5130.4d31108de97088a3b014.js
2850 bytes
0644
5130.4d31108de97088a3b014.js.map
6536 bytes
0644
5196.064b914693b6a5591a48.js
4035 bytes
0644
5196.064b914693b6a5591a48.js.map
10273 bytes
0644
5240.eceb5f73f807ac22d800.js
704 bytes
0644
5240.eceb5f73f807ac22d800.js.map
2618 bytes
0644
5277.ce6608b6f47246e32767.js
269 bytes
0644
5277.ce6608b6f47246e32767.js.map
457 bytes
0644
5280.4348c762594edebf7d0e.js
16657 bytes
0644
5280.4348c762594edebf7d0e.js.map
89146 bytes
0644
5356.eabc0dc2021a3814a65f.js
10156 bytes
0644
5356.eabc0dc2021a3814a65f.js.map
25249 bytes
0644
5358.7c5e9e1b192582f3082d.js
6173 bytes
0644
5358.7c5e9e1b192582f3082d.js.map
19652 bytes
0644
5364.ac21c32fd45a27bc998a.js
3070 bytes
0644
5364.ac21c32fd45a27bc998a.js.map
7368 bytes
0644
5398.d0c11aa7c1232f4afe44.js
81872 bytes
0644
5398.d0c11aa7c1232f4afe44.js.map
769414 bytes
0644
5428.e85b0800b30feca9d7dc.js
330175 bytes
0644
5428.e85b0800b30feca9d7dc.js.map
530929 bytes
0644
5511.93023985e5c5efe49ae2.js
21275 bytes
0644
5511.93023985e5c5efe49ae2.js.map
93188 bytes
0644
5550.9284e42acc3f2bbdfc9d.js
7039 bytes
0644
5550.9284e42acc3f2bbdfc9d.js.map
16382 bytes
0644
558.701e8b4db7b852c4a10d.js
12211 bytes
0644
558.701e8b4db7b852c4a10d.js.map
24505 bytes
0644
5618.638c32d58d896f3f7261.js
3348 bytes
0644
5618.638c32d58d896f3f7261.js.map
8181 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js
57392 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js.map
60585 bytes
0644
5786.db7abc3b8e4f474a8f7b.js
5325 bytes
0644
5786.db7abc3b8e4f474a8f7b.js.map
11885 bytes
0644
5807.f05d997ece5811bbc849.js
2922915 bytes
0644
5807.f05d997ece5811bbc849.js.map
10524334 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js
4616249 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js.map
19277501 bytes
0644
6018.f4de7ac19ac8f0c774e6.js
5861 bytes
0644
6018.f4de7ac19ac8f0c774e6.js.map
13314 bytes
0644
6029.0549a3fcb50e73c4b256.js
409895 bytes
0644
6029.0549a3fcb50e73c4b256.js.map
998408 bytes
0644
6185.883629fcc773b4968b24.js
2258 bytes
0644
6185.883629fcc773b4968b24.js.map
4788 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js
54594 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js.map
242030 bytes
0644
6302.257b2eb06c25ee74090e.js
8440 bytes
0644
6302.257b2eb06c25ee74090e.js.map
19322 bytes
0644
6359.f824c85233ec703f8cea.js
11411 bytes
0644
6359.f824c85233ec703f8cea.js.map
41881 bytes
0644
6377.45d36c143a694fc45bd3.js
20571 bytes
0644
6377.45d36c143a694fc45bd3.js.map
79590 bytes
0644
6378.27b1e6d863a0a3b85962.js
977993 bytes
0644
6378.27b1e6d863a0a3b85962.js.map
3865587 bytes
0644
6414.192cf271de6ecbbbcb11.js
3984 bytes
0644
6414.192cf271de6ecbbbcb11.js.map
9134 bytes
0644
6446.b4b93ee91aa1bb57ea93.js
7731 bytes
0644
6446.b4b93ee91aa1bb57ea93.js.map
17485 bytes
0644
6464.f379e014f9909e621de6.js
34429 bytes
0644
6464.f379e014f9909e621de6.js.map
113303 bytes
0644
6499.9f52e0855fd4782a8b45.js
78297 bytes
0644
6499.9f52e0855fd4782a8b45.js.map
273155 bytes
0644
6587.bfb1ca0c32c6f325b0df.js
135004 bytes
0644
6587.bfb1ca0c32c6f325b0df.js.map
541974 bytes
0644
660.838743295c2108f3492d.js
43101 bytes
0644
660.838743295c2108f3492d.js.map
100340 bytes
0644
6678.a615dbe07b8a3e591e66.js
14725 bytes
0644
6678.a615dbe07b8a3e591e66.js.map
51145 bytes
0644
680.1a328432fae403eacab3.js
53846 bytes
0644
680.1a328432fae403eacab3.js.map
57615 bytes
0644
6830.0c200fec1efc2be388e2.js
5811 bytes
0644
6830.0c200fec1efc2be388e2.js.map
13972 bytes
0644
6934.fa19d392db34411fb300.js
168944 bytes
0644
6934.fa19d392db34411fb300.js.map
540337 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js
3408 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js.map
8039 bytes
0644
6969.f8f153735314f9426000.js
1119 bytes
0644
6969.f8f153735314f9426000.js.map
4230 bytes
0644
6990.cc2f5674128929a3f870.js
4418 bytes
0644
6990.cc2f5674128929a3f870.js.map
10503 bytes
0644
7048.117de444b1e1cb5a1360.js
4365 bytes
0644
7048.117de444b1e1cb5a1360.js.map
10316 bytes
0644
7166.480da6892ee84ee8bb53.js
593985 bytes
0644
7166.480da6892ee84ee8bb53.js.map
2430098 bytes
0644
7200.dc60128b9d612fc7b5b0.js
3634 bytes
0644
7200.dc60128b9d612fc7b5b0.js.map
8184 bytes
0644
7246.3adf293a34fa2043387b.js
4306 bytes
0644
7246.3adf293a34fa2043387b.js.map
9084 bytes
0644
7400.024c96bd5b99b8b47a63.js
14112 bytes
0644
7400.024c96bd5b99b8b47a63.js.map
64001 bytes
0644
7409.24316c87d08c1053c46a.js
3287 bytes
0644
7409.24316c87d08c1053c46a.js.map
11649 bytes
0644
7455.845968885abe369e6479.js
19801 bytes
0644
7455.845968885abe369e6479.js.map
77213 bytes
0644
7466.09e6e197d2507f62097d.js
11670 bytes
0644
7466.09e6e197d2507f62097d.js.map
24830 bytes
0644
7515.95323f0dfbd0de010e5c.js
1083 bytes
0644
7515.95323f0dfbd0de010e5c.js.map
1321 bytes
0644
7613.6334cff4df12cc157522.js
808779 bytes
0644
7613.6334cff4df12cc157522.js.map
991378 bytes
0644
7836.6a7e4207e70fc2dc235f.js
7192 bytes
0644
7836.6a7e4207e70fc2dc235f.js.map
17613 bytes
0644
7882.1a3cc418752c83396970.js
3743 bytes
0644
7882.1a3cc418752c83396970.js.map
14950 bytes
0644
7886.485c46f14540aa23cf70.js
8668 bytes
0644
7886.485c46f14540aa23cf70.js.map
20124 bytes
0644
7914.2b1a06c504df18e20fe4.js
2390 bytes
0644
7914.2b1a06c504df18e20fe4.js.map
6418 bytes
0644
7982.6761217193d3060dbf0e.js
188973 bytes
0644
7982.6761217193d3060dbf0e.js.map
1737667 bytes
0644
8054.094788468423bb88ee68.js
38124 bytes
0644
8054.094788468423bb88ee68.js.map
132296 bytes
0644
8107.92bd414247a1d05c014f.js
5144 bytes
0644
8107.92bd414247a1d05c014f.js.map
15320 bytes
0644
8230.2eedae6021a4715c6dea.js
2413 bytes
0644
8230.2eedae6021a4715c6dea.js.map
5812 bytes
0644
8332.f4b05d2f028641445650.js
3177 bytes
0644
8332.f4b05d2f028641445650.js.map
7186 bytes
0644
8334.c95ec0eb6900c0cf7e89.js
7803 bytes
0644
8334.c95ec0eb6900c0cf7e89.js.map
17714 bytes
0644
8390.1fd9505094c8cf8830ab.js
2096 bytes
0644
8390.1fd9505094c8cf8830ab.js.map
5157 bytes
0644
84.a6f8658e6a033d642231.js
30608 bytes
0644
84.a6f8658e6a033d642231.js.map
142543 bytes
0644
8494.4470c87b7093ddf70db7.js
2180 bytes
0644
8494.4470c87b7093ddf70db7.js.map
4863 bytes
0644
8542.1391ab96a455b01963a7.js
1514 bytes
0644
8542.1391ab96a455b01963a7.js.map
3249 bytes
0644
8566.e05562713181c6ca30fe.js
3852 bytes
0644
8566.e05562713181c6ca30fe.js.map
8781 bytes
0644
8730.3dcdd8cbf22c63b45d78.js
2109 bytes
0644
8730.3dcdd8cbf22c63b45d78.js.map
2893 bytes
0644
8786.1b0e43b80c82c73e2096.js
1535 bytes
0644
8786.1b0e43b80c82c73e2096.js.map
4055 bytes
0644
8902.37d0b14aa6ef24687b7b.js
2673 bytes
0644
8902.37d0b14aa6ef24687b7b.js.map
5993 bytes
0644
8990.5a822b8788ebf0bdba81.js
3969 bytes
0644
8990.5a822b8788ebf0bdba81.js.map
9161 bytes
0644
9034.200fc7a09b466256c9a9.js
3486 bytes
0644
9034.200fc7a09b466256c9a9.js.map
8180 bytes
0644
9038.7ae2448b9cc5c423aeca.js
4937 bytes
0644
9038.7ae2448b9cc5c423aeca.js.map
11973 bytes
0644
9118.3121c6b96ec7dc211973.js
48311 bytes
0644
9118.3121c6b96ec7dc211973.js.map
62149 bytes
0644
9150.9eb62d45f9b21cb38850.js
10056 bytes
0644
9150.9eb62d45f9b21cb38850.js.map
21143 bytes
0644
9199.9897e268d6d13e834d4c.js
2307 bytes
0644
9199.9897e268d6d13e834d4c.js.map
8853 bytes
0644
9320.c403e78b78aa6df1d0bd.js
336139 bytes
0644
9320.c403e78b78aa6df1d0bd.js.map
1624993 bytes
0644
9355.421530b20c759bb75633.js
22098 bytes
0644
9355.421530b20c759bb75633.js.map
66961 bytes
0644
9384.a0d5fc49f1b15b3e311e.js
2855 bytes
0644
9384.a0d5fc49f1b15b3e311e.js.map
3717 bytes
0644
9390.fa2af7f3d3d9600c08ee.js
4201 bytes
0644
9390.fa2af7f3d3d9600c08ee.js.map
9682 bytes
0644
946.f2494c0c39a9590349b9.js
9194 bytes
0644
946.f2494c0c39a9590349b9.js.map
22193 bytes
0644
9510.4cfa85a51931dc20573a.js
2949 bytes
0644
9510.4cfa85a51931dc20573a.js.map
6939 bytes
0644
9521.de2a74ca5eb365810ca5.js
46306 bytes
0644
9521.de2a74ca5eb365810ca5.js.map
51040 bytes
0644
9538.996ade7a03ccdb01942d.js
64493 bytes
0644
9538.996ade7a03ccdb01942d.js.map
49212 bytes
0644
9569.a8d60b39654a160cb917.js
27965 bytes
0644
9569.a8d60b39654a160cb917.js.map
99160 bytes
0644
9643.b408884004ca73c102bc.js
627 bytes
0644
9643.b408884004ca73c102bc.js.map
2195 bytes
0644
968.22e079d28acb4131d34c.js
4001 bytes
0644
968.22e079d28acb4131d34c.js.map
9740 bytes
0644
970.a61e37b9b897c8098261.js
5239 bytes
0644
970.a61e37b9b897c8098261.js.map
13858 bytes
0644
9711.d6e977bd60f0e5ba673d.js
13555 bytes
0644
9711.d6e977bd60f0e5ba673d.js.map
43973 bytes
0644
9737.3340c89ea96d33307cc7.js
1001 bytes
0644
9737.3340c89ea96d33307cc7.js.map
3504 bytes
0644
9739.5a801055fcf72bf4d06f.js
1147 bytes
0644
9739.5a801055fcf72bf4d06f.js.map
4390 bytes
0644
9772.49e918c9331237552c0b.js
141 bytes
0644
9772.49e918c9331237552c0b.js.map
416 bytes
0644
9838.b8f01dc360f0c2151291.js
4003 bytes
0644
9838.b8f01dc360f0c2151291.js.map
8118 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js
22504 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js.map
67352 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js
6369 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js.map
20602 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js
4939 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js.map
16531 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js
2702 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js.map
7735 bytes
0644
AdminSettings.845c6def917892a0c1f9.js
1903 bytes
0644
AdminSettings.845c6def917892a0c1f9.js.map
5580 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js
54554 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js.map
208792 bytes
0644
AlertGroups.efd523dc41621f9f7935.js
10088 bytes
0644
AlertGroups.efd523dc41621f9f7935.js.map
39108 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js
44623 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js.map
156842 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js
6270 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js.map
18086 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js
24687 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js.map
83377 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js
9844 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js.map
27934 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js
10523 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js.map
37393 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js
672 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js.map
1220 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js
33492 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js.map
106868 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js
3648 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js.map
10875 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js
79931 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js.map
292923 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js
31333 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js.map
98330 bytes
0644
AngularApp.7e72879caebef22a5217.js
72809 bytes
0644
AngularApp.7e72879caebef22a5217.js.map
102853 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js
8422 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js.map
23375 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js
2941 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js.map
9749 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js
470 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js.map
1195 bytes
0644
Connections.b53c715b9b9a782d8647.js
32448 bytes
0644
Connections.b53c715b9b9a782d8647.js.map
112998 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js
674 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js.map
1149 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js
22725 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js.map
69262 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js
3046 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js.map
9594 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js
18153 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js.map
58242 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js
30967 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js.map
108517 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js
2786 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js.map
8754 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js
65136 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js.map
226791 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js
331 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js.map
582 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js
10507 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js.map
37444 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js
1768 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js.map
5917 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js
9633 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js.map
29985 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js
8599 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js.map
25919 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js
2704 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js.map
7623 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js
4713 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js.map
14309 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js
20855 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js.map
58932 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js
9785 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js.map
32951 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js
1325 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js.map
3158 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js
2547 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js.map
6671 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js
1620 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js.map
3378 bytes
0644
NotificationsPage.d26b90d7348139106351.js
4646 bytes
0644
NotificationsPage.d26b90d7348139106351.js.map
25381 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js
6742 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js.map
17850 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js
6892 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js.map
19989 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js
6583 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js.map
19084 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js
7895 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js.map
25502 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js
275 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js.map
698 bytes
0644
PluginListPage.815b65d32380d0a800f7.js
12167 bytes
0644
PluginListPage.815b65d32380d0a800f7.js.map
43537 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js
314 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js.map
668 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js
552 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js.map
1012 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js
4295 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js.map
14393 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js
1124 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js.map
2993 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js
1736 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js.map
4350 bytes
0644
ServerStats.3fbd2493deb8f4598755.js
3863 bytes
0644
ServerStats.3fbd2493deb8f4598755.js.map
11534 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js
2440 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js.map
7939 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js
14806 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js.map
51593 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js
14565 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js.map
46399 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js
2360 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js.map
6096 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js
3061 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js.map
9043 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js
3229 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js.map
12316 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js
1727 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js.map
5509 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js
14081 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js.map
48740 bytes
0644
SupportBundles.567d512b3f919b8112e4.js
3058 bytes
0644
SupportBundles.567d512b3f919b8112e4.js.map
8751 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js
2779 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js.map
8882 bytes
0644
TeamList.2e23d37c91734f608f09.js
9019 bytes
0644
TeamList.2e23d37c91734f608f09.js.map
30348 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js
22839 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js.map
66001 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js
2654 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js.map
8058 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js
1470 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js.map
3788 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js
2576 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js.map
6594 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js
25463 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js.map
79671 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js
14593 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js.map
42901 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js
8800 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js.map
30059 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js
957 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js.map
3199 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js
1429 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js.map
4041 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js
3810 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js.map
10753 bytes
0644
app.b11fde05d43f9632a473.js
920821 bytes
0644
app.b11fde05d43f9632a473.js.map
69088 bytes
0644
assets-manifest.json
280835 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js
232 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js.map
600 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js
371235 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js.map
1132097 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js
485254 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js.map
2136916 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js
198 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js.map
555 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js
192 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js.map
544 bytes
0644
dark.7fa24d1908c1c96e6fcc.js
134 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js
214 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js.map
583 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js
612 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js.map
1280 bytes
0644
explore.476912733278e2a99729.js
165810 bytes
0644
explore.476912733278e2a99729.js.map
579148 bytes
0644
geomapPanel.14b9605971a38c51d262.js
417078 bytes
0644
geomapPanel.14b9605971a38c51d262.js.map
540371 bytes
0644
grafana.dark.8c716fbcf630eae84ced.css
209089 bytes
0644
grafana.light.b8b3904788f25480f4a1.css
209047 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js
8654 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js.map
28174 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js
70277 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js.map
243430 bytes
0644
graphitePlugin.d59175976346917781fe.js
75305 bytes
0644
graphitePlugin.d59175976346917781fe.js.map
272016 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js
37545 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js.map
158066 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js
68843 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js.map
265085 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js
19727 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js.map
65603 bytes
0644
light.af65e5ce03b9ed0aa2b1.js
134 bytes
0644
loki-query-field.a588d587d9d762b18f22.js
191 bytes
0644
loki-query-field.a588d587d9d762b18f22.js.map
548 bytes
0644
lokiPlugin.77364509de280321b6f8.js
185 bytes
0644
lokiPlugin.77364509de280321b6f8.js.map
536 bytes
0644
mixedPlugin.f36bd557a883d9a67538.js
180 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js
20457 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js.map
61420 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js
17323 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js.map
45415 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js
2107 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js.map
7132 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js
22866 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js.map
82180 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js
11184 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js.map
42340 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js
18902 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js.map
54304 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js
14104 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js.map
76811 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js
224 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js.map
699 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js
22269 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js.map
86896 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js
15759 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js.map
51544 bytes
0644
runtime.4b7e1b5735d2ed64b824.js
13640 bytes
0644
runtime.4b7e1b5735d2ed64b824.js.map
35122 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js
25242 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js.map
80497 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js
182 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js.map
529 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js
120550 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js.map
303302 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js
459653 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js.map
1951742 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js
13172 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js.map
46861 bytes
0644
N4ST4R_ID | Naxtarrr