From c4ce7a40af142f8f9e52be3012fb5218c58a04b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 13 Oct 2021 16:59:47 +0200 Subject: [PATCH] AngularPanels: Move angular panel infra & components to angular/app folder (#40373) * AngularPanels: Move to app/angular folder * Fixing issues --- public/app/angular/AngularApp.ts | 1 + public/app/{features => angular}/panel/all.ts | 0 .../app/{features => angular}/panel/metrics_panel_ctrl.ts | 4 ++-- public/app/{features => angular}/panel/panel_ctrl.ts | 2 +- public/app/{features => angular}/panel/panel_directive.ts | 2 +- public/app/{features => angular}/panel/panel_editor_tab.ts | 0 .../panel/panellinks/linkSuppliers.test.ts | 2 +- .../{features => angular}/panel/panellinks/linkSuppliers.ts | 0 .../app/{features => angular}/panel/panellinks/link_srv.ts | 2 +- .../panel/panellinks/specs/link_srv.test.ts | 0 .../panel/partials/query_editor_row.html | 0 public/app/{features => angular}/panel/query_ctrl.ts | 0 public/app/{features => angular}/panel/query_editor_row.ts | 2 +- .../panel/specs/metrics_panel_ctrl.test.ts | 0 .../app/core/components/PanelTypeFilter/PanelTypeFilter.tsx | 2 +- public/app/features/all.ts | 1 - public/app/features/annotations/event_editor.ts | 2 +- public/app/features/annotations/event_manager.ts | 2 +- .../components/PanelEditor/AngularPanelOptions.tsx | 2 +- .../components/PanelEditor/VisualizationSelectPane.tsx | 6 +++++- .../components/PanelEditor/getFieldOverrideElements.tsx | 2 +- .../components/PanelEditor/getPanelFrameOptions.tsx | 2 +- .../components/PanelEditor/getVizualizationOptions.tsx | 2 +- .../dashboard/components/SubMenu/DashboardLinks.tsx | 2 +- .../components/SubMenu/DashboardLinksDashboard.tsx | 2 +- .../features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx | 2 +- public/app/features/dashboard/utils/getPanelMenu.ts | 2 +- public/app/features/explore/utils/links.test.ts | 2 +- public/app/features/explore/utils/links.ts | 2 +- .../components/LibraryPanelCard/LibraryPanelCard.tsx | 2 +- .../LibraryPanelsSearch/LibraryPanelsSearch.test.tsx | 2 +- .../components/VizTypePicker/PanelTypeCard.tsx | 0 .../components/VizTypePicker/VizTypePicker.tsx | 0 .../components/VizTypePicker/VizTypePickerPlugin.tsx | 0 .../datasource/loki/configuration/DebugSection.test.tsx | 2 +- public/app/plugins/panel/graph/graph.ts | 2 +- public/app/plugins/panel/graph/module.ts | 2 +- public/app/plugins/panel/graph/specs/graph.test.ts | 4 ++-- public/app/plugins/panel/graph/threshold_manager.ts | 2 +- public/app/plugins/sdk.ts | 6 +++--- public/app/routes/GrafanaCtrl.ts | 2 +- 41 files changed, 38 insertions(+), 34 deletions(-) rename public/app/{features => angular}/panel/all.ts (100%) rename public/app/{features => angular}/panel/metrics_panel_ctrl.ts (97%) rename public/app/{features => angular}/panel/panel_ctrl.ts (97%) rename public/app/{features => angular}/panel/panel_directive.ts (98%) rename public/app/{features => angular}/panel/panel_editor_tab.ts (100%) rename public/app/{features => angular}/panel/panellinks/linkSuppliers.test.ts (98%) rename public/app/{features => angular}/panel/panellinks/linkSuppliers.ts (100%) rename public/app/{features => angular}/panel/panellinks/link_srv.ts (99%) rename public/app/{features => angular}/panel/panellinks/specs/link_srv.test.ts (100%) rename public/app/{features => angular}/panel/partials/query_editor_row.html (100%) rename public/app/{features => angular}/panel/query_ctrl.ts (100%) rename public/app/{features => angular}/panel/query_editor_row.ts (93%) rename public/app/{features => angular}/panel/specs/metrics_panel_ctrl.test.ts (100%) rename public/app/features/{dashboard => panel}/components/VizTypePicker/PanelTypeCard.tsx (100%) rename public/app/features/{dashboard => panel}/components/VizTypePicker/VizTypePicker.tsx (100%) rename public/app/features/{dashboard => panel}/components/VizTypePicker/VizTypePickerPlugin.tsx (100%) diff --git a/public/app/angular/AngularApp.ts b/public/app/angular/AngularApp.ts index ffa585766dc..2124d8093fa 100644 --- a/public/app/angular/AngularApp.ts +++ b/public/app/angular/AngularApp.ts @@ -13,6 +13,7 @@ import { monkeyPatchInjectorWithPreAssignedBindings } from 'app/core/injectorMon import { extend } from 'lodash'; import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv'; import { getTemplateSrv } from '@grafana/runtime'; +import './panel/all'; export class AngularApp { ngModuleDependencies: any[]; diff --git a/public/app/features/panel/all.ts b/public/app/angular/panel/all.ts similarity index 100% rename from public/app/features/panel/all.ts rename to public/app/angular/panel/all.ts diff --git a/public/app/features/panel/metrics_panel_ctrl.ts b/public/app/angular/panel/metrics_panel_ctrl.ts similarity index 97% rename from public/app/features/panel/metrics_panel_ctrl.ts rename to public/app/angular/panel/metrics_panel_ctrl.ts index 80bf76b7bca..530e945c8fb 100644 --- a/public/app/features/panel/metrics_panel_ctrl.ts +++ b/public/app/angular/panel/metrics_panel_ctrl.ts @@ -1,5 +1,5 @@ import { isArray } from 'lodash'; -import { PanelCtrl } from 'app/features/panel/panel_ctrl'; +import { PanelCtrl } from 'app/angular/panel/panel_ctrl'; import { applyPanelTimeOverrides } from 'app/features/dashboard/utils/panel'; import { ContextSrv } from 'app/core/services/context_srv'; import { @@ -16,7 +16,7 @@ import { } from '@grafana/data'; import { Unsubscribable } from 'rxjs'; import { PanelModel } from 'app/features/dashboard/state'; -import { PanelQueryRunner } from '../query/state/PanelQueryRunner'; +import { PanelQueryRunner } from '../../features/query/state/PanelQueryRunner'; class MetricsPanelCtrl extends PanelCtrl { declare datasource: DataSourceApi; diff --git a/public/app/features/panel/panel_ctrl.ts b/public/app/angular/panel/panel_ctrl.ts similarity index 97% rename from public/app/features/panel/panel_ctrl.ts rename to public/app/angular/panel/panel_ctrl.ts index a50ec5c3bfb..2abb1c49531 100644 --- a/public/app/features/panel/panel_ctrl.ts +++ b/public/app/angular/panel/panel_ctrl.ts @@ -10,7 +10,7 @@ import { EventBusExtended, EventBusSrv, } from '@grafana/data'; -import { DashboardModel } from '../dashboard/state'; +import { DashboardModel } from '../../features/dashboard/state'; import { AngularLocationWrapper } from 'app/angular/AngularLocationWrapper'; export class PanelCtrl { diff --git a/public/app/features/panel/panel_directive.ts b/public/app/angular/panel/panel_directive.ts similarity index 98% rename from public/app/features/panel/panel_directive.ts rename to public/app/angular/panel/panel_directive.ts index fde0dd15155..7f0c5b642e8 100644 --- a/public/app/features/panel/panel_directive.ts +++ b/public/app/angular/panel/panel_directive.ts @@ -1,7 +1,7 @@ // @ts-ignore import baron from 'baron'; import { PanelEvents } from '@grafana/data'; -import { PanelModel } from '../dashboard/state'; +import { PanelModel } from '../../features/dashboard/state'; import { PanelCtrl } from './panel_ctrl'; import { Subscription } from 'rxjs'; import { PanelDirectiveReadyEvent, RefreshEvent, RenderEvent } from 'app/types/events'; diff --git a/public/app/features/panel/panel_editor_tab.ts b/public/app/angular/panel/panel_editor_tab.ts similarity index 100% rename from public/app/features/panel/panel_editor_tab.ts rename to public/app/angular/panel/panel_editor_tab.ts diff --git a/public/app/features/panel/panellinks/linkSuppliers.test.ts b/public/app/angular/panel/panellinks/linkSuppliers.test.ts similarity index 98% rename from public/app/features/panel/panellinks/linkSuppliers.test.ts rename to public/app/angular/panel/panellinks/linkSuppliers.test.ts index 69f44e4af14..961aaee01c0 100644 --- a/public/app/features/panel/panellinks/linkSuppliers.test.ts +++ b/public/app/angular/panel/panellinks/linkSuppliers.test.ts @@ -1,7 +1,7 @@ import { getFieldLinksSupplier } from './linkSuppliers'; import { applyFieldOverrides, createTheme, DataFrameView, dateTime, FieldDisplay, toDataFrame } from '@grafana/data'; import { getLinkSrv, LinkService, LinkSrv, setLinkSrv } from './link_srv'; -import { TemplateSrv } from '../../templating/template_srv'; +import { TemplateSrv } from '../../../features/templating/template_srv'; // We do not need more here and TimeSrv is hard to setup fully. jest.mock('app/features/dashboard/services/TimeSrv', () => ({ diff --git a/public/app/features/panel/panellinks/linkSuppliers.ts b/public/app/angular/panel/panellinks/linkSuppliers.ts similarity index 100% rename from public/app/features/panel/panellinks/linkSuppliers.ts rename to public/app/angular/panel/panellinks/linkSuppliers.ts diff --git a/public/app/features/panel/panellinks/link_srv.ts b/public/app/angular/panel/panellinks/link_srv.ts similarity index 99% rename from public/app/features/panel/panellinks/link_srv.ts rename to public/app/angular/panel/panellinks/link_srv.ts index 0858d78e2c9..81b83a48bf6 100644 --- a/public/app/features/panel/panellinks/link_srv.ts +++ b/public/app/angular/panel/panellinks/link_srv.ts @@ -23,7 +23,7 @@ import { VariableSuggestion, VariableSuggestionsScope, } from '@grafana/data'; -import { getVariablesUrlParams } from '../../variables/getAllVariableValuesForUrl'; +import { getVariablesUrlParams } from '../../../features/variables/getAllVariableValuesForUrl'; const timeRangeVars = [ { diff --git a/public/app/features/panel/panellinks/specs/link_srv.test.ts b/public/app/angular/panel/panellinks/specs/link_srv.test.ts similarity index 100% rename from public/app/features/panel/panellinks/specs/link_srv.test.ts rename to public/app/angular/panel/panellinks/specs/link_srv.test.ts diff --git a/public/app/features/panel/partials/query_editor_row.html b/public/app/angular/panel/partials/query_editor_row.html similarity index 100% rename from public/app/features/panel/partials/query_editor_row.html rename to public/app/angular/panel/partials/query_editor_row.html diff --git a/public/app/features/panel/query_ctrl.ts b/public/app/angular/panel/query_ctrl.ts similarity index 100% rename from public/app/features/panel/query_ctrl.ts rename to public/app/angular/panel/query_ctrl.ts diff --git a/public/app/features/panel/query_editor_row.ts b/public/app/angular/panel/query_editor_row.ts similarity index 93% rename from public/app/features/panel/query_editor_row.ts rename to public/app/angular/panel/query_editor_row.ts index 876047a9603..f7f0849da6d 100644 --- a/public/app/features/panel/query_editor_row.ts +++ b/public/app/angular/panel/query_editor_row.ts @@ -31,7 +31,7 @@ function queryEditorRowDirective() { controller: QueryRowCtrl, bindToController: true, controllerAs: 'ctrl', - templateUrl: 'public/app/features/panel/partials/query_editor_row.html', + templateUrl: 'public/app/angular/panel/partials/query_editor_row.html', transclude: true, scope: { queryCtrl: '=', diff --git a/public/app/features/panel/specs/metrics_panel_ctrl.test.ts b/public/app/angular/panel/specs/metrics_panel_ctrl.test.ts similarity index 100% rename from public/app/features/panel/specs/metrics_panel_ctrl.test.ts rename to public/app/angular/panel/specs/metrics_panel_ctrl.test.ts diff --git a/public/app/core/components/PanelTypeFilter/PanelTypeFilter.tsx b/public/app/core/components/PanelTypeFilter/PanelTypeFilter.tsx index bed3de8fce7..a2c5845f3d8 100644 --- a/public/app/core/components/PanelTypeFilter/PanelTypeFilter.tsx +++ b/public/app/core/components/PanelTypeFilter/PanelTypeFilter.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useMemo, useState } from 'react'; import { GrafanaTheme2, PanelPluginMeta, SelectableValue } from '@grafana/data'; -import { getAllPanelPluginMeta } from '../../../features/dashboard/components/VizTypePicker/VizTypePicker'; +import { getAllPanelPluginMeta } from '../../../features/panel/components/VizTypePicker/VizTypePicker'; import { Icon, resetSelectStyles, MultiSelect, useStyles2 } from '@grafana/ui'; import { css } from '@emotion/css'; diff --git a/public/app/features/all.ts b/public/app/features/all.ts index 3553964ca0d..fcb7c20703e 100644 --- a/public/app/features/all.ts +++ b/public/app/features/all.ts @@ -1,7 +1,6 @@ import './annotations/all'; import './plugins/all'; import './dashboard'; -import './panel/all'; import './manage-dashboards'; import './profile/all'; import './datasources/settings/HttpSettingsCtrl'; diff --git a/public/app/features/annotations/event_editor.ts b/public/app/features/annotations/event_editor.ts index b1ea26a0c57..1839c01a6a2 100644 --- a/public/app/features/annotations/event_editor.ts +++ b/public/app/features/annotations/event_editor.ts @@ -1,7 +1,7 @@ import { cloneDeep, isNumber } from 'lodash'; import { coreModule } from 'app/core/core'; import { AnnotationEvent, dateTime } from '@grafana/data'; -import { MetricsPanelCtrl } from '../panel/metrics_panel_ctrl'; +import { MetricsPanelCtrl } from 'app/angular/panel/metrics_panel_ctrl'; import { deleteAnnotation, saveAnnotation, updateAnnotation } from './api'; import { getDashboardQueryRunner } from '../query/state/DashboardQueryRunner/DashboardQueryRunner'; diff --git a/public/app/features/annotations/event_manager.ts b/public/app/features/annotations/event_manager.ts index 2fbc011c1fe..19797d0562a 100644 --- a/public/app/features/annotations/event_manager.ts +++ b/public/app/features/annotations/event_manager.ts @@ -8,7 +8,7 @@ import { PENDING_COLOR, REGION_FILL_ALPHA, } from '@grafana/ui'; -import { MetricsPanelCtrl } from '../panel/metrics_panel_ctrl'; +import { MetricsPanelCtrl } from 'app/angular/panel/metrics_panel_ctrl'; import { AnnotationEvent } from '@grafana/data'; diff --git a/public/app/features/dashboard/components/PanelEditor/AngularPanelOptions.tsx b/public/app/features/dashboard/components/PanelEditor/AngularPanelOptions.tsx index 5ab69063c4b..99778dd3463 100644 --- a/public/app/features/dashboard/components/PanelEditor/AngularPanelOptions.tsx +++ b/public/app/features/dashboard/components/PanelEditor/AngularPanelOptions.tsx @@ -11,7 +11,7 @@ import { PanelPlugin, PanelPluginMeta } from '@grafana/data'; import { changePanelPlugin } from 'app/features/panel/state/actions'; import { StoreState } from 'app/types'; import { getSectionOpenState, saveSectionOpenState } from './state/utils'; -import { PanelCtrl } from 'app/features/panel/panel_ctrl'; +import { PanelCtrl } from 'app/angular/panel/panel_ctrl'; import { getPanelStateForModel } from 'app/features/panel/state/selectors'; interface OwnProps { diff --git a/public/app/features/dashboard/components/PanelEditor/VisualizationSelectPane.tsx b/public/app/features/dashboard/components/PanelEditor/VisualizationSelectPane.tsx index 2799177e7a2..87af8f1b822 100644 --- a/public/app/features/dashboard/components/PanelEditor/VisualizationSelectPane.tsx +++ b/public/app/features/dashboard/components/PanelEditor/VisualizationSelectPane.tsx @@ -5,7 +5,11 @@ import { Button, CustomScrollbar, Icon, Input, RadioButtonGroup, useStyles } fro import { changePanelPlugin } from '../../../panel/state/actions'; import { PanelModel } from '../../state/PanelModel'; import { useDispatch, useSelector } from 'react-redux'; -import { filterPluginList, getAllPanelPluginMeta, VizTypePicker } from '../VizTypePicker/VizTypePicker'; +import { + filterPluginList, + getAllPanelPluginMeta, + VizTypePicker, +} from '../../../panel/components/VizTypePicker/VizTypePicker'; import { Field } from '@grafana/ui/src/components/Forms/Field'; import { PanelLibraryOptionsGroup } from 'app/features/library-panels/components/PanelLibraryOptionsGroup/PanelLibraryOptionsGroup'; import { toggleVizPicker } from './state/reducers'; diff --git a/public/app/features/dashboard/components/PanelEditor/getFieldOverrideElements.tsx b/public/app/features/dashboard/components/PanelEditor/getFieldOverrideElements.tsx index 3b40139eb16..1be7012d2f2 100644 --- a/public/app/features/dashboard/components/PanelEditor/getFieldOverrideElements.tsx +++ b/public/app/features/dashboard/components/PanelEditor/getFieldOverrideElements.tsx @@ -14,7 +14,7 @@ import { OptionPaneRenderProps } from './types'; import { OptionsPaneItemDescriptor } from './OptionsPaneItemDescriptor'; import { OptionsPaneCategoryDescriptor } from './OptionsPaneCategoryDescriptor'; import { DynamicConfigValueEditor } from './DynamicConfigValueEditor'; -import { getDataLinksVariableSuggestions } from 'app/features/panel/panellinks/link_srv'; +import { getDataLinksVariableSuggestions } from 'app/angular/panel/panellinks/link_srv'; import { OverrideCategoryTitle } from './OverrideCategoryTitle'; import { css } from '@emotion/css'; diff --git a/public/app/features/dashboard/components/PanelEditor/getPanelFrameOptions.tsx b/public/app/features/dashboard/components/PanelEditor/getPanelFrameOptions.tsx index 5cd1e34348b..0b4c6c1e417 100644 --- a/public/app/features/dashboard/components/PanelEditor/getPanelFrameOptions.tsx +++ b/public/app/features/dashboard/components/PanelEditor/getPanelFrameOptions.tsx @@ -1,5 +1,5 @@ import { DataLinksInlineEditor, Input, RadioButtonGroup, Select, Switch, TextArea } from '@grafana/ui'; -import { getPanelLinksVariableSuggestions } from 'app/features/panel/panellinks/link_srv'; +import { getPanelLinksVariableSuggestions } from 'app/angular/panel/panellinks/link_srv'; import React from 'react'; import { RepeatRowSelect } from '../RepeatRowSelect/RepeatRowSelect'; import { OptionsPaneItemDescriptor } from './OptionsPaneItemDescriptor'; diff --git a/public/app/features/dashboard/components/PanelEditor/getVizualizationOptions.tsx b/public/app/features/dashboard/components/PanelEditor/getVizualizationOptions.tsx index f5e9d9c8f38..25904650277 100644 --- a/public/app/features/dashboard/components/PanelEditor/getVizualizationOptions.tsx +++ b/public/app/features/dashboard/components/PanelEditor/getVizualizationOptions.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { StandardEditorContext, VariableSuggestionsScope } from '@grafana/data'; import { get as lodashGet } from 'lodash'; -import { getDataLinksVariableSuggestions } from 'app/features/panel/panellinks/link_srv'; +import { getDataLinksVariableSuggestions } from 'app/angular/panel/panellinks/link_srv'; import { OptionPaneRenderProps } from './types'; import { updateDefaultFieldConfigValue, setOptionImmutably } from './utils'; import { OptionsPaneItemDescriptor } from './OptionsPaneItemDescriptor'; diff --git a/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx b/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx index 196e47f71f7..909e5daaa26 100644 --- a/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx +++ b/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx @@ -2,7 +2,7 @@ import React, { FC } from 'react'; import { Icon, IconName, Tooltip, useForceUpdate } from '@grafana/ui'; import { sanitizeUrl } from '@grafana/data/src/text/sanitize'; import { DashboardLinksDashboard } from './DashboardLinksDashboard'; -import { getLinkSrv } from '../../../panel/panellinks/link_srv'; +import { getLinkSrv } from '../../../../angular/panel/panellinks/link_srv'; import { DashboardModel } from '../../state'; import { DashboardLink } from '../../state/DashboardModel'; diff --git a/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx b/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx index 203af35cf60..a08c89e0734 100644 --- a/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx +++ b/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx @@ -2,7 +2,7 @@ import React, { useRef, useState, useLayoutEffect } from 'react'; import { Icon, ToolbarButton, Tooltip, useStyles2 } from '@grafana/ui'; import { sanitize, sanitizeUrl } from '@grafana/data/src/text/sanitize'; import { getBackendSrv } from 'app/core/services/backend_srv'; -import { getLinkSrv } from '../../../panel/panellinks/link_srv'; +import { getLinkSrv } from '../../../../angular/panel/panellinks/link_srv'; import { DashboardLink } from '../../state/DashboardModel'; import { DashboardSearchHit } from 'app/features/search/types'; import { selectors } from '@grafana/e2e-selectors'; diff --git a/public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx b/public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx index a5f020a89a6..f12fae773fb 100644 --- a/public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx +++ b/public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx @@ -7,7 +7,7 @@ import { selectors } from '@grafana/e2e-selectors'; import PanelHeaderCorner from './PanelHeaderCorner'; import { DashboardModel } from 'app/features/dashboard/state/DashboardModel'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; -import { getPanelLinksSupplier } from 'app/features/panel/panellinks/linkSuppliers'; +import { getPanelLinksSupplier } from 'app/angular/panel/panellinks/linkSuppliers'; import { PanelHeaderNotices } from './PanelHeaderNotices'; import { PanelHeaderMenuTrigger } from './PanelHeaderMenuTrigger'; import { PanelHeaderLoadingIndicator } from './PanelHeaderLoadingIndicator'; diff --git a/public/app/features/dashboard/utils/getPanelMenu.ts b/public/app/features/dashboard/utils/getPanelMenu.ts index 9dc7b2f2c7b..16c18b8501e 100644 --- a/public/app/features/dashboard/utils/getPanelMenu.ts +++ b/public/app/features/dashboard/utils/getPanelMenu.ts @@ -16,7 +16,7 @@ import { contextSrv } from '../../../core/services/context_srv'; import { navigateToExplore } from '../../explore/state/main'; import { getExploreUrl } from '../../../core/utils/explore'; import { getTimeSrv } from '../services/TimeSrv'; -import { PanelCtrl } from '../../panel/panel_ctrl'; +import { PanelCtrl } from 'app/angular/panel/panel_ctrl'; import config from 'app/core/config'; export function getPanelMenu( diff --git a/public/app/features/explore/utils/links.test.ts b/public/app/features/explore/utils/links.test.ts index dec2bf3f9ed..846f0e245af 100644 --- a/public/app/features/explore/utils/links.test.ts +++ b/public/app/features/explore/utils/links.test.ts @@ -9,7 +9,7 @@ import { LinkModel, TimeRange, } from '@grafana/data'; -import { setLinkSrv } from '../../panel/panellinks/link_srv'; +import { setLinkSrv } from '../../../angular/panel/panellinks/link_srv'; import { setContextSrv } from '../../../core/services/context_srv'; describe('getFieldLinksForExplore', () => { diff --git a/public/app/features/explore/utils/links.ts b/public/app/features/explore/utils/links.ts index c3aabab2a51..48b7621150f 100644 --- a/public/app/features/explore/utils/links.ts +++ b/public/app/features/explore/utils/links.ts @@ -11,7 +11,7 @@ import { SplitOpen, } from '@grafana/data'; import { getTemplateSrv } from '@grafana/runtime'; -import { getLinkSrv } from '../../panel/panellinks/link_srv'; +import { getLinkSrv } from '../../../angular/panel/panellinks/link_srv'; import { contextSrv } from 'app/core/services/context_srv'; /** diff --git a/public/app/features/library-panels/components/LibraryPanelCard/LibraryPanelCard.tsx b/public/app/features/library-panels/components/LibraryPanelCard/LibraryPanelCard.tsx index 6401c734c28..a1578e21014 100644 --- a/public/app/features/library-panels/components/LibraryPanelCard/LibraryPanelCard.tsx +++ b/public/app/features/library-panels/components/LibraryPanelCard/LibraryPanelCard.tsx @@ -3,7 +3,7 @@ import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { Icon, Link, useStyles2 } from '@grafana/ui'; import { LibraryElementDTO } from '../../types'; -import { PanelTypeCard } from 'app/features/dashboard/components/VizTypePicker/PanelTypeCard'; +import { PanelTypeCard } from 'app/features/panel/components/VizTypePicker/PanelTypeCard'; import { DeleteLibraryPanelModal } from '../DeleteLibraryPanelModal/DeleteLibraryPanelModal'; import { config } from '@grafana/runtime'; import { getPanelPluginNotFound } from 'app/features/panel/components/PanelPluginError'; diff --git a/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx b/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx index 12bcc5a7f5c..b14ee979107 100644 --- a/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx +++ b/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx @@ -8,7 +8,7 @@ import { LibraryPanelsSearch, LibraryPanelsSearchProps } from './LibraryPanelsSe import * as api from '../../state/api'; import { LibraryElementKind, LibraryElementsSearchResult } from '../../types'; import { backendSrv } from '../../../../core/services/backend_srv'; -import * as viztypepicker from '../../../dashboard/components/VizTypePicker/VizTypePicker'; +import * as viztypepicker from '../../../panel/components/VizTypePicker/VizTypePicker'; jest.mock('@grafana/runtime', () => ({ ...((jest.requireActual('@grafana/runtime') as unknown) as object), diff --git a/public/app/features/dashboard/components/VizTypePicker/PanelTypeCard.tsx b/public/app/features/panel/components/VizTypePicker/PanelTypeCard.tsx similarity index 100% rename from public/app/features/dashboard/components/VizTypePicker/PanelTypeCard.tsx rename to public/app/features/panel/components/VizTypePicker/PanelTypeCard.tsx diff --git a/public/app/features/dashboard/components/VizTypePicker/VizTypePicker.tsx b/public/app/features/panel/components/VizTypePicker/VizTypePicker.tsx similarity index 100% rename from public/app/features/dashboard/components/VizTypePicker/VizTypePicker.tsx rename to public/app/features/panel/components/VizTypePicker/VizTypePicker.tsx diff --git a/public/app/features/dashboard/components/VizTypePicker/VizTypePickerPlugin.tsx b/public/app/features/panel/components/VizTypePicker/VizTypePickerPlugin.tsx similarity index 100% rename from public/app/features/dashboard/components/VizTypePicker/VizTypePickerPlugin.tsx rename to public/app/features/panel/components/VizTypePicker/VizTypePickerPlugin.tsx diff --git a/public/app/plugins/datasource/loki/configuration/DebugSection.test.tsx b/public/app/plugins/datasource/loki/configuration/DebugSection.test.tsx index 177eb167481..1d71a9dc933 100644 --- a/public/app/plugins/datasource/loki/configuration/DebugSection.test.tsx +++ b/public/app/plugins/datasource/loki/configuration/DebugSection.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { DebugSection } from './DebugSection'; import { mount } from 'enzyme'; -import { getLinkSrv, LinkService, LinkSrv, setLinkSrv } from '../../../../features/panel/panellinks/link_srv'; +import { getLinkSrv, LinkService, LinkSrv, setLinkSrv } from '../../../../angular/panel/panellinks/link_srv'; import { dateTime } from '@grafana/data'; // We do not need more here and TimeSrv is hard to setup fully. diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index 6c61a8b3b19..0ba97c2d0ed 100644 --- a/public/app/plugins/panel/graph/graph.ts +++ b/public/app/plugins/panel/graph/graph.ts @@ -46,7 +46,7 @@ import { import { GraphContextMenuCtrl } from './GraphContextMenuCtrl'; import { TimeSrv } from 'app/features/dashboard/services/TimeSrv'; import { ContextSrv } from 'app/core/services/context_srv'; -import { getFieldLinksSupplier } from 'app/features/panel/panellinks/linkSuppliers'; +import { getFieldLinksSupplier } from 'app/angular/panel/panellinks/linkSuppliers'; import { DashboardModel } from '../../../features/dashboard/state'; const LegendWithThemeProvider = provideTheme(Legend); diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index 6d067f033fb..d4e7568bbd7 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -24,7 +24,7 @@ import { dispatch } from 'app/store/store'; import { ThresholdMapper } from 'app/features/alerting/state/ThresholdMapper'; import { appEvents } from '../../../core/core'; import { ZoomOutEvent } from '../../../types/events'; -import { MetricsPanelCtrl } from 'app/features/panel/metrics_panel_ctrl'; +import { MetricsPanelCtrl } from 'app/angular/panel/metrics_panel_ctrl'; import { loadSnapshotData } from '../../../features/dashboard/utils/loadSnapshotData'; import { annotationsFromDataFrames } from '../../../features/query/state/DashboardQueryRunner/utils'; diff --git a/public/app/plugins/panel/graph/specs/graph.test.ts b/public/app/plugins/panel/graph/specs/graph.test.ts index 8d0f0279ccf..8b0c4815c1e 100644 --- a/public/app/plugins/panel/graph/specs/graph.test.ts +++ b/public/app/plugins/panel/graph/specs/graph.test.ts @@ -1,6 +1,6 @@ import { GraphCtrl } from '../module'; -import { MetricsPanelCtrl } from 'app/features/panel/metrics_panel_ctrl'; -import { PanelCtrl } from 'app/features/panel/panel_ctrl'; +import { MetricsPanelCtrl } from 'app/angular/panel/metrics_panel_ctrl'; +import { PanelCtrl } from 'app/angular/panel/panel_ctrl'; import config from 'app/core/config'; import TimeSeries from 'app/core/time_series2'; diff --git a/public/app/plugins/panel/graph/threshold_manager.ts b/public/app/plugins/panel/graph/threshold_manager.ts index 741c9c76427..f5ce394e1d5 100644 --- a/public/app/plugins/panel/graph/threshold_manager.ts +++ b/public/app/plugins/panel/graph/threshold_manager.ts @@ -3,7 +3,7 @@ import $ from 'jquery'; import { isNumber } from 'lodash'; import { getColorForTheme } from '@grafana/data'; import { CoreEvents } from 'app/types'; -import { PanelCtrl } from 'app/features/panel/panel_ctrl'; +import { PanelCtrl } from 'app/angular/panel/panel_ctrl'; import { config } from 'app/core/config'; export class ThresholdManager { diff --git a/public/app/plugins/sdk.ts b/public/app/plugins/sdk.ts index 3ab19c61a23..58fd3f2b02f 100644 --- a/public/app/plugins/sdk.ts +++ b/public/app/plugins/sdk.ts @@ -1,8 +1,8 @@ import { makeClassES5Compatible } from '@grafana/data'; import { loadPluginCss } from '@grafana/runtime'; -import { PanelCtrl as PanelCtrlES6 } from 'app/features/panel/panel_ctrl'; -import { MetricsPanelCtrl as MetricsPanelCtrlES6 } from 'app/features/panel/metrics_panel_ctrl'; -import { QueryCtrl as QueryCtrlES6 } from 'app/features/panel/query_ctrl'; +import { PanelCtrl as PanelCtrlES6 } from 'app/angular/panel/panel_ctrl'; +import { MetricsPanelCtrl as MetricsPanelCtrlES6 } from 'app/angular/panel/metrics_panel_ctrl'; +import { QueryCtrl as QueryCtrlES6 } from 'app/angular/panel/query_ctrl'; const PanelCtrl = makeClassES5Compatible(PanelCtrlES6); const MetricsPanelCtrl = makeClassES5Compatible(MetricsPanelCtrlES6); diff --git a/public/app/routes/GrafanaCtrl.ts b/public/app/routes/GrafanaCtrl.ts index 7a78a461783..a195b13d4f5 100644 --- a/public/app/routes/GrafanaCtrl.ts +++ b/public/app/routes/GrafanaCtrl.ts @@ -21,7 +21,7 @@ import { AngularLoader, setAngularLoader } from 'app/core/services/AngularLoader // Types import { CoreEvents, AppEventEmitter, AppEventConsumer } from 'app/types'; -import { setLinkSrv, LinkSrv } from 'app/features/panel/panellinks/link_srv'; +import { setLinkSrv, LinkSrv } from 'app/angular/panel/panellinks/link_srv'; import { UtilSrv } from 'app/core/services/util_srv'; import { ContextSrv } from 'app/core/services/context_srv'; import { DashboardSrv, setDashboardSrv } from 'app/features/dashboard/services/DashboardSrv';