Skip to content

Commit

Permalink
Disable the dirty prompt until #19594 is resolved (#19595)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline authored Jun 1, 2018
1 parent a801752 commit 9ce082b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ app.directive('jsonWatchEdit', function ($injector) {
const licenseService = $injector.get('xpackWatcherLicenseService');
const kbnUrl = $injector.get('kbnUrl');
const confirmModal = $injector.get('confirmModal');
const dirtyPrompt = $injector.get('dirtyPrompt');
// const dirtyPrompt = $injector.get('dirtyPrompt');

return {
restrict: 'E',
Expand All @@ -37,7 +37,7 @@ app.directive('jsonWatchEdit', function ($injector) {
bindToController: true,
controllerAs: 'jsonWatchEdit',
controller: class JsonWatchEditController extends InitAfterBindingsWorkaround {
initAfterBindings($scope) {
initAfterBindings() {
this.notifier = new Notifier({ location: 'Watcher' });
this.selectedTabId = 'edit-watch';
this.simulateResults = null;
Expand All @@ -51,8 +51,8 @@ app.directive('jsonWatchEdit', function ($injector) {
];
this.breadcrumb = this.watch.displayName;

dirtyPrompt.register(() => !this.watch.isEqualTo(this.originalWatch));
$scope.$on('$destroy', dirtyPrompt.deregister);
// dirtyPrompt.register(() => !this.watch.isEqualTo(this.originalWatch));
// $scope.$on('$destroy', dirtyPrompt.deregister);

this.onExecuteDetailsValid();
}
Expand Down Expand Up @@ -174,7 +174,7 @@ app.directive('jsonWatchEdit', function ($injector) {
}

onClose = () => {
dirtyPrompt.deregister();
// dirtyPrompt.deregister();
kbnUrl.change('/management/elasticsearch/watcher/watches', {});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ app.directive('thresholdWatchEdit', function ($injector) {
const actionDefaultsService = $injector.get('xpackWatcherActionDefaultsService');
const kbnUrl = $injector.get('kbnUrl');
const confirmModal = $injector.get('confirmModal');
const dirtyPrompt = $injector.get('dirtyPrompt');
// const dirtyPrompt = $injector.get('dirtyPrompt');
const $interval = $injector.get('$interval');

return {
Expand All @@ -64,9 +64,9 @@ app.directive('thresholdWatchEdit', function ($injector) {
];
this.breadcrumb = this.watch.displayName;

dirtyPrompt.register(() => !this.watch.isEqualTo(this.originalWatch));
// dirtyPrompt.register(() => !this.watch.isEqualTo(this.originalWatch));
$scope.$on('$destroy', () => {
dirtyPrompt.deregister();
// dirtyPrompt.deregister();
this.stopRefreshWatchVisualizationTimer();
});

Expand Down Expand Up @@ -152,7 +152,7 @@ app.directive('thresholdWatchEdit', function ($injector) {
}

onClose = () => {
dirtyPrompt.deregister();
// dirtyPrompt.deregister();
kbnUrl.change('/management/elasticsearch/watcher/watches', {});
}

Expand Down

0 comments on commit 9ce082b

Please sign in to comment.