grafana/public/app/features/dashboard/unsaved_changes_srv.ts
Torkel Ödegaard 85121e55c9
fix: Row state is now ignored when looking for dashboard changes (#11608)
* fix: Row state is now ignored when looking for dashboawrd changes, had to fix bug in expand logic to make fix work. Also moved the ChangeTracker to it's own file and moved tests to jest, fixes #11208

* removed commented out log calls
2018-04-17 09:41:07 +02:00

13 lines
483 B
TypeScript

import angular from 'angular';
import { ChangeTracker } from './change_tracker';
/** @ngInject */
export function unsavedChangesSrv($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);