Commit graph

14761 commits

Author SHA1 Message Date
Court Ewing
68baabe72f docs: kibana developer and known plugin docs (#9477)
* docs: kibana developer docs

This is the beginning of developer-focussed docs for Kibana. The content
is mostly pulled directly from the old wiki in the github repo.

* docs: known plugins for 5.x
2016-12-13 22:37:55 -05:00
Spencer
e488a16e6f [eslint] reenable no-extra-semi and quotes rules (#9473)
* [eslint] re-enable no-extra-semi and quotes rules

* [eslint] update to version 0.2.2 of eslint config

* [eslint] autofix
2016-12-13 18:17:47 -07:00
Tyler Smalley
617f21829b Use spec reporter for Mocha tests (#9470)
Provides context for exceptions and node warnings (ex: UnhandledPromiseRejectionWarning)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2016-12-13 17:05:05 -08:00
Martin Hickey
7028a88efd Kibana Globalization - Phase 1 (#7545)
* Add low level i18n plugin

Manages languages that are available and is responsible for loading translated
content at the granularity of a plugin.

To be done:
 - APIs for store and retrieval

* Use Kibana install as root for the translation store directory

Setting the path for storing the bundled language translation files to
<KIBANA_INSTALL>/data/store_translations/<PLUGIN_NAME>

* Updated i18n core plugin APIs to be asynchronous

To be done:
 - Better error handling in APIs
 - Fix threading issue with storePluginLanguageTranslations API

* Fix thread synchroization issue in storePluginLanguageTranslations

* Update error handling in i18n core plugin

* Change to use NodeJS mkdirp function for creating directories recursively

Updates with review comments from @srl295. Changed export syntax to show the
exported functions at end of file.

* Add REST API for getting translations of a language for a plugin

To be done:
 - Add algorithm to decide on the language for a plugin by comparing the accept languages
from the REST call and the plugin supported languages
 - Add REST API tests

* Add algorithm for determining plugin language when retrieving translations

Client would pass languages used in the 'accept-language' header. These
languages would then be compared against the plugin supported languages
and best compared language would be selected.

To be done:
 - Add REST API tests

* Add API to return all registered plugin language translations

* Add HAPI API to get all plugins translation files

* Update register translations API to be independent of plugin name and language

The register API is updated to be independent of plugin name and language. The API will now
traverse the path given and create language bundles as per language files it traverses.
The translations files structure has also been simplified to be just key/value objects.

To be done:
 - Add hapi API to get translations
 - Extend the API tests to test responses

* Update API test

* Add eslint fix for API test

* Update with review comments

From review https://github.com/elastic/kibana/pull/7545#issuecomment-231147435
following comments updated:
- README, .gitignore, and .eslintrc are not needed in a core plugin
- package.json only needs name and version
- unit tests need to go in a tests directory otherwise they won't get picked up
by the grunt tasks. Also our convention is to name the test file with the same
name as the module it's testing (so i18n_tests.js should just be i18n.js)
- For consistency with the rest of the code base, rename the data directory to fixtures.
- Prefer const (or let if necessary). Don't use var.
- Use ES6 imports/exports rather than commonjs style
- Only export the i18n module's public API. For instance, I don't think getPluginTranslationDetails is used outside of the i18n module, so it shouldn't be exposed publicly. If you want to expose it for testing purposes, I would recommend creating an i18n directory with an index.js file that exports the module's public API, and a separate i18n.js file with the "private" API. index.js will be for public use, i18n.js will be for private internal use.

* Update after review comments

From review (https://github.com/elastic/kibana/pull/7545#issuecomment-231884490):
- i18n module API should return promises for async operations instead of using
callbacks
- All filesystem access should be async
- Unit tests need to be updated based on new proposed plugin structure
(single language file, not split by view)

From design (https://github.com/elastic/kibana/issues/6515#issuecomment-231400097):
- Removed API as will consider in later phase

TODO:
- Make write function async

* Update after review comments

Updated write function to be asynchronous

* Update registerTranslations API to take absolute translation file as argument

The API originally took the directory as the argument but following reviews it
was decided to change to absolute file because it will be less brittle
since it is more explicit.

* Translate the Kibana welcome message

Translates the start-up message (“Kibana is loading ...”)in the Jade template.

To be done:
 - Means to register the core plugin translations. They are currently added
in the fixtures directory as static files. Need to be generated on the fly.

* Add build task to generate core plugin translations

Task which calls registerTranslations API and then a task which copies the
regsitered translations to <kibana_root>/build/kibana

* Add hook to optimize module to add registration during dev startup

Registration of the core plugin translations during development start of
Kibana server. The translations include the welcome message and server error
startup message.

* Handle scenario when the user preferred language header is not passed

The UI when loading asks i18n plugin which language translation to use
depending on the user preferred language header 'accept-language'.
This commit is to handle scenario where header is not passed. The algorithm
then chooses the default language.

* Replace registering of translations at plugin install time to the plugin init phase

This change follows review comments in:
https://github.com/elastic/kibana/issues/6515#issuecomment-236237218

* Update after review comments

Comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-72890673
- https://github.com/elastic/kibana/pull/7545#discussion-diff-72894762

* Update after plugin folder layout changes in Kibana

This require to use <kibana_root>/data for registered translations
and i18n plugin moved to core_plugins from plugins.

Refer to PR for more details:
https://github.com/elastic/kibana/pull/7562

* Update translation registration to file path rather than bundling

After review discussions it was agreed to just register the absolute paths
to translation files rather than bundling each file into one central file
at registration.

* Update review comments

This commit contains the following review comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74661282
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74661392
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74662271
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74663235
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669201
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669269
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669419
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669628
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74799382

* Update review comments

The following review comments are included in the commit:
- https://github.com/elastic/kibana/pull/7545#discussion_r74663515
- https://github.com/elastic/kibana/pull/7545#discussion_r74666995
- https://github.com/elastic/kibana/pull/7545#discussion_r74805552

* Expose the i18n APIs in the server object for plugin access

Plugins should call the i18n plugin APIs through the server object
and not directly from the module.

This closes he following comments:
- https://github.com/elastic/kibana/pull/7545#discussion_r74662598
- https://github.com/elastic/kibana/pull/7545#discussion_r74669327
- https://github.com/elastic/kibana/pull/7545#discussion_r74669765

* Update accept-language-parser module to 1.2.0

Module version 1.2.0 fixes issue:
https://github.com/opentable/accept-language-parser/issues/8

This commit updates review comments:
https://github.com/elastic/kibana/pull/7545#discussion-diff-75525214
https://github.com/elastic/kibana/pull/7545#issuecomment-240290461

* Add i18n default locale as a configurable item

Adds 'defaultLocale' configurable item to the i18n plugin configuration.
The default locale is used for translations if the locale specified by user
is not supported.

This commit satisfies the review comment:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669970

* Move UI i18n wrapper functionality into a module

This commit better structures the i18n capability so that it can be called
in UI code in a clearly defined fashion with minimum code. It also fixes
potential race conditions.

This commit updates review comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74804791
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74801802
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74670457

* Fill any missing translations using translations from default locale

The default language translations are loaded and are compared against the selected
language translations. The comparison can then highlight any missing translation
keys and can load the default translations keys as needed. This helps to unsure
where possible that a translation string is available in most scenarios even if not
in the locale requested.

This commit resolves review comments:
- https://github.com/elastic/kibana/pull/7545#issuecomment-239202583
- https://github.com/elastic/kibana/pull/7545#issuecomment-239203734

* Add unit tests for the i18n UI wrapper functions

* Fix issues after rebase with master

* Add translation keys verification tool

This tool helps to check that translation keys are translated. This tool can be
used for non-angular translation constructs like the Jade templates.

* Updates after review comments

Updates for review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-3748114

* Update after review comments

Update for review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-3937958

To be done:
- Update of unit tests for UI and server
- Call of verify translations

* Update unit tests after review changes

There was a number of changes to the i18n module and the ui i18n wrapper
following review comments. This commit is to update the unit tests with
respect.

* Add build task for verify translations

* Update the kibana i18n IDs to be prefixed with kibana

* Update verify translations to test registered translations

It was testing the static translation files. It is now updated to
test the translations registered when Kibana server is started and
the plugins have initialized.

* Update after review comments

Updates following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-5529711

* Update after review

This commit contain updates after the following review:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-5707951

* Updates after review

Updates for review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-6656571

* Update after review

Updates for the following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-6911265

* Update after review

Updates after the following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-7084765

* Update unit tests to use expect throwError

* Update after rebase with master

Loading message changed following merge of commit
26c53e8a8d (diff-e25d7fee746a4f249e17f87c02fd95f8R55)
This required update to the welcome message and how it is called.

* Update following review

Updated the following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-9297662

* Update the algorithm to return the locale

The algorithm to return which locale to use for translations based on the user
locale list and the regsitered locales is updated in this commit. The algorithm
previously did an exact match on all the user locales first before (by priority)
then checking for best case match. The algorithm is now modified to check each
user locale starting with the highest priority first for an exact match and then
for best case match. If no match it then moves to the next user locale with
the next highest priority. This is to follow the priority list that a user
browser is configured for where there maybe a locale translation available
but might not be the exact match with regard to the locale code and/or script.
An example of this is that the highest priority locale of the user is 'en-US'
but the locale translation available is 'en'. It is better select the 'en'
locale rather than select the next highest locale which is an exact match.

* Update after review comments

Updates after the following reviews:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-9785665
https://github.com/elastic/kibana/pull/7545#pullrequestreview-9786404

* Fix after merge with master

Change in the flo and layout of ui index meant that acceptLanguages were not
being passed. This commit is an update to fix this so that the welcome
messages are loaded.

* Update after review comments

This commit is for updates after the following review:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-10435175

* Fix issue when unit test run in CI as core translations are registered

When unit tests are run on a test server (like in the CI), it will start
Kibana server and register the core translations. This means that the i18n
unit tests need to be able to store the existing registration prior to
testing and replace after testing.

* [server/ui] move i18n into ui module

* [server/ui] restore renderApp() method signature

* [server/ui] unify i18n logic in UiI18n class

* [server] move translation files into "translations" dir

* Update i18n module to loaded by multiple server instances within the one process

* Update i18n module to a class

Moving the i18n module into a class so as to encapsulate the registered
translations which means there can be different and distinct instances per process.
This is to accomodate the user case where there might be multiple Kibana server
instances in a process and the localization should be at the server level.

* Identify private members in a class with underscore-prefix convention

* Remove redundant translation from core translation file

Message starting with 'Give me a moment...' is no longer part of loading
message folowing a rebase with master.

* [ui/i18n] reject translations files that do not use absolute paths

* Update config item locale to defaultLocale

* Update after review comments

- Update after following review: https://github.com/elastic/kibana/pull/7545#pullrequestreview-12775161
- Also, fix syntax mess following rebase with master of src/optimize/index.js

* Fix rebase with master error

* Add task for verifying translations in CI

* Fix lint errors
2016-12-13 17:55:48 -07:00
Tyler Smalley
bb2ed406e1 Renames Timelion test directories (#9469)
In Kibana, we source __tests__ directory names for mocha tests. This adds the missing 9 tests.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2016-12-13 17:13:03 -07:00
Spencer
4b2ac10381 Fix build with ui framework (#9463)
* [uiFramework] include sass deps in production so we can rebuild

* [build] do not copy the doc_site source into the final build

* [licenses] allow code that uses the `Unlicense`
2016-12-13 14:41:57 -07:00
spalger
6b8bd3126b [eslint] autofix lint errors 2016-12-13 11:24:10 -07:00
Spencer
2f6654bcec [eslint] re-enable no-var and prefer-const (#9455)
* [eslint] enable no-var and autofix

* [eslint] enable prefer-const and autofix

* [eslint] fix autofix-incompatible no-var and prefer-const violations
2016-12-13 10:44:27 -07:00
Jonathan Budzenski
e125db2b02 Bump elasticsearch client (#9446)
* Bump elasticsearch client

* Bump elasticsearch version in tests entry template to master
2016-12-13 08:34:37 -06:00
CJ Cenizal
1e315d92c9 Migrate UI Framework source into Kibana. (#9192)
Migrate UI Framework source into Kibana.
- Add dependencies to package.json.
- Add task for building UI Framework docs and serving locally.
- Import UI Framework scss from autoload/styles.js instead of importing the CSS in base.less.
- Refactor UI Framework directory structure.
- Remove babel-polyfill.
- Include SCSS synchronously.
2016-12-12 17:54:56 -08:00
CJ Cenizal
10f7880bc8 Add close button to localNavDropdowns. (#9437)
* Add close button to localNavDropdowns.
- Make Timelion docs dropdown scroll only the table.
- Make Timelion tutorial a fluid height, instead of fixed.

* Use chevron for localDropdownCloseButton.
2016-12-12 14:54:40 -08:00
Matt Bargar
8eed97b69f Limit scripted fields to painless and expression langs (#9172)
We made a mistake in opening up Kibana scripted fields to any and all
langs enabled in Elasticsearch. Kibana needs to do some magic to get
certain scripted field features to work
(https://github.com/elastic/kibana/pull/9171) and we can't commit to
supporting anything beyond expression and painless scripts. On top of
that, the other languages are being removed in ES 6.0 anyway. This commit
makes that stance explicit by disallowing anything other than those two
choices.
2016-12-12 16:32:22 -05:00
Spencer
0c736724b0 Upgrade eslint (#9357)
* upgrade eslint, all related deps, and config files

* replace gruntify-eslint with basic eslint-cli wrapper

* arrow-IIFEs must be invoked outside of the parens

* move import statements before their use

* reindent to satisfy new indentation check algorithm

* place missing semicolon

* ignore copy-pasted decode geohash code

* [grunt/eslint] fix argument spacing

* [gurnt/eslint] add comment about contents of report

* [grunt/tasks] use `export default`
2016-12-12 13:44:18 -07:00
Peter Pisljar
5864f2b093 pie chart unhandled error fix (#9420) 2016-12-10 10:00:27 +01:00
Megan Walker
10c2136010 server onRequest handler no longer requires a socket in the request (#9332)
Per #9302 A request sent through a HapiJS .inject() doesn't have
a socket associated with the request, which causes a failure.
2016-12-09 17:00:54 -08:00
Lukas Olson
b20f996601 Add time navigation buttons (#9253)
* Add time navigation buttons

* changing vars to const

* Address some review points

* fixing typo in function name

* Remove unused variables

* [timepicker] Simplify zoom in/out and forward/back and remove getter that had side effects

* [timepicker] Move time navigation calculations to own class and write test

* [timepicker] Remove unused styling and classes

* [timepicker] Change from i to span, add more explanatory comments

* [timepicker] Remove unused variable

* Remove zoom in/out buttons from timepicker nav

* Change step forward/back timepicker nav button icons
2016-12-09 15:41:33 -07:00
Jim Unger
6e819c11b8 Remove legacy pipelines code (#9397)
* Removes legacy pipelines code from kibana core_plugin

* removes pipelines tests
2016-12-08 16:05:18 -06:00
CJ Cenizal
2860b12079 Add form and page components. (#8910)
- Third party overrides.
- kuiList
- kuiListItem
- kuiPage
- kuiPageView
- kuiSubHeader
- kuiNotice
- kuiNoticeTitle
- kuiNoticeText
- kuiCard
- kuiCardGroup
- kuiButton
- kuiIcon
- kuiTitle
- kuiBadge
- kuiFormSection
- kuiFormSubSection
- kuiColumn
- kuiFormLabel
- kuiFormSubLabel
- kuiTextArea
- kuiInput
- kuiStaticInput
- kuiOptionLabel
- kuiCheckbox
- kuiFormPanel
- kuiFormPanelLayout
- kuiMenuItem
- kuiInputNote
- kuiTableControls
- kuiTableControlAction
- fullWidth
- noPadding
2016-12-08 13:55:57 -08:00
CJ Cenizal
cebf834321 Fix markdown typo in CSS style guide. (#9408) 2016-12-07 13:20:02 -08:00
Stacey Gammon
050fc87a70 Make panel scope isolate, and some cleanup (#9335)
* make scope isolate

* Make panel scope isolate

Also clean up and simplify scope destroying

Fix sorting on scripted date and boolean fields (#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: aeb97ff412/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java (L359)

Fixes: https://github.com/elastic/kibana/issues/9257

Add docs on all available console server config options (#9288)

settings: do not query ES for settings in non-green status (#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (#9313)

more refactoring

Fix sorting on scripted date and boolean fields (#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: aeb97ff412/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java (L359)

Fixes: https://github.com/elastic/kibana/issues/9257

Add docs on all available console server config options (#9288)

settings: do not query ES for settings in non-green status (#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (#9313)

Skip assertion when the test blips. (#9251)

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

[git] ignore extra files in the root config/ directory (#9296)

upgrade makelogs (#9295)

build: remove deepModules hackery (#9327)

The deepModules hacks in the build system were added to support the long
paths that resulted from npm2, but npm3 fundamentally addresses that
problem, so deepModules is no longer necessary. In practical terms, npm3
shouldn't ever cause path lengths to become so long that they trigger
path length problems on certain operating systems.

more cleanup and tests

Save/rename flow fix (#9087)

* Save/rename flow fix

- Use auto generated ids instead of coupling the id to the title which
creates problems.
- Adjust UI to make the save flow more understandable.
- Remove confirmation on overwrite since we will now be creating
duplicate objects even if they have the same title.

* use undefined instead of null

* Change titleChanged function name

* address code review comments

* Add isSaving flag to avoid checkbox flicker, fix regression bug from refactor.
Added tests and fixed a couple bugs
Updated info message

* Update doc and nav title with new name on rename
don't hardcode Dashboard

* namespace panel factory

cleanup

* Fix parameter name in html

* Address comments

- Get rid of factory function and Panel class.
- Rename panel.js to panel_state.js
- Rename dashboard_panel_directive to dashboard_panel

* Fix file path reference in tests.

* Panel => PanelState
2016-12-07 16:04:14 -05:00
Lukas Olson
0a577f1ce8 Change mapping of index-pattern fields to text (#9353)
* Change mapping of index-pattern fields to text

* Update kibana index mappings from keyword to text to allow longer values

* Update search source to text mapping instead of keyword

* fix mapping setup test

* Change from string to text
2016-12-07 13:54:19 -07:00
CJ Cenizal
e1428f7289 Remove loading message from Welcome loader. Slightly lower the loading message. (#9383) 2016-12-06 08:49:56 -08:00
Stacey Gammon
2ea5915ca3 Use this instead of self (#9380) 2016-12-06 10:36:27 -05:00
Steven Chen
7a5f34a044 Correct typo in 'Sharing a Dashboard' section (#9366)
Change 'You can can..' to 'You can either...'
2016-12-06 08:07:49 -05:00
Arthur
e14c3fcf20 Update connect-to-elasticsearch.asciidoc (#9361)
Update documentation to show how to select an index as default.
2016-12-06 08:01:23 -05:00
Peter Pisljar
b19794585b Vislib Point Series updates (#9044)
Multiple changes to the Vislib point series charts. Before each of the chart (bar/area/line) would be an independent unit responsible for drawing all of its parts (axes, titles). This change splits things up so we can have greater control and better code reuse.

converting to ES6
moving axes out of each chart
joining both axes types (x and y) into a common axis type
allowing multiple axes
allowing top/bottom/left/right axis positioning
introducing new chart type 'point_series' which can combine bar/line/area series
making each of the series (bar/line/area) direction independent (vertical/horizontal charts)
2016-12-06 12:55:17 +01:00
Thomas Neirynck
5b61fc346b Tag Cloud should deal with empty responses correctly (#9354)
tag cloud did not work with empty responses correctly. One of the side-effects is that the back button did not work properly. For example, pressing the back button would not empty out the screen and show stale clouds.

This also caused a type-error. Empty configurations meant that we could not access any aggregation-configs to produce a label.
2016-12-05 09:38:47 -05:00
Thomas Neirynck
ac6c4cd3ef improve tag cloud doc (#9356) 2016-12-02 18:56:22 -05:00
Shaunak Kashyap
d635c11c61 Update mappings for kibana index (#9280)
* Update buildNum mapping from string/not_analyzed to keyword

* Change index-pattern type mappings from string -> keyword

* Updating unit test

* Updating string mappings for various saved object types

* Fixing mapping for index pattern title field

This needs to be text because other types in the Kibana index also have a field named "title", whose mapping needs to be text. We can't have the same field have different mappings in different types within the same index.

* Removing unused files

* Removing test file because corresponding source file is gone now
2016-12-02 10:54:47 -08:00
Brandon Kobel
083d564a7c Modifying the dashboard grid to not unnecessarily set appStatus.dirty (#9307) 2016-12-02 12:01:59 -05:00
Stacey Gammon
f432698c27 Save/rename flow fix (#9087)
* Save/rename flow fix

- Use auto generated ids instead of coupling the id to the title which
creates problems.
- Adjust UI to make the save flow more understandable.
- Remove confirmation on overwrite since we will now be creating
duplicate objects even if they have the same title.

* use undefined instead of null

* Change titleChanged function name

* address code review comments

* Add isSaving flag to avoid checkbox flicker, fix regression bug from refactor.
Added tests and fixed a couple bugs
Updated info message

* Update doc and nav title with new name on rename
don't hardcode Dashboard
2016-12-02 09:33:30 -05:00
Court Ewing
9d79d8bc63 build: remove deepModules hackery (#9327)
The deepModules hacks in the build system were added to support the long
paths that resulted from npm2, but npm3 fundamentally addresses that
problem, so deepModules is no longer necessary. In practical terms, npm3
shouldn't ever cause path lengths to become so long that they trigger
path length problems on certain operating systems.
2016-12-01 19:52:37 -05:00
Spencer
dd1105eceb upgrade makelogs (#9295) 2016-12-01 17:10:29 -07:00
Spencer
467a5bddb3 [git] ignore extra files in the root config/ directory (#9296) 2016-12-01 17:10:17 -07:00
Thomas Neirynck
8569bd1fce Skip assertion when the test blips. (#9251)
Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.
2016-12-01 18:18:42 -05:00
CJ Cenizal
c989ee152f Change loading screen background to white to make it less distracting when navigating between apps. (#9313) 2016-12-01 11:33:28 -07:00
Court Ewing
a15d1c90cf settings: do not query ES for settings in non-green status (#9308)
If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.
2016-12-01 12:54:27 -05:00
Matt Bargar
4ef3b68409 Add docs on all available console server config options (#9288) 2016-11-30 17:56:05 -05:00
Stacey Gammon
ddfa603927 Panel clean up (#9282)
the right syntax is ‘require’ not ‘requires’, but it isn’t needed
anyhow (and throws an error if the right syntax is used).
2016-11-30 16:40:15 -05:00
Matt Bargar
cd3269bf96 Fix sorting on scripted date and boolean fields (#9261)
The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: aeb97ff412/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java (L359)

Fixes: https://github.com/elastic/kibana/issues/9257
2016-11-30 16:04:06 -05:00
Stacey Gammon
0266a9adbe Code clean up (#9262) 2016-11-30 12:28:19 -05:00
Jonathan Budzenski
6759e25780 [plugin cli] Retry folder rename on windows eperm (#9260) 2016-11-30 12:22:50 -05:00
Thomas Neirynck
1aaa3813ca Mouse out over legend should not cause errors to the console (#9263) 2016-11-30 10:43:04 -05:00
szydan
8d642709bd move timepicker's styles to separate less file (#9117) 2016-11-29 15:03:47 -07:00
CJ Cenizal
7cdd29822f Use data attribute to select loading message, instead of CSS class… (#9248)
* Use uniquely and semantically named data attribute to select loading message, instead of CSS class since that creates a brittle coupling between JS and CSS.
* Formalize this rule in the CSS style guide.
2016-11-29 14:21:57 -07:00
Court Ewing
4d6e0d726e Removes "global-style" setting for npm (#9256)
This change, which was originally introduced in #9136, resulted in much
larger installs for Kibana (50MB larger in dev mode), which isn't a
reasonable tradeoff for the convenience that global-style provides.
2016-11-29 15:43:57 -05:00
Pablo Sanchez
4cc4ddf22e Update client node for Coordinating only node (#9178)
Since client node doesn't exist anymore, this should be replace by the coordinating only node.
2016-11-29 13:17:31 -05:00
Thomas Neirynck
8a528dcd97 Tagcloud fixes (#9194)
* Improve robustness

Tagcloud was subsceptible to race conditions, potentially yielding stale clouds.
- Introduced queue to explicitly keep track of outstanding jobs and avoid clobbering of the state.
- Expanded unit tests

* ensure tagcloud expands to full height in reporting

* remove magic numbers
2016-11-29 11:31:37 -05:00
Matt Bargar
10eb827133 Fix filters for complex painless scripted fields (#9171)
* Fix filters for complex painless scripted fields

Painless scripted fields that consisted of more than a single expression
would break when the user attempted to filter on them in Discover or
Visualize because of the naive way we were building them. We now wrap
the user's script in a lambda so that it can be as complex at they need
it to be. The only special exception is that the user cannot define
named functions since those cannot go inside a Painless lambda.

Fixes https://github.com/elastic/kibana/issues/9024
Related https://github.com/elastic/elasticsearch/pull/21635

* DRY it up

* Phrase tests

* Only include necessary comparators and add tests
2016-11-29 10:51:33 -05:00
Stacey Gammon
5d689aa5ed fix issue with hiding loading message in embedded mode (#9235)
* fix issue with hiding loading message in embedded mode

* Fix match as well

This chunk of logic only matched on =embed, not =embed=true, which is
what the url given by sharing uses.
2016-11-28 16:44:03 -05:00