Skip to content

Commit

Permalink
Remove dirty prompt from Logstash Pipeline Management (#19649)
Browse files Browse the repository at this point in the history
* Remove dirty prompt from Logstash Pipeline management because of Angular routing issue.

* Remove test for removed feature.
  • Loading branch information
justinkambic authored Jun 5, 2018
1 parent a428591 commit 194e427
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { isEmpty } from 'lodash';
import { uiModules } from 'ui/modules';
import { InitAfterBindingsWorkaround } from 'ui/compat';
import { Notifier, toastNotifications } from 'ui/notify';
import 'ui/dirty_prompt';
import template from './pipeline_edit.html';
import 'plugins/logstash/services/license';
import 'plugins/logstash/services/security';
Expand All @@ -25,7 +24,6 @@ app.directive('pipelineEdit', function ($injector) {
const securityService = $injector.get('logstashSecurityService');
const kbnUrl = $injector.get('kbnUrl');
const confirmModal = $injector.get('confirmModal');
const dirtyPrompt = $injector.get('dirtyPrompt');

return {
restrict: 'E',
Expand Down Expand Up @@ -71,11 +69,6 @@ app.directive('pipelineEdit', function ($injector) {
}

this.tooltips = TOOLTIPS;

dirtyPrompt.register(
() => !this.pipeline.isEqualTo(this.originalPipeline)
);
$scope.$on('$destroy', dirtyPrompt.deregister);
}

onPipelineSave = username => {
Expand Down Expand Up @@ -124,7 +117,6 @@ app.directive('pipelineEdit', function ($injector) {
};

close = () => {
dirtyPrompt.deregister();
kbnUrl.change('/management/logstash/pipelines', {});
};

Expand Down
14 changes: 0 additions & 14 deletions x-pack/test/functional/apps/logstash/pipeline_create.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function ({ getService, getPageObjects }) {
const pipelineList = getService('pipelineList');
const pipelineEditor = getService('pipelineEditor');
const PageObjects = getPageObjects(['logstash']);
const testSubjects = getService('testSubjects');

describe('pipeline create new', () => {
let originalWindowSize;
Expand Down Expand Up @@ -94,18 +93,5 @@ export default function ({ getService, getPageObjects }) {
await pipelineEditor.assertNoDeleteButton();
});
});

describe('breadcrumbs navigation', () => {
it('prompts the user about unsaved changes', async () => {
await PageObjects.logstash.gotoNewPipelineEditor();

const description = random.text();
await pipelineEditor.setDescription(description);

await pipelineEditor.clickManagementBreadcrumb();
await pipelineEditor.assertUnsavedChangesModal();
await testSubjects.click('confirmModalConfirmButton');
});
});
});
}

0 comments on commit 194e427

Please sign in to comment.