mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TimeSrv: Refactor service to have no dependency on angular (#32562)
* TimeSrv: Refactor service to have no dependency on angular * Fixing reference to function that does not exist * fixing tests * Worked around the strange error
This commit is contained in:
@@ -15,6 +15,7 @@ import { loadPanelPlugin } from 'app/features/plugins/state/actions';
|
||||
import { DashboardAcl, DashboardAclUpdateDTO, NewDashboardAclItem, PermissionLevel, ThunkResult } from 'app/types';
|
||||
import { PanelModel } from './PanelModel';
|
||||
import { cancelVariables } from '../../variables/state/actions';
|
||||
import { getTimeSrv } from '../services/TimeSrv';
|
||||
|
||||
export function getDashboardPermissions(id: number): ThunkResult<void> {
|
||||
return async (dispatch) => {
|
||||
@@ -168,6 +169,8 @@ export const cleanUpDashboardAndVariables = (): ThunkResult<void> => (dispatch,
|
||||
dashboard.destroy();
|
||||
}
|
||||
|
||||
getTimeSrv().stopAutoRefresh();
|
||||
|
||||
dispatch(cleanUpDashboard());
|
||||
dispatch(cancelVariables());
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user