Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into apps/home
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Jul 27, 2015
2 parents 1e555c5 + 0a7c2d1 commit f9f4b0e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Don't do this. Everything should be wrapped in a module that can be depended on

Prefer the use of function declarations over function expressions. Function expressions are allowed, but should usually be avoided.

Also, keep function definitions above other code instead of relying on function hoising.
Also, keep function definitions above other code instead of relying on function hoisting.

*Preferred:*

Expand Down
11 changes: 5 additions & 6 deletions src/plugins/elasticsearch/lib/upgrade_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ module.exports = function (server) {
}

// if we already have a the current version in the index then we need to stop
if (_.find(response.hits.hits, function currentVersion(hit) {
return hit._id !== '@@version' &&
hit._id === config.get('pkg.version');
})) {
return Promise.resolve();
}
var devConfig = _.find(response.hits.hits, function currentVersion(hit) {
return hit._id !== '@@version' && hit._id === config.get('pkg.version');
});

if (devConfig) return Promise.resolve();

// Look for upgradeable configs. If none of them are upgradeable
// then resolve with null.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div bindonce>
<div class="discover-field-details">
<h5 ng-show="!field.details.error">Quick Count <kbn-info info="Based on documents in the table" placement="right"></kbn-info>
<h5 ng-show="!field.details.error">Quick Count <kbn-info info="Top 5 values based on documents in the table" placement="right"></kbn-info>
<span ng-if="!field.details.error" class="small discover-field-details-count">
(
<a ng-show="field.indexed" ng-click="updateFilterInQuery('_exists_', field.name, '+')">{{field.details.exists}}</a>
Expand Down
23 changes: 17 additions & 6 deletions src/ui/public/directives/saved_object_finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,27 @@ define(function (require) {

//key handler for the filter text box
self.filterKeyDown = function ($event) {
if (keymap[$event.keyCode] !== 'tab') return;
switch (keymap[$event.keyCode]) {
case 'tab':
if (self.hitCount === 0) return;

if (self.hits.length === 0) return;
self.selector.index = 0;
self.selector.enabled = true;

self.selector.index = 0;
self.selector.enabled = true;
selectTopHit();

selectTopHit();
$event.preventDefault();
break;
case 'enter':
if (self.hitCount !== 1) return;

$event.preventDefault();
var hit = self.hits[0];
if (!hit) return;

self.onChoose(hit, $event);
$event.preventDefault();
break;
}
};

//key handler for the list items
Expand Down

0 comments on commit f9f4b0e

Please sign in to comment.