Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
simianhacker committed Jan 2, 2017
2 parents 0d0f4c6 + b4d754a commit 2fb42d0
Show file tree
Hide file tree
Showing 258 changed files with 8,409 additions and 1,493 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ Start the development server.

> On Windows, you'll need you use Git Bash, Cygwin, or a similar shell that exposes the `sh` command. And to successfully build you'll need Cygwin optional packages zip, tar, and shasum.

Now you can point your web browser to https://localhost:5601 and start using Kibana! When running `npm start`, Kibana will also log that it is listening on port 5603 due to the base path proxy, but you should still access Kibana on port 5601.

#### Customizing `config/kibana.dev.yml`

The `config/kibana.yml` file stores user configuration directives. Since this file is checked into source control, however, developer preferences can't be saved without the risk of accidentally committing the modified version. To make customizing configuration easier during development, the Kibana CLI will look for a `config/kibana.dev.yml` file if run with the `--dev` flag. This file behaves just like the non-dev version and accepts any of the [standard settings](https://www.elastic.co/guide/en/kibana/master/kibana-server-properties.html).
Expand Down
1 change: 1 addition & 0 deletions docs/plugins/known-plugins.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ This list of plugins is not guaranteed to work on your version of Kibana. Instea
* https://github.com/mstoyano/kbn_c3js_vis[C3JS Visualizations] (mstoyano)
* https://github.com/clamarque/Kibana_health_metric_vis[Health Metric] (clamarque)
* https://github.com/ommsolutions/kibana_ext_metrics_vis[Extended Metric] (ommsolutions)
* https://github.com/virusu/3D_kibana_charts_vis[3D Charts] (virusu)

[float]
=== Other
Expand Down
4 changes: 4 additions & 0 deletions docs/setup/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ mappings are available:
`SERVER_PORT`:: `server.port`
`SERVER_SSL_CERT`:: `server.ssl.cert`
`SERVER_SSL_KEY`:: `server.ssl.key`
`XPACK_SECURITY_COOKIENAME`:: `xpack.security.cookieName`
`XPACK_SECURITY_ENCRYPTIONKEY`:: `xpack.security.encryptionKey`
`XPACK_SECURITY_SECURECOOKIES`:: `xpack.security.secureCookies`
`XPACK_SECURITY_SESSIONTIMEOUT`:: `xpack.security.sessionTimeout`

These variables can be set with +docker-compose+ like this:

Expand Down
2 changes: 2 additions & 0 deletions docs/visualize.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,5 @@ include::visualize/tilemap.asciidoc[]
include::visualize/vertbar.asciidoc[]

include::visualize/tagcloud.asciidoc[]

include::visualize/heatmap.asciidoc[]
2 changes: 1 addition & 1 deletion docs/visualize/area.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ _silhouette_:: Displays each aggregation as variance from a central line.

Checkboxes are available to enable and disable the following behaviors:

*Smooth Lines*:: Check this box to curve the top boundary of the area from point to point.
*Line Mode*:: You can choose between straight line, smoothed line and stepped line.
*Set Y-Axis Extents*:: Check this box and enter values in the *y-max* and *y-min* fields to set the Y axis to specific
values.
*Scale Y-Axis to Data Bounds*:: The default Y axis bounds are zero and the maximum value returned in the data. Check
Expand Down
83 changes: 83 additions & 0 deletions docs/visualize/heatmap.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[[heatmap-chart]]
== Heatmap Chart

A heat map is a graphical representation of data where the individual values contained in a matrix are represented as colors.
The color for each matrix position is determined by the _metrics_ aggregation. The following aggregations are available for
this chart:

include::y-axis-aggs.asciidoc[]

The _buckets_ aggregations determine what information is being retrieved from your data set.

Before you choose a buckets aggregation, specify if you are defining buckets for X or Y axis within a single chart
or splitting into multiple charts. A multiple chart split must run before any other aggregations.
When you split a chart, you can change if the splits are displayed in a row or a column by clicking
the *Rows | Columns* selector.

This chart's X and Y axis supports the following aggregations. Click the linked name of each aggregation to visit the main
Elasticsearch documentation for that aggregation.

*Date Histogram*:: A {es-ref}search-aggregations-bucket-datehistogram-aggregation.html[_date histogram_] is built from a
numeric field and organized by date. You can specify a time frame for the intervals in seconds, minutes, hours, days,
weeks, months, or years. You can also specify a custom interval frame by selecting *Custom* as the interval and
specifying a number and a time unit in the text field. Custom interval time units are *s* for seconds, *m* for minutes,
*h* for hours, *d* for days, *w* for weeks, and *y* for years. Different units support different levels of precision,
down to one second.

