AppEvents: export appEvents in @grafana/runtime and support copy panel (#40715)

This commit is contained in:
Ryan McKinley
2021-10-20 13:01:21 -07:00
committed by GitHub
parent b60ae7ebed
commit ad69de4a10
18 changed files with 85 additions and 39 deletions

View File

@@ -1,6 +1,7 @@
// Libraries
import React, { Component } from 'react';
import { dateMath, TimeRange, TimeZone } from '@grafana/data';
import { TimeRangeUpdatedEvent } from '@grafana/runtime';
// Types
import { DashboardModel } from '../../state';
@@ -12,7 +13,7 @@ import { TimePickerWithHistory } from 'app/core/components/TimePicker/TimePicker
// Utils & Services
import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';
import { appEvents } from 'app/core/core';
import { ShiftTimeEvent, ShiftTimeEventPayload, TimeRangeUpdatedEvent, ZoomOutEvent } from '../../../../types/events';
import { ShiftTimeEvent, ShiftTimeEventPayload, ZoomOutEvent } from '../../../../types/events';
import { Unsubscribable } from 'rxjs';
export interface Props {

View File

@@ -5,8 +5,8 @@ import { PanelModel } from '../../state/PanelModel';
import { DashboardModel } from '../../state/DashboardModel';
import appEvents from 'app/core/app_events';
import { RowOptionsButton } from '../RowOptions/RowOptionsButton';
import { getTemplateSrv } from '@grafana/runtime';
import { RefreshEvent, ShowConfirmModalEvent } from '../../../../types/events';
import { getTemplateSrv, RefreshEvent } from '@grafana/runtime';
import { ShowConfirmModalEvent } from '../../../../types/events';
import { Unsubscribable } from 'rxjs';
export interface DashboardRowProps {

View File

@@ -4,7 +4,7 @@ import React, { useEffect, useState } from 'react';
import { PanelModel, DashboardModel } from '../../state';
import { usePanelLatestData } from './usePanelLatestData';
import { PanelOptions } from 'app/plugins/panel/table/models.gen';
import { RefreshEvent } from 'app/types/events';
import { RefreshEvent } from '@grafana/runtime';
import { applyPanelTimeOverrides } from 'app/features/dashboard/utils/panel';
import { getTimeSrv, TimeSrv } from '../../services/TimeSrv';
interface Props {

View File

@@ -9,7 +9,7 @@ import { DashboardLink } from '../../state/DashboardModel';
import { linkIconMap } from '../LinksSettings/LinkSettingsEdit';
import { useEffectOnce } from 'react-use';
import { selectors } from '@grafana/e2e-selectors';
import { TimeRangeUpdatedEvent } from 'app/types/events';
import { TimeRangeUpdatedEvent } from '@grafana/runtime';
export interface Props {
dashboard: DashboardModel;