Commit graph

26169 commits

Author SHA1 Message Date
Nathan Reese
9e3ac6d6e0
[Maps] Custom labels for metric aggregations (#39914)
* [Maps] custom labels for metrics

* fix onRemove

* set metric propertyLabel to custom label when provided

* add metrics label around MetricsEditor for geo grid source

* do not use label in terms join metric expression

* fix requerying of the data when custom label changes

* remove extra space

* add comment to LeftInnerJoin.getSourceId

* use FormRow.labelAppend instead of absolute positioning for delete aggregation button

* fix i18n translations
2019-07-01 14:06:23 -06:00
Nathan Reese
1a5f96c470
[Maps] set data-render-complete on map container when layers are loaded (#39746)
* [Maps] set data-render-complete when layers are loaded

* ignore layers that are not visible

* use timeout to give time for render to complete

* move check for layer visibility out of isDataLoaded and into areLayersLoaded selector

* prepend private functions with _ in name

* rename isRenderTimeoutComplete to isInitialLoadRenderTimeoutComplete

* update AbstractLayer.isDataLoaded default implemenation to check source data request to TileLayer source requests are checked

* TileLayer cleanup

* rename for clarity
2019-07-01 13:58:36 -06:00
Angela Chuang
0bc47ddd37
[SIEM] update translation (#40038)
* update translation

* rename translation

* rename translation

* fix lint error
2019-07-02 03:36:00 +08:00
Steph Milovic
fbd066d3c7
[SIEM] Tab headers openable in a new tab (#39702)
[SIEM] Tab headers openable in a new tab
2019-07-01 13:21:11 -06:00
Nathan Reese
7f4c07b3c0
[Maps] remove beta labeling from application and docs (#39871)
* [Maps] remove beta labeling from application and docs

* clean up i18n
2019-07-01 12:48:29 -06:00
Andrew Cholakian
9949107a79
[Uptime] Summary based monitors Page (#39751)
This implements the overview page changes described in elastic/uptime#41 and https://docs.google.com/document/d/1jlyOam08gC3oq0W8dim0BF-5QYEOXFqSg48nMwbirmg/edit

One change that was necessary was omitting the swimlane visualization. After speaking to the ML team it was discovered that incorporating this component isn't possible yet, as it requires cross-plugin code sharing. In its stead we have re-used the monitor checks over time graph. We may want to keep this, as the graph used here is superior for multiple IP use cases.
2019-07-01 12:57:15 -05:00
dave.snider@gmail.com
53273ecff4
EUI@12.2.0 (#40039)
* EUI@12.2.0

* update EuiFormRow to hold a single child, removes comments only
2019-07-01 13:33:22 -04:00
Larry Gregory
544ef71ba1
Spaces API - default disabledFeatures to empty array (#40017)
* default disabledFeatures to empty array

* update PUT spaces tests
2019-07-01 13:15:01 -04:00
Thomas Neirynck
e1b1c56eef
[Maps] add multiple feature selection in tooltips (#39629) 2019-07-01 12:53:39 -04:00
Patrick Mueller
c4749b7068
Changes x-pack action executor to return result. (#39820)
* Changes x-pack action executor to return result.

Previously, the result was never captured.  It's now captured, and
returned if it's JSONable.  If not JSONable a `{succcess: true}`
object is returned with a 200 response (used to be 204).

Also added logging for action execution calls, in lieu of having an
action history available.

Drive-by:

- `services.log` was set to the unbound Hapi server.log method, so
  places where it was set were changed to bind it to the server.
2019-07-01 12:50:36 -04:00
Joel Griffith
7b67613128
[Reporting]: Check if CSV cells (including headers) start with known formula characters (#37930)
* Re-working csv injection issue into master

* Config flag for checking if CSV's contain formulas

* Fixing snapshots
2019-07-01 09:49:59 -07:00
Larry Gregory
3e8687c3e3
Saved Objects - make import/export stream based (#39674)
* transform ndjson within route handlers for SO import/export APIs

* convert export saved objects to return a stream

* fix stream creation
2019-07-01 11:48:06 -04:00
Alison Goryachev
8807427c9c
fix license management actions (#39898) 2019-07-01 11:46:22 -04:00
Sonja Krause-Harder
7f7144eb75
[Infra UI] Add temporary workaround for too small max-width. (#39890)
* Add temporary workaround for too small max-width.

* Follow naming guidelines.
2019-07-01 17:29:00 +02:00
Tiago Costa
302ac70c12
Exclude contextual module references from cleaning dll task (#38733)
* fix(NA): exclude contextual module references from cleaning dll tasks

* test(NA): fix tests for nodejs modules webpack dll build task.

* chore(NA): add test for non accessible files.

* chore(NA): apply requested changed on the PR review.

* test(NA): fix for test cases

* fix(na): circular call on isFileAccessible implementation.
2019-07-01 16:14:30 +01:00
Walter Rafelsberger
acfbe096c4
[ML] Data Frames: Fixes transform list paging and sorting. (#40009)
- Fix to retain the selected page when the transform list updates with new data
- Fix to sort column based on custom render() functions.
2019-07-01 16:42:56 +02:00
Corey Robertson
5c53e6f8cc
Track customElement and full screen and autoplay usage (#39735)
* Track customElement and full screen and autoplay usage

* Rename action
2019-07-01 09:46:25 -04:00
Carlos Pérez-Aradros Herce
c6c751832d
Add NATS logo to the Add Data UI (#39905)
* Add NATS logo to the Add Data UI
2019-07-01 15:15:50 +02:00
Liza Katz
1824d99b71
Moved modal and transition directives to ML (#39976)
* Moved modal and transition directives to ML

* Moved paginated selectable list to ML

* Moved paginated selectable list test

* Fixed i18n
2019-07-01 16:13:59 +03:00
Liza Katz
531e2b0f59
Query Filter \ Filter Manager: de-angularize and move to data plugin (#37311)
* Embeddable and Visualize to use type definitions from kbn-es-query package

* moved state watching to new filter manager and removed query filter dependency on rootScope

* Deleted unused pinFilter

* Extracted merge fitlers function

* Changed mappedFilters name

* Move state management to new filter management as well. query filter is now just a wrapper.

* Code works correctly with new setup of query filter

* improved typing

* Moved mapping into new filter manager

* removed promise dependency from query filter

* Extracted filter state manager from query filter

* Moved addFiltersAndChangeTimeFilter logic into new filter manager

* Fixed addFiltersAndChangeTimeFilter implementation

* Moved all logic to new filter manager - query filter is just a wrapper now!

* Connected query_filter observable management to new filter manager as well

* Usage example in discover

* filter state management tests + fire less events from filter state manager

* Tests for filter manager and filter state manager

* Moved new filter manager to data plugin

* Got rid of FilterManagerProvider and turned it into a getFilterGenerator function that works with the new FilterManager.
Need to merge this code with FilterManager.

* Added tests that make sure that filter manager listens to filter state manager

* fix typo

* Fixed action add filter test

* Fixed increasePredecessorCount test

* Fixed increaseSuccessorCount test

* Fixed setPredecessorCount test

* Fixed setQueryParameters test

* Fixed setSuccessorCount test

* Fixed doc table filter actions test

* Fixed filter generator tests

* rename argument

* Moved push filters into vis filters (only place where its used)

* Filter type fix, test fix

* Removed irrelevant filter tests (for deleted methods)
    Added state to filters

* Fixed most of get filters errors by sleeping (TODO!)

* Added destroy methods
Improved merge logic
Improved remove filter tests to use add filter (to avoid having for filter state manager to catch up)

* Fixed discover functional tests
Added default empty filter state in filter generator
Some more browser test adjustments

* Allow filter $state to be empty

* Fixed types

* Code review with @splager
- subscribeWithScope
- query filter to return angular promises
- remove unneeded Promise.resolve

* 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

* Fixed merge

* updated some get filter tests to work with add filter, and therefore moved them to add_filters.js

* Remove shouldFetch and add comment explaning the observable.

* Minor code style fixes

* Code review fixes and changes

* Moved Karma tests to jest

* Fixed merge

* Fixed some type errors

* Improved watchFilterState logic

* Removed addFiltersAndChangeTimeFilter test for now, as I'm having TS difficulties

* filters can also be null

* Further watch state fine tuning

* Get data instance inside provider to avoid circular deps

* mock chrome

* Removed change to range filter

* Deleted unnecessary injects

* dedup setFilters as well

* deleted unused subscription

* Added tests for setFilters de-dupe

* Update src/legacy/core_plugins/data/public/filter/filter_manager/filter_state_manager.ts

Co-Authored-By: Stacey Gammon <gammon@elastic.co>

* Update src/legacy/core_plugins/data/public/filter/filter_manager/filter_manager.ts

Co-Authored-By: Stacey Gammon <gammon@elastic.co>

* Code review minor fixes
2019-07-01 15:57:57 +03:00
Walter Rafelsberger
4426094048
[ML] Data frames: Updated progress reporting. (#39920)
- Adds a column mode to the data frame transforms list to indicate if the transform is batch or continuous.
- For continuous data frames an animated horizontal loading indicator is shown in the Progress column instead of a progress bar with percentage.
- In expanded rows, for Job details the section checkpointing was added.
- In the transform wizard's creation step, for continuous transforms the progress bar is not shown. In a follow up we could add more useful stats there, like what's shown in the transform list's job details.
2019-07-01 13:59:28 +02:00
Walter Rafelsberger
7e88f47c92
[ML] Data Frames: Fixes crash of the source table for complex field values. (#39878)
The data frame wizard's source index preview table would crash with some field values more complex than strings. This PR fixes it by adding the following "special treatment" for these values:

Arrays of strings will be concatenated to a comma separated string in table rows.
Arrays of objects will be rendered as a badge with the label array and a tooltip that says that the full value is available in the expanded row.
In the expanded row, every value that's not a string will be rendered using JSON.stringify().
2019-07-01 13:25:35 +02:00
WangQianliang
19311fb5a2
[Code] refactor file and repository reducer (#39422)
* chore(code/frontend): refactor file and repository reducer

* chore(code/frontend): add types in actions and reducers
2019-07-01 18:51:08 +08:00
Joe Reuter
9d7ab49b36 Check whether vis type exists (#39803)
* check whether vis type exists

* check wether vis type exists for experimental check

* only show object if vis type is valid
2019-07-01 12:04:44 +02:00
Liza Katz
2181e6ee5c
delete unused table_info (#39978) 2019-07-01 12:13:34 +03:00
Liza Katz
09950ea27d
Moved fancy forms into vis editor (#39977) 2019-07-01 12:12:17 +03:00
Liza Katz
3f7d01b82f
Moved pager and pager control directives to doc_table (#39975)
* Moved pager and pager contrlol directives to doc_table

* translation fix
2019-07-01 12:12:03 +03:00
James Gowdy
3d380d199c
[ML] Adding licensing and space limits to privileges checks (#39749)
* [ML] Adding licensing limits to privileges checks

* renaming enum key

* adding ml enabled in space check

* fixing tests

* adding new tests

* adding space tests

* updating types

* fixing type failure

* renaming platinum

* renaming privileges to capabilities
2019-07-01 09:45:41 +01:00
Dario Gieselaar
d4cd8d205d
Execute locally configured pre-commit hooks (#39784)
* Execute locally configured pre-commit hooks

This change enables users to add and execute locally configured pre-commit hookly configured pre-commit hooks. Previously this was not possible because kibana bootstrap installs its own pre-commit in the `.hooks` folder.

To add a locally configured pre-commit hook, simply create a `.pre-commit` file in the root folder. Kibana's pre-commit hook will check if this file exists and if it does, execute it.

* Address review feedback

* remove GIT_PARAMS, because https://git-scm.com/docs/githooks#_pre_commit
2019-07-01 09:22:15 +02:00
CJ Cenizal
c2a14e75f3 EUIfy Watcher (#35301) 2019-06-29 07:05:55 -04:00
Liza Katz
6165e19ef2
Removed unnecessary use of kbn-top-nav in dev tools app (wrapping tabs) (#39785) 2019-06-29 12:19:08 +03:00
Frank Hassanabad
2bf06185da
[SIEM] Adds Machine Learning table anomalies, a pop over UI for anomalies, and machine learning details score (#39483)
## Summary

[SIEM] Adds Machine Learning table anomalies, a pop over UI for anomalies, and machine learning details score. Works on both the hosts page and the network page as well as the details sections of both those pages.

Table
<img width="760" alt="Screen Shot 2019-06-28 at 11 09 39 AM" src="https://user-images.githubusercontent.com/1151048/60359902-96c33e00-9997-11e9-8a0a-92fb8e7d808a.png">

Popover
<img width="764" alt="Screen Shot 2019-06-28 at 11 09 50 AM" src="https://user-images.githubusercontent.com/1151048/60359909-9cb91f00-9997-11e9-96e0-f51ec33cee6f.png">

Details with Popover:
<img width="800" alt="Screen Shot 2019-06-28 at 11 12 14 AM" src="https://user-images.githubusercontent.com/1151048/60359955-bce8de00-9997-11e9-8154-6165b21f25f7.png">


### Checklist

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

- [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)
- [x] 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

- [x] 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-06-29 01:20:15 -06:00
Catherine Liu
af56c9b732
[Canvas] Feat: Fit Workpad to Window (#39864)
* Added fit to window zoom option

Added reset zoom option

Added divider between zoom and reset options

* Fixed zoom in/out from fit to window scale

* PR feedback

* Fixed fit to window with elements way off the workpad

* Ensure zoom level array is always in ascending order

* Updated storyshot
2019-06-28 16:17:55 -07:00
renovate[bot]
d142171366 Update dependency eslint-plugin-import to v2.18.0 (#39934)
* Update dependency eslint-plugin-import to v2.18.0

* fix new import order violations
2019-06-28 15:51:50 -07:00
spalger
0922772b70 skip flaky test (#39927) 2019-06-28 15:46:43 -07:00
Garrett Spong
8a316d2aba
[SIEM] Follow up fixes from PR comments (#39956)
## Summary

Follow-up fixes for https://github.com/elastic/kibana/pull/39766

### Checklist

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

- [X] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) -- Verified in Chrome, FF, & Safari. and IE11 (Only an alignment issue was found in IE11 testing: https://github.com/elastic/ingest-dev/issues/573).
- [X] 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~ -- Will be added in follow-up PR.
- [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-28 16:23:09 -06:00
Joel Griffith
1367413914
Fixing broken reporting URL (#39822) 2019-06-28 15:01:40 -07:00
spalger
c5b4e3264d skip flaky test (#39958) 2019-06-28 14:35:46 -07:00
Matthew Kime
f961b00aee
d13n WatchesService (#39645)
* try $http => npStart.core.http
* d13n
* async cleanup
2019-06-28 16:05:51 -05:00
Corey Robertson
ef2b551e48
[Canvas] Convert Function tests to Jest (#39176)
* Convert function tests to jest

* Fix some bad merge conflict resolutions

* Exclude Server tests from being included in mocha run

* Remove code leftover from testing

* Fix rebase

* Fix paths for running Jest tests

* do not run function server tests as part of test:server

* Move Jest tests to be alongside files
2019-06-28 16:52:16 -04:00
Garrett Spong
6131d1e91b
[SIEM] Adds ML Integration for Installing & Starting/Stopping embedded ML jobs (#39766)
## Summary

This PR is for the initial integration of ML + SIEM, and provides a simple UI within the SIEM App for installing the ML-bundled Jobs added in https://github.com/elastic/kibana/pull/39678, and for starting/stopping Datafeeds.

![create_embedded_ml_jobs](https://user-images.githubusercontent.com/2946766/60295736-af711c80-98e1-11e9-8027-34511e20ead7.gif)

### Features

* Checks installed Jobs and provides UI for creating the SIEM Jobs embedded within ML
* Will only install jobs if `defaultIndexPattern` required by SIEM Jobs is configured
* Installs all jobs with `siem-api-` name prefix, and tags them with the `siem` group
* Provides UI for starting/stopping a Job's Datafeed, and also ensures the Job's `jobState` is set to `closed` when stopping datafeeds
* Provides UI for viewing all `siem` group Jobs or just the Siem Jobs embedded within ML
* UI reflects any changes performed within the ML UI

Note I: Will follow up with linked PR for adding new documentation around this feature

Note II: ConfigTemplate's `name`, `defaultIndexPattern`, and `jobs` have been hardcoded within the SIEM app to match what ML has included in https://github.com/elastic/kibana/pull/39678. Would like to retrieve this from an ML API in future iterations. 

##### Embedded ConfigTemplates
``` ts
const configTemplates = [
  {
    name: 'siem_auditbeat_ecs',
    defaultIndexPattern: 'auditbeat-*',
    jobs: [
      `${siemJobPrefix}rare_process_linux_ecs`,
      `${siemJobPrefix}suspicious_login_activity_ecs`,
    ],
  },
  {
    name: 'siem_winlogbeat_ecs',
    defaultIndexPattern: 'winlogbeat-*',
    jobs: [`${siemJobPrefix}rare_process_windows_ecs`],
  },
];
```


### Todo
* Wire up API for querying ML Privileges and make available to whole SIEM App: https://github.com/elastic/ingest-dev/issues/559 

### Issues Resolved
* Wire up API to create ML Jobs : https://github.com/elastic/ingest-dev/issues/556
* Wire up API to start/stop ML Jobs: https://github.com/elastic/ingest-dev/issues/558
* Wire up API to query existing ML Jobs : https://github.com/elastic/ingest-dev/issues/557
* Create UI to install SIEM Bundled ML Jobs : https://github.com/elastic/ingest-dev/issues/562
* Create UI to start/stop SIEM Bundled ML Jobs: https://github.com/elastic/ingest-dev/issues/563


### Pretty Pictures! 🎉 

##### Initial UI for when no jobs have been installed
![image](https://user-images.githubusercontent.com/2946766/60297207-ef85ce80-98e4-11e9-94bd-b6cbc03f681a.png)

##### Jobs Installed!
![image](https://user-images.githubusercontent.com/2946766/60297265-0b897000-98e5-11e9-9928-06c1e67a6372.png)

##### View all SIEM Group Jobs
![image](https://user-images.githubusercontent.com/2946766/60297372-3ecbff00-98e5-11e9-86aa-45a2b2239139.png)




### Checklist

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

- [X] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) -- Verified in Chrome, FF, & Safari. and IE11 (Only an alignment issue was found in IE11 testing: https://github.com/elastic/ingest-dev/issues/573).
- [X] 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~ -- Will be added in follow-up PR.
- [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-28 14:42:27 -06:00
renovate[bot]
35f5a48b40 Update dependency simple-git to v1.116.0 (#39936) 2019-06-28 13:41:57 -07:00
renovate[bot]
c5e481170c Update dependency eslint-plugin-jest to v22.7.1 (#39935) 2019-06-28 13:40:56 -07:00
renovate[bot]
b02bacbe0d Update dependency @types/fetch-mock to v7.3.1 (#39931) 2019-06-28 13:40:29 -07:00
renovate[bot]
25e8347259 Update dependency babel-eslint to v10.0.2 (#39932) 2019-06-28 13:39:07 -07:00
Robert Monfera
b71ab9dae9
[Canvas] Feat: Box select (#32995)
* Box select: highlight box

* Lint

* Create interaction boundary

* PR feedback: selection box should not include group members (therefore undoing the box won't dissolve said groups)
2019-06-28 22:30:44 +02:00
Patrick Mueller
0d2d3d6c67
Change x-pack actionType unencryptedAttributes to be non-optional (#39836)
* Change actionType unencryptedAttributes to be non-optional

Will help ensure that action type creators actually spell out which
properties should NOT be encrypted.  As an example, when implementing
the email action type, I didn't have a value set, so all properties
were encrypted, which is not ideal.

* add now-required unencryptedAttributes to tests

* fix snapshot in test
2019-06-28 16:29:01 -04:00
Robert Monfera
db13fa021e
Fix: native HTML5 drag&drop shouldn't kick in (#39861) 2019-06-28 22:28:19 +02:00
Jen Huang
32107a8da7
Fix EuiCard selected i18n tokens (#39921)
* Fix EuiCard selected i18n tokens

* Update test
2019-06-28 13:24:13 -07:00
Angela Chuang
9a7eb85e97
split queries (#39849) 2019-06-29 04:14:23 +08:00