Merge branch 'master' into feature/ingest
This commit is contained in:
commit
4ce5e7f323
15 changed files with 74 additions and 38 deletions
|
@ -1 +1 @@
|
|||
4.3.1
|
||||
4.3.2
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
"angular-mocks": "1.4.7",
|
||||
"auto-release-sinon": "1.0.3",
|
||||
"babel-eslint": "4.1.8",
|
||||
"chokidar": "1.0.5",
|
||||
"chokidar": "1.4.3",
|
||||
"eslint": "1.10.3",
|
||||
"eslint-plugin-mocha": "1.1.0",
|
||||
"expect.js": "0.3.1",
|
||||
|
@ -189,7 +189,7 @@
|
|||
"supertest-as-promised": "2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.3.1",
|
||||
"npm": "2.14.21"
|
||||
"node": "4.3.2",
|
||||
"npm": "2.14.22"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import cluster from 'cluster';
|
||||
const { join } = require('path');
|
||||
const { join, resolve } = require('path');
|
||||
const { format: formatUrl } = require('url');
|
||||
import Hapi from 'hapi';
|
||||
const { debounce, compact, get, invoke, bindAll, once, sample } = require('lodash');
|
||||
const { debounce, compact, get, invoke, bindAll, once, sample, uniq } = require('lodash');
|
||||
|
||||
import Log from '../Log';
|
||||
import Worker from './worker';
|
||||
|
@ -85,14 +85,19 @@ module.exports = class ClusterManager {
|
|||
const chokidar = require('chokidar');
|
||||
const fromRoot = require('../../utils/fromRoot');
|
||||
|
||||
this.watcher = chokidar.watch([
|
||||
'src/plugins',
|
||||
'src/server',
|
||||
'src/ui',
|
||||
'src/utils',
|
||||
'config',
|
||||
...extraPaths
|
||||
], {
|
||||
const watchPaths = uniq(
|
||||
[
|
||||
fromRoot('src/plugins'),
|
||||
fromRoot('src/server'),
|
||||
fromRoot('src/ui'),
|
||||
fromRoot('src/utils'),
|
||||
fromRoot('config'),
|
||||
...extraPaths
|
||||
]
|
||||
.map(path => resolve(path))
|
||||
);
|
||||
|
||||
this.watcher = chokidar.watch(watchPaths, {
|
||||
cwd: fromRoot('.'),
|
||||
ignored: /[\\\/](\..*|node_modules|bower_components|public|__tests__)[\\\/]/
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@ describe('plugins/elasticsearch', function () {
|
|||
let kbnServer;
|
||||
|
||||
before(function () {
|
||||
this.timeout(15000); // sometimes waiting for server takes longer than 10
|
||||
this.timeout(60000); // sometimes waiting for server takes longer than 10
|
||||
|
||||
kbnServer = kbnTestServer.createServer();
|
||||
return kbnServer.ready()
|
||||
|
|
|
@ -126,7 +126,7 @@ app.controller('discover', function ($scope, config, courier, $route, $window, N
|
|||
return {
|
||||
query: $scope.searchSource.get('query') || '',
|
||||
sort: getSort.array(savedSearch.sort, $scope.indexPattern),
|
||||
columns: savedSearch.columns || ['_source'],
|
||||
columns: savedSearch.columns.length > 0 ? savedSearch.columns : config.get('defaultColumns'),
|
||||
index: $scope.indexPattern.id,
|
||||
interval: 'auto',
|
||||
filters: _.cloneDeep($scope.searchSource.getOwn('filter'))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Caution: You can break stuff here</h4>
|
||||
Be careful in here, these settings are for very advanced users only.
|
||||
Tweaks you make here can break large portionsof Kibana. Some of these
|
||||
Tweaks you make here can break large portions of Kibana. Some of these
|
||||
settings may be undocumented, unsupported or experimental. If a field has
|
||||
a default value, blanking the field will reset it to its default which
|
||||
may be unacceptable given other configuration directives. Deleting a
|
||||
|
|
|
@ -15,8 +15,6 @@ module.exports = function createMappingsFromPatternFields(fields) {
|
|||
mapping = {
|
||||
type: 'string',
|
||||
index: 'analyzed',
|
||||
omit_norms: true,
|
||||
fielddata: {format: 'disabled'},
|
||||
fields: {
|
||||
raw: {type: 'string', index: 'not_analyzed', doc_values: true, ignore_above: 256}
|
||||
}
|
||||
|
|
|
@ -102,8 +102,6 @@ module.exports = function registerPost(server) {
|
|||
mapping: {
|
||||
type: 'string',
|
||||
index: 'analyzed',
|
||||
omit_norms: true,
|
||||
fielddata: {format: 'disabled'},
|
||||
fields: {
|
||||
raw: {type: 'string', index: 'not_analyzed', doc_values: true, ignore_above: 256}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,10 @@ export default function configDefaultsProvider() {
|
|||
value: null,
|
||||
description: 'The index to access if no index is set',
|
||||
},
|
||||
'defaultColumns': {
|
||||
value: ['_source'],
|
||||
description: 'Columns displayed by default in the Discovery tab',
|
||||
},
|
||||
'metaFields': {
|
||||
value: ['_source', '_id', '_type', '_index', '_score'],
|
||||
description: 'Fields that exist outside of _source to merge into our document when displaying it',
|
||||
|
|
|
@ -106,6 +106,9 @@ export default function DispatchClass(Private) {
|
|||
var isClickable = this.listenerCount('click') > 0;
|
||||
var addEvent = this.addEvent;
|
||||
var $el = this.handler.el;
|
||||
if(!this.handler.highlight) {
|
||||
this.handler.highlight = self.highlight;
|
||||
}
|
||||
|
||||
function hover(d, i) {
|
||||
// Add pointer if item is clickable
|
||||
|
@ -113,7 +116,7 @@ export default function DispatchClass(Private) {
|
|||
self.addMousePointer.call(this, arguments);
|
||||
}
|
||||
|
||||
self.highlightLegend.call(this, $el);
|
||||
self.handler.highlight.call(this, $el);
|
||||
self.emit('hover', self.eventResponse(d, i));
|
||||
}
|
||||
|
||||
|
@ -129,9 +132,12 @@ export default function DispatchClass(Private) {
|
|||
var self = this;
|
||||
var addEvent = this.addEvent;
|
||||
var $el = this.handler.el;
|
||||
if(!this.handler.unHighlight) {
|
||||
this.handler.unHighlight = self.unHighlight;
|
||||
}
|
||||
|
||||
function mouseout() {
|
||||
self.unHighlightLegend.call(this, $el);
|
||||
self.handler.unHighlight.call(this, $el);
|
||||
}
|
||||
|
||||
return addEvent('mouseout', mouseout);
|
||||
|
@ -225,21 +231,24 @@ export default function DispatchClass(Private) {
|
|||
* Mouseover Behavior
|
||||
*
|
||||
* @param element {D3.Selection}
|
||||
* @method highlightLegend
|
||||
* @method highlight
|
||||
*/
|
||||
Dispatch.prototype.highlightLegend = function (element) {
|
||||
Dispatch.prototype.highlight = function (element) {
|
||||
var label = this.getAttribute('data-label');
|
||||
if (!label) return;
|
||||
$('[data-label]', element.parentNode).not(function (els, el) { return $(el).data('label') !== label;}).css('opacity', 0.5);
|
||||
//Opacity 1 is needed to avoid the css application
|
||||
$('[data-label]', element.parentNode).css('opacity', 1).not(
|
||||
function (els, el) { return `${$(el).data('label')}` === label;}
|
||||
).css('opacity', 0.5);
|
||||
};
|
||||
|
||||
/**
|
||||
* Mouseout Behavior
|
||||
*
|
||||
* @param element {D3.Selection}
|
||||
* @method unHighlightLegend
|
||||
* @method unHighlight
|
||||
*/
|
||||
Dispatch.prototype.unHighlightLegend = function (element) {
|
||||
Dispatch.prototype.unHighlight = function (element) {
|
||||
$('[data-label]', element.parentNode).css('opacity', 1);
|
||||
};
|
||||
|
||||
|
|
|
@ -33,7 +33,25 @@ export default function AreaChartFactory(Private) {
|
|||
if (this.isOverlapping) {
|
||||
|
||||
// Default opacity should return to 0.6 on mouseout
|
||||
handler._attr.defaultOpacity = 0.6;
|
||||
var defaultOpacity = 0.6;
|
||||
handler._attr.defaultOpacity = defaultOpacity;
|
||||
handler.highlight = function (element) {
|
||||
var label = this.getAttribute('data-label');
|
||||
if (!label) return;
|
||||
|
||||
var highlightOpacity = 0.8;
|
||||
var highlightElements = $('[data-label]', element.parentNode).filter(
|
||||
function (els, el) { return `${$(el).data('label')}` === label;
|
||||
});
|
||||
$('[data-label]', element.parentNode).not(highlightElements).css('opacity', defaultOpacity / 2); // half of the default opacity
|
||||
highlightElements.css('opacity', highlightOpacity);
|
||||
};
|
||||
handler.unHighlight = function (element) {
|
||||
$('[data-label]', element).css('opacity', defaultOpacity);
|
||||
|
||||
//The legend should keep max opacity
|
||||
$('[data-label]', $(element).siblings()).css('opacity', 1);
|
||||
};
|
||||
}
|
||||
|
||||
this.checkIfEnoughData();
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
<li
|
||||
ng-repeat="legendData in labels track by legendData.label"
|
||||
ng-mouseenter="highlightSeries(legendData.label)"
|
||||
ng-mouseleave="unhighlightSeries()"
|
||||
ng-mouseenter="highlight($event)"
|
||||
ng-mouseleave="unhighlight($event)"
|
||||
data-label="{{legendData.label}}"
|
||||
class="legend-value color">
|
||||
|
||||
|
|
|
@ -29,12 +29,18 @@ uiModules.get('kibana')
|
|||
refresh();
|
||||
});
|
||||
|
||||
$scope.highlightSeries = function (label) {
|
||||
$('[data-label]', $elem.siblings()).not(function (els, el) { return $(el).data('label') !== label;}).css('opacity', 0.5);
|
||||
$scope.highlight = function (event) {
|
||||
var el = event.currentTarget;
|
||||
var handler = $scope.renderbot.vislibVis.handler;
|
||||
if(!handler) return;
|
||||
handler.highlight.call(el, handler.el);
|
||||
};
|
||||
|
||||
$scope.unhighlightSeries = function () {
|
||||
$('[data-label]', $elem.siblings()).css('opacity', 1);
|
||||
$scope.unhighlight = function (event) {
|
||||
var el = event.currentTarget;
|
||||
var handler = $scope.renderbot.vislibVis.handler;
|
||||
if(!handler) return;
|
||||
handler.unHighlight.call(el, handler.el);
|
||||
};
|
||||
|
||||
$scope.setColor = function (label, color) {
|
||||
|
|
|
@ -21,7 +21,6 @@ module.exports = {
|
|||
'mapping': {
|
||||
'type': 'string',
|
||||
'index': 'analyzed',
|
||||
'omit_norms': true,
|
||||
'fields': {
|
||||
'raw': {
|
||||
'index': 'not_analyzed',
|
||||
|
|
|
@ -21,7 +21,6 @@ module.exports = {
|
|||
'mapping': {
|
||||
'type': 'string',
|
||||
'index': 'analyzed',
|
||||
'omit_norms': true,
|
||||
'fields': {
|
||||
'raw': {
|
||||
'index': 'not_analyzed',
|
||||
|
|
Loading…
Reference in a new issue