*Histogram*:: A standard {es-ref}search-aggregations-bucket-histogram-aggregation.html[_histogram_] is built from a
numeric field. Specify an integer interval for this field. Select the *Show empty buckets* checkbox to include empty
intervals in the histogram.
*Range*:: With a {es-ref}search-aggregations-bucket-range-aggregation.html[_range_] aggregation, you can specify ranges
of values for a numeric field. Click *Add Range* to add a set of range endpoints. Click the red *(x)* symbol to remove
a range.
*Date Range*:: A {es-ref}search-aggregations-bucket-daterange-aggregation.html[_date range_] aggregation reports values
that are within a range of dates that you specify. You can specify the ranges for the dates using
{es-ref}common-options.html#date-math[_date math_] expressions. Click *Add Range* to add a set of range endpoints.
Click the red *(x)* symbol to remove a range.
*IPv4 Range*:: The {es-ref}search-aggregations-bucket-iprange-aggregation.html[_IPv4 range_] aggregation enables you to
specify ranges of IPv4 addresses. Click *Add Range* to add a set of range endpoints. Click the red *(x)* symbol to
remove a range.
*Terms*:: A {es-ref}search-aggregations-bucket-terms-aggregation.html[_terms_] aggregation enables you to specify the top
or bottom _n_ elements of a given field to display, ordered by count or a custom metric.
*Filters*:: You can specify a set of {es-ref}search-aggregations-bucket-filters-aggregation.html[_filters_] for the data.
You can specify a filter as a query string or in JSON format, just as in the Discover search bar. Click *Add Filter* to
add another filter. Click the image:images/labelbutton.png[Label button icon] *label* button to open the label field, where
you can type in a name to display on the visualization.
*Significant Terms*:: Displays the results of the experimental
{es-ref}search-aggregations-bucket-significantterms-aggregation.html[_significant terms_] aggregation.

Enter a string in the *Custom Label* field to change the display label.

You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation:

*Exclude Pattern*:: Specify a pattern in this field to exclude from the results.
*Include Pattern*:: Specify a pattern in this field to include in the results.
*JSON Input*:: A text field where you can add specific JSON-formatted properties to merge with the aggregation
definition, as in the following example:

[source,shell]
{ "script" : "doc['grade'].value * 1.2" }

The availability of these options varies depending on the aggregation you choose.

Select the *Options* tab to change the following aspects of the chart:

*Show Tooltips*:: Check this box to enable the display of tooltips.
*Highlight*:: Check this box to enable highlighting of elements with same label
*Legend Position*:: You can select where to display the legend (top, left, right, bottom)


*Color Schema*:: You can select an existing color schema or go for custom and define your own colors in the legend
*Reverse Color Schema*:: Checking this checkbox will reverse the color schema.
*Color Scale*:: You can switch between linear, log and sqrt scales for color scale.
*Scale to Data Bounds*:: The default Y axis bounds are zero and the maximum value returned in the data. Check
this box to change both upper and lower bounds to match the values returned in the data.
*Number of Colors*:: Number of color buckets to create. Minimum is 2 and maximum is 10.
*Percentage Mode*:: Enabling this will show legend values as percentages.
*Custom Range*:: You can define custom ranges for your color buckets. For each of the color bucket you need to specify
the minimum value (inclusive) and the maximum value (exclusive) of a range.
*Show Label*:: Enables showing labels with cell values in each cell
*Rotate*:: Allows rotating the cell value label by 90 degrees.


include::visualization-raw-data.asciidoc[]
3 changes: 1 addition & 2 deletions docs/visualize/line.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ regularize the display of data sets with variabilities that are themselves highl
the variability is itself variable over the domain being examined, is known as _heteroscedastic_ data. For example, if
a data set of height versus weight has a relatively narrow range of variability at the short end of height, but a wider
range at the taller end, the data set is heteroscedastic.
*Smooth Lines*:: Check this box to curve the line from point to point. Bear in mind that smoothed lines necessarily
affect the representation of your data and create a potential for ambiguity.
*Line Mode*:: You can choose between straight line, smoothed line and stepped line.
*Show Connecting Lines*:: Check this box to draw lines between the points on the chart.
*Show Circles*:: Check this box to draw each data point on the chart as a small circle.
*Current time marker*:: For charts of time-series data, check this box to draw a red line on the current time.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"@bigfunger/jsondiffpatch": "0.1.38-webpack",
"@elastic/datemath": "2.3.0",
"@elastic/kibana-ui-framework": "0.0.13",
"@elastic/webpack-directory-name-as-main": "2.0.2",
"@spalger/filesaver": "1.1.2",
"@spalger/leaflet-draw": "0.2.3",
"@spalger/leaflet-heat": "0.1.3",
Expand Down Expand Up @@ -166,7 +167,6 @@
"validate-npm-package-name": "2.2.2",
"vision": "4.1.0",
"webpack": "github:elastic/webpack#fix/query-params-for-aliased-loaders",
"webpack-directory-name-as-main": "1.0.0",
"whatwg-fetch": "0.9.0",
"wreck": "6.2.0"
},
Expand Down Expand Up @@ -217,7 +217,7 @@
"keymirror": "0.1.1",
"license-checker": "5.1.2",
"load-grunt-config": "0.19.2",
"makelogs": "3.1.1",
"makelogs": "3.2.0",
"marked-text-renderer": "0.1.0",
"mocha": "2.5.3",
"murmurhash3js": "3.0.1",
Expand Down
4 changes: 0 additions & 4 deletions src/core_plugins/console/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

