Commit graph

6137 commits

Author SHA1 Message Date
spalger 8e9a8a84dc autofix all violations 2019-12-13 23:17:13 -07:00
Joe Portner e78689e61e
Upgrade pdfmake (#53043) 2019-12-13 17:50:49 -05:00
spalger 5feb376aac remove test that's been skipped since opening xpack 2019-12-13 15:32:19 -07:00
Eli Perelman 614bde927e
Move CSP options to new platform (#52698)
* Move CSP options to new platform

* Expose SharedGlobalConfig from root

* Derive CSP options from config

* Consolidate CSP configuration with HTTP config

* Fix outstanding config renames

* Remove legacy CSP configuration calls, migrate to platform properties

* Revise docs

* Fix test from type change

* Expose ICspConfig, consolidate and simplify CSP defaults access

* Rebase and update docs

* Remove legacy API from route definition params, review nits

* Clean up config path usages for consistency

* Regenerate docs
2019-12-13 15:57:17 -06:00
spalger 1ea9d791bc Revert "Revert "Fix wrong impor (#52994)""
This reverts commit c220d770cc.
2019-12-13 14:09:51 -07:00
spalger c220d770cc Revert "Fix wrong impor (#52994)"
This reverts commit 6c1f248c4f.
2019-12-13 13:16:40 -07:00
Ahmad Bamieh 3658220048
[Telemetry] Migrate ui_metric plugin to NP under usageCollecti… (#51972)
* move cloud dir to plugins from legacy

* create ui_metrics in NP

* migrate first plugin

* ui_metric plugin uses npStart

* sinin mock

* karma mocks

* type check fix

* rename old configs

* fix mocks and use configs

* use  fo debug

* ui_metric deprecation configs

* remove commented out code

* remove unused type import

* mock ui_metric in client_integration

* jest.mock ui/new_platform

* fix all failing tests

* platform team code review fixes

* reset interval back to default

* apm cypress config use usageCollection

* revert kibana.yml change

* remove license type from NP def

* undo revert of NP type

* code review fixes

* report schema in a separate dir
2019-12-13 14:41:51 -05:00
Joe Portner 3e6270737a
Change session timeout values to use duration instead of number (#52520) 2019-12-13 13:58:40 -05:00
Josh Dover ec2134d221
Add lint rule to prevent server code being imported into client (#52447) 2019-12-13 12:26:04 -06:00
Mikhail Shustov 6c1f248c4f
Fix wrong impor (#52994)
* Licensing plugin and XPackInfo uses the same license data (#52507)

* convert xpackinfo to TS

* use NP Licensing plugin in XPackInfo

* update mocks

* put license regresh hack back.

otherwise new license won't be re-fetched when signature changed. was deleted by mistake

* add functional test for legacy xpackmain

* declare setup types on client & server explicitly

* rename mock license --> licensing to match plugin name

* add tests for createLicensePoller

* fix type error

* adopt tests for xpack_info

* createXPackInfo uses new platform API

* put back error mute

* address comments

* fix renamed import

* address comment

* update tests to reduce delays

* deprecate xpack.xpack_main.xpack_api_polling_frequency_millis

* use snake_case in config

* fix wrong import
2019-12-13 18:09:36 +01:00
Marta Bondyra a97d2646f5
Lens: pass indexPatternId prop to ChangeIndexPattern to di… (#52614) 2019-12-13 17:44:58 +01:00
Mike Côté 88ae8d07c8
Cleanup alerting / actions feature controls (#52286)
* Initial work

* Apply changes based on feedback

* Fix a broken test

* Fix failing test

* Revert monitoring changes

* Remove UI features for now
2019-12-13 10:36:46 -05:00
Brandon Kobel c8912199d3
Using forceLogout *almost* everywhere (#52922)
* Changing usages of .logout() to .forceLogout()

* Using `.logout` from within the security login page test
2019-12-13 10:09:38 -05:00
Shahzad d79631adaa
Feature/issue 44550 new details panel and location map (#50518)
* update

* added an embeddable maps

* update map config

* added options to disable zoom, hide tool tips, widgets/overlays in embeddable maps

* added options to disable zoom, hide tool tips, widgets/overlays in embeddable maps

* added bool option to hide header

* revert panel changes

* update panel

* update map

* added disable interactive

* update uptime embeddable

* update redux state and removed widget over lay hiding

* refactor widget overlay prop

* update layout

* update rest API

* remove maps code

* update components

* update up/down points on map

* update snaps

* fixed type

* update request

* update request to include rnage

* fix tests

* utilize newly added setLayers method

* remove unused code

* refactor code
2019-12-13 16:02:00 +01:00
Wylie Conlon 6ca913874c [Lens] Change feedback link (#52916) 2019-12-13 09:55:04 -05:00
spalger f67a063f1c Revert "Licensing plugin and XPackInfo uses the same license data (#52507)"
This reverts commit 2b8825603f.
2019-12-13 07:53:12 -07:00
Matthias Wilhelm dbec0b1007
[Graph] Deangularize saved object handling (workspace) (#52529) 2019-12-13 14:48:03 +01:00
Jean-Louis Leysens 96fb2d16f7
[Console] Console with better SQL support (#51446)
* First iteration of PoC for SQL highlighting and better completion

* Alternate implementation (no """sql markers)

* xLang markers

* - Remove 'start-sql'
- no flow :c

* Revert "- Remove 'start-sql'"

This reverts commit 2d585eef17.

* Revert "xLang markers"

This reverts commit f019616675.

* Revert "xLang markers" and add comment

This reverts commit f019616675.

* Add elasticsearch sql highlight rules

* Add links to sources of data

* Update colors

* Redo built in functions
2019-12-13 14:39:42 +01:00
Mikhail Shustov 2b8825603f
Licensing plugin and XPackInfo uses the same license data (#52507)
* convert xpackinfo to TS

* use NP Licensing plugin in XPackInfo

* update mocks

* put license regresh hack back.

otherwise new license won't be re-fetched when signature changed. was deleted by mistake

* add functional test for legacy xpackmain

* declare setup types on client & server explicitly

* rename mock license --> licensing to match plugin name

* add tests for createLicensePoller

* fix type error

* adopt tests for xpack_info

* createXPackInfo uses new platform API

* put back error mute

* address comments

* fix renamed import

* address comment

* update tests to reduce delays

* deprecate xpack.xpack_main.xpack_api_polling_frequency_millis

* use snake_case in config
2019-12-13 13:46:04 +01:00
Liza Katz e3282d4a89
Move search bar to NP (#52622)
* Moved SearchBar component to NP

* move search bar to NP

* change import

* Revert "change import"

This reverts commit 52d990fbe4.

* Revert "move search bar to NP"

This reverts commit 4196e8b4b9.

* move create search bar

* Clean up jest mocks

* update snapshots

* Remove indexPatterns angular service

* Deleted comment

* Mock npStart.core.savedObjects

* Removed export of SearchBarOwnProps

* fix import

* Fix typo

* eslint
2019-12-13 12:05:31 +00:00
patrykkopycinski 7dbfb750ce
[SIEM] Cleanup react-beautiful-dnd jest warnings (#52468) 2019-12-13 12:31:04 +01:00
James Gowdy 6ba805d18e
[ML] Removing context API (#52953) 2019-12-13 10:33:28 +00:00
Joe Reuter c73f984e7f
Migrate graph server and licensing handling (#52279) 2019-12-13 11:33:15 +01:00
Tiago Costa ee2bb82a12
fix(NA): kibana keystore options and arguments processing (#52774)
* fix(NA): kibana keystore options and arguments processing

* chore(NA): updated dependencies to match resolutions
2019-12-13 02:34:31 +00:00
spalger f634877b62 skip failing suite (#52969) 2019-12-12 18:12:44 -07:00
Thomas Neirynck fe44595523 [Maps] Move field-meta implementation to style property (#52828)
* improve clarity

* rename for clarity

* feedback

* add comment

* remove debug statements
2019-12-12 16:19:06 -07:00
Bhavya RM 4765ed0fa1
A11y base tests (#51893)
a11y base tests
2019-12-12 17:20:55 -05:00
Frank Hassanabad 98c54e8d51
[SIEM][Detection Engine] Adds a tags service and optimizes alert_id lookups
## Summary

* Adds a tags services for use by UI's that want to get a list of all the unique tags that are on all of the rules just like an aggregation
* Removes the horribly inefficient `alert_id` look up that was a full alert scan and instead uses an internal structure that it augments to the tags for fast `alert_id` look ups.
* Adds unit tests for the tags and internal structure tags
* Updates other unit tests

Usage for the UI:

```sh
GET /api/detection_engine/tags
```

or shell script:
```sh
./get_tags.sh
```

Returns:

```sh
[
  "tag_1",
  "tag_2"
]
```

Testing:
Ensure that the internal structure does not leak when doing any of these script/API calls
  * ./get_tags.sh
  * ./post_rule.sh ./rules/queries/query_with_tags.json
  * ./update_rule.sh ./rules/queries/query_with_tags.json
  * ./delete_rule.sh
  * ./find_rules.sh
  * ./find_rule_by_filter.sh "alert.attributes.enabled:%20true"
  * ./find_rule_by_filter.sh "alert.attributes.tags:tag_1"

Caveat:

You can do filter searches against tags that have the double underscore such as:

```sh
./find_rule_by_filter.sh "alert.attributes.tags:%20__*"
```

But that shouldn't be a big problem and more than likely no one will be naming something with double underscores.

### 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)~~

- [x] 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-12-12 13:41:13 -07:00
Chris Davies f3813556ec
[Lens] Modify merge tables to use the same logic as auto date (#52931) 2019-12-12 15:35:37 -05:00
Chris Cowan 617c8d589a
[Metrics UI] Add AWS Metricsets to Inventory Models (#49983)
* Adding initial code for EC2

* Removing obsolute files; Adding EC2;

* Removing currentTimerange and replacing it with currentTime; Timerange will now be calcuated on the server

* Fixing AWS.s3 with Metrics Explorer

* Auto calculating timerange and interval based on metricset.period

* Adding S3 metricset

* Inital addition of RDS metrics

* Adding SQS and fixing a few things

* Fixing typescript error

* Adding RDS; Adjusting fields for S3; adding new formatter

* Return 60 seconds by detault

* Fixing types

* Removing i18n

* Fixing tests

* Fixing translations

* Fixes from merge

* Removing IDX from code not covered by #52354

* fixing tests

* Adding controls for crossliking; consolidating display name

* remove obsolete import

* Adding drop_last_bucket_support to TSVB models

* Changing type

* Fixing value per type

* remvoing obsolete translation

* Removing duplicate lines

* Removing icons from switcher

* Reducing boilerplate in Toolbar Items

* Changing file name
2019-12-12 13:17:30 -07:00
Tim Sullivan 31a6b5013d
[Reporting/Screenshots] add error for no shared items found on the page (#52022)
* [Reporting/Screenshots] add error for no shared items container found on the page

* wording adjustment
2019-12-12 12:58:11 -07:00
Melissa Alvarez deee1c08e9
[ML] DF Analytics creation: ensure advanced editor can be validated when empty (#52831)
* Check for undefined analysis config before validating

* update tests
2019-12-12 12:05:31 -07:00
Melissa Alvarez 0cd5bb0ca9
[ML] DF Analytics: create classification jobs results view (#52584)
* wip: create classification results page + table and evaluate panel

* enable view link for classification jobs

* wip: fetch classification eval data

* wip: display confusion matrix in datagrid

* evaluate panel: add heatmap for cells and doc count

* Update use of loadEvalData in expanded row component

* Add metric type for evaluate endpoint and fix localization error

* handle no incorrect prediction classes case for confusion matrix. remove unused translation

* setCellProps needs to be called from a lifecycle method - wrap in useEffect

* TypeScript improvements

* fix datagrid column resize affecting results table

* allow custom prediction field for classification jobs

* ensure values are rounded correctly and add tooltip

* temp workaroun for datagrid width issues
2019-12-12 12:02:04 -07:00
Walter Rafelsberger af1a876f21
[ML] Color Range Legend component (#52794)
Introduces ColorRangeLegend, a reusable component to display a color range legend to go along with color coded table cells or visualizations such as heatmaps.
2019-12-12 19:16:32 +01:00
spalger 065ca6e041 skip flaky suite (#36011) 2019-12-12 11:13:06 -07:00
Spencer c8b42f09de
require yarn 1.21.1 to avoid binary planting vuln (#52899) 2019-12-12 10:15:23 -07:00
Matthias Wilhelm 85aea35c94
Deangularize and typescriptify ui/saved_object (#51562) 2019-12-12 17:35:22 +01:00
Wylie Conlon 06eeb59da3
[Lens] Fix sort crash (#52694) 2019-12-12 11:22:27 -05:00
patrykkopycinski 0c6516f1bc
Add babel-plugin-styled-components to webpack config (#52862) 2019-12-12 16:29:59 +01:00
Pedro Luiz Cabral Salomon Prado 4be168ce27 [Watcher] Removed overwritten property (#49998) 2019-12-12 10:03:10 -05:00
Luke Elmers 2caf640d48
[Data Plugin]: Remove export * for common code from public/server index files (#52821) 2019-12-12 08:00:44 -07:00
Nathan L Smith e488d9b02a
[APM] Make client-side routes static (#52574)
* [APM] Make client-side routes static

Turn `getRoutes` back into `routes` so we can just import it.

Checking for the service map being enabled isn't really necessary since we don't have any links to those routes and the backend routes are already flagged.
2019-12-11 21:45:46 -06:00
Aaron Caldwell 3d10370138
[Maps] Get basic structure of NP client shim in place (#52551)
* Move ui routes init to separate file

* Add index and general maps plugin template

* Add legacy shim. Pass uimodules in as legacy service

* Move ts-ignore

* Fix N/A ts error on uiModules

* Point index file toward legacy file. Minor NP additions
2019-12-11 19:14:30 -07:00
Chris Roberson 802423da89
[Monitoring] Fix 7.5 cloud test issues (#51781)
* Fix cloud test issues

* We don't have to skip for cloud
2019-12-11 16:34:32 -05:00
Nathan Reese eb8c0e33dd
[Maps] clean up source settings (#52644)
* [Maps] clean up source settings

* update es_search_source editor

* geo grid source

* pew pew source

* fix i18n

* doc updates for changing UI

* docs re-wording

* use correct image name

* update snapshot

* review feedback
2019-12-11 13:53:58 -07:00
Nathan L Smith e0f155be31
[APM] Refactor core and plugin context (#52353)
* [APM] Refactor core and plugin context

Change the plugin to use a context that exposes:

```
export interface ApmPluginContextValue {
  config: ConfigSchema;
  core: AppMountContext['core'];
  packageInfo: PackageInfo;
  plugins: ApmPluginSetupDeps;
}
```

This replaces the `PluginContext` and `usePlugins` that were added with the NP shim, and the `KibanaCoraContext` and `useKibanaCore` from the observability plugin.

Remove the observability plugin since it's not being used anywhere else.
2019-12-11 14:49:51 -06:00
patrykkopycinski c6336c384b
Bump react-router (#52445) 2019-12-11 21:19:35 +01:00
Nathan Reese 9c203613db
[Maps] MapEmbeddable setLayerList (#52573)
* [Maps] MapEmbeddable setLayerList

* review feedback
2019-12-11 13:19:20 -07:00
Nathan Reese a50d3781af
[Maps] fix tooltips for CCS (#52793) 2019-12-11 12:39:04 -07:00
Tim Sullivan 711b44b7fb
[Reporting/NP Migration] Remove server.expose of ExportTypeRegistry (#50973)
* [Reporting/NPMigration] typescriptify ExportTypeRegistry, remove from server.expose

* Minor routes registration cleanup

* move the ETR test file

* Re-pack the route registration, reduce LOC changes

* add EnqueueJobFn type

* Fix usage collector test

* remove a throw error used for development/debugging

* fix imports error

* Fix execute job tests

* wip test fixes

* test fixes for real

* fix more tests

* fix diffs

* Add TODOs about the ExportTypesRegistry.register unwrap the factory functions.

* really make headlessbrowserdriver required as an execute job factory option

* fix tests

* Use constants for license type keywords
2019-12-11 12:11:07 -07:00