Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into pr/8597
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Oct 27, 2016
2 parents fed9df2 + 35fc5f4 commit b583db7
Show file tree
Hide file tree
Showing 301 changed files with 4,688 additions and 3,825 deletions.
2 changes: 1 addition & 1 deletion .node-version
@@ -1 +1 @@
6.4.0
6.9.0
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -232,7 +232,7 @@ npm run test:dev -- --kbnServer.testsBundle.pluginId=some_special_plugin --kbnSe
* Open VMWare and go to Window > Virtual Machine Library. Unzip the virtual machine and drag the .vmx file into your Virtual Machine Library.
* Right-click on the virtual machine you just added to your library and select "Snapshots...", and then click the "Take" button in the modal that opens. You can roll back to this snapshot when the VM expires in 90 days.
* In System Preferences > Sharing, change your computer name to be something simple, e.g. "computer".
* Run Kibana with `npm start -- --no-ssl --host=computer.local` (subtituting your computer name).
* Run Kibana with `npm start -- --no-ssl --host=computer.local` (substituting your computer name).
* Now you can run your VM, open the browser, and navigate to `http://computer.local:5601` to test Kibana.

#### Running Browser Automation Tests
Expand Down
2 changes: 1 addition & 1 deletion bin/kibana
Expand Up @@ -21,4 +21,4 @@ if [ ! -x "$NODE" ]; then
exit 1
fi

exec "${NODE}" $NODE_OPTIONS "${DIR}/src/cli" ${@}
exec "${NODE}" $NODE_OPTIONS --no-warnings "${DIR}/src/cli" ${@}
2 changes: 1 addition & 1 deletion bin/kibana-plugin
Expand Up @@ -21,4 +21,4 @@ if [ ! -x "$NODE" ]; then
exit 1
fi

exec "${NODE}" $NODE_OPTIONS "${DIR}/src/cli_plugin" ${@}
exec "${NODE}" $NODE_OPTIONS --no-warnings "${DIR}/src/cli_plugin" ${@}
2 changes: 1 addition & 1 deletion bin/kibana-plugin.bat
Expand Up @@ -22,7 +22,7 @@ If Not Exist "%NODE%" (
)

TITLE Kibana Server
"%NODE%" %NODE_OPTIONS% "%DIR%\src\cli_plugin" %*
"%NODE%" %NODE_OPTIONS% --no-warnings "%DIR%\src\cli_plugin" %*

:finally

Expand Down
2 changes: 1 addition & 1 deletion bin/kibana.bat
Expand Up @@ -22,7 +22,7 @@ If Not Exist "%NODE%" (
)

TITLE Kibana Server
"%NODE%" %NODE_OPTIONS% "%DIR%\src\cli" %*
"%NODE%" %NODE_OPTIONS% --no-warnings "%DIR%\src\cli" %*

:finally

Expand Down
12 changes: 0 additions & 12 deletions docs/apps.asciidoc

This file was deleted.

116 changes: 10 additions & 106 deletions docs/console.asciidoc
@@ -1,6 +1,8 @@
[[console-kibana]]
== Console for Kibana
= Console

[partintro]
--
The Console plugin provides a UI to interact with the REST API of Elasticsearch. Console has two main areas: the *editor*,
where you compose requests to Elasticsearch, and the *response* pane, which displays the responses to the request.
Enter the address of your Elasticsearch server in the text box on the top of screen. The default value of this address
Expand Down Expand Up @@ -63,120 +65,22 @@ but you can easily change this by entering a different url in the Server input:
.The Server Input
image::images/introduction_server.png["Server",width=400,align="center"]

[NOTE]
Console is a development tool and is configured by default to run on a laptop. If you install it on a server please
look at the <<securing_console>> for instructions on how make it secure.

[float]
[[console-ui]]
== The Console UI

In this section you will find a more detailed description of UI of Console. The basic aspects of the UI are explained
in the <<console-kibana>> section.
--

