grafana/public/app/features/dashboard/services/UnsavedChangesSrv.ts
2019-01-23 12:52:46 +01:00

13 lines
493 B
TypeScript

import angular from 'angular';
import { ChangeTracker } from './ChangeTracker';
/** @ngInject */
export function unsavedChangesSrv(this: any, $rootScope, $q, $location, $timeout, contextSrv, dashboardSrv, $window) {
this.init = function(dashboard, scope) {
this.tracker = new ChangeTracker(dashboard, scope, 1000, $location, $window, $timeout, contextSrv, $rootScope);
return this.tracker;
};
}
angular.module('grafana.services').service('unsavedChangesSrv', unsavedChangesSrv);