Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useResizeCheckerProvider } from '../sense_editor_resize';
import $ from 'jquery';
import { initializeInput } from '../input';
import { initializeOutput } from '../output';
import es from '../es';
import init from '../app';
import { SenseTopNavController } from './sense_top_nav_controller';

Expand All @@ -20,7 +19,7 @@ module.run(function (Private, $rootScope) {
module.controller('SenseController', function SenseController(Private, $scope, $timeout, $location, docTitle) {
docTitle.change('Console');

$scope.topNavController = Private(SenseTopNavController)
$scope.topNavController = Private(SenseTopNavController);

// We need to wait for these elements to be rendered before we can select them with jQuery
// and then initialize this app
Expand Down
12 changes: 11 additions & 1 deletion src/core_plugins/console/public/src/directives/sense_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require('ui/modules')
restrict: 'E',
template: require('./settings.html'),
controllerAs: 'settings',
controller: function ($scope) {
controller: function ($scope, $element) {
const settings = require('../settings');

this.vals = settings.getCurrentSettings();
Expand All @@ -16,6 +16,16 @@ require('ui/modules')
$scope.kbnTopNav.close();
};

const self = this;

function onEnter(event) {
if (event.which === 13) {
self.apply();
}
}

const boundElement = $element.bind('keydown', onEnter);
$scope.$on('$destroy', () => boundElement.unbind('keydown', onEnter));
},
};
});
1 change: 0 additions & 1 deletion src/ui/public/kbn_top_nav/kbn_top_nav.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import _ from 'lodash';
import 'ui/watch_multi';
import angular from 'angular';
import 'ui/directives/input_focus';
import uiModules from 'ui/modules';
import template from './kbn_top_nav.html';
Expand Down
1 change: 0 additions & 1 deletion src/ui/public/kbn_top_nav/kbn_top_nav_controller.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { capitalize, isArray, isFunction } from 'lodash';

import chrome from 'ui/chrome';
import uiModules from 'ui/modules';
import filterTemplate from 'ui/chrome/config/filter.html';
import intervalTemplate from 'ui/chrome/config/interval.html';

Expand Down