Commit graph

17860 commits

Author SHA1 Message Date
Tim Sullivan 80833cde95
Remove /api/_xpack/usage and /api/_kibana/v1/stats (#20800)
/api/_xpack/usage was added as a target for 6.4.0 but it will not be
used. Instead, the /api/stats response will include usage info on
everything that gets registered with the usage service in
/src/server/usage

/api/_kibana/v1/stats is a GET API that was added in 6.2, during a point
where we thought providing usage stats through a public API would be OK
for capturing internally, with the benefit of having it be visible.

However, we've pivoted away from that idea because it doesn't line up
too well with the existing flow of data, where usage stats are combined
with the "Kibana stats" such as process uptime and number of requests.
We want to shift how we collect stats from Kibana, but it will be
gradual. It might be a while before we have an architecture that makes
sense for a standalone public API for the usage stats

This endpoint was never documented, and isn't used anywhere in the code.
It does incur a maintenance cost though.

Therefore, instead of waiting for a next major version to remove this
API, I'm removing it for 6.4. It will be marked in the release notes as
a breaking change. Since it was never documented, it should not provide
a problem.
2018-07-19 13:46:52 -07:00
Tim Sullivan f8bdc7d22a
[Test/Cleanup] Remove console.log (#21002) 2018-07-19 13:42:47 -07:00
Bill McConaghy 35dade2d3c
Reactify users roles (#20739)
* partial progress on reactifying users

* progress on EUIfication of users screen

* removing Angular stuff

* adding data-test-subj="passwordConfirmationInput"

* removing data-test-subj="userFormEmailInput" refs from tests

* fixing selector for role assignment

* some functional test fixes

* fixing some functional tests

* fixing last functional test

* removing stray console log

* fixing warnings

* attempting to fix flaky test

* trying again to fix flaky test

* PR feedback

* PR feedback

* fixing issue where form tried to submit

* adding sleep to allow user to load

* Design edits

Mainly adding wrapper EUI page elements, but also shifted around form elements.

* Fixed console error and added responsive prop to table

* addressing PR feedback

* A few more PR feedback

- Fixed alignment of table
- Removed the tooltip from the lock icon and placed the description inline.
- Changed delete button to an empty button

* addressing more PR feedback

* adding email field back in

* adding back username validation

* restoring original error message

* fixing dumb null error
2018-07-19 16:40:12 -04:00
Alex F 218dfa2953
Update Cloud tutorial instructions to work with UCv2 (#20950)
Updated some of the text in the manifest file for on-prem cloud
2018-07-19 14:24:51 -04:00
liza-mae e02485684d
skip test (#20986) 2018-07-19 10:07:19 -06:00
James Gowdy d1b667512c
[ML] Better handling of job request timeouts (#20985) 2018-07-19 16:39:54 +01:00
James Gowdy 3d06046295
[ML] Removing _feature and _ignored from detector modal (#20984) 2018-07-19 16:39:42 +01:00
Nicolas Ruflin 469c00592f
Remove beta label from tutorial overview page (#20977)
Many modules are still in beta which made the beta label not very useful in the overview page. This disables the beta label for now.

The label is still shown when clicking on module.
2018-07-19 17:09:03 +02:00
Spencer b434652452
[kfetch] TypeScript-ify (#20914)
In order to make the awesome new kfetch api easier to consume in purely TypeScript projects, and since it's a pretty small module with very few dependencies, I converted it to TypeScript.

Along with kfetch I also started a type definition file for `ui/chrome` that we can extend as we go, but will likely be unnecessary after #19992
2018-07-19 06:31:44 -07:00
Leanid Shutau a091cf0bdb
Fix i18n default formats injection into en.json (#20929)
* Fix i18n default formats injection into en.json

* Use snapshots for tests
2018-07-19 14:48:43 +03:00
Tudor Golubenco c4436652ee
Add new tutorials: Osquery, RabbitMQ, and uWSGI (#20944)
* Osquery tutorial, under Security

* Rabbitmq tutorial

* uWSGI metrics tutorial

* Marked another two tutorials as Beta
2018-07-19 14:27:28 +03:00
James Gowdy 7a84e7871e
[ML] Changing edit job icon (#20935) 2018-07-19 08:21:10 +01:00
Aleh Zasypkin b4b55bdf7b
Document the way new platform is integrated into legacy one. (#20925) 2018-07-19 07:48:14 +02:00
Spencer 29d8ec48b2
[tslint] enable no-default-export rule (#20952)
Just like our ESLint rules, I think we should enforce named exports over default exports via TSLint. No changes to the code were necessary because of this linting rule because everyone is already following the pattern we established with ESLint, but TSLint wasn't actually verifying the pattern.
2018-07-18 19:22:19 -07:00
Tim Sullivan 274617de59
Stats API: implement the "kibana status" spec from the Monitoring data model for stats (#20577)
* [Stats API] Set API field names per spec

* fix jest tests

* fix api integration test

* trash the original metrics collector

- constantly accumulating stats over time does not align with the existing behavior, which is to reset the stats to 0 whenever they are pulled

* move some logic out of the collector types combiner into inline

- change the signature of sourceKibana

* Make a new stats collector for the API

- to not clear the data when pulling via the api
- fetching is a read-only thing

* isolate data transforms for api data and upload data

* no static methods

* remove external in bytes

* remove the _stats prefix for kibana and reporting

* update jest test snapshot

* fix collector_types_combiner test

* fix usage api

* add test suite todo comment

* reduce some loc change

* roll back mysterious change

* reduce some more loc change

* comment correction

* reduce more loc change

* whitespace

* comment question

* fix cluster_uuid

* fix stats integration test

* fix bulk uploader test, combineTypes is no longer external

* very important comments about the current nature of stats represented and long-term goals

* add stats api tests with/without authentication

* fix more fields to match data model

* fix more tests

* fix jest test

* remove TODO

* remove sockets

* use snake_case for api field names

* restore accidental removal + copy/paste error

* sourceKibana -> getKibanaInfoForStats

* skip usage test on legacy endpoint

* fix api tests

* more comment

* stop putting a field in that used to be omitted

* fix the internal type to ID the usage data for bulk uploader

* correct the kibana usage type value, which is shown as-is in the API

* more fixes for the constants identifying collector types + test against duplicates

* add a comment on a hack, and a whitespace fix
2018-07-18 16:37:04 -07:00
Aleh Zasypkin 2a645d2252
Log correct Kibana URL when TLS is enabled and log it only once. (#20721) 2018-07-19 01:27:32 +02:00
Nathan Reese 0f5322e3a5
scripted fields preview and validate script before saving (#20746)
* add preview for creating scripted fields

* Move previewed results into flyout.  (#25)

* Move previewed results into flyout. Execute script as soon as the tab is selected.

* Format error in a danger callout.

* add functional test for preview

* move executeScript functionallity into lib so it can be used to validate on save

* validate script on save

* add functional test for script validation during save

* fix jest tests

* fix jest tests

* only validate script when field is scripted

* only add script callouts and help flyout to DOM for scripted fields

* move scripting stuff to its own render method

* right justify delete button to have same style as delete button for user management

* use data-test-subj key to find invalid script error msg in functional tests

* move help flyout link out of formRow help text and into its own row
2018-07-18 17:06:12 -06:00
Spencer 5afd06b5e5
[devUtils/procRunner] wait for proc to exit so we fallback to SIGKILL (#20918) 2018-07-18 14:30:16 -07:00
Nicolas Ruflin fecbd11fd6
Add beta modules to add Data UI (#20923)
The following modules are added with the beta label:

* aerospike
* couchbase
* dropwizard
* elasticsearch
* etcd
* haproxy
* kafka
* kibana
* memcached
* munin
* windows
2018-07-18 20:19:04 +02:00
Nathan Reese 59b63c6a63
[home] Include ability to publish kibana saved objects from add data tutorial (#19559)
* add savedObjects to tutorial schema, add savedObjects to APM, add bulk create endpoint

* SavedObjectInstaller component

* bulkCreate fixes

* fix tutorial jest test

* update from sqren review

* updated copy

* move saved object json into seperate json files

* minor commit clean up

* ensure isMounted before setting state after async call, allow manifest to customize saved object install message

* remove duplicated logic for getting config xpack.apm.indexPattern

* refactor get index pattern title

* add functional test that loads APM saved objects

* remove extra await

* display overwrite message

* use angular free savedObjectClient

* functional test cleanup

* handle bulkRequest exception and add jest tests for SavedObjectsInstaller

* use Promise.reject instead of throw

* update copy
2018-07-18 10:57:25 -06:00
James Gowdy 3c74d30bee
[ML] Adding close jobs menu item (#20927)
* [ML] Adding close jobs menu item

* changing icon

* updates based on review

* adding extra check for close failure

* adding extra guard against missing response
2018-07-18 17:47:44 +01:00
Aliaksandr Yankouski 4445c58988
Use only core in browser environment, loader in node env (#20905)
* use only core in browser environment and loader only in node env

* do not reexport node stuff from browser
2018-07-18 18:02:37 +03:00
liza-mae 4551dfc0ad
Improve visualization tests (#20782)
* Improve tests for histogram, tag cloud, input controls and enable lab mode.

* enable skipped tests

* Update shakespeare test navigation to visualize

* Add sleep to shakespeare test

* Skip shakespeare test for now, it is not clear why it is failing and does not fail locally, need the other tests to run in CI

* Revert selector for selectAggregation, re-enable shakespeare test

* skip vega spec text test, was not fixed with changes

* Enable only visualize tests to run, need to see results and it's being blocked by other test failures

* Enable all tests again, visualization tests all passed

* Skipping sample data test due to bug #20807, let's see if rest of the tests pass
2018-07-18 07:31:17 -06:00
Walter Rafelsberger 651013b89c
[ML] Moves tooltip of info icon to top to avoid overlapping with corresponding form fields. (#20874) 2018-07-18 14:20:05 +02:00
Tim Roes 41fd042798
Move del to dependencies (#20921) 2018-07-18 13:55:23 +02:00
Spencer 8662475834
[core/ui] bootstrap the legacy platform within the new platform (#20699)
Fixes #20694

Implements super basic new platform `core` system, which includes two services: `core.injectedMetadata` and `core.legacyPlatform`. The `core` currently has two responsibilities:

 1. read the metadata from the DOM and initialize the `ui/metadata` module with legacy metadata, proving out how we plan to expose data from the new platform through the existing APIs/modules to the legacy platform.
 2. bootstrap the legacy platform by loading either `ui/chrome` or `ui/test_harness`

Because `core` mutates the `ui/metadata` module before bootstrapping the legacy platform all existing consumers of `ui/metadata` won't be impacted by the fact that metadata loading was moved into the new platform. We plan to do this for many other services that will need to exist in both the legacy and new platforms, like `ui/chrome` (see #20696).
2018-07-17 22:07:13 -07:00
CJ Cenizal a36b87ad3e
Add SearchStrategyRegistry and defaultSearchStrategy to support existing search behavior, and integrate it with CallClient. (#20497)
* Add SearchStrategyRegistry and defaultSearchStrategy to support existing search behavior, and integrate it with CallClient.
* Move fetch param logic from CallClient into defaultSearchStrategy.
* Move defaultSearchStrategy configuration into kibana plugin via search uiExport to avoid race conditions with other plugins.
* Add call-out react directive.
* Show error in Discover if user tries to access a rollup index pattern without the right search strategy. Sentence-case copy in field chooser.
* Add tests with multiple searchStrategies and fix errors in logic.
2018-07-17 18:49:46 -07:00
Stacey Gammon e90f652875
Bump eui (#20774)
* bump eui

* Fixed breaking `EuiPage` changes

Mainly adding `EuiPageBody`’s where there were none

* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots

* bump eui

* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots

* Update jest snapshots in xpack
2018-07-17 19:28:07 -04:00
liza-mae 861ff8aacc
Add telemetry false for dashboard tests (#20901) 2018-07-17 16:35:11 -06:00
Hanqing Zhao 17eebb9ba3 [kbn-plugin-generator] Fix plugin naming inconsistency (#20808)
<!--
Thank you for your interest in and contributing to Kibana! There
are a few simple things to check before submitting your pull request
that can help with the review process. You should delete these items
from your submission, but they are here to help bring them to your
attention.

- Have you signed the [contributor license agreement](https://www.elastic.co/contributor-agreement)?
- Have you followed the [contributor guidelines](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md)?
- If submitting code, have you included unit tests that cover the changes?
- If submitting code, have you tested and built your code locally prior to submission with `yarn test && yarn build`?
- If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
-->
Make relevant generated files use snakeCase instead of kebabCase
Closes #20524
2018-07-17 12:01:52 -07:00
CJ Cenizal 1a65b3577a
Update JS style guide with rule for prefixing private class methods with an underscore. (#20851) 2018-07-17 08:44:51 -07:00
Nick Peihl bea8bb4dda
Add link to maps.elastic.co to region maps docs (#20645) 2018-07-17 07:59:47 -07:00
Nathan Reese 2053441c33
fix flaky input control chained test (#20642)
* add check that combobox was successfully cleared

* run test 25 times

* checkin the correct files this time

* re-enable skipped test

* remove extra test loaders
2018-07-17 08:55:30 -06:00
Hendrik Muhs a0a22cfc12
[Monitoring/ML] add number of forecasts to monitoring overview (#20758)
Add forecasts (Number of forecasts for an ml jobs) as column to the ML Jobs monitoring page. Related to: elastic/elasticsearch#31647
2018-07-17 16:41:19 +02:00
James Gowdy 492fb01f8c
[ML] Better error notifications in jobs list (#20880)
* [ML] Better error notifications in jobs list

* removing test data
2018-07-17 14:27:28 +01:00
Leanid Shutau 9c9159ce0c
Implement a build tool for default messages extraction (#19620)
* Implement a build tool for default messages extraction

* Refactor extraction tool, resolve review comments, fix bugs

* Resolve comments, refactor extraction tool, fix bugs

* Add context to messages extraction tool

* Resolve comments

* Fix bugs

* Add messages extraction from .jade files, refactor code

* Add template literals parsing

* Return defaultMessages.json to plain structure

* Refactor utils

* Fix bugs

* Refactor code, resolve review comments, fix bugs

* Fix minor bug

* Get rid of '@babel/traverse' and add its native implementation

* Add handlebars messages extraction

* Fix mkdir on macOS

* Fix bugs, inject default formats, finalize the tool

* Fix filsystem permissions

* Refactor nodes traversal

* Update code style

* Downgrade @babel/types to fix build issues

* Resolve comments

* Fix minor bugs
2018-07-17 15:56:55 +03:00
Pete Harverson 6939f5073c
[ML] Adds page to ML Settings for viewing and editing filter lists (#20769)
* [ML] Add page to ML Settings for viewing and editing filter lists

* [ML] Edits to Filter Lists Settings page following review
2018-07-17 09:47:26 +01:00
Tyler Smalley ac1a922124
[test][kbn-plugin-helpers] Skip install dependencies (#20649)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-16 21:38:39 -07:00
Nathan Reese ffa6109014
properly render disabled range control (#20811)
* properly render disabled range control

* remove disabled from existing elements
2018-07-16 20:00:45 -06:00
Spencer fcc2c440f0
[tslint] add helper for running tslint on specific projects (#20866) 2018-07-16 17:46:47 -07:00
Felix Stürmer 4b255e9fe9
Upgrade typescript to 2.9.2 (#20757)
This upgrades TypeScript to version 2.9.2. My main motivation is the support for generic type arguments in JSX elements and tagged templates (e.g. for `styled-components`).

Problems arising from breaking changes in the new TypeScript version have been mitigated by:

* setting the `keyofStringsOnly` option until impacted code has been
  future-proofed
* Restricting some joi-related generics

See the [release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html) for details.

Some follow-up tasks should be:

* Update EUI to support the new `keyof` behaviour
* Update new platform TypeScript code to support new `keyof` behaviour
* Remove `keyofStringsOnly` setting
2018-07-17 00:31:05 +02:00
Spencer 4f867a25d1
[esArchiver/test] use different lengths for random to ensure unique values (#20857)
fixes #20741

Rather than just generate random words with the default length of 2, generate a random 5 letter word for the type to filter by and 10 letter words for the other types, so there will never be more than 3 records with `type1`.
2018-07-16 14:36:05 -07:00
debadair c488f7edc1
[DOCS] Tweaked Elasticsearch Service links for SEO 2018-07-16 13:19:05 -07:00
Tim Sullivan 8ba773a498
Add Beats module and input info to Telemetry (#20648)
* fix metrics field name (stats)

* add state info

* add module name count

* use a set for the unique hosts instead of a map

* fix getting beats_state info

* fix unit test

* processBeatsStatsResults and processBeatsStateResults
2018-07-16 12:57:26 -07:00
CJ Cenizal ea1c0a6757
Remove courier:searchRefresh angular event from searchPoll. (#20850) 2018-07-16 11:50:46 -07:00
Tim Roes 61f50dd30c
Fix flickering of vislib on refresh (#20817) 2018-07-16 18:36:50 +02:00
James Gowdy 54cf83d360
[ML] Jobs list bug fixes (#20823) 2018-07-16 16:33:59 +01:00
Tyler Smalley 46bacc6c64
Workaround for yarn interdependency conflicts (#20805)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-16 07:42:49 -07:00
Aliaksandr Yankouski adc4185898
Split i18n engine to specific parts by tech and by env (#20513)
* split to packages in accordance to specific library

* split to packages depending on tech and environment

* make env modules names consistent

* remove intl polyfilling

* move laoder to root, i18n folder to core
2018-07-16 17:02:06 +03:00
James Gowdy 6ddc9db376
[ML] Removing hardcoded datafeed ID in jobs list (#20815) 2018-07-16 12:44:59 +01:00