Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra UI] Merge master and adapt to browser side kibana api changes #21077

Conversation

weltenwort
Copy link
Member

This merges Kibana master into the feature branch and fixes some minor breakages due to Kibana api changes.

LeanidShutau and others added 30 commits July 17, 2018 15:56
* 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
* [ML] Better error notifications in jobs list

* removing test data
…ic#20758)

Add forecasts (Number of forecasts for an ml jobs) as column to the ML Jobs monitoring page. Related to: elastic/elasticsearch#31647
* 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
<!--
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 elastic#20524
* 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
…ting search behavior, and integrate it with CallClient. (elastic#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.
…tic#20699)

Fixes elastic#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 elastic#20696).
* 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 elastic#20807, let's see if rest of the tests pass
* use only core in browser environment and loader only in node env

* do not reexport node stuff from browser
* [ML] Adding close jobs menu item

* changing icon

* updates based on review

* adding extra check for close failure

* adding extra guard against missing response
…tutorial (elastic#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
The following modules are added with the beta label:

* aerospike
* couchbase
* dropwizard
* elasticsearch
* etcd
* haproxy
* kafka
* kibana
* memcached
* munin
* windows
)

* add preview for creating scripted fields

* Move previewed results into flyout.  (elastic#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
…a model for stats (elastic#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
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.
* Osquery tutorial, under Security

* Rabbitmq tutorial

* uWSGI metrics tutorial

* Marked another two tutorials as Beta
* Fix i18n default formats injection into en.json

* Use snapshots for tests
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 elastic#19992
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.
cjcenizal and others added 17 commits July 19, 2018 15:05
…e 'No results' feedback, when there were no failures. (elastic#21003)
* PostgreSQL module
* Added Logstash logs module
* Added Elasticsearch logs module
* Added IIS logs module
* Traefik logs tutorial
* Golang
* Logstash
* Prometheus
* Zookeeper
* Add vSphere Metricbeat module tutorial
* Change painless scripted field

* Remove wrong char

* Remove invalid escape chars
* Replace notify.warning with toastNotifications in region map, vega, index_pattern, redirect_when_missing, graph, monitoring, and ML
* Link to index patterns from Graph toast.
* Delete RouteBasedNotifier.
* Remove courierNotifier and SearchTimeout and ShardFailure errors.
* Remove warning and custom notifier types.
* [ML] Adds editor for configuring detector rules

* [ML] Edits to Rule Editor flyout following review
* avoid day long gaps in sample data

* avoid using toISOString to avoid an timezone problems

* unskip sample test now that problem is fixed

* use much better cj algorithm for translating time

* cjcenizal review updates

* update funtion name in install.js

* push source reference date back a week
- Migrates the ml-form-label directive to use EUI/React.
- Exposes both FormLabel and JsonTooltip as React components from individual files so they can be used in a React context when the wrapping element also has been already ported to React.
- Adds jests based tests for the FormLabel and JsonTooltip components. They try where possible to make the same assertions like the mocha based tests. The mocha based tests are kept in the code for now so the code gets still tested in a angular based context and as a reference to have the same mocha/jest based tests side by side as a reference for migration.
- The FormLabel component is done in a way so it supports transclusion in both cases when used with React alone (using the children prop) and angularjs (using a ref callback and angular's transclude()).
@weltenwort weltenwort self-assigned this Jul 23, 2018
@weltenwort weltenwort requested a review from simianhacker July 23, 2018 11:39
@elasticmachine
Copy link
Contributor

💔 Build Failed

@weltenwort weltenwort removed the request for review from simianhacker July 23, 2018 15:16
@elasticmachine
Copy link
Contributor

💔 Build Failed

@weltenwort
Copy link
Member Author

jenkins, test this again

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@weltenwort weltenwort merged commit b138b63 into elastic:feature-infra-ui Jul 23, 2018
weltenwort added a commit that referenced this pull request Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.