mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
logs: refactor: move logsModel to the logs folder (#70989)
* move files * fixed imports in the moved files * updated imports pointing to the moved files
This commit is contained in:
parent
368afc211c
commit
a62ae10a02
@ -42,13 +42,13 @@ import {
|
||||
Themeable2,
|
||||
Collapse,
|
||||
} from '@grafana/ui';
|
||||
import { dedupLogRows, filterLogLevels } from 'app/core/logsModel';
|
||||
import store from 'app/core/store';
|
||||
import { createAndCopyShortLink } from 'app/core/utils/shortLinks';
|
||||
import { getState, dispatch } from 'app/store/store';
|
||||
|
||||
import { LogRows } from '../../logs/components/LogRows';
|
||||
import { LogRowContextModal } from '../../logs/components/log-context/LogRowContextModal';
|
||||
import { dedupLogRows, filterLogLevels } from '../../logs/logsModel';
|
||||
import { getUrlStateFromPaneState } from '../hooks/useStateSync';
|
||||
import { changePanelState } from '../state/explorePane';
|
||||
|
||||
|
@ -14,10 +14,10 @@ import {
|
||||
import { config, reportInteraction } from '@grafana/runtime';
|
||||
import { DataQuery, TimeZone } from '@grafana/schema';
|
||||
import { Button, Collapse, Icon, Tooltip, useStyles2 } from '@grafana/ui';
|
||||
import { dataFrameToLogsModel } from 'app/core/logsModel';
|
||||
import store from 'app/core/store';
|
||||
|
||||
import { LogRows } from '../../logs/components/LogRows';
|
||||
import { dataFrameToLogsModel } from '../../logs/logsModel';
|
||||
import { SupplementaryResultError } from '../SupplementaryResultError';
|
||||
|
||||
import { SETTINGS_KEYS } from './utils/logs';
|
||||
|
@ -14,11 +14,11 @@ import {
|
||||
import { config } from '@grafana/runtime';
|
||||
import { DataQuery } from '@grafana/schema';
|
||||
|
||||
import { dataFrameToLogsModel } from '../../../core/logsModel';
|
||||
import { refreshIntervalToSortOrder } from '../../../core/utils/explore';
|
||||
import { ExplorePanelData } from '../../../types';
|
||||
import { CorrelationData } from '../../correlations/useCorrelations';
|
||||
import { attachCorrelationsToDataFrames } from '../../correlations/utils';
|
||||
import { dataFrameToLogsModel } from '../../logs/logsModel';
|
||||
import { sortLogsResult } from '../../logs/utils';
|
||||
|
||||
/**
|
||||
|
@ -15,10 +15,11 @@ import {
|
||||
LogsVolumeType,
|
||||
SupplementaryQueryType,
|
||||
} from '@grafana/data';
|
||||
import { makeDataFramesForLogs } from 'app/core/logsModel';
|
||||
import store from 'app/core/store';
|
||||
import { ExplorePanelData, SupplementaryQueries } from 'app/types';
|
||||
|
||||
import { makeDataFramesForLogs } from '../../logs/logsModel';
|
||||
|
||||
export const supplementaryQueryTypes: SupplementaryQueryType[] = [
|
||||
SupplementaryQueryType.LogsVolume,
|
||||
SupplementaryQueryType.LogsSample,
|
||||
|
@ -18,10 +18,11 @@ import { reportInteraction } from '@grafana/runtime';
|
||||
import { Button, Spinner, Table } from '@grafana/ui';
|
||||
import { config } from 'app/core/config';
|
||||
import { t, Trans } from 'app/core/internationalization';
|
||||
import { dataFrameToLogsModel } from 'app/core/logsModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { GetDataOptions } from 'app/features/query/state/PanelQueryRunner';
|
||||
|
||||
import { dataFrameToLogsModel } from '../logs/logsModel';
|
||||
|
||||
import { InspectDataOptions } from './InspectDataOptions';
|
||||
import { getPanelInspectorStyles } from './styles';
|
||||
import { downloadAsJson, downloadDataFrameAsCsv, downloadLogsModelAsTxt, downloadTraceAsJson } from './utils/download';
|
||||
|
@ -10,7 +10,8 @@ import {
|
||||
LogsSortOrder,
|
||||
SplitOpenOptions,
|
||||
} from '@grafana/data';
|
||||
import { dataFrameToLogsModel } from 'app/core/logsModel';
|
||||
|
||||
import { dataFrameToLogsModel } from '../../logsModel';
|
||||
|
||||
import { LogRowContextModal } from './LogRowContextModal';
|
||||
|
||||
|
@ -17,12 +17,12 @@ import {
|
||||
import { config, reportInteraction } from '@grafana/runtime';
|
||||
import { DataQuery, LoadingState, TimeZone } from '@grafana/schema';
|
||||
import { Icon, Button, Modal, useTheme2 } from '@grafana/ui';
|
||||
import { dataFrameToLogsModel } from 'app/core/logsModel';
|
||||
import store from 'app/core/store';
|
||||
import { SETTINGS_KEYS } from 'app/features/explore/Logs/utils/logs';
|
||||
import { splitOpen } from 'app/features/explore/state/main';
|
||||
import { useDispatch } from 'app/types';
|
||||
|
||||
import { dataFrameToLogsModel } from '../../logsModel';
|
||||
import { sortLogRows } from '../../utils';
|
||||
import { LogRows } from '../LogRows';
|
||||
|
||||
|
@ -19,7 +19,7 @@ import {
|
||||
toDataFrame,
|
||||
} from '@grafana/data';
|
||||
|
||||
import { MockObservableDataSourceApi } from '../../test/mocks/datasource_srv';
|
||||
import { MockObservableDataSourceApi } from '../../../test/mocks/datasource_srv';
|
||||
|
||||
import {
|
||||
COMMON_LABELS,
|
@ -42,8 +42,8 @@ import { BarAlignment, GraphDrawStyle, StackingMode } from '@grafana/schema';
|
||||
import { ansicolor, colors } from '@grafana/ui';
|
||||
import { getThemeColor } from 'app/core/utils/colors';
|
||||
|
||||
import { LogsFrame, parseLogsFrame } from '../features/logs/logsFrame';
|
||||
import { getLogLevel, getLogLevelFromKey, sortInAscendingOrder } from '../features/logs/utils';
|
||||
import { LogsFrame, parseLogsFrame } from './logsFrame';
|
||||
import { getLogLevel, getLogLevelFromKey, sortInAscendingOrder } from './utils';
|
||||
|
||||
export const LIMIT_LABEL = 'Line limit';
|
||||
export const COMMON_LABELS = 'Common labels';
|
@ -33,10 +33,10 @@ import {
|
||||
AnnotationEvent,
|
||||
} from '@grafana/data';
|
||||
import { DataSourceWithBackend, getDataSourceSrv, config, BackendSrvRequest } from '@grafana/runtime';
|
||||
import { queryLogsSample, queryLogsVolume } from 'app/core/logsModel';
|
||||
import { getTimeSrv, TimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
import { getTemplateSrv, TemplateSrv } from 'app/features/templating/template_srv';
|
||||
|
||||
import { queryLogsSample, queryLogsVolume } from '../../../features/logs/logsModel';
|
||||
import { getLogLevelFromKey } from '../../../features/logs/utils';
|
||||
|
||||
import { IndexPattern, intervalMap } from './IndexPattern';
|
||||
|
@ -36,12 +36,12 @@ import {
|
||||
} from '@grafana/data';
|
||||
import { BackendSrvRequest, config, DataSourceWithBackend, FetchError } from '@grafana/runtime';
|
||||
import { DataQuery } from '@grafana/schema';
|
||||
import { queryLogsSample, queryLogsVolume } from 'app/core/logsModel';
|
||||
import { convertToWebSocketUrl } from 'app/core/utils/explore';
|
||||
import { getTimeSrv, TimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
import { getTemplateSrv, TemplateSrv } from 'app/features/templating/template_srv';
|
||||
|
||||
import { serializeParams } from '../../../core/utils/fetch';
|
||||
import { queryLogsSample, queryLogsVolume } from '../../../features/logs/logsModel';
|
||||
import { getLogLevelFromKey } from '../../../features/logs/utils';
|
||||
import { renderLegendFormat } from '../prometheus/legend';
|
||||
import { replaceVariables, returnVariables } from '../prometheus/querybuilder/shared/parsingUtils';
|
||||
|
@ -13,12 +13,12 @@ import {
|
||||
CoreApp,
|
||||
} from '@grafana/data';
|
||||
import { CustomScrollbar, useStyles2, usePanelContext } from '@grafana/ui';
|
||||
import { dataFrameToLogsModel, dedupLogRows, COMMON_LABELS } from 'app/core/logsModel';
|
||||
import { getFieldLinksForExplore } from 'app/features/explore/utils/links';
|
||||
import { PanelDataErrorView } from 'app/features/panel/components/PanelDataErrorView';
|
||||
|
||||
import { LogLabels } from '../../../features/logs/components/LogLabels';
|
||||
import { LogRows } from '../../../features/logs/components/LogRows';
|
||||
import { dataFrameToLogsModel, dedupLogRows, COMMON_LABELS } from '../../../features/logs/logsModel';
|
||||
|
||||
import { Options } from './types';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user