root: true
extends: '../../../.eslintrc'
extends: '../../../../.eslintrc'

rules:
block-scoped-var: off
Expand Down
11 changes: 10 additions & 1 deletion src/core_plugins/console/api_server/es_5_0/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,16 @@ module.exports = function (api) {
min_score: 1.0
},
SCORING_FUNCS
)
),
script: {
__template: {
"script": "_score * doc['f'].value"
},
script: {
//populated by a global rule
}
},


});
};
34 changes: 17 additions & 17 deletions src/core_plugins/console/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import Joi from 'joi';
import Boom from 'boom';
import apiServer from './api_server/server';
import { existsSync } from 'fs';
import { resolve, join, sep } from 'path';
import { startsWith, endsWith } from 'lodash';
import { ProxyConfigCollection } from './server/proxy_config_collection';

module.exports = function (kibana) {
let { resolve, join, sep } = require('path');
let Joi = require('joi');
let Boom = require('boom');
let modules = resolve(__dirname, 'public/webpackShims/');
let src = resolve(__dirname, 'public/src/');
let { existsSync } = require('fs');
const { startsWith, endsWith } = require('lodash');
export default function (kibana) {
const modules = resolve(__dirname, 'public/webpackShims/');
const src = resolve(__dirname, 'public/src/');

const apps = [];

Expand Down Expand Up @@ -88,7 +89,7 @@ module.exports = function (kibana) {

if (!filters.some(re => re.test(uri))) {
const err = Boom.forbidden();
err.output.payload = "Error connecting to '" + uri + "':\n\nUnable to send requests to that url.";
err.output.payload = `Error connecting to '${uri}':\n\nUnable to send requests to that url.`;
err.output.headers['content-type'] = 'text/plain';
reply(err);
} else {
Expand All @@ -109,19 +110,19 @@ module.exports = function (kibana) {
const filterHeaders = server.plugins.elasticsearch.filterHeaders;
reply.proxy({
mapUri: function (request, done) {
done(null, uri, filterHeaders(request.headers, requestHeadersWhitelist))
done(null, uri, filterHeaders(request.headers, requestHeadersWhitelist));
},
xforward: true,
onResponse(err, res, request, reply, settings, ttl) {
if (err != null) {
reply("Error connecting to '" + uri + "':\n\n" + err.message).type("text/plain").statusCode = 502;
reply(`Error connecting to '${uri}':\n\n${err.message}`).type('text/plain').statusCode = 502;
} else {
reply(null, res);
}
},

...proxyConfigCollection.configForUri(uri)
})
});
}
};

Expand Down Expand Up @@ -150,14 +151,13 @@ module.exports = function (kibana) {
path: '/api/console/api_server',
method: ['GET', 'POST'],
handler: function (req, reply) {
let server = require('./api_server/server');
let { sense_version, apis } = req.query;
const { sense_version, apis } = req.query;
if (!apis) {
reply(Boom.badRequest('"apis" is a required param.'));
return;
}

return server.resolveApi(sense_version, apis.split(","), reply);
return apiServer.resolveApi(sense_version, apis.split(','), reply);
}
});

Expand Down Expand Up @@ -190,5 +190,5 @@ module.exports = function (kibana) {
join(src, 'sense_editor/mode/worker.js')
]
}
})
};
});
}
36 changes: 36 additions & 0 deletions src/core_plugins/console/public/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---

root: true
extends: '../../../../.eslintrc'

rules:
block-scoped-var: off
camelcase: off
curly: off
dot-location: off
dot-notation: off
eqeqeq: off
guard-for-in: off
indent: off
max-len: off
new-cap: off
no-caller: off
no-empty: off
no-extend-native: off
no-loop-func: off
no-multi-str: off
no-nested-ternary: off
no-proto: off
no-sequences: off
no-undef: off
no-use-before-define: off
one-var: off
quotes: off
space-before-blocks: off
space-in-parens: off
space-infix-ops: off
semi: off
strict: off
wrap-iife: off
no-var: off
prefer-const: off
8 changes: 8 additions & 0 deletions src/core_plugins/console/public/css/sense.light.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
border-left: 1px solid #CCC;
}

.ace_multi_string {
color: #166555;
}

.ace_start_triple_quote, .ace_end_triple_quote {
color: #40B0D3;
}

.ace_snippet-marker {
background: rgba(194, 193, 208, 0.20);
border-top: dotted 1px rgba(194, 193, 208, 0.80);
Expand Down
Loading

0 comments on commit 2fb42d0

Please sign in to comment.