[[multi-req]]
=== Multiple Requests Support

The Console editor allows writing multiple requests below each other. As shown in the <<console-kibana>> section, you
can submit a request to Elasticsearch by positioning the cursor and using the <<action_menu,Action Menu>>. Similarly
you can select multiple requests in one go:

.Selecting Multiple Requests
image::images/multiple_requests.png[Multiple Requests]

Console will send the request one by one to Elasticsearch and show the output on the right pane as Elasticsearch responds.
This is very handy when debugging an issue or trying query combinations in multiple scenarios.

Selecting multiple requests also allows you to auto format and copy them as cURL in one go.


[[auto_formatting]]
=== Auto Formatting

Console allows you to auto format messy requests. To do so, position the cursor on the request you would like to format
and select Auto Indent from the action menu:

.Auto Indent a request
image::images/auto_format_before.png["Auto format before",width=500,align="center"]

Console will adjust the JSON body of the request and it will now look like this:

.A formatted request
image::images/auto_format_after.png["Auto format after",width=500,align="center"]

If you select Auto Indent on a request that is already perfectly formatted, Console will collapse the
request body to a single line per document. This is very handy when working with Elasticsearch's bulk APIs:

.One doc per line
image::images/auto_format_bulk.png["Auto format bulk",width=550,align="center"]


[[keyboard_shortcuts]]
=== Keyboard shortcuts

Console comes with a set of nifty keyboard shortcuts making working with it even more efficient. Here is an overview:

==== General editing

Ctrl/Cmd + I:: Auto indent current request.
Ctrl + Space:: Open Auto complete (even if not typing).
Ctrl/Cmd + Enter:: Submit request.
Ctrl/Cmd + Up/Down:: Jump to the previous/next request start or end.
Ctrl/Cmd + Alt + L:: Collapse/expand current scope.
Ctrl/Cmd + Option + 0:: Collapse all scopes but the current one. Expand by adding a shift.

==== When auto-complete is visible

Down arrow:: Switch focus to auto-complete menu. Use arrows to further select a term.
Enter/Tab:: Select the currently selected or the top most term in auto-complete menu.
Esc:: Close auto-complete menu.


=== History

Console maintains a list of the last 500 requests that were successfully executed by Elasticsearch. The history
is available by clicking the clock icon on the top right side of the window. The icons opens the history panel
where you can see the old requests. You can also select a request here and it will be added to the editor at
the current cursor position.

.History Panel
image::images/history.png["History Panel"]


=== Settings

Console has multiple settings you can set. All of them are available in the Settings panel. To open the panel
click on the cog icon on the top right.

.Settings Panel
image::images/settings.png["Setting Panel"]

[[securing_console]]
=== Securing Console

Console is meant to be used as a local development tool. As such, it will send requests to any host & port combination,
just as a local curl command would. To overcome the CORS limitations enforced by browsers, Console's Node.js backend
serves as a proxy to send requests on behalf of the browser. However, if put on a server and exposed to the internet
this can become a security risk. In those cases, we highly recommend you lock down the proxy by setting the
`console.proxyFilter` Kibana server setting. The setting accepts a list of regular expressions that are evaluated
against each URL the proxy is requested to retrieve. If none of the regular expressions match the proxy will reject
the request.
include::console/multi-requests.asciidoc[]

Here is an example configuration the only allows Console to connect to localhost:
include::console/auto-formatting.asciidoc[]

[source,yaml]
--------
console.proxyFilter:
- ^https?://(localhost|127\.0\.0\.1|\[::0\]).*
--------
include::console/keyboard-shortcuts.asciidoc[]

Restart Kibana for these changes to take effect.
include::console/history.asciidoc[]

Alternatively if the users of Kibana have no requirements or need to access any of the Console functionality, it can
be disabled completely and not even show up as an available app by setting the `console.enabled` Kibana server setting to `false`:
include::console/settings.asciidoc[]

