unsaved_changes_srv.ts 494 B

123456789101112
  1. import angular from 'angular';
  2. import { ChangeTracker } from './change_tracker';
  3. /** @ngInject */
  4. export function unsavedChangesSrv(this: any, $rootScope, $q, $location, $timeout, contextSrv, dashboardSrv, $window) {
  5. this.init = function(dashboard, scope) {
  6. this.tracker = new ChangeTracker(dashboard, scope, 1000, $location, $window, $timeout, contextSrv, $rootScope);
  7. return this.tracker;
  8. };
  9. }
  10. angular.module('grafana.services').service('unsavedChangesSrv', unsavedChangesSrv);