Commit graph

2827 commits

Author SHA1 Message Date
Spencer
f87b767265
[ftr/services/es] use apiVersion from es plugin (#30733) 2019-02-11 17:18:19 -08:00
Spencer
133ba2360f
[esArchiver] stable archives (#30477)
* [esArchiver/save] serialize with stable json stringify

* [esArchives] rebuild all archives
2019-02-11 11:16:25 -08:00
Matt Bargar
fa2eab7718
skip flaky dashboard filtering test (#30682) 2019-02-11 12:14:37 -05:00
Spencer
da010f6ef0
[ftr/uiSettingDefaults] disable telemetry by default (#30473) 2019-02-11 08:37:14 -08:00
Court Ewing
2ce51a5be5 Update paths to ui, server, deprecation, plugin_discovery in src/legacy
This commit accompanies the four that precede it. Rather than squash
them altogether, the four previous commits all do nothing except move
files to help avoid conflicts.
2019-02-11 10:41:37 -05:00
Matt Bargar
247502083b
Enable query bar datepicker in core apps where appropriate (#30171)
Updates discover, visualize, and dashboard to use the date picker added to the query bar in #29130. There are still some areas where we use the top nav date picker, like Timelion and TSVB which don't have a query bar.
2019-02-08 17:02:53 -05:00
Spencer
476c4cd099
[ftr/services/kbnServer] set uiSetting defaults more often (#30459)
* [ftr/services/kbnServer] set uiSetting defaults more often

* [ftr/services/uiSettings] only init defaults when they're defined
2019-02-08 13:18:16 -08:00
Chris Davies
16c2dcb9ca
Make migration mapping change detection more robust (#28252)
Modify the way migrations detect mapping changes. The previous approach simply
diffed the index mappings against the mappings defined in Kibana. The problem was
that sometimes the index mappings will *always* differ. For example, if an index template
is affecting the .kibana* indices. Or if Elasticsearch adds a new magical mapping that
appears in the index, even though not specified (this happened in the 7.0 release). So,
instead of diffing, we now store hashes of our mappings in _meta, and compare against
those.
2019-02-08 07:43:07 -05:00
spalger
bd56a0d9dd skip super flaky test 2019-02-07 22:33:34 -08:00
Matt Bargar
af2da97974
Makes KQL the default query language for new searches (#27092)
Changes the default query language to KQL in all apps that respect the `search:queryLanguage` advanced setting.
2019-02-06 17:18:25 -05:00
Nathan Reese
6ad036b187
Replace angular timepicker with EuiSuperDatePicker (#29204)
* replace kbnTimepicker directive with EuiSuperDatePicker

* remove kbnTimepicker directive

* remove bootstrap datepicker

* Embed timepicker in query bar (#29130)

* replace kbnTimepicker directive with EuiSuperDatePicker

* remove kbnTimepicker directive

* remove bootstrap datepicker

* embed timepicker in query bar

* flesh out date picker in query bar for maps app

* wire up refresh config

* fix bug with way update function called by watcher

* get maps application functional tests working with new timepicker

* update setAbsoluteRange for EuiSuperDatePicker

* replace setQuickTime with calls to setAbsoluteTime

* remove open time picker button in discover empty results view

* pass config values to super-date-picker directive

* remove getPrettyDuration

* clean up typescript lint problems

* some functional test fixes

* try something else to fix I18n problems

* fix some more functional tests

* update query_bar jest test

* remove unused method in kbn_global_timepicker

* do not import removed timepicker styles

* remove mode from time state

* remove mode from time_history interface

* fix problem with ui_settings_defaults

* fix failing TSVB functional test

* another round to test fixes

* more functional test changes

* fixes for failing tests

* add retry block to flaky tsvb test

* styles/bootstrap_dark.less

* fix functional tests

* call fetch event even when times are the same

* add retry around flaky tsvb test

* fix timefilter jest test, attempt to fix another flaky functional test

* revert emitting fetch outside of areTimePickerValsDifferent check

* clean up time mode code that is no longer needed in dashboard

* fix timefilter tests changed by timefilter emit revert
2019-02-05 20:45:31 -07:00
Caroline Horn
06181346fe
Dashboard design updates (#29896)
* Dashboard visual pass (initial)

* Adjusted panel header

..And used a different selector for editing mode to fix bug of `.dshPanel--editing` needing a hard refresh to update.

* better positioning of legend toggle

* Fixed legend toggle position

* Fixed some visualize sidebar font sizes

* better position for resize handle

* Consolidated error and warning messages

* Last edits and removing old testing things

* snaps

* Fix tag cloud

* Comment out markdown-it for now, since it’s not working

* update area chart snapshot

* Styled empty dashboard state

* PR feedback

 - background fix
- dark mode highlight color fix
- euiScrollbars
- euiSpacer

* Fix reporting

* More PR comments

- No edit button in mobile
- No markdown comment for panel error
- i18n id addition
- Remove euiHeader sharing fix

* Revert “hide edit button”
2019-02-05 13:42:37 -05:00
Dmitry Lemeshko
3a260b02cd
[visualize/_point_series_options] update test with proper wait: fixes 29502 (#29950) 2019-02-05 10:31:26 +01:00
Spencer
b4725b7d34
Remove dependency on doc versions (#29906)
See https://github.com/elastic/elasticsearch/pull/38254

Using the `version` parameter to implement optimistic concurrency is not going to be supported in 7.0, so we need to replace our usage of document version with the new `_seq_no` and `_primary_term` parameters. These fields are returned in the same way that `_version` was returned on all read/write requests except for search, where it needs to be requested by sending `seq_no_primary_term: true` in the body of the search request. These parameters are sent back to Elasticsearch on write requests with the `if_seq_no` and `if_primary_term` parameters, and are functionally equivalent to sending a `version` in a write request before elastic/elasticsearch#38254.

To make these updates I searched the code base for uses of a `version` and `_version`, then triaged each usage, so I'm fairly confident that I got everything but it's possible something slipped through the cracks, so if you know of any usage of the document version field please help me out by double checking that I converted it.

- [x] **Saved Objects**:  @elastic/kibana-platform, @elastic/es-security - for BWC and ergonomics the `version` provided by the Saved Objects client/API was not removed, it was converted from a number to a string whose value is `base64(json([_seq_no, _primary_term]))`. This allows the Saved Objects API and its consumers to remain mostly unmodified, as long as the underlying value in the version field is irrelevant. This was the case for all usages in Kibana, only thing that needed updating was tests and TS types.

- [x] **Reporting/esqueue**: @joelgriffith, @tsullivan - the version parameter was used here specifically for implementing optimistic concurrency, and since its usage was contained within the esqueue module I just updated it to use the new `_seq_no` and `_primary_term` fields.

- [x] **Task Manager**: @tsullivan @njd5475 - Like esqueue this module uses version for optimistic concurrency but the usage is contained with the module so I just updated it to use, store, and request the `_seq_no` and `_primary_term` fields.

- [ ] **ML**: @elastic/ml-ui - Best I could tell the only "version" in the ML code refers to the stack version, 077245fed8

- [ ] **Beats CM**: @elastic/beats - Looks like the references to `_version` in the code is only in the types but not in the code itself. I updated the types to use `_seq_no` and `_primary_term`, and their camelCase equivalents where appropriate. I did find a method that used one of the types referencing version but when investigating its usage it seemed the only consumer of that method was itself so i removed it. 52d890fed7

- [x] **Spaces (tests)**: @elastic/kibana-security - The spaces test helpers use saved objects with versions in a number of places, so I updated them to use the new string versions where the version was predictable, and removed the assertion on version where it wasn't. We test the version in the saved objects code so this should be fine.
2019-02-04 21:13:34 -08:00
Nathan Reese
908b387236
[Maps] add saved objects for all sample data sets (#28797)
* [Maps] add saved objects for all sample data sets

* add functional tests that compare sample data maps to baseline images

* add check for layer loading in functional tests

* try something out in CI

* try map without EMS regions

* add weblogs test but hide region layer

* skip tests with EMS vector layers

* gis-map to map and ES_GEOHASH_GRID to ES_GEO_GRID

* add resolution property to ES_GEO_GRID source descriptor

* move alphaValue from style descriptor to layer descriptor and rename to alpha

* terms join label change 'group by' to 'of'

* ensure sample data sets work with no internet access

* get functional tests working with updated full screen snapshots

* delete gis folder left overs

* give time for visibility to toggle to fire

* make web logs screen comparision more forgiving

* wait for layers to load on full screen
2019-02-04 20:18:11 -07:00
Joe Reuter
93fef68647
Fix fieldformatter calls in pipeline helper and add functional test for range aggs (#29842) 2019-02-04 11:25:06 +01:00
Spencer
32190e3ecb
[pageObjects/visualize] use testSubjects.setValue() to avoid partial input (#29903)
Fixes https://github.com/elastic/kibana/issues/29373
Fixes https://github.com/elastic/kibana/issues/29833

This flaky test is caused by the filter input box not being filled in completely. I was able to reproduce this once locally, but only after running the tests a couple times. To fix this I tried switching to the `testSubjects.setValue()` function, which focuses the input and clears its value before attempting to type into the field. This seems to have a higher success rate as I was able to run the test 40 times after making the change without a failure.
2019-02-01 22:38:24 -08:00
Court Ewing
7a87f03ec7
Introduce content security policy (CSP) (#29545)
* csp: nonce and unsafe-eval for scripts

To kick things off, a rudimentary CSP implementation only allows
dynamically loading new JavaScript if it includes an associated nonce
that is generated on every load of the app.

A more sophisticated content security policy is necessary, particularly
one that bans eval for scripts, but one step at a time.

* img-src is not necessary if the goal is not to restrict

* configurable CSP owned by security team

* smoke test

* remove x-content-security-policy

* document csp.rules

* fix tsconfig for test

* switch integration test back to regular js

* stop looking for tsconfig in test

* grrr, linting errors not caught by precommit

* docs: people -> you for consistency sake

Co-Authored-By: epixa <court@epixa.com>
2019-02-01 17:11:38 -05:00
Dmitry Lemeshko
83a2f7b030
[page_objects/visual_builder_page] fixes #29670 with proper wait for visualization loaded (#29741) 2019-02-01 11:11:24 +01:00
dave.snider@gmail.com
037fcf4ab5
Inter UI and roboto mono font stack. Remove K6 theming. We did it (#29152)
Adds inter ui as the default font for Kibana. Removes the K6 theming. Kibana now uses EUI default.
2019-01-31 20:59:56 -08:00
Matt Bargar
8a83955650
Re-introduce new filter bar (#29752)
Fixes the build issues introduced in #25563 and re-introduces the new react/eui/typescript filter bar, essentially reverting the revert in #29662. I did have to resolve one merge conflict in query_bar.tsx, and re-deleted all of the old filter bar code where translation code had been added.
2019-01-31 18:36:26 -05:00
Caroline Horn
90554c1744
Visualize sidebar design updates (#29658)
* Bring over all ui-select styles and convert color vars

* Some bootstrap dark theming

* Consolidating non-EUI form control styles

* Update some tutorial pieces set to EUI

* Fix up visualize editor sidebar as best as I can

* PR feedback

- comment for image
- euiScrollbar
- euiBorderThick

* Fix advanced toggle test

* Don’t show IE’s select arrow
2019-01-31 16:46:05 -05:00
Luke Elmers
402b8cfa8a
Test dashboards in spaces & interpreter socket. (#29459) 2019-01-31 09:44:23 -07:00
Ryan Keairns
bbc68b0000
[7.0] Adds new K7 side navigation (#28940)
* initial commit of K7 side nav

* [ui/persistedLog/recentlyAccessed] support observing history items

* [globalNav] use real recentlyAccessed and navLink data

* fixes header logo and mobile layout

* handle hidden links and no recents, use size vars

* handle hidden links and no recents, use size vars

* adds prop to wrap flyout link text

* fix menu scroll for IE

* [chrome/headerGlobalNav] fix typescript issues

* [chrome/headerGlobalNav] only ignore types that are actually missing

* update EUI to 6.6.0

* Revert "update EUI to 6.6.0"

This reverts commit 048cbf9157f8fc7410d4cf8e017b210c4548104e.

* [chrome] remove HeaderAppMenu component

* [ftr/services/appsMemnu] update for new style

* [ftr/discover] tweak size of discover tests and size-dependent assertions

* [chrome] disable offsets in embed mode

* [ftr/discover] try sticking with original screen width

* [ftr/discover] try to force screensize before checking axis labels

* [ftr/services/appMenu] ensure menu closed after clicking app

* uptime app icon, mobile header size removed

* [ftr/discover] make assertion resilient to minor changes in vis width

* [chrome] add types for nav apis

* [chrome/recentlyAccessed] display app icons when possible

* [ftr/discover] make a little wider so scroll doesn't interfer with vis width

* [ftr/services/globalNav] fix test subject
2019-01-31 10:13:40 -06:00
Peter Pisljar
db64c791a2
adding tests for vilisb legend filtering (#29604) 2019-01-31 04:41:21 -08:00
Nathan Reese
c1d6a1bd76
[Maps] use EuiSuperDatePicker in QueryBar instead of Angular timepicker in Top Nav (#29235)
* Embed timepicker in query bar (#29130)

* replace kbnTimepicker directive with EuiSuperDatePicker

* remove kbnTimepicker directive

* remove bootstrap datepicker

* embed timepicker in query bar

* flesh out date picker in query bar for maps app

* wire up refresh config

* fix bug with way update function called by watcher

* get maps application functional tests working with new timepicker

* remove some changes outside of scoped work

* clean up typescript lint problems

* fix query_bar I18n lint error

* update query_bar jest test

* grab some parts missing from one cherry-pick

* pass dateRange to updateQueryAndDispatch when app state changes

* use timefilter disable methods to hide timepicker from top naav

* get selected refresh unit

* use EuiSuperUpdate button

* Fix responsive sizing of datepicker (#29)

* set isDisabled on EuiSuperUpdateButton

* review feedback

* remove ts-ignore comment from defaultProps, fix query_bar snapshot

* make new props optional

* fighting with ts linter

* do not include dateRangeFrom and dateRangeTo in isDirty when shoDateRange is not true

* pull initial query from UI settings
2019-01-30 17:02:42 -07:00
Matt Bargar
45b24afe83
Revert "Migrate filter bar to React, EUI, and Typescript (#25563)" (#29662)
This reverts commit 410c094547.
2019-01-30 17:00:42 -05:00
Mike Côté
1b0f595f01
Add new "references" attribute to saved objects for relationships (#28199)
* Add new references attribute to saved objects

* Add dual support for dashboard export API

* Use new relationships API supporting legacy relationships extraction

* Code cleanup

* Fix style and CI error

* Add missing spaces test for findRelationships

* Convert collect_references_deep to typescript

* Add missing trailing commas

* Fix broken test by making saved object API consistently return references

* Fix broken api integration tests

* Add comment about the two TS types for saved object

* Only return title from the attributes returned in findRelationships

* Fix broken test

* Add missing security tests

* Drop filterTypes support

* Implement references to search, dashboard, visualization, graph

* Add index pattern migration to dashboards

* Add references mapping to dashboard mppings.json

* Remove findRelationships from repository and into it's own function / file

* Apply PR feedback pt1

* Fix some failing tests

* Remove error throwing in migrations

* Add references to edit saved object screen

* Pass types to findRelationships

* [ftr] restore snapshots from master, rely on migrations to add references

* [security] remove `find_relationships` action

* remove data set modifications

* [security/savedObjectsClient] remove _getAuthorizedTypes method

* fix security & spaces tests to consider references and migrationVersion

* Add space id prefixes to es_archiver/saved_objects/spaces/data.json

* Rename referenced attributes to have a suffix of RefName

* Fix length check in scenario references doesn't exist

* Add test for inject references to not be called when references array is empty or missing

* some code cleanup

* Make migrations run on machine learning data files, fix rollup filterPath for savedSearchRefName

* fix broken test

* Fix collector.js to include references in elasticsearch response

* code cleanup pt2

* add some more tests

* fix broken tests

* updated documentation on referencedBy option for saved object client find function

* Move visualization migrations into kibana plugin

* Update docs with better description on references

* Apply PR feedback

* Fix merge

* fix tests I broke adressing PR feedback

* PR feedback pt2
2019-01-30 15:53:03 -05:00
Matt Bargar
410c094547
Migrate filter bar to React, EUI, and Typescript (#25563)
Rewrites the filter bar in React, EUI, and Typescript. Updates the look and feel of the filter bar and makes it consistent with the rest of K7.
2019-01-30 15:48:31 -05:00
Mike Côté
9eef63f783
Allow passing a default operator to use on saved object client find operations (#29339)
* Allow passing a default operator to use on find operations

* Default operator to OR like elasticsearch to avoid passing null

* Add dashboard search tests

* Make search_operator optional

* Fix query_params.test.js

* Include searchOperator in saved_object_finder

* Apply PR feedback

* Rename searchOperator to defaultSearchOperator
2019-01-30 11:33:44 -05:00
Chris Davies
2510ccb0ae
Upgrade Kibana to Elasticsearch 7.0 (#29184) 2019-01-30 09:08:58 -05:00
Spencer
343ce0ff31
[pageObjects/visalize/waitForRenderingCount] wait for rendering count to be >= (#29366)
We've seen a number of flaky test failures where the tests are waiting for the rendering count to be `11` but it is `12` for some reason (which is probably totally fine). This is causing tests to regularly fail when they probably shouldn't, so I've updated the `PageObjects.visualize.waitForRenderingCount()` to accept a `minimumCount` instead of an exact count that is expected. I've also updated the function to use `retry.waitFor()` for slightly better logging.

```
[00:01:13]               │ debg Waiting up to 20000ms for rendering count to be greater than or equal to [3]...
[00:01:13]               │ debg TestSubjects.find(visualizationLoader)
[00:01:13]               │ debg findByCssSelector [data-test-subj~="visualizationLoader"]
[00:01:13]               │ debg -- currentRenderingCount=2
[00:01:13]               │ debg TestSubjects.find(visualizationLoader)
[00:01:13]               │ debg findByCssSelector [data-test-subj~="visualizationLoader"]
[00:01:13]               │ debg -- currentRenderingCount=3
```
2019-01-25 13:56:52 -08:00
Luke Elmers
c6f0595262
Remove nested table splits from table vis (#26057) 2019-01-25 10:13:19 -07:00
Marco Vettorello
b3eacc04d2
Fix timelion data-render-complete attribute on resize (#29320)
* Fix timelion missing renderer on resize

Adding a watch to the renderComplete promise to fix missing rendering of chart
when the resize observer detect a change in size.
Removed the existing resize observer.

* Revert removing observe resize

It's need on the timelion app to resize since that app doesn't use
visualize loader

* Change double watch to watchgroup

* Reenable skipped dashboard test
2019-01-25 15:50:04 +01:00
Spencer
879025e603
Implement global dark theme (#28445)
* [scss] build a light/dark theme for each style sheet, only include correct stylesheet

* Created dark theme Bootstrap

Right now it’s importing both dark and light theme, but light is last so it’s overriding. Not sure how to only import the one or the other.

* migrate light/dark style to unique webpack bundle

* [build] fix log messaage about built sass

* [build/notice] deduplicate notices

* [uiRender/bootstrap] make try auth if necessary

* [visualize/editor] set reversed prop

* remove unnecessary change

* [styles] show toast when theme:darkMode is changed

* [styles] update copy

* [uiRender] default dark mode to false
2019-01-24 17:26:23 -08:00
Spencer
65c80048fd
[ftr/dashboard] disable flaky suite (#29299) 2019-01-24 15:42:05 -08:00
spalger
56cd6001c0 [ftr/management] fix misnamed method 2019-01-24 11:15:53 -08:00
Matthew Kime
f897026e1f
management/kibana/indices => management/kibana/index_patterns (#29151)
* partial progress

* fix routing, account for create flow

* fix test

* fix test

* fix test

* fix next page after delete

* fix test

* indices refs to index_patterns as appropriate

* more refactor and potential test fix

* change more urls
2019-01-24 08:10:52 -06:00
Spencer
78299c08e3
[es] when specifying path with vars always use encodeURIComponent (#29210)
Fixes #29194

In node 10, urls are validated to not include any multi-byte characters, which wouldn't be possible if we were always encoding variables injected into URLs but we missed a couple places.
2019-01-23 18:33:52 -08:00
Spencer
c052613962
[dashboard+gis] remove dark mode options (#29017)
* [dashboard+gis] remove dark mode options

* [reporting/extract] restore fixtures

* remove mentions of old `.theme-dark` class

* import panel styles from panel/_index.scss
2019-01-23 14:29:35 -08:00
Dmitry Lemeshko
5b67941b5f
page_objects updates prior webDriver migration (#28941)
* page_objects updates prior webDriver migration

* [services/test_subjects] set default find timeout to timeouts.find

* remove redundant waitUntilLoadingHasFinished
2019-01-23 09:40:57 +01:00
Silvia Mitter
414dec39cc
[APM] Remove dashboards (#29043)
related to #1673
2019-01-21 19:08:58 +01:00
Dmitry Lemeshko
cf386f1c7d
Add data rendering count for visualisation (#28936)
* add RENDERING_COUNT_ATTRIBUTE

* update tests with new wait for visualization

* update 'tile map visualize app' tests with await and waitForVisualization

* update tests with waitForVisualization

* remove waitVisualisationLoaded

* fix naming suggestion

* remove redundant waiting in functional tests
2019-01-21 13:20:27 +01:00
Rashmi Kulkarni
c8c9313c31
If running against a proxy with port 8000, navigation broke - this PR attempts to fix it . (#28973)
* modified to test against a proxy set up -else the navigation will break.
2019-01-18 14:46:15 -08:00
Spencer
61ca36f15d
Switch to K7 design by default (#29009)
* [visualize] update breadcrumbs when updating visualization

* [ftr] auto-scroll elements passed the fixed header if necessary

* [uiSettings] enable the k7design by default

* [ftr/services/flyout] add ensureClosed() and ensureAllClosed()

* [ftr/services/globalNav] implement globalNav service

* [ftr/services/appsMenu] implement service for using app menu

* [ftr/services/userMenu] add service for using user menu

* [ftr/discover+visualize] update assertions that are based on the app width

* [ftr/monitoring] pass test subjects to new breadcrumbs

* [headerGlobalNav] don't offset the app container in embed mode

* update heights for slightly smaller header
2019-01-18 12:39:01 -08:00
Spencer
a8619805f3
[pageObjects/visualize] combine common assertions into helper (#28945)
While working on https://github.com/elastic/kibana/pull/28503 an update needs to be made to an assertion that is copy/pasted all over the place. To make the process simpler I've added a new helper that does the work in one place and allows updating once.
2019-01-18 10:08:08 -08:00
Peter Pisljar
85bdd22f91
Pipeline field formatting (#28746) 2019-01-17 22:11:49 -08:00
Spencer
4d40ddff7a
Implement config for disabling welcome screen (#28888)
As suggested by @legrego in #28792, this PR adds a config flag to completely disable the welcome screen, which is enabled by the functional test runner to ensure that the welcome screen doesn't pop up.
2019-01-17 12:13:13 -08:00
Spencer
e355ec47aa
[ftr/element] custom scrollIntoView to support fixed header (#28727)
With https://github.com/elastic/kibana/pull/28503 we will be enabling the k7design by default, which adds a fixed header to the top of the page. This causes issues with the default "scroll into view" logic, as elements which are in the top overflow will be scrolled into view but then covered by the header.

My first attempt to solve this was adjusting the layout to only scroll the content below the header. This allowed the [standard scroll into view algorithm](https://drafts.csswg.org/cssom-view/#element-scrolling-members) to function as intended, but had a slightly worse UX on OSes like macOS, and @elastic/kibana-design ultimately pushed back because not allowing the body to scroll has other implications.

Instead I have implemented a `LeadfootElementWrapper#scrollIntoViewIfNecessary()` method which is automatically called before each `#click()` and `#moveMouseTo()` call. This new method scrolls the element into view when necessary, and then additionally adjusts the scroll position of the root scroll element by the necessary pixels if the top of the element is within `layout.fixedHeaderHeight` pixels.
2019-01-16 12:37:40 -08:00
Spencer
3bea7a31d5
[pageObjects/welcome] automatically disable on navigation (#28792)
* [pageObjects/welcome] automatically disable on navigation

* [pageObjects/welcome] disable on beforeTests to not slow down navigation

* [ftr/services/welcome] also disable welcome after logout

* [ftr/services/welcome] revist home after disabling welcome
2019-01-16 09:45:28 -08:00