Commit graph

3749 commits

Author SHA1 Message Date
Nathan Reese
bd4b7a03ea
show link to Maps application in create new visualize menu (#39191)
* show link to Maps application in create new visualize menu

* use VisTypeAlias for typing

* change title to just Maps

* add betaBadge for visTypeAlias menu items

* typescript whack-a-mole round one

* typescript whack-a-mole round 2

* typescript whack-a-mole round 3

* update text based on gchaps feedback

* typescript whack-a-mole round 4

* typescript whack-a-mole round 5

* fix defaultMessage problem

* update jest snapshots

* simplify VisHelpText

* wrap description in p element

* move register_vis_type_alias.js to legecy folder
2019-06-21 15:07:52 -06:00
Justin Kambic
c3c5e92455
[Uptime] Replace deprecated EUI charts (#34313)
* WIP adding new charts.

* Replace remaining charts.

* Update charts on monitors view.

* Working on getting y0 to work for duration chart.

* Add date label module.

* Improve label generation code.

* Extract charts to dedicated components.

* Move monitor charts to dedicated charts directory.

* Extract datemath to context.

* Merge master.

* Add hidden access to monitor list bar series to format tooltip date value.

* Update unit tests for helper formatting function.

* Update helper label getter function tests.

* Refactor simplify code.

* Add jsdoc comment to checks chart function.

* Translate bare heading string.

* Translate axis headings for duration chart.

* Extract map instantiation and clean up variable names for duration chart.

* Extract map instantiation and clean up variabble names for checks chart.

* Add jsdoc comment to helper colors function.

* Add comments to snapshot histogram props. Remove obsolete props. Move histogram to charts directory.

* Remove unneeded code, translate heading of duration chart.

* Remove unneeded code.

* Remove obsolete props from snapshot component.

* Remove unneeded style.

* Remove imports of deprecated charts.

* Add comment to test.

* Add jsdoc and improve symbol naming for new helper function.

* Perfer floor to round for conversion function.

* Remove unnecessary addition to x-pack package.json file.

* Update comments, props order.

* Extract helper function to dedicated file.

* Update test snapshots to fix outdated tests.

* Update chart components to preserve existing translation values.

* Preserve translations for new charts components.

* Write snapshot tests for new components.

* Delete tests.

* Update label generation logic to attach hours to wider delta.

* Update chart labels.

* Remove unneeded @ts-ignore, fix domain prop.

* Remove renderer props from chart components.

* Set yScaleToDataExtent to false for line series.

* Specify timeZone prop for all ScaleType.Time charts.

* Update obsolete test snapshots.

* Remove reliance on context date values from deep functional components.

* Add missing reference to absolute times.

* Supply absolute date values from Overview page to child components.

* Remove unneeded import.

* Move headings outside of panels.

* Translate untranslated string.

* Delete invalid prop.

* Delete unneeded default prop.

* Attempt to undo changes to yarn.lock file.

* Rename new files to ~/x-pack/legacy path.

* Fix misplaced directory.

* Fix broken test snapshots.

* Delete obsolete files.
2019-06-21 14:56:41 -04:00
Daniil Suleiman
3d4a3ce673
[Vis: Default editor] Euificate vis-editor-agg-add (#38898)
* Euificate vis-editor-agg-add

* Rebuild UI and fix functional tests

* Make all labels sentence case

* Disable schema instead of filter

* Calculate disabled only in open state
2019-06-21 16:01:22 +03:00
Chris Cowan
2f029e63d0
Fixes 36818 - Metrics Explorer action menu to honor uiCapabilities (#36824)
* Fixes 36818 - Metrics Explorer action menu to honor uiCapabilities

* making test description clearer

* Fixing uiCapabilities
2019-06-20 21:47:38 -05:00
Mike Côté
98f7c75ff4
Introduce basic alerting and actions plugin (#37042)
* Create actions plugin (#35679)

* Basic alerting plugin with actions

* Remove relative imports

* Code cleanup

* Split service into 3 parts, change connector structure

* Ability to disable plugin, ability to get actions

* Add slack connector

* Add email connector

* Ability to validate params and connector options

* Remove connectorOptionsSecrets for now

* Fix plugin config validation

* Add tests for slack connector

* Default connectors register on plugin init, console renamed to log, slack to message_slack

* Add remaining API endpoints for action CRUD

* Add list connectors API

* Change actions CRUD APIs to be closer with saved objects structure

* WIP

* Fix broken tests

* Add encrypted attribute support

* Add params and connectorOptions for email

* WIP

* Remove action's ability to have custom ids

* Remove ts-ignore

* Fix broken test

* Remove default connectors from this branch

* Fix API integration tests to use fixture connector

* Rename connector terminology to action type

* Rename actionTypeOptions to actionTypeConfig

* Code cleanup

* Fix broken tests

* Rename alerting plugin to actions

* Some code cleanup and add API unit tests

* Change signature of action type service execute function

* Add some plugin api integration tests

* Fix type check failure

* Code cleanup

* Create an actions client instead of an action service

* Apply Bill's PR feedback

* Fix broken test

* Find function to have destructured params

* Add tests to ensure encrypted attributes are not returned

* Fix broken test

* Add tests for validation

* Ensure actions can be updated without re-passing the config

* Remove dead code

* Test cleanup

* Fix eslint issue

* Apply Peter's PR feedback

* Code cleanup and fix broken tests

* Apply Brandon's PR feedback

* Add namespace support

* Fix broken test

* Pass services to action executors (#37194)

* Pass services to action executors

* Fix tests

* Apply PR feedback

* Apply PR feedback pt2

* Cleanup actions plugin (#37250)

* Cleanup actions, move code from alerting plugin PR

* Rename service terminology to registry

* Use static encryption key for encrypted attributes plugin inside of tests

* Empty data after create test is done running

* Fix type checks

* Fix inconsistent naming

* add server log action for alerting (#37530)

adds the first "builtin" alertType for performing a `server.log()`

* Create alerting plugin (#37043)

* WIP

* Rename fire function and remove @ts-ignore in all places

* Change naming in alerting service

* Remove alert instance class for now, support interval configuration

* Cleanup TS

* Split alerting between registry and client

* Use saved object alongside task manager instance

* Add remaining alerting APIs

* Change create structure

* Rename some variables, change actionGroups structure

* Use handlebars for templating strings at fire time

* Fix params given to alert type execute function

* Use alert instance class

* Alert instances support meta attributes

* Move alert instances deserialization

* Change interval to be ms

* Rename actions es archive

* Fix tests to use encrypted esArchive for action record

* Add create alert test to demo end to end flow

* Fix type check issue

* Alerts to use references to action objects

* Only update task manager tasks after saved objects are fully updated

* Use scope in task manager

* Fix type check

* Use task manager to execute actions

* Convert ids into references and back

* Apply PR feedback

* Fix broken test

* Fix some bugs

* Fix test errors

* Alert interval to be previous runAt + interval instead of now + interval

* Add range support

* Remove extra line

* Cleanup

* Add alert_instance.test.ts

* Add alert_type_registry.test.ts

* Move tests around

* Create generic task manager mock

* Add note about saved objects client mock

* Create alert_type_registry.mock.ts

* Add alerts_client.test.ts

* Add create_alert_instance_factory.test.ts

* Add create_fire_handler.test.ts

* WIP

* Fix get_create_task_runner_function.test.ts and make test pass

* Make get_create_task_runner_function.test.ts 100% coverage

* Add unit tests for routes

* Move files around

* Created transform_action_params.ts

* Add get_next_run_at.ts

* Add comment explaining why we copy nextRunAt

* Re-use state within alert instance

* Finalize code coverage in unit tests

* Create base api integration tests

* Add a test that ensures end to end functionality of an alert

* Fix ui capabilities test

* Fix broken plugin api integration test

* Fix jest tests with new saved objects client

* Fix broken integration tests

* Change api integration test fixture to make more sense, add functions for future tests

* Move alerts integration testing into own file, prep to add more tests

* Add tests to ensure failed task instances get retried

* Add get_create_task_runner_function.test.ts for actions, create encrypted saved objects mock

* Add action validation tests

* Ensure action type validation occurs on update

* Test 400 on unregistered alert types

* Ensure alertTypeId can't be updated

* Add validation test for alert create / update

* Fix broken checks / tests

* Skip failing test for now

* Cleanup jest tests

* Ensure action objects can be updated while keeping encrypted attributes readable

* Remove partial update sopport, remove ability to change actionTypeId, require config

* Ensure actionTypeConfig is validated on create and update

* Add alertTypeParams validation support

* Fix failing tests

* Ensure alert cleanup errors don't replace the original error

* Pass callCluster as a service to alerts and actions

* Only pass log to alerts client

* Pass savedObjectsClient as a service to alerting and actions

* Fix failing tests

* Remove range support, provide when current and previous task got scheduled

* Ensure Joi validation happens before every execute

* Remove skipped tests, to be done in future PR

* Apply self feedback pt1

* Apply self feedback pt2

* Fix broken tests

* Apply PR feedback

* PR feedback pt1

* Apply security team PR feedback

* PR feedback pt1

* PR feedback pt2

* PR feedback pt3

* Fix broken tests

* Fix callCluster to have signature

* Revert f11a6aeb06

* PR feedback pt4

* Remove __jest__ folders

* PR feedback pt5

* Fix Joi from leaking secrets

* Fire instance actions in parallel instead of series

* Fix failing jest tests

* Accept core api changes

* Fix saved objects client mock

* PR feedback pt1

* Fix eslint issues

* Throw error when alert instance already fired (#39251)

* Throw error when alert instance already fired

* shouldFire doesn't need its own boolean value

* Actions & alerting getting started user guides (#39093)

* Initial user guides

* Cleanup

* Typos, example changes

* Switch to tables, use ordered list for usage

* Start docs around alert instances and templating

* Documentation changes

* Some adjustments

* Apply PR feedback

* Apply suggestions from code review

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* PR feedback pt2

* Provide better examples for alert types

* Apply PR feedback

* Update README locations
2019-06-20 19:37:17 -04:00
Josh Dover
5941436e1b
Remove final legacy dependencies from Header UI (#38175)
* Remove final legacy dependencies from Header UI

* Address @eliperelman comments

* Move files for x-pack move
2019-06-20 15:57:02 -05:00
Court Ewing
2d171c92f5 Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
Court Ewing
7ac8e4d9cc Move x-pack plugins/server/common to x-pack/legacy 2019-06-20 13:34:48 -04:00
Alison Goryachev
d4abdc7a06
[IM] warn user before closing or deleting kibana index (#39018) 2019-06-20 09:48:08 -04:00
CJ Cenizal
bcb9d5fc92
Fix broken reference to prependBasePath in Remote Clusters shim. (#39277) 2019-06-20 06:46:47 -07:00
Casper Hübertz
bc1e90068e
[APM] Fixed positioning of CTA button (#39332) 2019-06-20 14:54:06 +02:00
Henry Wong
658d50440e
[code] Enrich the client capabilities with markup kind. (#39153)
In the lsp specification, initialize request can provide capability
options to the language server. However, for the minimize influence on
other language servers, nest capabilitiy options into `initialOptions`.
If there is no client capability options explicitly, use the one nested
 in `initialOptions`.
2019-06-20 13:47:55 +08:00
Fuyao Zhao
887151da10
[Code]: Upgrade ts langserver version (#39321) 2019-06-19 19:49:02 -07:00
Yulong
5ad6ae7616
[Code] Cancel requests if workspace is unloaded (#39062)
* [Code] Cancel requests if a workspace is unloaded
* [Code] clear unnecessary code proxy
2019-06-20 09:32:41 +08:00
Chris Cowan
a9badb9af2
[Infra UI] Fixes 38141 - Allow Metrics Explorer to set KQL filters in TSVB (#38280)
* Change TSVB link to use KQL for filters; Apply filterQuery to TSVB requests

* Add test for filterQuery in TSVB data

* Reverting yarn.lock

* updating tests; removing derivedIndexPattern

* Removing commented out code

* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts

Co-Authored-By: Felix Stürmer <weltenwort@users.noreply.github.com>

* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts

Co-Authored-By: Felix Stürmer <weltenwort@users.noreply.github.com>

* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/populate_series_with_tsvb_data.ts

Co-Authored-By: Felix Stürmer <weltenwort@users.noreply.github.com>

* Escaping possible double quotes in id fields and adding test case
2019-06-19 17:47:48 -05:00
Zacqary Adam Xeper
e22d7d795a
[Logs UI] Shrink log stream when window is resized (#38937)
* [Logs UI] Shrink log stream when window is resized

* Avoid using window resize events for width
2019-06-19 16:25:50 -05:00
Vadim Dalecky
071a52d4d4
No common registry implementation (#39168)
* refactor: 💡 use new Map() in Embeddables

* refactor: 💡 remove IndexPatternCreationConfigRegistry

* refactor: 💡 make indexPatternTypes registry semantic

* fix: 🐛 fix TypeScript errors
2019-06-19 22:21:15 +02:00
Nathan Reese
7b5b6e4e02
[Maps] Move set view to toolbar control, show zoom level in view control (#38925)
* break out ToolsControl from ToolbarOverlay component

* move set view control to toolbar overlay component

* fix i18n

* use cchaos approved top calculation in scss

* fix functional tests by updating lat,lon, and zoom state when props change

* do not set state from props in constructor, only set state from props in getDerivedStateFromProps

* provide default value for isSetViewOpen in store

* just pass needed params to connect
2019-06-19 10:53:25 -06:00
Walter Rafelsberger
1ca0953832
[ML] Data Frames: Rename target index to destination index. (#39239)
Renames all occurrences of "Target Index" to "Destination Index" in both code and UI to match how it is referred to in the transform configuration.
2019-06-19 18:48:15 +02:00
Artyom Gospodarsky
b6f472af59
[TSVB] Replace deprecated moving_avg by moving_fn aggregation (#36624)
* Take model options away in a separate file

* Connect user scripting to models

* Add inputs to the panel for managing alpha, beta, gamma params

* Cover model types and scripts by tests

* Change default export of the bucket transform to the permanent one and write tests for moving_average

* Add a migration script from mov_avg to mov_fn

* Remove redundant translations

* Remove old tests

* Fix issues of PR

* Revert yarn.lock

* Fix issues regarding localization

* Remove extra license

* Remove redundant translations

* Move the replaceMovAvgToMovFn hook to 7.3.0

* Fix reviews

* Add a migration test

* Set proper default values and turn hint on for holt-winter only

* Format touched files by Prettier

* Import settings from moving_avg

* Wrap changes to the try/catch statement and log exceptions
2019-06-19 19:47:41 +03:00
Mengwei Ding
88a5a86349
[Code] Improve error logging (#39137)
* [Code] Suppress the get index request count error if index request has been cancelled

* [Code] Skip index data migration if the original index does not exist
2019-06-19 08:38:54 -07:00
Mikhail Shustov
a75d777bea
New Platform and Legacy platform servers integration (#39047)
* New and Legacy platforms share http server instance.

Required to use a common security interceptor for incoming http requests

* generate docs

* remove excessive contract method

* add test for New platform compatibility

* address comments part #1

* log server running only for http server

* fix test. mutate hapi request headers for BWC with legacy

* return 503 on start

* address @eli comments

* address @joshdover comments
2019-06-19 16:32:37 +02:00
Matthew Kime
80eb1e1583
d13n docTitle (#39162)
* refactor doc title so it can be used outside of angular service
2019-06-19 09:31:42 -05:00
Larry Gregory
7e4e8fee54
Spaces - New Platform Migration, Step 1 (#35429)
* crude test updates

* remove custom server typedef

* allow spaces to aquire security plugin after init

* split CoreSetup into CoreSetup and PluginsSetup

* move interfaces to new plugin

* init interceptors in legacy plugin

* fix import

* add placeholder kibana.json

* use NP Elasticsearch service instead of legacy ES Plugin

* cleanup imports

* don't destructure the es client

* introduce request facade

* document reason for getSecurity

* prefer relative imports from src/core

* fix typo in filename: inteceptors --> interceptors

* fix imports; remove stray ts-ignore

* improve typings for spaces client

* rename InterfaceExcept --> Omit

* don't use legacy config in NP

* additional comment

* shim NP config service

* fix merge from master

* revert relative imports into src/core and src/legacy

* shim capabilities modifier into new platform

* removing placeholder kibana.json

* fix prettier problem

* temporary: patch NP 'setUrl'

* migrate onRequest interceptor to NP, without tests

* fix ts error

* testing and deps cleanup for onRequestInterceptor

* replace spaces's usages of request.getBasePath with http.getBasePathFor

* add explicit timeouts for jest interceptor tests

* attempt to fix imports

* use NP logging instead of faked implementation

* revert stray yarn.lock change

* attempt to stablize and fix tests

* update jest config to include src/core/server/mocks

* fix plugin config typings

* add service tests

* fix merge

* allow spaces service to also work with legacy requests

* update interfaces to confirm to new internal/external API convention

* re-enable some post auth interceptor tests

* add explicit timeouts for tests

* prefer modifyUrl instead of manual url modification

* update logger shim to conform to PluginInitializerContext

* remove spaces ConfigClass

* don't weaken type declaration for scoped cluster client calls

* remove legacy server from SpacesCoreSetup

* remove spaces service cache

* remove legacy server as an interceptor dependency

* use modifyUrl on the raw request too

* remove unused import

* cleanup typings

* replace onRequest interceptor with new onPreAuth interceptor

* fix onPostAuth tests

* temporarily copy modifyUrl into spaces plugin

* fix mock export

* fix merge from master

* spaces scopedClient always uses updated ES client and config

* improve typings for usage collector

* rename isLegacyRequest -> isFakeRequest

* use updated NP base path API

* remove commented code

* only expose scoped spaces client

* use OptionalPlugin instead of getSecurity

* update imports of Saved Objects Service to use new src/core/server location

* update core docs
2019-06-19 10:08:54 -04:00
Alison Goryachev
a1ed573cde
check permissions before loading license management actions (#39183) 2019-06-19 09:14:37 -04:00
Dario Gieselaar
101dea21dd
[APM] Display parsed user agent in Transaction Details (#39064)
* [APM] Display parsed user agent in Transaction Details

- Update Transaction typings to include user_agent
- Display user agent fields in Transaction Details if available

* Replace identity with Boolean to prevent unnecessary lodash import
2019-06-19 14:56:14 +02:00
Pete Harverson
85e8ee758b
[ML] Set noopener feature for custom URLs which use absolute URLs (#39161)
* [ML] Set noopener feature for custom URLs which use absolute URLs

* [ML] Add comments around regex testing for external URL
2019-06-19 11:34:02 +01:00
Yulong
0120f7cb57
[Code] Fix some texts cannot be hovered in blame page (#39233) 2019-06-19 14:38:30 +08:00
Yulong
0ed5ce2d03
[Code] Fix hard coded doc version link in app (#39232) 2019-06-19 10:54:39 +08:00
Aaron Caldwell
b1911e9269
[File upload] New plugin: file upload (#36404)
* Add file upload x-pack plugin

* Clean up

* Remove unneeded cluster config

* Remove unneeded test

* First pass basic telemetry (not connected).

* Basic telemetry connected

* Review feedback

* Revise telemetry to use savedObjectRepository. Capture metrics on app and file types

* Lots of cleanup, consolidation of logic

* Clean up, reorg

* Update telem tests and telem functions

* Add back import data model

* Clean up and update telemetry tests

* Fix telemetry test issues and update corresponding code

* Up chunk limit to 30 MB

* Add file upload telemetry to saved objects management builder

* Missing space

* Add descriptive comments to dynamic keys in telemetry fields

* [Maps] [File upload] Geojson upload (#36410)

* Client side basics

* File added and default named correctly

* Connect transient layer removal to file import component

* Simplify transient layer removal

* Move file import ui over to new file upload plugin and make more generic

* Add post-processing option to file upload. Make component json-specific

* Add flag for source indexing

* Revise import layer workflow to be separate from add layer workflow

* Differentiate between normal sources and import sources. Add back layer add/next button

* Update indexing boolean in component after file upload & parse

* First pass rough indexing from maps working on specific use cases

* Update parsing logic to handle geojson formats

* Index pattern added following index creation

* Pass onsuccess callback to file_upload to add layer to maps app

* Handle mulltipolygon type in es geo utils

* Add functionality to make es layer permanent and switch to edit panel

* Add to index if exists or create new

* Make plugin API more intuitive. Set up to handle remove action

* Pass transient removal call through to file import

* Clean up layer viewing logic for temp and perm layers

* Remove change source from import screen

* Add option to provide mappings array and pass geo_point and geo_shape to array

* Add support for multiple mappings select and index naming

* Match style of import file button to add layer for now

* Remove duplicate case handling resulting from merge

* Move geo processing logic over to file upload plugin for reuse

* Remove old geo_shape formatting from geo_point code

* Set default index data type. Remove unneeded stringify request logic

* Check for custom processor object which contains function

* Move file picker to separate component

* Some cleaning. Add geojson clean & validate code

* Catch file parsing errors and notify user

* Disable index type if valid file not referenced

* Set error messaging on invalid index name used

* Add index pattern checking logic and error handling

* Dynamically populate geo index options

* Set index data type earlier in the workflow. Don't duplicate requests

* Pass back index ready status from plugin and connect to layer next button

* Increase max bytes to ~50MB

* Don't parse files over max size & warn user. Also, remove toasts and warn similarly to other components

* Uploaded file default label: 'fileToImport' -> 'Import File'

* Expand out feature properties for mapping

* Pass through telemetry data to plugin back-end

* Clean up indexing flow. Separate creation of index patterns. Add new index pattern create callbacks

* Pass back info for indexing failures but don't connect to UI yet

* Fix telemetry test issues and update corresponding code

# Conflicts:
#	x-pack/plugins/file_upload/server/telemetry/telemetry.test.ts

* Add file upload telemetry to saved objects management builder

* Missing space

* Add descriptive comments to dynamic keys in telemetry fields

* Divide up the import layer add workflow on the maps side and tweak to avoid layer color change

* Fix bug affecting file preview replacement not updating coordinate index type

* Remove index pattern. Organize effects. General clean up

* preIndexTransform -> transformDetails

* Update proptypes

* Cleaning, organizing

* Add index name guidelines. Show conditionally

* Add file size, type guidance. Filter on file size, not chunk size. Small tweaks to file/index tips

* Zoom to layer extent on preview of imported data

* Revert "Revise import layer workflow to be separate from add layer workflow"

This reverts commit 3b35f5371d.

* Handle import file determination to accomodate add layer flow. Update card wording

* Decompose addLayer component into smaller pieces. Add placeholder import progress component

* Dynamically change footer button text for context

* Move import card to top of sources

* Get basic progress tracking in place

* Allow second layer (indexed layer) to get removed. Reconnect file remove. Small UI tweaks

* Add link to management for further index mods

* Fix i18n failures

* Add file parsing progress indicator & text

* Reset importView on source reset

* Add dynamic chunking to handle fluctuating data sizes common to geo features

* Don't duplicate index request if request in flight

* Modify json upload and import to use JS classes & react class component state

* Transition remaining file_upload components over to class/component structure with state

* Move functions into index_settings class

* Review feedback

* Add fetch with timeout

* Split out import editor into separate component and clean up logic

* Clean up add layer panel/button title logic

* More cleanup

* Tweaks to success and error handling flow

* Handle success/error handling on add/view indexed data

* Jump to indexing complete on error. Handle nothing returned to client app

* Update name/location of source select css file

* Update import source card border color and icon

* Suggest name for index based upon file name

* Add validation to auto-suggested index name/pattern

* Use constants for geo_point and geo_shape in mappings

* Update geojson upload card/description

* Catch-all review feedback

* Fix internationalization syntax errors

* Review feedback

* Get index names and patterns only when needed

* Make addLayer async again to fix zoom to extent issue, waits on just the async syncDataForLayer function (which is async)

* Remove panel description as derived state and shift to function

* Remove geojson fit to extent for now

* Remove unused class selector

* Remove unneeded i18 wrapper for what's already passed in as an i18 element

* Revise import state to be handle via redux. Some json upload args changes

* Review feedback. Some cleanup and bug fixes

* Roll back store actions changes and layer_addpanel changes related to color change

* Follow scss file naming conventions for source_select

* Review feedback

* Restore clobbered layer_control view to master state. Add source_select css

* Update import to use plugin local indexPatternService, not maps'

* Review feedback, mostly i18n. Also add index to scss path

* i18n translation updates

* Assign error message to values rather than error object

* Update getMapColors to filter out transient layer

* Wrap Feature as FeatureCollection in Maps

* Add jest tests for geo processing functions. Add fixes for single feature handling

* i18n

* Review feedback. Test cleanup/fixes

* Update layer add panel footer logic to still show when source not selected

* Fix issue of not recognizing MultiPoint type. Remove throw logic for now

* Update telemetry with newly required placeholder function

* Prevent external modification of nested geojson objects

* i18n translation updates

* Revert "Fix issue of not recognizing MultiPoint type. Remove throw logic for now"

This reverts commit d692f913f8.

* Revert "Prevent external modification of nested geojson objects"

This reverts commit 0ea9fd3336.

* yarn.lock update

* [File upload] Remove dynamic fields from mappings, code and telemetry test (#38902)

* Remove dynamic fields from mappings, code and telemetry test

* Add file-upload-telemetry to spaces and es archiver test mappings

* Don't create telemetry saved object if none exists, create on first update instead

* Back out es archiver mappings update
2019-06-18 18:32:31 -06:00
Nathan Reese
20bbb9c164
[Maps] add Symbol orientation style property (#39129)
* add UI for symbol orientation styling

* set icon-rotate layout property

* fix jest test with new default style property value

* remove some references to scaled and use styling instead
2019-06-18 18:09:33 -06:00
Angela Chuang
0bf36ac252
[SIEM] Update Scale types for charts (#38512)
* change Scale types for charts

* update mock data

* add unit test for rendering charts with configs

* add timezone and formatter for charts

* update mock implementation for ui/chrome

* update snapshot
2019-06-19 02:51:26 +08:00
Larry Gregory
f059452f84
Spaces - use kfetch in SpacesManager (#39102) 2019-06-18 13:25:51 -04:00
James Gowdy
89892ba097
[ML] Fixing server side logger after new platform change (#39154) 2019-06-18 15:18:44 +01:00
Xavier Mouligneau
78d0c0f75a
[SIEM] - Refactor url state (#39136)
* refactor url state with hooks

* adapt unit testing to refactor + add new ones

* review I

* review II
2019-06-18 09:13:01 -04:00
Kerry Gallagher
d88d5278c1
Update usage based on recommendations in #36761 (#39090) 2019-06-18 13:43:07 +01:00
Stacey Gammon
17b185c1f8
Consolidate TimeRange, Query and Filter types. Stop exporting/importing from embeddables. (#39074) 2019-06-18 07:47:30 -04:00
Tim Roes
b550bfd810
Rename Visual Builder to TSVB (#39125)
* Rename Visual Builder to TSVB

* A, B, C, D, E, F, G ...
2019-06-18 13:30:11 +02:00
Rudolf Meijering
260d907f90
[Core] Move Saved objects files to core (#38771)
* Move src/legacy/server/saved_objects -> src/core/server/saved_objects

* Fix SavedObject import references after moving files to core

* First pass at SavedObjects api docs

* Expose and import all saved object types through core/server

* Don't expose SavedObjectsManagement from core and fix imports

* Improve typings for SavedObject error helpers

* Fix type errors after master merge

* Fix SavedObjectErrorHelpers tests
2019-06-18 13:10:23 +02:00
spalger
9d82f65a2a remove flaky tests (#38791) (#38849) (#39055) 2019-06-18 03:43:30 -07:00
WangQianliang
9d292232cd
fix(code/frontend): should match exactly the container name (#39046) 2019-06-18 09:43:25 +08:00
Yulong
ee6a22dde8
[Code] bump nodegit version, to fix ssl issue in centos (#39057) 2019-06-18 09:41:09 +08:00
Jason Rhodes
b20a8e2ff4
Shared observability code baseline (#36912)
* Simple baseline for using an x-pack faux plugin to share code

* Fixed directory structure and clarified README

* Clarifies README after feedback
2019-06-17 19:10:02 -04:00
Nathan Reese
a3a1e0c18d
[Maps] use coalesce to ensure number always passed to interpolate for data driven size styling (#38427)
* [Maps] use coalesce to ensure number always passed to interpolate for data driven size styling

* update docs with behavior when feature property is not defined

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* move first note into description paragraph

* add coalesce wrapper around icon-size extraction expression
2019-06-17 15:14:53 -06:00
Frank Hassanabad
8032f82b18
[SIEM] Enhance URL to handle ISO-8601 date times within them. (#39045)
## Summary
* Added ISO Handler called normalizeTimeRange
* Added unit tests
* Implemented and tested with Machine Learning Jobs to ensure it works as expected
* Moved around Omit Utility to the common area
* https://xkcd.com/1179/
### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~
~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2019-06-17 14:58:41 -06:00
Melissa Alvarez
c47a0d5cdf
[ML] New Platform Migration - server (#38360)
* wip: pull out all server dependencies

* create new platform plugin

* shim newPlatform plugin into legacy init

* update server tests for migration refactor

* cleanup interfaces

* Only add ML links for sample data sets if full license from - 38120

* update test and fix typescript errors

* Remove unused types
2019-06-17 16:08:13 -04:00
Dario Gieselaar
4526e2a2b5
[APM]: Inferred types for aggregations (#37360)
* [APM]: Inferred types for aggregations

Previously, aggregations returned by the ESClient were 'any' by default, and the return type had to be explicitly defined by the consumer to get any type safety. This leads to both type duplication and errors because of wrong assumptions.

This change infers the aggregation return type from the parameters passed to ESClient.search.

* Fix idx error

* Safeguard against querying against non-existing indices in functional tests

* Improve metric typings

* Automatically infer params from function arguments

* Remove unnecessary type hints
2019-06-17 21:56:23 +02:00
Dario Gieselaar
16fffe0a95
[APM] Don't redirect to default sample before data has been loaded (#39069)
Fixes an issue w/ the transaction sample redirect being too aggressive & redirecting to the default sample before the data has been fully loaded. This makes deeplinking to samples unreliable.
2019-06-17 21:39:57 +02:00
Zacqary Adam Xeper
d5d4d6bf2c
Change 'Metrics explorer' to 'Metrics Explorer' (#39101) 2019-06-17 13:46:55 -05:00
Corey Robertson
6b3ffb8491
Convert common/lib files to Typescript and Jest (#37640)
* Remove unused lib and associated tests

* Convert unquote string to TS and Jest

* Convert getFieldType to TS and Jest

* Convert httpurl to TS and Jest

* Remove latest_change and tests

* Convert pivot_object_array to TS and Jest

* Address PR feedback
2019-06-17 14:38:58 -04:00
Nathan Reese
151d2e1413
[Maps] add functional test for tooltip filter actions (#38988) 2019-06-17 12:13:59 -06:00
Melissa Alvarez
76777c5c92
[ML] File Data Visualiser - Link for timestamp notation docs/guide (#39037)
* add helpText with doc link to timestamp format

* add internationalization

* update snapshot
2019-06-17 14:07:57 -04:00
Dmitry Lemeshko
581755098a
[firefox] Run functional tests in dedicated CI groups (#38416)
* 2 jobs for Firefox tests

* review fixes

* make sh files executable

* add check reporter
2019-06-17 19:31:41 +03:00
Kerry Gallagher
22d1786908
Align text overflow styles for Label and Value (#39068) 2019-06-17 16:35:30 +01:00
Daniil Suleiman
e74f22d36a
Upgarde enzyme to v3.10.0 (#38766)
* Upgarde enzyme to v3.10.0

*update snapshots (React components which are using Memo());

*revert pending test in list_control_editor.test.js;

*replace component.html() and component.text() function calls
 which expect null to component.isEmptyRender() for consistency
2019-06-17 18:33:37 +03:00
Angela Chuang
de927603d7
update button size (#39051) 2019-06-17 23:08:35 +08:00
Marco Vettorello
922e111dd5
Upgrade @elastic/charts to 6.0.1 (#38783)
* Upgrade @elastic/charts to 5.2.0

* Upgrade @elastic/charts to 6.0.1

* Add darkMode theme mock
2019-06-17 15:45:53 +02:00
Felix Stürmer
5b9c231a51
[Infra UI] Make queries more robust against missing indices (#38976)
This fixes several queries that failed when indices didn't exist and were not specified using a wildcard at the same time.
2019-06-17 06:43:04 -04:00
Felix Stürmer
2228863440
[Infra/Logs UI][skip ci] Add infra plugin readme with contribution notes (#38696)
This adds a README file to the `infra` plugin directory with additional contribution notes.

Co-Authored-By: Kerry Gallagher <k.gallagher.05@gmail.com>
2019-06-17 06:33:11 -04:00
Angela Chuang
399adcddcd
[SIEM] add middleware for handling refetch (#38697)
* add middleware for handling refetch

* add unit test for error links

* add unit test
2019-06-17 01:29:40 +08:00
Rashmi Kulkarni
5d90300224
extend timeout (#39001)
trying it out - so that test runner runs are clean...
2019-06-14 15:47:56 -07:00
Tim Roes
2d37b05a43
Improve jest mocking infrastructure (#38760)
* Always mock metadata/chrome in OSS

* Enable jest env in jest mocks

* Exclude jest mocks in karma bundles

* Use setupFilesAfterEnv in config

* Remove chrome/metadata mock from x-pack

* Remove kuery mock

* Add missing mock to SIEM test

* Fix typo in mock import

* Remove top level capabilities x-pack mock

* Move kfetch mock to ui/public

* Move moment-timezone to mocks file

* Unmock kfetch in kfetch specific tests

* Make kfetch mock manual

* Removed unnecessary jest.mock

* Remove kfetch unmocks
2019-06-14 23:36:51 +02:00
Greg Thompson
c22b706b25
Upgrade EUI to 11.3.2 (#38262)
* eui 11.3.1

* EuiSuperSelect TS updates

* EuiColorPicker updates

* EuiBadge updates

* a11y updates

* i18n service updates

* remove unused translations

* move valueOfSelected logic to private method

* update EuiColorPicker class name

* Updated canvas storyshots

* i18n fixes; maps color selection position

* i18n snapshot updates

* update canvas storyshots

* snapshot updates

* 11.3.2

* maps colorpicker

* space avatar colorpicker
2019-06-14 15:45:35 -05:00
CJ Cenizal
93e8fcf003
Fix Search Profiler's 'Index' input's placeholder color contrast accessibility. (#38952) 2019-06-14 11:39:54 -07:00
Chris Roberson
b09e3a622f
[Monitoring] Metricbeat migration flyout and instructions (#35228)
* Initial attempt at a reactor of how this works

* Enter and exiting setup mode with migration buttons working

* Adding monitoring url step back in and some small cleanup

* Elasticsearch steps

* Add missing file

* Better organization here

* Remove this debug logic

* Clean up

* PR feedback

* Add in monospacing

* Persist monitoring url in local storage

* Rework the steps

* Change node to server, and add missing files

* Fix linting issues

* Fix api integration tests

* PR feedback

* Pass down if the product is the "primary" or not, then use that to show certain warnings in the UI (just supported for Kibana right now)

* Elasticsearch migration will work slightly differently in that all nodes must be partially migrated before we can disable internal collection

* More PR feedback

* PR feedback

* Better links

* Fix tests

* This should open in a new tab

* PR feedback

* Design and PR feedback

* Fix these tests

* PR feedback

* Remove debug

* PR feedback

* Update the import path

* Update this import path too

* PR feedback

* Fix i18n
2019-06-14 14:21:53 -04:00
Steph Milovic
cd76109a2c
[SIEM] Fix url state request once initial state (#38955)
[SIEM] Fix url state request once initial state
2019-06-14 11:42:52 -06:00
CJ Cenizal
a106da9477
Unsplit i18n strings in ILM's MinAgeInput component. (#38854) 2019-06-14 10:29:31 -07:00
Aleh Zasypkin
7f3f579894
Make Kerberos authentication provider to accept requests with Authorization: Bearer xxx header to support reporting use case. Disable Kerberos support for the Windows Chromium build. (#38796) 2019-06-14 18:54:44 +02:00
liza-mae
0003a32f56
[WIP] FTR Percy changes (#36897)
* [ftr/percy] integrate percy with functional test runner

* execute ftr within `percy exec`

* share PERCY_BIN and GRUNT_BIN vars in setup

* [license] whitelist `(Unlicense OR Apache-2.0)`

* [percy] include pr/parallel info in env

* echo the actual variable value

* destructure required modules

* [ci] calculate percy env in a script

* remove outdated eslint overrides

* oops, nonce should be the same for each build

* take snapshots in context tests

* add percy snapshots to some dashboard tests

* account for extra execution of PERCY_BIN

* remove usage of percy service

* rename service to `visualTesting`

* write a simple test

* switch left-over percy test to visualTesting

* set log level for percy agent

* trigger ci

* try using the system chrome install instead of downloading one

* fix export definition

* Don't skip chromium download

* Add Spencer's fix to point to chrome installation

* Attempting to split tests into own ci job and test files

* Renumber job

* Add tag to decorations file

* Try new files with existing CI job

* Try again to create a new CI job

* Fix eslint problem with space

* eslint updates

* fix console test

* make test names unique

* Update ci group names

* Try old name again

* save

* add separate visual_regression ci job

* add visual regression ci job

* add new job to jobs.yml

* update path to take_percy_snapshot script

* use fixed percy job total

* fix common services import

* move visual_create_and_add_embeddables to visual_regression project

* finish moving create_and_add_embeddables

* add x-pack visual regression job

* migrate dashboard_snapshots tests to visual_regression

* remove references to removed test files

* restore some unnecessary changes

* reimplement the login page tests

* yarn.lock update

* fix test

* remove old CI_GROUP 100 block

* update failed_tests trap

* reduce yarn.lock changes

* disable debug logging

* disable visual-regression tests for now, we can enable them in specific prs
2019-06-14 10:35:23 -06:00
Alison Goryachev
da13b9b763
[IM] improve ux for permissions error (#38916) 2019-06-14 10:27:36 -04:00
Zacqary Adam Xeper
74a90b25c0
[Infra UI] Format arrays as ul elements in LogEntryFieldColumn (#38692)
* [Infra UI] Format arrays as ul elements in LogEntryFieldColumn

* Add enzyme test for LogEntryFieldColumn

* Fix tests

* Swap ul's for comma separation

* Use semantic markup for inline list

* Fix tests

* Use ::after element for comma separation

* Move ::after element to :not(:last-child)

* Hoist CommaSeparatedLi

* Use EuiThemeProvider in tests instead of isEnzyme prop

* Suppress type error with issue link
2019-06-14 10:07:35 -04:00
Pete Harverson
1a03c5135b
[ML] Increase max data frames in list from 100 to 1000 (#38973) 2019-06-14 14:32:55 +01:00
Kerry Gallagher
db7b6878c1
Add a tooltip for name (#38904) 2019-06-14 13:52:30 +01:00
Nathan Reese
8ddb5b70c0
[Maps] symbolize points with maki icons (#37822)
* [Maps] sybmolize points with maki icons

* add from for selecting symbol

* add from for selecting symbol

* get icons working for static colors

* static icon sizing

* refacto symbol_utils

* timing issue

* use SDF icons

* dynamic iconSize

* set icon-anchor

* display symbol icon in map legend

* add unit tests for VectorIcon

* set icon fill based on dark mode

* remove unused file

* fix jest tests

* set icon-opacity

* use size style to configure icon-image small or large

* fix queryRadius error by just hiding other point layer instead of removing

* remove console statement on error

* use maki icon size constants

* add retry around opening set view popover for flaky test
2019-06-14 05:56:30 -06:00
Casper Hübertz
68eb9687d4
[APM] UI Dark theme fixes (#38840)
* Removed hard-coded background color

* Updated x-axis ticks text color to match other charts

* Updated to match Eui border-radius

* Update snapshots
2019-06-14 11:23:37 +02:00
Liza Katz
4a39c7a33e
Separate class\type definitions from plugin instance setup (#38894)
* Separate class\type defenitions from plugin instance setup in shim plugin definition
This helps avoiding circular dependency issues that were obsereved in filter-manager branch (due to code starting to use the data plugin).

* typescript fun
2019-06-14 11:45:26 +03:00
Peter Pisljar
5baf958adf
removing angular from indexPatterns (#34418) 2019-06-14 10:39:50 +02:00
WangQianliang
3a9dd77293
fix(code/frontend): fix search filter duplicate items (#38858) 2019-06-14 10:12:52 +08:00
WangQianliang
9c57df5e3f
fix(code/frontend): fix style issues (#38748) 2019-06-14 10:04:57 +08:00
WangQianliang
c2f5cc1162
fix(code/frontend): auto focus import project inpt (#38860) 2019-06-14 10:04:34 +08:00
chongzhe
4e8206b380
[Code] udpate links in setup guide (#38928) 2019-06-13 13:06:55 -07:00
Sébastien Loix
941cc44270
[SR] Component integration tests (#36871) 2019-06-13 20:34:47 +02:00
Clint Andrew Hall
13260786ca
[Canvas][Storybook] Convert Shapes to TS, Storybook (#38850)
* Shapes stories + TS

* Merging storybook into shapes-ts-stories

* A few tweaks
2019-06-13 13:08:48 -05:00
Chris Roberson
b1a7bcb40a
Ensure we provide the cluster when toggling completed recoveries (#38543) 2019-06-13 12:44:29 -04:00
Brandon Kobel
3e06e6b09a
Spaces - Hiding management link (#38472)
* Changing the Spaces management section to behave like the other FC
controlled sections

* Adding those glorious tests and fixing a bug

* Fixing some test descriptions

* Making the mergeCapabilities operation emulate the old behavior

* Fixing privileges test with the addition of the new action

* Updating jest snapshot

* Adding tests, preventing additional clobbering

* Changing requireUICapability to use management.kibana.spaces
2019-06-13 09:32:27 -07:00
igoristic
51074bbc20
Added a retry for a flaky test in FF (#38845) 2019-06-13 11:58:00 -04:00
Aleh Zasypkin
ffb0b06fa3
Make xpack.security.authc.saml.realm mandatory and completely remove xpack.security.authProviders and xpack.security.public. (#38657) 2019-06-13 17:43:18 +02:00
Melissa Alvarez
4260d82c97
[ML] File datavisualizer - custom timestamp override functionality (#38727)
* show custom input option for timestamp format

* show validation errors if custom timestamp format invalid

* Update error messages. Remove unnecessary comments

* use custom constant for delimiter override

* fix i18n errors
2019-06-13 09:36:51 -04:00
Chris Roberson
25802019ae
[Monitoring] Integrate logs source for Logs UI (#36929)
* Define and use an internal log ui source configuration

* Fix urls in tests

* Remove unnecessary code
2019-06-13 09:28:54 -04:00
Mike Place
6c0f83a515
Minor changes to text on Alerting in Stack Monitoring application (#38388)
* Minor changes to text.

* "Basic" is a proper name, so it should be capatalized.

* Cluster Alerts are plural.

* Fix tests to align with help text changes

* Missed one test file
2019-06-13 14:46:36 +02:00
Tim Roes
5f3f1966cb
Rename Visual Builder to Timeseries (#38777) 2019-06-13 14:44:53 +02:00
CJ Cenizal
b2e0527735
Convert Index Management from using intl.formatMessage to i18n.translate. (#38780) 2019-06-13 04:42:24 -07:00
Maryia Lapata
386619e577
[Vis: Default editor] EUIficate Sub agg control (#37979)
* EUIficate metric agg control

* Fix translation errors

* Display agg error underneath the last bucket agg form control

* Update functional test

* Update error message

* Update parent_pipeline_agg_controller.js

* Fix validation when metricAgg is invalid

* Show error message when a filed is selected

* Delete _terms_helper.tsx

* Remove extra empty line

* Update parent_pipeline_agg_helper.js

* Update selector for test
2019-06-13 11:18:26 +03:00
spalger
f2dd96b50a disable flaky test (#38849) 2019-06-12 16:40:33 -07:00
CJ Cenizal
4785301ed9
[Remote Clusters] Migrate to the New Platform with a shim (#37559)
* Extract isEsError from router.
2019-06-12 14:13:11 -07:00
Mengwei Ding
ad19b6bb11
[Code] add beta label for code (#38814) 2019-06-12 12:25:00 -07:00
igoristic
35a5706e16
Flooring number down to whole second (#38065) 2019-06-12 15:24:33 -04:00
Clint Andrew Hall
ce80d0063a
[Canvas] Update Type Documentation (#38554)
* Add docs; fix nits

* Updating documentation

* Tweaks

* Fix missed conversions
2019-06-12 14:08:39 -05:00
Fuyao Zhao
f877c78e95 Revert "[Code]: disable code by default in 7.2 (#38757)" (#38802)
This reverts commit 4886c4bb21.
2019-06-12 10:42:01 -07:00
Dario Gieselaar
fed808c2af
[APM] Use transaction type from flyout instead of url params (#38782)
* [APM] Use transaction type from flyout instead of url params

* Use GET instead of HEAD to prevent kfetch from erroring out on invalid JSON

* Remove unnecessary check for existence of transactionType
2019-06-12 18:31:11 +02:00