2017-12-21 06:22:20 -06:00
|
|
|
import angular from 'angular';
|
2018-04-17 02:41:07 -05:00
|
|
|
import { ChangeTracker } from './change_tracker';
|
2017-12-21 06:22:20 -06:00
|
|
|
|
|
|
|
/** @ngInject */
|
2018-08-30 03:49:18 -05:00
|
|
|
export function unsavedChangesSrv(this: any, $rootScope, $q, $location, $timeout, contextSrv, dashboardSrv, $window) {
|
2017-12-21 06:22:20 -06:00
|
|
|
this.init = function(dashboard, scope) {
|
2018-04-17 02:41:07 -05:00
|
|
|
this.tracker = new ChangeTracker(dashboard, scope, 1000, $location, $window, $timeout, contextSrv, $rootScope);
|
2017-12-21 06:22:20 -06:00
|
|
|
return this.tracker;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-12-26 05:26:50 -06:00
|
|
|
angular.module('grafana.services').service('unsavedChangesSrv', unsavedChangesSrv);
|