mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Make server listen on all interfaces, makes mobile testing easier
This commit is contained in:
parent
078a1ef00b
commit
3c32d1c28f
3 changed files with 15 additions and 6 deletions
|
@ -18,11 +18,11 @@ define(function (require) {
|
|||
link: function ($scope, $el) {
|
||||
var chart; // set in "vis" watcher
|
||||
|
||||
function onHover(event) {
|
||||
console.log(event);
|
||||
}
|
||||
|
||||
|
||||
$scope.$watch('vis', function (vis, prevVis) {
|
||||
var typeDefinition = typeDefs.byName[vis.typeName];
|
||||
|
||||
if (prevVis && prevVis.destroy) prevVis.destroy();
|
||||
if (chart) {
|
||||
chart.off('hover');
|
||||
|
@ -40,12 +40,14 @@ define(function (require) {
|
|||
};
|
||||
|
||||
_.merge(vis.params, params);
|
||||
_.defaults(params, typeDefs.byName[vis.typeName].params);
|
||||
_.defaults(params, typeDefinition.params);
|
||||
|
||||
chart = new k4d3.Chart($el[0], params);
|
||||
|
||||
chart.on('hover', onHover);
|
||||
chart.on('click', onHover);
|
||||
if (!!typeDefinition.onHover) chart.on('hover', typeDefinition.onHover);
|
||||
if (!!typeDefinition.onClick) chart.on('click', typeDefinition.onClick);
|
||||
if (!!typeDefinition.onBrush) chart.on('brush', typeDefinition.onBrush);
|
||||
|
||||
|
||||
vis.searchSource.onResults(function onResults(resp) {
|
||||
courier.indexPatterns.get(vis.searchSource.get('index'))
|
||||
|
|
|
@ -11,6 +11,12 @@ define(function (require) {
|
|||
addTooltip: true,
|
||||
addLegend: true
|
||||
},
|
||||
onClick: function (e) {
|
||||
console.log('click', e);
|
||||
},
|
||||
onHover: function (e) {
|
||||
console.log('hover', e);
|
||||
},
|
||||
config: {
|
||||
metric: {
|
||||
label: 'Y-Axis',
|
||||
|
|
|
@ -5,6 +5,7 @@ module.exports = function (grunt) {
|
|||
return {
|
||||
dev: {
|
||||
options: {
|
||||
hostname: '0.0.0.0',
|
||||
middleware: function (connect, options, stack) {
|
||||
stack = stack || [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue