Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into latest-value
Browse files Browse the repository at this point in the history
  • Loading branch information
scampi committed Nov 17, 2016
2 parents 991864c + 96a668b commit bc1c90a
Show file tree
Hide file tree
Showing 94 changed files with 511 additions and 11,809 deletions.
2 changes: 1 addition & 1 deletion bin/kibana-plugin
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ if [ ! -x "$NODE" ]; then
exit 1
fi

exec "${NODE}" $NODE_OPTIONS --no-warnings "${DIR}/src/cli_plugin" ${@}
exec "${NODE}" $NODE_OPTIONS --no-warnings "${DIR}/src/cli_plugin" "$@"
3 changes: 3 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

:version: 6.0.0-alpha1
:major-version: 6.x
:docker-image: docker.elastic.co/kibana/kibana:{version}

//////////
release-state can be: released | prerelease | unreleased
Expand All @@ -13,6 +14,8 @@ release-state can be: released | prerelease | unreleased
:xpack-ref: https://www.elastic.co/guide/en/x-pack/current/
:issue: https://github.com/elastic/kibana/issues/
:pull: https://github.com/elastic/kibana/pull/
:commit: https://github.com/elastic/kibana/commit/
:security: https://www.elastic.co/community/security/


include::introduction.asciidoc[]
Expand Down
8 changes: 8 additions & 0 deletions docs/plugins.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
Add-on functionality for Kibana is implemented with plug-in modules. You can use the `bin/kibana-plugin`
command to manage these modules. You can also install a plugin manually by moving the plugin file to the
`plugins` directory and unpacking the plugin files into a new directory.

[IMPORTANT]
.Plugin compatibility
==============================================
The Kibana plugin interfaces are in a state of constant development. We cannot provide backwards compatibility for plugins due to the high rate of change. Kibana enforces that the installed plugins match the version of Kibana itself. Plugin developers will have to release a new version of their plugin for each new Kibana release as a result.
==============================================
--

== Installing Plugins
Expand Down
2 changes: 2 additions & 0 deletions docs/setup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ include::setup/install.asciidoc[]

include::setup/settings.asciidoc[]

include::setup/docker.asciidoc[]

include::setup/access.asciidoc[]

include::setup/connect-to-elasticsearch.asciidoc[]
Expand Down
115 changes: 115 additions & 0 deletions docs/setup/docker.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
[[docker]]
== Running Kibana on Docker
Docker images for Kibana are available from the Elastic Docker registry.
The images are shipped with https://www.elastic.co/products/x-pack[X-Pack]
installed.

NOTE: https://www.elastic.co/guide/en/x-pack/current/index.html[X-Pack] is
pre-installed in this image. With X-Pack installed, Kibana expects to
connect to an Elasticsearch cluster that is also runnning X-Pack.

=== Pulling the image
Obtaining Kibana for Docker is as simple as issuing a +docker pull+ command
against the Elastic Docker registry.

ifeval::["{release-state}"=="unreleased"]

However, version {version} of Kibana has not yet been released, so no Docker
image is currently available for this version.

endif::[]

ifeval::["{release-state}"!="unreleased"]

The Docker image for Kibana {version} can be retrieved with the following
command:

["source","sh",subs="attributes"]
--------------------------------------------
docker pull {docker-image}
--------------------------------------------

endif::[]

=== Configuring Kibana on Docker

The Docker image provides several methods for configuring Kibana. The conventional
approach is to provide a `kibana.yml` file as described in <<settings>>, but it's
also possible to use environment variables to define settings.

==== Bind-mounted configuration

One way to configure Kibana on Docker is to provide `kibana.yml` via bind-mounting.
With +docker-compose+, the bind-mount can be specified like this:

["source","yaml",subs="attributes"]
--------------------------------------------
services:
kibana:
image: {docker-image}
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
--------------------------------------------

==== Environment variable configuration

Under Docker, Kibana can be configured via environment variables. The following
mappings are available:

.Docker Environment Variables
[horizontal]
**Environment Variable**:: **Kibana Setting**
`ELASTICSEARCH_CUSTOMHEADERS`:: `elasticsearch.customHeaders`
`ELASTICSEARCH_PASSWORD`:: `elasticsearch.password`
`ELASTICSEARCH_PINGTIMEOUT`:: `elasticsearch.pingTimeout`
`ELASTICSEARCH_PRESERVEHOST`:: `elasticsearch.preserveHost`
`ELASTICSEARCH_REQUESTHEADERSWHITELIST`:: `elasticsearch.requestHeadersWhitelist`
`ELASTICSEARCH_REQUESTTIMEOUT`:: `elasticsearch.requestTimeout`
`ELASTICSEARCH_SHARDTIMEOUT`:: `elasticsearch.shardTimeout`
`ELASTICSEARCH_SSL_CA`:: `elasticsearch.ssl.ca`
`ELASTICSEARCH_SSL_CERT`:: `elasticsearch.ssl.cert`
`ELASTICSEARCH_SSL_KEY`:: `elasticsearch.ssl.key`
`ELASTICSEARCH_SSL_VERIFY`:: `elasticsearch.ssl.verify`
`ELASTICSEARCH_STARTUPTIMEOUT`:: `elasticsearch.startupTimeout`
`ELASTICSEARCH_URL`:: `elasticsearch.url`
`ELASTICSEARCH_USERNAME`:: `elasticsearch.username`
`KIBANA_DEFAULTAPPID`:: `kibana.defaultAppId`
`KIBANA_INDEX`:: `kibana.index`
`LOGGING_DEST`:: `logging.dest`
`LOGGING_QUIET`:: `logging.quiet`
`LOGGING_SILENT`:: `logging.silent`
`LOGGING_VERBOSE`:: `logging.verbose`
`OPS_INTERVAL`:: `ops.interval`
`PID_FILE`:: `pid.file`
`SERVER_BASEPATH`:: `server.basePath`
`SERVER_HOST`:: `server.host`
`SERVER_MAXPAYLOADBYTES`:: `server.maxPayloadBytes`
`SERVER_NAME`:: `server.name`
`SERVER_PORT`:: `server.port`
`SERVER_SSL_CERT`:: `server.ssl.cert`
`SERVER_SSL_KEY`:: `server.ssl.key`

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

["source","yaml",subs="attributes"]
----------------------------------------------------------
services:
kibana:
image: {docker-image}
environment:
SERVER_NAME: kibana.example.org
ELASTICSEARCH_URL: http://elasticsearch.example.org
----------------------------------------------------------

Environment variables take precedence over settings configured in `kibana.yml`.

==== Docker defaults
The following settings have different default values when using the Docker image:

[horizontal]
`server.host`:: `"0"`
`elasticsearch.url`:: `http://elasticsearch:9200`
`elasticsearch.username`:: `elastic`
`elasticsearch.password`:: `changeme`


9 changes: 9 additions & 0 deletions docs/setup/install.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ Elastic website or from our RPM repository.
+
<<rpm>>

`docker`::

An image is available for running Kibana as a Docker container. It ships
with https://www.elastic.co/products/x-pack[X-Pack] pre-installed and is
available from the Elastic
Docker registry.
+
<<docker>>

IMPORTANT: If your Elasticsearch installation is protected by {xpack-ref}xpack-security.html[X-Pack Security]
see {xpack-ref}kibana.html[Using Kibana with X-Pack Security] for additional setup
instructions.
Expand Down
2 changes: 2 additions & 0 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ you'll need to update your `kibana.yml` file. You can also enable SSL and set a
to Kibana. This setting cannot end in a slash (`/`).
`server.maxPayloadBytes:`:: *Default: 1048576* The maximum payload size in bytes for incoming server requests.
`server.name:`:: *Default: "your-hostname"* A human-readable display name that identifies this Kibana instance.
`server.defaultRoute:`:: *Default: "/app/kibana"* This setting specifies the default route when opening Kibana. You can use this setting to modify the landing page when opening Kibana.
`elasticsearch.url:`:: *Default: "http://localhost:9200"* The URL of the Elasticsearch instance to use for all your
queries.
`elasticsearch.preserveHost:`:: *Default: true* When this setting’s value is true Kibana uses the hostname specified in
Expand Down Expand Up @@ -63,3 +64,4 @@ information and all requests.
The minimum value is 100.
`status.allowAnonymous`:: *Default: false* If authentication is enabled, setting this to `true` allows
unauthenticated users to access the Kibana server status API and status page.
`console.enabled`:: *Default: true* Set to false to disable Console. Toggling this will cause the server to regenerate assets on the next startup, which may cause a delay before pages start being served.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@bigfunger/decompress-zip": "0.2.0-stripfix3",
"@bigfunger/jsondiffpatch": "0.1.38-webpack",
"@elastic/datemath": "2.3.0",
"@elastic/kibana-ui-framework": "0.0.10",
"@elastic/kibana-ui-framework": "0.0.11",
"@spalger/filesaver": "1.1.2",
"@spalger/leaflet-draw": "0.2.3",
"@spalger/leaflet-heat": "0.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ describe('markdown vis controller', function () {
beforeEach(ngMock.module('kibana/markdown_vis'));
beforeEach(ngMock.inject(function ($rootScope, $controller) {
$scope = $rootScope.$new();
$scope.vis = {
emit: function () {}
};
$controller('KbnMarkdownVisController', {$scope: $scope});
$scope.$digest();
}));

it('should set html from markdown params', function () {
expect($scope).to.not.have.property('html');
$scope.vis = {
params: {
markdown: 'This is a test of the [markdown](http://daringfireball.net/projects/markdown) vis.'
}
$scope.vis.params = {
markdown: 'This is a test of the [markdown](http://daringfireball.net/projects/markdown) vis.'
};
$scope.$digest();

Expand Down
3 changes: 2 additions & 1 deletion src/core_plugins/markdown_vis/public/markdown_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ function MarkdownVisProvider(Private) {
params: {
editor: markdownVisParamsTemplate
},
requiresSearch: false
requiresSearch: false,
implementsRenderComplete: true,
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ marked.setOptions({
const module = uiModules.get('kibana/markdown_vis', ['kibana', 'ngSanitize']);
module.controller('KbnMarkdownVisController', function ($scope) {
$scope.$watch('vis.params.markdown', function (html) {
if (!html) return;
$scope.html = marked(html);
if (html) {
$scope.html = marked(html);
}
$scope.vis.emit('renderComplete');
});
});
1 change: 1 addition & 0 deletions src/core_plugins/metric_vis/public/metric_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function MetricVisProvider(Private) {
},
editor: metricVisParamsTemplate
},
implementsRenderComplete: true,
schemas: new Schemas([
{
group: 'metrics',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.controller('KbnMetricVisController', function ($scope, Private) {
if (resp) {
metrics.length = 0;
$scope.processTableGroups(tabifyAggResponse($scope.vis, resp));
$scope.vis.emit('renderComplete');
}
});
});
1 change: 1 addition & 0 deletions src/core_plugins/table_vis/public/table_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function TableVisTypeProvider(Private) {
},
editor: '<table-vis-params></table-vis-params>'
},
implementsRenderComplete: true,
hierarchicalData: function (vis) {
return Boolean(vis.params.showPartialRows || vis.params.showMeticsAtAllLevels);
},
Expand Down
2 changes: 2 additions & 0 deletions src/core_plugins/table_vis/public/table_vis_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ module.controller('KbnTableVisController', function ($scope, Private) {
if (table.tables) return table.tables.some(haveRows);
return table.rows.length > 0;
});

$scope.vis.emit('renderComplete');
}

$scope.hasSomeRows = hasSomeRows;
Expand Down
4 changes: 4 additions & 0 deletions src/core_plugins/timelion/public/panels/timechart/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ module.exports = function timechartFn(Private, config, $rootScope, timefilter, $
setTimeout(drawPlot, 500);
}

if ($scope.plot) {
$scope.$emit('renderComplete');
}

legendScope.$destroy();
legendScope = $scope.$new();
// Used to toggle the series, and for displaying values on hover
Expand Down
3 changes: 2 additions & 1 deletion src/core_plugins/timelion/public/vis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ define(function (require) {
params: {
editor: require('plugins/timelion/vis/timelion_vis_params.html')
},
requiresSearch: false
requiresSearch: false,
implementsRenderComplete: true,
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,10 @@ define(function (require) {

$scope.$on('fetch', $scope.search);

$scope.$on('renderComplete', event => {
event.stopPropagation();
$scope.vis.emit('renderComplete');
});

});
});
9 changes: 5 additions & 4 deletions src/server/http/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { parse } from 'url';
import { format } from 'url';
import { resolve } from 'path';
import _ from 'lodash';
import fs from 'fs';
import Boom from 'boom';
import Hapi from 'hapi';
import HapiTemplates from 'vision';
import HapiStaticFiles from 'inert';
import HapiProxy from 'h2o2';
import getDefaultRoute from './get_default_route';
import versionCheckMixin from './version_check';
import { shortUrlAssertValid } from './short_url_assert_valid';
Expand Down Expand Up @@ -140,6 +137,10 @@ module.exports = async function (kbnServer, server, config) {
}
});

// Expose static assets (fonts, favicons).
server.exposeStaticDir('/ui/fonts/{path*}', resolve(__dirname, '../../ui/public/assets/fonts'));
server.exposeStaticDir('/ui/favicons/{path*}', resolve(__dirname, '../../ui/public/assets/favicons'));

kbnServer.mixin(versionCheckMixin);

return kbnServer.mixin(require('./xsrf'));
Expand Down
5 changes: 0 additions & 5 deletions src/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import UiBundleCollection from './ui_bundle_collection';
import UiBundlerEnv from './ui_bundler_env';

export default async (kbnServer, server, config) => {

const loadingGif = readFile(fromRoot('src/ui/public/loading.gif'), { encoding: 'base64'});

const uiExports = kbnServer.uiExports = new UiExports({
urlBasePath: config.get('server.basePath')
});
Expand Down Expand Up @@ -42,7 +39,6 @@ export default async (kbnServer, server, config) => {

// render all views from the ui/views directory
server.setupViews(resolve(__dirname, 'views'));
server.exposeStaticFile('/loading.gif', resolve(__dirname, 'public/loading.gif'));

server.route({
path: '/app/{id}',
Expand Down Expand Up @@ -81,7 +77,6 @@ export default async (kbnServer, server, config) => {
function viewAppWithPayload(app, payload) {
return this.view(app.templateName, {
app: app,
loadingGif: loadingGif,
kibanaPayload: payload,
bundlePath: `${config.get('server.basePath')}/bundles`,
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
"name": "Kibana",
"icons": [
{
"src": "\/android-chrome-192x192.png",
"src": "android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png"
},
{
"src": "android-chrome-256x256.png",
"sizes": "256x256",
"type": "image\/png"
}
],
"theme_color": "#e8488b",
Expand Down
File renamed without changes
Loading

0 comments on commit bc1c90a

Please sign in to comment.