[source,yaml]
--------
console.enabled:
- false
--------
include::console/disabling-console.asciidoc[]
19 changes: 19 additions & 0 deletions docs/console/auto-formatting.asciidoc
@@ -0,0 +1,19 @@
[[auto-formatting]]
== Auto Formatting

Console allows you to auto format messy requests. To do so, position the cursor on the request you would like to format
and select Auto Indent from the action menu:

.Auto Indent a request
image::images/auto_format_before.png["Auto format before",width=500,align="center"]

Console will adjust the JSON body of the request and it will now look like this:

.A formatted request
image::images/auto_format_after.png["Auto format after",width=500,align="center"]

If you select Auto Indent on a request that is already perfectly formatted, Console will collapse the
request body to a single line per document. This is very handy when working with Elasticsearch's bulk APIs:

.One doc per line
image::images/auto_format_bulk.png["Auto format bulk",width=550,align="center"]
10 changes: 10 additions & 0 deletions docs/console/disabling-console.asciidoc
@@ -0,0 +1,10 @@
[[disabling-console]]
== Disable Console

If the users of Kibana have no requirements or need to access any of the Console functionality, it can
be disabled completely and not even show up as an available app by setting the `console.enabled` Kibana server setting to `false`:

[source,yaml]
--------
console.enabled: false
--------
10 changes: 10 additions & 0 deletions docs/console/history.asciidoc
@@ -0,0 +1,10 @@
[[history]]
== History

Console maintains a list of the last 500 requests that were successfully executed by Elasticsearch. The history
is available by clicking the clock icon on the top right side of the window. The icons opens the history panel
where you can see the old requests. You can also select a request here and it will be added to the editor at
the current cursor position.

.History Panel
image::images/history.png["History Panel"]
21 changes: 21 additions & 0 deletions docs/console/keyboard-shortcuts.asciidoc
@@ -0,0 +1,21 @@
[[keyboard-shortcuts]]
== Keyboard shortcuts

Console comes with a set of nifty keyboard shortcuts making working with it even more efficient. Here is an overview:

[float]
=== General editing

Ctrl/Cmd + I:: Auto indent current request.
Ctrl + Space:: Open Auto complete (even if not typing).
Ctrl/Cmd + Enter:: Submit request.
Ctrl/Cmd + Up/Down:: Jump to the previous/next request start or end.
Ctrl/Cmd + Alt + L:: Collapse/expand current scope.
Ctrl/Cmd + Option + 0:: Collapse all scopes but the current one. Expand by adding a shift.

[float]
=== When auto-complete is visible

Down arrow:: Switch focus to auto-complete menu. Use arrows to further select a term.
Enter/Tab:: Select the currently selected or the top most term in auto-complete menu.
Esc:: Close auto-complete menu.
14 changes: 14 additions & 0 deletions docs/console/multi-requests.asciidoc
@@ -0,0 +1,14 @@
[[multi-requests]]
== Multiple Requests Support

The Console editor allows writing multiple requests below each other. As shown in the <<console-kibana>> section, you
can submit a request to Elasticsearch by positioning the cursor and using the <<action_menu,Action Menu>>. Similarly
you can select multiple requests in one go:

.Selecting Multiple Requests
image::images/multiple_requests.png[Multiple Requests]

Console will send the request one by one to Elasticsearch and show the output on the right pane as Elasticsearch responds.
This is very handy when debugging an issue or trying query combinations in multiple scenarios.

Selecting multiple requests also allows you to auto format and copy them as cURL in one go.
8 changes: 8 additions & 0 deletions docs/console/settings.asciidoc
@@ -0,0 +1,8 @@
[[console-settings]]
== Settings

Console has multiple settings you can set. All of them are available in the Settings panel. To open the panel
click on the cog icon on the top right.

.Settings Panel
image::images/settings.png["Setting Panel"]

0 comments on commit b583db7

Please sign in to comment.