mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove dashboard state barrel file (#97562)
* refactor(dashboard-state): delete dashboard/state barrel file and update imports * chore(betterer): update results
This commit is contained in:
parent
2e342e5b1b
commit
1fc9b4bfc1
@ -2712,10 +2712,6 @@ exports[`better eslint`] = {
|
||||
"public/app/features/dashboard/state/getPanelPluginToMigrateTo.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/app/features/dashboard/state/index.ts:5381": [
|
||||
[0, 0, 0, "Do not re-export imported variable (\`./DashboardModel\`)", "0"],
|
||||
[0, 0, 0, "Do not re-export imported variable (\`./PanelModel\`)", "1"]
|
||||
],
|
||||
"public/app/features/dashboard/state/initDashboard.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
} from '@grafana/data';
|
||||
import { PanelCtrl } from 'app/angular/panel/panel_ctrl';
|
||||
import { ContextSrv } from 'app/core/services/context_srv';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { applyPanelTimeOverrides } from 'app/features/dashboard/utils/panel';
|
||||
|
||||
import { PanelQueryRunner } from '../../features/query/state/PanelQueryRunner';
|
||||
|
@ -13,7 +13,7 @@ import { AngularLocationWrapper } from 'app/angular/AngularLocationWrapper';
|
||||
import config from 'app/core/config';
|
||||
import { profiler } from 'app/core/core';
|
||||
|
||||
import { DashboardModel } from '../../features/dashboard/state';
|
||||
import { DashboardModel } from '../../features/dashboard/state/DashboardModel';
|
||||
|
||||
export class PanelCtrl {
|
||||
panel: any;
|
||||
|
@ -7,7 +7,7 @@ import { RefreshEvent } from '@grafana/runtime';
|
||||
import { coreModule } from 'app/angular/core_module';
|
||||
import { PanelDirectiveReadyEvent, RenderEvent } from 'app/types/events';
|
||||
|
||||
import { PanelModel } from '../../features/dashboard/state';
|
||||
import { PanelModel } from '../../features/dashboard/state/PanelModel';
|
||||
|
||||
import { PanelCtrl } from './panel_ctrl';
|
||||
|
||||
|
@ -22,7 +22,7 @@ import { getConfig } from 'app/core/config';
|
||||
import { getSessionExpiry, hasSessionExpiry } from 'app/core/utils/auth';
|
||||
import { loadUrlToken } from 'app/core/utils/urlToken';
|
||||
import { getDashboardAPI } from 'app/features/dashboard/api/dashboard_api';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { DashboardSearchItem } from 'app/features/search/types';
|
||||
import { TokenRevokedModal } from 'app/features/users/TokenRevokedModal';
|
||||
import { DashboardDTO, FolderDTO } from 'app/types';
|
||||
|
@ -4,7 +4,7 @@ import appEvents from 'app/core/app_events';
|
||||
import { getExploreUrl } from 'app/core/utils/explore';
|
||||
import { SaveDashboardDrawer } from 'app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer';
|
||||
import { ShareModal } from 'app/features/dashboard/components/ShareModal';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
|
||||
import { getTimeSrv } from '../../features/dashboard/services/TimeSrv';
|
||||
import {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
|
||||
import { hiddenReducerTypes, ThresholdMapper } from './ThresholdMapper';
|
||||
import alertDef from './alertDef';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { config } from 'app/core/config';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
|
||||
export const hiddenReducerTypes = ['percent_diff', 'percent_diff_abs'];
|
||||
export class ThresholdMapper {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Tab, TabProps } from '@grafana/ui';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
|
||||
import { usePanelCombinedRules } from './hooks/usePanelCombinedRules';
|
||||
|
||||
|
@ -5,7 +5,8 @@ import { DataSourceApi } from '@grafana/data';
|
||||
import { PromOptions, PrometheusDatasource } from '@grafana/prometheus';
|
||||
import { setDataSourceSrv, setPluginLinksHook } from '@grafana/runtime';
|
||||
import * as ruleActionButtons from 'app/features/alerting/unified/components/rules/RuleActionsButtons';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { getDatasourceSrv } from 'app/features/plugins/datasource_srv';
|
||||
import { AccessControlAction } from 'app/types';
|
||||
import { AlertQuery, PromRulesResponse } from 'app/types/unified-alerting-dto';
|
||||
|
@ -4,7 +4,8 @@ import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { Alert, LoadingPlaceholder, ScrollContainer, useStyles2 } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
|
||||
import { NewRuleFromPanelButton } from './components/panel-alerts-tab/NewRuleFromPanelButton';
|
||||
import { RulesTable } from './components/rules/RulesTable';
|
||||
|
@ -2,7 +2,7 @@ import { screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { render } from 'test/test-utils';
|
||||
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { createDashboardModelFixture } from 'app/features/dashboard/state/__fixtures__/dashboardFixtures';
|
||||
|
||||
import * as analytics from '../../Analytics';
|
||||
|
@ -3,7 +3,8 @@ import { useAsync } from 'react-use';
|
||||
|
||||
import { urlUtil } from '@grafana/data';
|
||||
import { Alert, Button, LinkButton } from '@grafana/ui';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { useSelector } from 'app/types';
|
||||
|
||||
import { logInfo, LogMessages } from '../../Analytics';
|
||||
|
@ -8,7 +8,7 @@ import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { Button, Field, Input, Stack, Text, TextArea, useStyles2 } from '@grafana/ui';
|
||||
import { t, Trans } from 'app/core/internationalization';
|
||||
|
||||
import { DashboardModel } from '../../../../dashboard/state';
|
||||
import { DashboardModel } from '../../../../dashboard/state/DashboardModel';
|
||||
import { RuleFormValues } from '../../types/rule-form';
|
||||
import { Annotation, annotationLabels } from '../../utils/constants';
|
||||
import { isGrafanaManagedRuleByType } from '../../utils/rules';
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
useStyles2,
|
||||
} from '@grafana/ui';
|
||||
|
||||
import { DashboardModel } from '../../../../dashboard/state';
|
||||
import { DashboardModel } from '../../../../dashboard/state/DashboardModel';
|
||||
import { dashboardApi } from '../../api/dashboardApi';
|
||||
|
||||
import { useDashboardQuery } from './useDashboardQuery';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import memoizeOne from 'memoize-one';
|
||||
|
||||
import { DashboardDTO } from '../../../../../types';
|
||||
import { DashboardModel } from '../../../../dashboard/state';
|
||||
import { DashboardModel } from '../../../../dashboard/state/DashboardModel';
|
||||
import { dashboardApi } from '../../api/dashboardApi';
|
||||
|
||||
const convertToDashboardModel = memoizeOne((dashboardDTO: DashboardDTO) => {
|
||||
|
@ -17,7 +17,8 @@ import { config, getDataSourceSrv } from '@grafana/runtime';
|
||||
import { ExpressionDatasourceRef } from '@grafana/runtime/src/utils/DataSourceWithBackend';
|
||||
import { sceneGraph, VizPanel } from '@grafana/scenes';
|
||||
import { DataSourceJsonData } from '@grafana/schema';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import {
|
||||
getDashboardSceneFor,
|
||||
getPanelIdForVizPanel,
|
||||
|
@ -14,7 +14,7 @@ import { selectors } from '@grafana/e2e-selectors';
|
||||
import { Alert, AlertVariant, Button, Space, Spinner } from '@grafana/ui';
|
||||
import { getDashboardSrv } from 'app/features/dashboard/services/DashboardSrv';
|
||||
import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
|
||||
import { executeAnnotationQuery } from '../executeAnnotationQuery';
|
||||
import { shouldUseLegacyRunner, shouldUseMappingUI, standardAnnotationSupport } from '../standardAnnotationSupport';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { DataSourceApi, dateTime, DataQuery } from '@grafana/data';
|
||||
|
||||
import { PanelModel } from '../dashboard/state';
|
||||
import { PanelModel } from '../dashboard/state/PanelModel';
|
||||
import { createDashboardModelFixture } from '../dashboard/state/__fixtures__/dashboardFixtures';
|
||||
import { TestQuery, getMockDataSource } from '../query/state/__mocks__/mockDataSource';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { AnnotationEvent, PanelData, TimeRange } from '@grafana/data';
|
||||
|
||||
import { DashboardModel, PanelModel } from '../dashboard/state';
|
||||
import { DashboardModel } from '../dashboard/state/DashboardModel';
|
||||
import { PanelModel } from '../dashboard/state/PanelModel';
|
||||
|
||||
export interface AnnotationQueryOptions {
|
||||
dashboard: DashboardModel;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { SceneTimeRange } from '@grafana/scenes';
|
||||
import store from 'app/core/store';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { DASHBOARD_FROM_LS_KEY, DashboardDTO } from 'app/types';
|
||||
|
||||
import { DashboardScene } from '../scene/DashboardScene';
|
||||
|
@ -19,7 +19,7 @@ import { LibraryPanel } from '@grafana/schema/';
|
||||
import { Button, CodeEditor, Field, Select, useStyles2 } from '@grafana/ui';
|
||||
import { t } from 'app/core/internationalization';
|
||||
import { getPanelDataFrames } from 'app/features/dashboard/components/HelpWizard/utils';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { getPanelInspectorStyles2 } from 'app/features/inspector/styles';
|
||||
import { InspectTab } from 'app/features/inspector/types';
|
||||
import { getPrettyJSON } from 'app/features/inspector/utils/utils';
|
||||
|
@ -24,7 +24,8 @@ import { RuleFormValues } from 'app/features/alerting/unified/types/rule-form';
|
||||
import * as config from 'app/features/alerting/unified/utils/config';
|
||||
import { Annotation } from 'app/features/alerting/unified/utils/constants';
|
||||
import { DataSourceType, GRAFANA_RULES_SOURCE_NAME } from 'app/features/alerting/unified/utils/datasource';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { getDatasourceSrv } from 'app/features/plugins/datasource_srv';
|
||||
import { configureStore } from 'app/store/configureStore';
|
||||
import { AccessControlAction, DashboardDataDTO } from 'app/types';
|
||||
|
@ -31,7 +31,8 @@ import { LS_PANEL_COPY_KEY } from 'app/core/constants';
|
||||
import { getNavModel } from 'app/core/selectors/navModel';
|
||||
import store from 'app/core/store';
|
||||
import { getDashboardSrv } from 'app/features/dashboard/services/DashboardSrv';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { dashboardWatcher } from 'app/features/live/dashboard/dashboardWatcher';
|
||||
import { getClosestScopesFacade, ScopesFacade } from 'app/features/scopes';
|
||||
import { VariablesChanged } from 'app/features/variables/types';
|
||||
|
@ -3,7 +3,7 @@ import { SceneObjectBase, SceneObjectState, sceneUtils, VizPanel, VizPanelState
|
||||
import { LibraryPanel } from '@grafana/schema';
|
||||
import { Stack } from '@grafana/ui';
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { getLibraryPanel } from 'app/features/library-panels/state/api';
|
||||
|
||||
import { createPanelDataProvider } from '../utils/createPanelDataProvider';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { PanelTypeChangedHandler } from '@grafana/data';
|
||||
import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
|
||||
import { getAngularPanelMigrationHandler } from './angularMigration';
|
||||
|
||||
|
@ -20,7 +20,8 @@ import {
|
||||
RowPanel,
|
||||
VariableType,
|
||||
} from '@grafana/schema';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { createPanelSaveModel } from 'app/features/dashboard/state/__fixtures__/dashboardFixtures';
|
||||
import { SHARED_DASHBOARD_QUERY } from 'app/plugins/datasource/dashboard';
|
||||
import { DASHBOARD_DATASOURCE_PLUGIN_ID } from 'app/plugins/datasource/dashboard/types';
|
||||
|
@ -20,7 +20,8 @@ import {
|
||||
SceneDataLayerControls,
|
||||
UserActionEvent,
|
||||
} from '@grafana/scenes';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { DashboardDTO, DashboardDataDTO } from 'app/types';
|
||||
|
||||
import { addPanelsOnLoadBehavior } from '../addToDashboard/addPanelsOnLoadBehavior';
|
||||
|
@ -17,7 +17,7 @@ import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks';
|
||||
import { getPluginLinkExtensions, setPluginImportUtils } from '@grafana/runtime';
|
||||
import { MultiValueVariable, sceneGraph, SceneGridRow, VizPanel } from '@grafana/scenes';
|
||||
import { Dashboard, LoadingState, Panel, RowPanel, VariableRefresh } from '@grafana/schema';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { getTimeRange } from 'app/features/dashboard/utils/timeRange';
|
||||
import { reduceTransformRegistryItem } from 'app/features/transformers/editors/ReduceTransformerEditor';
|
||||
import { SHARED_DASHBOARD_QUERY } from 'app/plugins/datasource/dashboard';
|
||||
|
@ -7,7 +7,7 @@ import { Button, ClipboardButton, CodeEditor, Field, Modal, Stack, Switch } from
|
||||
import { t, Trans } from 'app/core/internationalization';
|
||||
import { DashboardExporter } from 'app/features/dashboard/components/DashExportModal';
|
||||
import { shareDashboardType } from 'app/features/dashboard/components/ShareModal/utils';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
|
||||
import { transformSceneToSaveModel } from '../serialization/transformSceneToSaveModel';
|
||||
import { getVariablesCompatibility } from '../utils/getVariablesCompatibility';
|
||||
|
@ -4,7 +4,8 @@ import { LibraryPanel } from '@grafana/schema/dist/esm/index.gen';
|
||||
import { t } from 'app/core/internationalization';
|
||||
import { ShareLibraryPanel } from 'app/features/dashboard/components/ShareModal/ShareLibraryPanel';
|
||||
import { shareDashboardType } from 'app/features/dashboard/components/ShareModal/utils';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
|
||||
import { DashboardGridItem } from '../scene/layout-default/DashboardGridItem';
|
||||
import { gridItemToPanel, transformSceneToSaveModel } from '../serialization/transformSceneToSaveModel';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { config } from '@grafana/runtime';
|
||||
import { SceneDataProvider, SceneDataTransformer, SceneQueryRunner } from '@grafana/scenes';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
|
||||
import { DashboardDatasourceBehaviour } from '../scene/DashboardDatasourceBehaviour';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { DashboardModel } from '../../dashboard/state';
|
||||
import { DashboardModel } from '../../dashboard/state/DashboardModel';
|
||||
|
||||
interface ComponentProps {
|
||||
dashboard: DashboardModel;
|
||||
|
@ -19,7 +19,7 @@ import {
|
||||
SceneVariableSet,
|
||||
} from '@grafana/scenes';
|
||||
import { defaultDashboard, defaultTimePickerConfig, VariableType } from '@grafana/schema';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
|
||||
import { SnapshotVariable } from '../serialization/custom-variables/SnapshotVariable';
|
||||
import { NEW_LINK } from '../settings/links/utils';
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
SceneVariableSet,
|
||||
TextBoxVariable,
|
||||
} from '@grafana/scenes';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
|
||||
import { SnapshotVariable } from '../serialization/custom-variables/SnapshotVariable';
|
||||
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
SessionDashboard,
|
||||
SessionUser,
|
||||
} from 'app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { DashboardScene } from 'app/features/dashboard-scene/scene/DashboardScene';
|
||||
import {
|
||||
PublicDashboardListWithPagination,
|
||||
|
@ -11,7 +11,8 @@ import {
|
||||
LibraryPanelsSearch,
|
||||
LibraryPanelsSearchVariant,
|
||||
} from '../../../library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch';
|
||||
import { DashboardModel, PanelModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
interface Props {
|
||||
panel: PanelModel;
|
||||
|
@ -3,7 +3,7 @@ import { useState, useEffect } from 'react';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { Dropdown, Button, Icon } from '@grafana/ui';
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
|
||||
import AddPanelMenu from './AddPanelMenu';
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { selectors } from '@grafana/e2e-selectors';
|
||||
import { locationService } from '@grafana/runtime';
|
||||
import { Menu } from '@grafana/ui';
|
||||
import { t } from 'app/core/internationalization';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import {
|
||||
getCopiedPanelPlugin,
|
||||
onAddLibraryPanel,
|
||||
|
@ -3,7 +3,7 @@ import { defaults, each, sortBy } from 'lodash';
|
||||
import { DataSourceRef, PanelPluginMeta, VariableOption, VariableRefresh } from '@grafana/data';
|
||||
import { getDataSourceSrv } from '@grafana/runtime';
|
||||
import config from 'app/core/config';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { getLibraryPanel } from 'app/features/library-panels/state/api';
|
||||
import { variableRegex } from 'app/features/variables/utils';
|
||||
|
||||
|
@ -28,7 +28,7 @@ import { removeNavIndex } from 'app/core/reducers/navModel';
|
||||
import AddPanelButton from 'app/features/dashboard/components/AddPanelButton/AddPanelButton';
|
||||
import { SaveDashboardDrawer } from 'app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer';
|
||||
import { getDashboardSrv } from 'app/features/dashboard/services/DashboardSrv';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { DashboardInteractions } from 'app/features/dashboard-scene/utils/interactions';
|
||||
import { playlistSrv } from 'app/features/playlist/PlaylistSrv';
|
||||
import { updateTimeZoneForSession } from 'app/features/profile/state/reducers';
|
||||
|
@ -11,7 +11,7 @@ import { AutoRefreshInterval } from 'app/core/services/context_srv';
|
||||
import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
|
||||
import { ShiftTimeEvent, ShiftTimeEventDirection, ZoomOutEvent } from '../../../../types/events';
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
export interface Props {
|
||||
dashboard: DashboardModel;
|
||||
|
@ -2,7 +2,7 @@ import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src';
|
||||
import { locationService } from '@grafana/runtime';
|
||||
import { Button } from '@grafana/ui';
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { DashboardInteractions } from 'app/features/dashboard-scene/utils/interactions';
|
||||
|
||||
import { shareDashboardType } from '../ShareModal/utils';
|
||||
|
@ -2,7 +2,7 @@ import { AnnotationQuery, getDataSourceRef, NavModelItem } from '@grafana/data';
|
||||
import { getDataSourceSrv, locationService } from '@grafana/runtime';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { AnnotationSettingsEdit, AnnotationSettingsList, newAnnotationName } from '../AnnotationSettings';
|
||||
|
||||
import { SettingsPageProps } from './types';
|
||||
|
@ -2,7 +2,7 @@ import { screen, within } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { render } from 'test/test-utils';
|
||||
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { createDashboardModelFixture } from '../../state/__fixtures__/dashboardFixtures';
|
||||
|
||||
import { DashboardSettings } from './DashboardSettings';
|
||||
|
@ -3,7 +3,7 @@ import { ComponentType } from 'react';
|
||||
import { NavModel } from '@grafana/data';
|
||||
import { IconName } from '@grafana/ui';
|
||||
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
export interface SettingsPage {
|
||||
id: string;
|
||||
|
@ -4,7 +4,7 @@ import useAsyncFn from 'react-use/lib/useAsyncFn';
|
||||
|
||||
import { locationService, config, reportInteraction } from '@grafana/runtime';
|
||||
import { Modal, Button, Text, Space, TextLink } from '@grafana/ui';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { cleanUpDashboardAndVariables } from 'app/features/dashboard/state/actions';
|
||||
|
||||
import { Trans, t } from '../../../../core/internationalization';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { getDashboardSrv } from '../../services/DashboardSrv';
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
import { GenAIButton } from './GenAIButton';
|
||||
import { EventTrackingSrc } from './tracking';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { getDashboardSrv } from '../../services/DashboardSrv';
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
import { GenAIButton } from './GenAIButton';
|
||||
import { EventTrackingSrc } from './tracking';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
import { GenAIButton } from './GenAIButton';
|
||||
import { EventTrackingSrc } from './tracking';
|
||||
|
@ -2,7 +2,7 @@ import { createTwoFilesPatch } from 'diff';
|
||||
|
||||
import { Dashboard } from '@grafana/schema';
|
||||
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
export type JSONValue = null | boolean | number | string | JSONArray | JSONObject;
|
||||
|
||||
|
@ -4,7 +4,8 @@ import { llms } from '@grafana/experimental';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { Panel } from '@grafana/schema';
|
||||
|
||||
import { DashboardModel, PanelModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { NEW_PANEL_TITLE } from '../../utils/dashboard';
|
||||
|
||||
import { getDashboardStringDiff } from './jsonDiffText';
|
||||
|
@ -22,7 +22,7 @@ import {
|
||||
} from '@grafana/ui';
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { AccessControlAction } from 'app/types';
|
||||
|
||||
import { ShowMessage, SnapshotTab, SupportSnapshotService } from './SupportSnapshotService';
|
||||
|
@ -7,7 +7,8 @@ import { Randomize } from 'app/features/dashboard-scene/inspect/HelpWizard/rando
|
||||
import { createDashboardSceneFromDashboardModel } from 'app/features/dashboard-scene/serialization/transformSaveModelToScene';
|
||||
|
||||
import { getTimeSrv } from '../../services/TimeSrv';
|
||||
import { DashboardModel, PanelModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
import { getDebugDashboard, getGithubMarkdown } from './utils';
|
||||
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
DataTopic,
|
||||
} from '@grafana/data';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { Randomize, randomizeData } from 'app/features/dashboard-scene/inspect/HelpWizard/randomizer';
|
||||
import { GrafanaQueryType } from 'app/plugins/datasource/grafana/types';
|
||||
|
||||
|
@ -23,7 +23,8 @@ import { QueryInspector } from 'app/features/inspector/QueryInspector';
|
||||
import { InspectTab } from 'app/features/inspector/types';
|
||||
|
||||
import { GetDataOptions } from '../../../query/state/PanelQueryRunner';
|
||||
import { DashboardModel, PanelModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
interface Props {
|
||||
dashboard: DashboardModel;
|
||||
|
@ -4,7 +4,8 @@ import { useLocation } from 'react-router-dom-v5-compat';
|
||||
|
||||
import { PanelPlugin } from '@grafana/data';
|
||||
import { locationService } from '@grafana/runtime';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { InspectTab } from 'app/features/inspector/types';
|
||||
import { getPanelStateForModel } from 'app/features/panel/state/selectors';
|
||||
import { StoreState } from 'app/types';
|
||||
|
@ -4,7 +4,8 @@ import useAsync from 'react-use/lib/useAsync';
|
||||
import { DataSourceApi, PanelData, PanelPlugin } from '@grafana/data';
|
||||
import { getDataSourceSrv } from '@grafana/runtime';
|
||||
import { t } from 'app/core/internationalization';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { InspectTab } from 'app/features/inspector/types';
|
||||
|
||||
import { supportsDataQuery } from '../PanelEditor/utils';
|
||||
|
@ -8,7 +8,8 @@ import { changePanelPlugin } from 'app/features/panel/state/actions';
|
||||
import { getPanelStateForModel } from 'app/features/panel/state/selectors';
|
||||
import { StoreState } from 'app/types';
|
||||
|
||||
import { PanelModel, DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
import { getSectionOpenState, saveSectionOpenState } from './state/utils';
|
||||
|
||||
|
@ -17,7 +17,7 @@ import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { getAllOptionEditors, getAllStandardFieldConfigs } from 'app/core/components/OptionsUI/registry';
|
||||
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { createDashboardModelFixture } from '../../state/__fixtures__/dashboardFixtures';
|
||||
|
||||
import { OptionsPaneOptions } from './OptionsPaneOptions';
|
||||
|
@ -37,7 +37,8 @@ import { UnlinkModal } from '../../../dashboard-scene/scene/UnlinkModal';
|
||||
import { isPanelModelLibraryPanel } from '../../../library-panels/guard';
|
||||
import { getVariablesByKey } from '../../../variables/state/selectors';
|
||||
import { DashboardPanel } from '../../dashgrid/DashboardPanel';
|
||||
import { DashboardModel, PanelModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { DashNavTimeControls } from '../DashNav/DashNavTimeControls';
|
||||
import { SaveDashboardDrawer } from '../SaveDashboard/SaveDashboardDrawer';
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { QueryGroup } from 'app/features/query/components/QueryGroup';
|
||||
import { QueryGroupDataSource, QueryGroupOptions } from 'app/types';
|
||||
|
||||
import { getDashboardSrv } from '../../services/DashboardSrv';
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { getLastUsedDatasourceFromStorage } from '../../utils/dashboard';
|
||||
|
||||
interface Props {
|
||||
|
@ -17,7 +17,7 @@ import { selectors } from '@grafana/e2e-selectors';
|
||||
import { getTimeSrv, TimeSrv, setTimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
|
||||
import { PanelQueryRunner } from '../../../query/state/PanelQueryRunner';
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { createDashboardModelFixture } from '../../state/__fixtures__/dashboardFixtures';
|
||||
|
||||
import { PanelEditorTableView, Props } from './PanelEditorTableView';
|
||||
|
@ -7,7 +7,8 @@ import { PanelRenderer } from 'app/features/panel/components/PanelRenderer';
|
||||
import { Options } from 'app/plugins/panel/table/panelcfg.gen';
|
||||
|
||||
import { getTimeSrv } from '../../services/TimeSrv';
|
||||
import { DashboardModel, PanelModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
import PanelHeaderCorner from './PanelHeaderCorner';
|
||||
import { usePanelLatestData } from './usePanelLatestData';
|
||||
|
@ -9,7 +9,8 @@ import { PanelAlertTab } from 'app/features/alerting/unified/PanelAlertTab';
|
||||
import { PanelAlertTabContent } from 'app/features/alerting/unified/PanelAlertTabContent';
|
||||
import { PanelQueriesChangedEvent, PanelTransformationsChangedEvent } from 'app/types/events';
|
||||
|
||||
import { DashboardModel, PanelModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { TransformationsEditor } from '../TransformationsEditor/TransformationsEditor';
|
||||
|
||||
import { PanelEditorQueries } from './PanelEditorQueries';
|
||||
|
@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react';
|
||||
import { createTheme } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
import { PanelHeaderCorner, Props } from './PanelHeaderCorner';
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { selectors } from '@grafana/e2e-selectors';
|
||||
import { ToolbarButton, ButtonGroup } from '@grafana/ui';
|
||||
import { useDispatch, useSelector } from 'app/types';
|
||||
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { getPanelPluginWithFallback } from '../../state/selectors';
|
||||
|
||||
import { updatePanelEditorUIState } from './state/actions';
|
||||
|
@ -5,7 +5,7 @@ import { createDashboardModelFixture } from 'app/features/dashboard/state/__fixt
|
||||
import { panelModelAndPluginReady, removePanel } from 'app/features/panel/state/reducers';
|
||||
|
||||
import { thunkTester } from '../../../../../../test/core/thunk/thunkTester';
|
||||
import { PanelModel } from '../../../state';
|
||||
import { PanelModel } from '../../../state/PanelModel';
|
||||
|
||||
import { exitPanelEditor, initPanelEditor, skipPanelUpdate } from './actions';
|
||||
import { closeEditor, initialState, PanelEditorState } from './reducers';
|
||||
|
@ -6,7 +6,8 @@ import { cleanUpPanelState } from 'app/features/panel/state/actions';
|
||||
import { panelModelAndPluginReady } from 'app/features/panel/state/reducers';
|
||||
import { ThunkResult } from 'app/types';
|
||||
|
||||
import { DashboardModel, PanelModel } from '../../../state';
|
||||
import { DashboardModel } from '../../../state/DashboardModel';
|
||||
import { PanelModel } from '../../../state/PanelModel';
|
||||
|
||||
import {
|
||||
closeEditor,
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { DataFrame, FieldConfigSource, PanelData, PanelPlugin } from '@grafana/data';
|
||||
|
||||
import { DashboardModel, PanelModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
export interface PanelEditorTab {
|
||||
id: string;
|
||||
|
@ -4,7 +4,7 @@ import { Unsubscribable } from 'rxjs';
|
||||
import { LoadingState, PanelData } from '@grafana/data';
|
||||
|
||||
import { GetDataOptions } from '../../../query/state/PanelQueryRunner';
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
interface UsePanelLatestData {
|
||||
data?: PanelData;
|
||||
|
@ -7,7 +7,7 @@ import { FetchError } from '@grafana/runtime';
|
||||
import { Alert, useStyles2 } from '@grafana/ui';
|
||||
import { backendSrv } from 'app/core/services/backend_srv';
|
||||
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
interface DashboardValidationProps {
|
||||
dashboard: DashboardModel;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { reportInteraction } from '@grafana/runtime';
|
||||
import { Button, ButtonVariant, ComponentSize, ModalsController } from '@grafana/ui';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
|
||||
import { SaveDashboardDrawer } from './SaveDashboardDrawer';
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { Provider } from 'react-redux';
|
||||
|
||||
import { configureStore } from 'app/store/configureStore';
|
||||
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
import { createDashboardModelFixture } from '../../state/__fixtures__/dashboardFixtures';
|
||||
|
||||
import { SaveDashboardDrawer } from './SaveDashboardDrawer';
|
||||
|
@ -2,7 +2,7 @@ import { css } from '@emotion/css';
|
||||
|
||||
import { Button, Modal } from '@grafana/ui';
|
||||
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
import { SaveDashboardButton } from './SaveDashboardButton';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { screen, render } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import * as api from 'app/features/manage-dashboards/state/actions';
|
||||
import { SaveDashboardResponseDTO } from 'app/types';
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { ChangeEvent } from 'react';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { Button, Input, Switch, Form, Field, InputControl, Label, TextArea, Stack } from '@grafana/ui';
|
||||
import { FolderPicker } from 'app/core/components/Select/FolderPicker';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { validationSrv } from 'app/features/manage-dashboards/services/ValidationSrv';
|
||||
|
||||
import { GenAIDashDescriptionButton } from '../../GenAI/GenAIDashDescriptionButton';
|
||||
|
@ -2,7 +2,7 @@ import { screen, render } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
|
||||
import { Dashboard } from '@grafana/schema';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { createDashboardModelFixture } from 'app/features/dashboard/state/__fixtures__/dashboardFixtures';
|
||||
import { SaveDashboardResponseDTO } from 'app/types';
|
||||
|
||||
|
@ -6,7 +6,7 @@ import { selectors } from '@grafana/e2e-selectors';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { Dashboard } from '@grafana/schema';
|
||||
import { Button, Checkbox, TextArea, useStyles2, Stack } from '@grafana/ui';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { SaveDashboardResponseDTO } from 'app/types';
|
||||
|
||||
import { GenAIDashboardChangesButton } from '../../GenAI/GenAIDashboardChangesButton';
|
||||
|
@ -7,7 +7,7 @@ import appEvents from 'app/core/app_events';
|
||||
import { useAppNotification } from 'app/core/copy/appNotification';
|
||||
import { updateDashboardName } from 'app/core/reducers/navBarTree';
|
||||
import { useSaveDashboardMutation } from 'app/features/browse-dashboards/api/browseDashboardsAPI';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { useDispatch } from 'app/types';
|
||||
import { DashboardSavedEvent } from 'app/types/events';
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { setEchoSrv } from '@grafana/runtime/src';
|
||||
import config from 'app/core/config';
|
||||
|
||||
import { Echo } from '../../../../core/services/echo/Echo';
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { createDashboardModelFixture } from '../../state/__fixtures__/dashboardFixtures';
|
||||
|
||||
import { ShareEmbed } from './ShareEmbed';
|
||||
|
@ -10,7 +10,7 @@ import { initTemplateSrv } from '../../../../../test/helpers/initTemplateSrv';
|
||||
import { Echo } from '../../../../core/services/echo/Echo';
|
||||
import { variableAdapters } from '../../../variables/adapters';
|
||||
import { createQueryVariableAdapter } from '../../../variables/query/adapter';
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { createDashboardModelFixture } from '../../state/__fixtures__/dashboardFixtures';
|
||||
|
||||
import { Props, ShareLink } from './ShareLink';
|
||||
|
@ -6,7 +6,8 @@ import { contextSrv } from 'app/core/core';
|
||||
import { t } from 'app/core/internationalization';
|
||||
import { SharePublicDashboard } from 'app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard';
|
||||
import { isPublicDashboardsEnabled } from 'app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { DashboardInteractions } from 'app/features/dashboard-scene/utils/interactions';
|
||||
import { isPanelModelLibraryPanel } from 'app/features/library-panels/guard';
|
||||
import { AccessControlAction } from 'app/types';
|
||||
|
@ -21,7 +21,7 @@ import {
|
||||
usePauseOrResumePublicDashboardMutation,
|
||||
useUpdatePublicDashboardMutation,
|
||||
} from 'app/features/dashboard/api/publicDashboardApi';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { getTimeRange } from 'app/features/dashboard/utils/timeRange';
|
||||
import { DashboardScene } from 'app/features/dashboard-scene/scene/DashboardScene';
|
||||
import { DashboardInteractions } from 'app/features/dashboard-scene/utils/interactions';
|
||||
|
@ -7,7 +7,7 @@ import { Button, Spinner, useStyles2 } from '@grafana/ui';
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { useCreatePublicDashboardMutation } from 'app/features/dashboard/api/publicDashboardApi';
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { DashboardScene } from 'app/features/dashboard-scene/scene/DashboardScene';
|
||||
import { DashboardInteractions } from 'app/features/dashboard-scene/utils/interactions';
|
||||
import { AccessControlAction, useSelector } from 'app/types';
|
||||
|
@ -3,7 +3,7 @@ import { config, DataSourceWithBackend, featureEnabled } from '@grafana/runtime'
|
||||
import { getConfig } from 'app/core/config';
|
||||
import { getDatasourceSrv } from 'app/features/plugins/datasource_srv';
|
||||
|
||||
import { PanelModel } from '../../../state';
|
||||
import { PanelModel } from '../../../state/PanelModel';
|
||||
import { shareDashboardType } from '../utils';
|
||||
|
||||
import { supportedDatasources } from './SupportedPubdashDatasources';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import { DashboardModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
|
||||
import { getUnsupportedDashboardDatasources } from './SharePublicDashboardUtils';
|
||||
|
||||
|
@ -5,7 +5,8 @@ import { Provider } from 'react-redux';
|
||||
|
||||
import { configureStore } from '../../../../../store/configureStore';
|
||||
import { DashboardInitPhase } from '../../../../../types';
|
||||
import { DashboardModel, PanelModel } from '../../../state';
|
||||
import { DashboardModel } from '../../../state/DashboardModel';
|
||||
import { PanelModel } from '../../../state/PanelModel';
|
||||
import { createDashboardModelFixture } from '../../../state/__fixtures__/dashboardFixtures';
|
||||
import { ShareModal } from '../ShareModal';
|
||||
|
||||
|
@ -6,7 +6,8 @@ import { getBackendSrv } from '@grafana/runtime';
|
||||
import { Button, ClipboardButton, Field, Input, LinkButton, Modal, Select, Spinner, Stack } from '@grafana/ui';
|
||||
import { t, Trans } from 'app/core/internationalization';
|
||||
import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { DashboardInteractions } from 'app/features/dashboard-scene/utils/interactions';
|
||||
|
||||
import { getDashboardSnapshotSrv } from '../../services/SnapshotSrv';
|
||||
|
@ -2,7 +2,8 @@ import * as React from 'react';
|
||||
|
||||
import { NavModelItem } from '@grafana/data';
|
||||
import { LibraryPanel } from '@grafana/schema/dist/esm/index.gen';
|
||||
import { DashboardModel, PanelModel } from 'app/features/dashboard/state';
|
||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
|
||||
export interface ShareModalTabProps {
|
||||
dashboard: DashboardModel;
|
||||
|
@ -4,7 +4,7 @@ import { SceneObjectRef, VizPanel } from '@grafana/scenes';
|
||||
import { createShortLink } from 'app/core/utils/shortLinks';
|
||||
import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
export interface BuildParamsArgs {
|
||||
useCurrentTimeRange: boolean;
|
||||
|
@ -8,7 +8,7 @@ import { Tooltip, useForceUpdate } from '@grafana/ui';
|
||||
import { LINK_ICON_MAP } from 'app/features/dashboard-scene/settings/links/utils';
|
||||
|
||||
import { getLinkSrv } from '../../../panel/panellinks/link_srv';
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
import { DashboardLinkButton, DashboardLinksDashboard } from './DashboardLinksDashboard';
|
||||
|
||||
|
@ -9,7 +9,7 @@ import { stylesFactory, Themeable2, withTheme2 } from '@grafana/ui';
|
||||
|
||||
import { StoreState } from '../../../../types';
|
||||
import { getSubMenuVariables, getVariablesState } from '../../../variables/state/selectors';
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
import { Annotations } from './Annotations';
|
||||
import { DashboardLinks } from './DashboardLinks';
|
||||
|
@ -6,7 +6,7 @@ import { selectors } from '@grafana/e2e-selectors';
|
||||
import config from 'app/core/config';
|
||||
import { getStandardTransformers } from 'app/features/transformers/standardTransformers';
|
||||
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
|
||||
import { TransformationsEditor } from './TransformationsEditor';
|
||||
|
||||
|
@ -26,7 +26,7 @@ import {
|
||||
import config from 'app/core/config';
|
||||
import { EmptyTransformationsMessage } from 'app/features/dashboard-scene/panel-edit/PanelDataPane/EmptyTransformationsMessage';
|
||||
|
||||
import { PanelModel } from '../../state';
|
||||
import { PanelModel } from '../../state/PanelModel';
|
||||
import { PanelNotSupported } from '../PanelEditor/PanelNotSupported';
|
||||
|
||||
import { TransformationOperationRows } from './TransformationOperationRows';
|
||||
|
@ -8,7 +8,7 @@ import { historySrv } from 'app/features/dashboard-scene/settings/version-histor
|
||||
import { useSelector } from 'app/types';
|
||||
|
||||
import { dashboardWatcher } from '../../../live/dashboard/dashboardWatcher';
|
||||
import { DashboardModel } from '../../state';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
const restoreDashboard = async (version: number, dashboard: DashboardModel) => {
|
||||
// Skip the watcher logic for this save since it's handled by the hook
|
||||
|
@ -18,7 +18,7 @@ import { DashboardInitPhase, DashboardMeta, DashboardRoutes } from 'app/types';
|
||||
|
||||
import { Props as LazyLoaderProps } from '../dashgrid/LazyLoader';
|
||||
import { DashboardSrv, setDashboardSrv } from '../services/DashboardSrv';
|
||||
import { DashboardModel } from '../state';
|
||||
import { DashboardModel } from '../state/DashboardModel';
|
||||
import { createDashboardModelFixture } from '../state/__fixtures__/dashboardFixtures';
|
||||
|
||||
import { Props, UnthemedDashboardPage } from './DashboardPage';
|
||||
|
@ -16,7 +16,7 @@ import { getKioskMode } from 'app/core/navigation/kiosk';
|
||||
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
||||
import { ID_PREFIX } from 'app/core/reducers/navBarTree';
|
||||
import { getNavModel } from 'app/core/selectors/navModel';
|
||||
import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelModel } from 'app/features/dashboard/state/PanelModel';
|
||||
import { dashboardWatcher } from 'app/features/live/dashboard/dashboardWatcher';
|
||||
import { AngularDeprecationNotice } from 'app/features/plugins/angularDeprecation/AngularDeprecationNotice';
|
||||
import { AngularMigrationNotice } from 'app/features/plugins/angularDeprecation/AngularMigrationNotice';
|
||||
|
@ -13,7 +13,7 @@ import { DashboardInitPhase, DashboardMeta, DashboardRoutes } from 'app/types';
|
||||
|
||||
import { configureStore } from '../../../store/configureStore';
|
||||
import { Props as LazyLoaderProps } from '../dashgrid/LazyLoader';
|
||||
import { DashboardModel } from '../state';
|
||||
import { DashboardModel } from '../state/DashboardModel';
|
||||
import { initDashboard } from '../state/initDashboard';
|
||||
|
||||
import PublicDashboardPage, { Props } from './PublicDashboardPage';
|
||||
|
@ -24,7 +24,7 @@ import { useGetPublicDashboardConfig } from '../components/PublicDashboard/usePu
|
||||
import { PublicDashboardNotAvailable } from '../components/PublicDashboardNotAvailable/PublicDashboardNotAvailable';
|
||||
import { DashboardGrid } from '../dashgrid/DashboardGrid';
|
||||
import { getTimeSrv } from '../services/TimeSrv';
|
||||
import { DashboardModel } from '../state';
|
||||
import { DashboardModel } from '../state/DashboardModel';
|
||||
import { initDashboard } from '../state/initDashboard';
|
||||
|
||||
export type Props = Omit<
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user