Commit graph

2577 commits

Author SHA1 Message Date
Stacey Gammon
cd92cff665
Remove uiState from dashboard - communicate via the panelState instead (#14949)
* Remove uiState from dashboard - communicate via the panelState instead

* migrate old app state from the url

* Add comment about migration and why the unused uiStateJSON field is kept around still
2017-11-29 11:26:14 -05:00
Matt Bargar
f6b0623b37
Revert #15169 (#15220)
Fixes #14159
2017-11-29 11:06:10 -05:00
Peter Pisljar
e9bd952f9b
fixing field formatters for gauge (#15145)
* fixing field formatters for gauge

* fixing the if statement

* using lodash _.has for the if statement

* adding selenium test
2017-11-29 13:18:45 +01:00
Nathan Reese
074d7cef8c
[timelion] provide argument suggestions when argument name not provided (#15081)
* get wiring done for timelion application functional tests

* add tests for expression type ahead functions, arguments, and argument values

* provide argument suggestions when argument name not provided

* updates from cjcenizal review
2017-11-28 08:51:11 -07:00
Tim Roes
6584c6d5b2
Add functional tests, that banner is shown (#15121) 2017-11-28 10:16:00 +01:00
Matt Bargar
2911418677
Temporarily disable scripted field filter tests (#15169)
Commenting out 4 tests that are failing due to elastic/elasticsearch#26760 so we can bump ESVM snapshots. We'll need to revert this PR once elastic/elasticsearch#26760 is fixed.
2017-11-27 16:30:02 -05:00
Spencer
90e2aa001b
[savedObjects] Use index template (#14271)
* [es][savedObjects/index] put template on each savedObject write

The elasticsearch plugin currently checks for the Kibana index on each iteration of the healthCheck, and creates it if it does not exist. This removes that step from the healthCheck and instead, before each savedObject is written to elasticsearch, ensures that Elasticsearch has the necessary index template should the write result in index creation.

The healthCheck still has the `patchKibanaIndex()` logic, which checks the type in the Kibana index and adds any missing types. This step now does nothing when the Kibana index does not exist, and does what it has always done when it does.

* [ftr] remove unused kibanaIndex service

(cherry picked from commit b1ef897dafeb6d43fe279776e44a9d793a389dc3)

* [savedObjects/integration] create now creates kibana index

* [es/healthCheck] remove use of format()

* [es/healthCheck/tests] use sinon assertions

* [es/patchKibanaIndex] test for kibana index missing behavior

* [savedObjects/errors] add tests for EsAutoCreateIndexError

* [savedObjects/config] deprecate and remove savedObjects.indexCheckTimeout config

* use dangling commas consistently

* [ui/error_auto_create_index] fix class names

* [ui/savedObjectsClient] no need to specify basePath

* [eslint] fix linting issue
2017-11-21 17:05:46 -07:00
Stacey Gammon
45eaa09b9a
add some new tests that the uiState migration in the url will benefit from (#15063) 2017-11-21 15:07:58 -05:00
Tim Roes
d4442e78d7
Fix Kibana crashing when resizing a tag cloud too small (#15001)
* Don't allow d3-cloud to run on 0 size, fix #14833

* Add test that validates correct resizing
2017-11-21 20:48:26 +01:00
Peter Pisljar
f22cd98825
removing more tile map tests which are flaky (#15082) 2017-11-21 19:59:30 +01:00
Spencer
319832774a
[dashboard/functionalTests] stabilize initialization ordering (#15031) 2017-11-20 17:01:41 -07:00
Stacey Gammon
856d012b46
ensure time picker open in retry loop (#15034)
* ensure time picker open in retry loop

* clean up isTimepickerOpen to use testSubjects.exists
2017-11-20 09:55:28 -05:00
Peter Pisljar
b03eac4376
removing failing tilemap tests (#15048) 2017-11-20 13:18:06 +01:00
Stacey Gammon
337def12bd
Fix mistakes added in bwc url test PR (#15038)
* Fix mistakes in bcc tests

* Correct data-test-subj name
2017-11-17 18:06:27 -05:00
Stacey Gammon
7152d334cf
Add BWC url tests for 6.0 (#15033)
Also adds some stabilization by refactoring some retries and
expectations.
and fixes a bug that snuck in between two PRS where the pie slice css
changed.
2017-11-17 14:59:16 -05:00
Spencer
60298ec8b2
[ftr] default window size (#14834)
* [ftr/mocha] revert Mocha UI assigments after loading test files

* [ftr] add beforeTopLevelSuite and afterTopLevelSuite lifecycle hooks

* [ftr] add defaultWindowWidth and defaultWindowHeight options

Adds two configuration parameters to the functional test runner which
will set the windowSize before running the tests in any file and
restores the original window size when the tests complete.

Individual test files can set the windowSize within its own before() or
beforeEach() handlers using the same `command.setWindowSize()` command.

* [ftr/assignmentProxy] use better naming

* [ftr] restore initial window size after each suite

* [ftr] improve error message for unexpected suite definitions

* [ftr/remote] remove configuration option, rely on suite-level changes

* [ftr] fix stack manipulation order

* [ftr/remote] write tests for window size management
2017-11-17 11:15:02 -06:00
Stacey Gammon
de1b98cdb7
Add a couple tests with queries and saved searches linked to visualizations (#14878)
* Add a couple tests with queries and saved searches linked to visualizations

Fix issue when edit link is clicked too soon and embeddable hasn't finished loading

* attempt to fix flakiness

* remove duplicate lines
2017-11-17 10:24:08 -05:00
Peter Pisljar
5793410a35
pie chart labels (#12174)
* pie labels

* add simple unit test

* fixing dashboard test

* fixing basedo on review

* simplifying conflict resolution

* removing unused code

* cleanup code

* minor changes based on review

* updating option templates to match new design

* updating truncate_labels to work with chars instead pixels
2017-11-17 09:57:02 +01:00
Spencer
5cddc10077
Upgrade to eslint 4 (#14862)
* [eslint] upgrade to 4.10.0

* [eslint-config-kibana] limit jest config to jest test files

* [ui_framework] remove trailing comma from rest-spreads

* [dashboard/tests] tag jest helpers with .test.js suffix

* explicitly import expect.js where used

* [eslint] apply auto-fixes

* [eslint] manually add/wrap some parens for compliance

* [npm] point to local packages for testing/review

* [jest] remove .test extension from jest helpers

* [ui_framework] fix trailing comma removal from 3bc661a1c8

* [packages] upgrade eslint packages
2017-11-14 18:16:59 -07:00
Tyler Smalley
188796314d
Removes index.mapper.dynamic from test fixture (#14930)
This was removed in ES 6.0+

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2017-11-14 07:25:38 -08:00
Matt Bargar
5321d7a567
Remove support for expression based scripted fields (#14310)
This PR removes the ability to create scripted fields with the expression language. It also adds an error message to the scripted field list page if any expression scripts already exist which instructs the user to convert all their scripts to painless.
2017-11-13 15:39:53 -05:00
Peter Pisljar
5f1f28ba41 reverts metric visualization (#14052)
Uses the previous html/css rendering code instead of the svg-based rendering for simple metrics.
2017-11-09 14:49:58 -05:00
Stacey Gammon
6d4972869b
Add new title query param to dashboard listing page (#14760)
* introduce a mechanism to load a dashboard by title is a single one is found, if not, to refill the search box on the listing page

* Make case insensitive and prevent listing page from "blipping" up on the screen before the redirect

* Add tests
2017-11-09 14:23:14 -05:00
Tim Roes
0661a4aa64
Fix issue, where tags are vanishing after double resize (#14822)
* Fix issue, where tags vanishing after resizing

* Also fix rawText in debug log
2017-11-08 16:18:14 +01:00
Jonathan Budzenski
34b4e8c05d
[jenkins] Add docs script (#14769)
* [jenkins] Add docs script

* remove xvfb
2017-11-07 15:37:28 -06:00
Stacey Gammon
f806d64e60
Add dashboard tests (#14775)
* add a test that will fail due to the current TSVB bug

* add a test to catch the latest bug with saved searches

* reorder array so tests pass

* Update tests since the first panel is TSVB and won't have a spy pane toggle
2017-11-07 14:59:18 -05:00
Stacey Gammon
81e89685e1
Don't update layout multiple times in updateLayout function (#14780)
* Don't update panels in state one at a time when layout changes

* Add test that would have caught the bug

* fix test

Hmmm, I thought grabbing the panels the second time would change their
order predictably but seems no.  Still unsure if the order is
garaunteed.

* Need to split out merging panel updates action and setting panels

Tests caught this issue, woot.

* Fix remaining setState warnings by not calling getEmbeddableHander in render
2017-11-06 15:36:46 -05:00
Thomas Neirynck
22a2fa0f4a
add more regionmaps tests (#14735) 2017-11-06 09:31:15 -05:00
Stacey Gammon
ac5ae44590
Add new "use margins" option to add separation between panels (#14708)
* Add an option to add margins between panels

Make it a boolean useMargins to make this even simpler

* Fix issue with undefined not matching false and triggering a dirty state

* add some test helpers and css for plugin use-age

* default to margins on for new dashboards.

* use const variable syntax for margins

* Fix issue with older dashboards being bumped into useMargins: true mode
2017-11-02 19:17:43 -04:00
Stacey Gammon
92964ef45f
Sync saved searches that don't have local modifications on a dashboard (#14452)
* Add tests to catch error

* Fix test

* Don't store column and sort state in panel uiState unless explicitly overridden in a dashboard.

* add debug messages

* Elements can go stale between the find by and the click event so wrap in a retry

* fix bad merge with master
2017-11-02 16:47:40 -04:00
Stacey Gammon
abef22b2ef
only show expand toggle, in view mode, on hover (#14706)
* only show expand toggle, in view mode, on hover (and focus for accessibility)

* Fix tests
2017-11-02 15:00:57 -04:00
Stacey Gammon
5984553962
Fix issue with saved search changes not being preserved on a dashboard (#14678)
* add tests to catch the issue

* use Object.assign instead of the spread operator

since we want it to modify the original object
2017-10-31 08:30:47 -04:00
Chris Roberson
677742ee06
[Management] [7.0] Handle saved search import better (#14637)
* Port fixes from #14625 to 7.0

* Fix linting issue
2017-10-27 11:46:45 -04:00
Chris Cowan
bb859d93b9 [TSVB] Fix bugs with the new split gauge/metric behavior (#13823)
* Adding a check to make sure everything is available to render

* Adding some safety

* Fixing a bug with the label

* Adding an additional sleep to wait for the new data to arrive.
2017-10-26 15:47:57 -07:00
Stacey Gammon
fc27d2abe6 wrap the check in a retry so we know it's not just taking a little long for the css changes to take affect in the UI (#14575) 2017-10-26 09:55:09 -04:00
CJ Cenizal
05cbb92965 [eslint-config-kibana] Apply AirBnB spacing rules (#14522)
* Add AirBnB key-spacing rule.
* Add AirBnB comma-spacing rule.
2017-10-25 15:08:05 -07:00
CJ Cenizal
ec38367b70 [UI Framework] Improve KuiContextMenu keyboard navigation UX (#14434)
* Refactor focus state logic to use the React lifecycle correctly.
* Update KuiPopover snapshots.
* Remove unnecessary isVisible prop from KuiContextMenu.
* Allow user to both tab AND use the arrow keys for navigation.
* Reinstate ability to tab and shift-tab to the title of KuiContextMenuPanel.
* Release focus from Dashboard panel options KuiContextMenu by closing it when you select an option.
* Update KuiContextMenu example to demonstrate best practice of closing the menu when an item is clicked.
* Replace native transitionend event handler with onAnimationEnd React event handler.
2017-10-24 17:37:51 -07:00
Stacey Gammon
9c8887ab74 Fix flaky test (#14543)
Doesn’t fix the underlying issue (which hasn’t been determined yet) but
it should get the build passing consistently again.
2017-10-24 16:55:16 -04:00
Thomas Neirynck
147c6c2832 Re-enable the tilemap test (#14532)
Enables the tile-map test. this was disabled due to CORS-issues on the server end. These are now resolved.

This reverts commit e7fb1b0d8f.
2017-10-24 11:08:21 -04:00
Nathan Reese
88f3af406d Scale histogram aggregation interval to avoid crashing browser (#14157)
* update histogram agg to fetch min and max when search request started

* scale interval when too many buckets are created

* move min and max params into autoBounds param, remove typo in help text

* use decorated property instead of params to avoid changing agg state, add functional test

* remove sleep from functional test

* make args for onSearchRequest functions specific. Add getters and setters for autoBounds to AggConfig. Protect against divide by zero

* add unused arguments with eslint comment
2017-10-24 06:53:19 -06:00
Stacey Gammon
e5a3ba7802 Introduce redux into dashboard (#14518)
* Initial check in of introducing redux in dashboard

* Use redux-actions and redux-thunks to reduce boilerplate

* Make sure all panels are minimized from the start when a dashboard is loaded - we don't want a panel id from a different dashboard in the state tree on a fresh open.

* Remove unused file

* use classnames dependency instead of manual logic

* First pass on selectors, handleActions, and more segmented reducers.

* Fix bugs with selectors and reducers and add tests that would have caught them.

* Fix issue plus tests

discover was not returning a promise

* Make expanding a panel purely a css modification which avoids all re-renders

* Found another bug with initial state not being set correctly on a hard refresh

* Remove check for change handlers now that the event handler bug is fixed

* rename dashboardState => dashboard for reducers and redux state tree

* Remove unnecessary top level describe in jest tests

* Navigate back to landing page at the end of the newly added test suite

* Fix lint errors

* Stabilize flaky tests by waiting until saved object search is finished loading results

* Don't leak subscriptions to the store.

* use selectors to grab dashboard panel off state.

* Remove use of getState in dispatcher to avoid circular reference and still use selectors

* use spread over object.assign

* No need to pass second param in when the input is simply returned as-is.
2017-10-23 16:39:23 -04:00
Stacey Gammon
e7fb1b0d8f Comment out tile map tests to get the build passing again (#14519) 2017-10-23 15:29:38 -04:00
Kim Joar Bekkelund
b19c823bc3 Use Boom.boomify instead of deprecated Boom.wrap (#14325) 2017-10-12 08:56:07 +02:00
Court Ewing
19b760627b test: move es proxy tests to api_integration (#14406)
Integration tests should go into the corresponding directory under
`test` and should use the appropriate testing framework that is designed
for long-running tests like those. Tests under __tests__ directories
should be fast-running unit tests only.
2017-10-11 13:59:03 -04:00
Court Ewing
22e97f068e test: move url shortener tests to api_integration (#14411)
Integration tests should go into the corresponding directory under
test and should use the appropriate testing framework that is designed
for long-running tests like those. Tests under tests directories
should be fast-running unit tests only.
2017-10-11 13:57:29 -04:00
Kim Joar Bekkelund
6a2bb74407 Use Object spread instead of Object.assign where it makes sense (#13903)
* Prefer Object spread

* Add eslint rules for Object spread

* no slice
2017-10-10 14:50:56 +02:00
Tim Sullivan
57c25307b5 [FTR] Add getAttribute helpers to TestSubjects (#14340) 2017-10-06 09:28:46 -07:00
Spencer
6998f07454 [uiSettings] auto create/upgrade saved config (#14164)
* [uiSettings] auto upgrade savedConfig doc when missing

* naming tweaks

* fix comments

* ensure that rcVersions are not found within a version

* add some tests for non-single digit versions/rcs/betas

* return the condition, rather than using an if()

* assert that getUpgradeableConfig() is always called once

* [uiSettingsService] remove excess space

* [savedObjectsClient] only attempt to createOrUpgradeSavedConfig once

* [uiSettings/routes/tests] remove unused assert helper

* [functional/console] correct test title

* [ftr/kibanaServer/uiSettings] fix disableToastAutohide timeout
2017-10-05 15:34:09 -07:00
Chris Roberson
4c1d029c79 [Management] Allows for imports to select existing index (#14137)
* Adds ability to change index pattern on import

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* UI changes. Use a table in the modal grouped by index pattern id instead of multiple modals.

* PR feedback

* PR feedback

* PR updates

* Handle skip properly

* Fix error when there were no existing index patterns

* Tests for the new import conflict logic

* Fix invisible filters caused by missing index pattern (#14131)

"invisible filters" occur when the mapping chain throws an error. If a single filter throws an error, the entire chain rejects. As a result, not even the valid filters appear in the filter bar because they never get added to the scope. However the filters still exist in app state and still get sent with each search request.

The most common error occurs when the filter's meta.index property points to a non-existing index pattern. Since this property is only used for looking up field formatters and it is not essential for a working filter, we now fall back on raw values instead of failing if the index pattern is not found. See the PR this one replaces for discussion about other solutions we tried and why we chose to go this route.

* Show query and filter bars even when there's a linked search (#14212)

The query bar used to be hidden in the presence of a linked search because unlike filters, queries didn't get merged when flattening a SearchSource hierarchy. That means a query in the query bar would override the query in the linked search. This is no longer the case. As of 6.0 we include all queries in the SearchSource hierarchy in the final request, so there's no longer any reason to hide the query bar.

Since filters created via a Vis show up in the query bar when Kuery is selected, these filters now appear correctly even when there's a linked search in the vis editor.

Previously when unlinking a saved search visualize would insert the query and filters from the saved search into app state before removing the SearchSource from the hierarcy. This posed a problem because combining two lucene query strings isn't as easy as combing two sets of filters. We decided this behavior was a bit counterintuitive anyway. If the user wants to unlink the saved search, they probably want to discard it, not combine it with their local changes. So I've also updated the unlinking functionality to discard the saved search.

* limit wait time for baselayer (#14047)

* adding scope appy back (#14269)

* remove junk tests (#14191)

* We are using the index pattern id now

* Use the index pattern id here too

* Use an isolated es env for these tests

* Revert "Fix invisible filters caused by missing index pattern (#14131)"

This reverts commit e09d7ad1f9.

* Revert "Show query and filter bars even when there's a linked search (#14212)"

This reverts commit 3aee7c2bf0.

* Revert "limit wait time for baselayer (#14047)"

This reverts commit 44a71071ac.

* Revert "adding scope appy back (#14269)"

This reverts commit 51b6b51aac.

* Revert "remove junk tests (#14191)"

This reverts commit f06c18332b.

* Revert these
2017-10-04 20:42:07 -04:00
Nathan Reese
d5ed14f460 apply field formatter to tag cloud (#14230)
* apply field formatter to tag cloud

* use unformatted value for filter creation
2017-10-03 07:58:49 -06:00
Kim Joar Bekkelund
5009435148 [index patterns] Don't attempt to wrap Boom errors (#14253) 2017-10-03 15:06:51 +02:00
Spencer
e84761217e [savedObjects] fix error handling when Kibana index is missing (#14141)
* [savedObjects/delete+bulk_get] add failing tests

* [savedObjects/delete+bulk_get] improve 404 handling

* [savedObjects/client] fix mocha tests

* [savedObjects/tests] remove extra test wrapper

* [apiIntegration/kbnServer] basically disable es healthcheck

* [savedObjects/create] add integration test

* [savedObjects/find] add failing integration tests

* [savedObjects/find] fix failing test

* [savedObjects/client] explain reason for generic 404s

* [savedObjects/get] add integration tests

* [savedObjects/find] test request with unkown type

* [savedObjects/find] add some more weird param tests

* [savedObjects/find] test that weird params pass when no index

* [savedObjects/update] use generic 404

* fix typos

* [savedObjects/update] add integration tests

* remove debugging uncomment

* [savedObjects/tests] move backup kibana index delete out of tests

* [savedObjects/tests/esArchives] remove logstash data

* [savedObjects] update test

* [uiSettings] remove detailed previously leaked from API

* [functional/dashboard] wrap check that is only failing on Jenkins

* [savedObjects/error] replace decorateNotFound with createGenericNotFound

* fix typo

* [savedObjectsClient/errors] fix decorateEsError() test

* [savedObjectsClient] fix typos

* [savedObjects/tests/functional] delete document that would normally exist

* [savedObjectsClient/tests] use sinon assertions

* [savedObjects/apiTests] create without index responds with 503 after #14202
2017-10-02 18:51:58 -07:00
Tim Sullivan
7a52fed0d4 [Test/FTR] Add getPropertyAll to testSubjects service (#14210) 2017-09-28 10:59:50 -07:00
Spencer
4fed3725ae [SavedObjects] use constructor options (#14200) 2017-09-27 14:57:47 -07:00
Stacey Gammon
e35d7b0141 Replace gridster with react-grid-layout (#13853)
* Initial check-in to replace gridster with react-grid-layout and reactify panels

* # This is a combination of 3 commits.
# This is the 1st commit message:
Add margin of error to test determining panel widths

# This is the commit message #2:

use real kibana version when creating panel data. Will make future conversions easier.

# This is the commit message #3:

Fix lint errors

* Add margin of error to test determining panel widths

use real kibana version when creating panel data. Will make future conversions easier.

Move default height and width to dashboard_constants so those that need it don't end up including extra stuff like ui/chrome

* Remove unnecessary _.once when creating react directives in dashboard.js

* Remove unnecessary constructors

* Use componentDidMount instead of componentWillMount bc of async calls, and handle case where destroyEmbeddable is not defined.

* Remove unnecessary null in classNames

* Use loads defaultsDeep instead of Object.assign

* use render* instead of get* for functions returning an element

* use relative css paths

* Use local import path

* Switch to local imports and remove need for plugins path in jest tests

* Improve accessibility of max/min panel toggle icon

* remove unused css

Had to implement this via code

* disable eslint rule for setState in componentDidMount

Am not aware of a better way to handle this, aside from switching to
redux, since it’s recommended not to put async calls in
componentWillMount.  Since I plan to investigate redux next, disabling
for now. Open to other’s opinions on the matter.

* Use native map instead of lodash

* Have the grid handle setting the z-indexes of the right reactgriditem

* Make the draggable handle the title, not the whole heading

Otherwise the drag event often takes over click events when trying to
open the panel options menu and it gets really annoying.

* Change from click to mouse down detector in KuiOutsideClickDector so drags also close pop ups.

* Fix mistaken commit

Code from the redux PR snuck into this one.

* Run getEditPath and getTitle async calls in parallel - no need to wait on the return value of one before starting the others.

* Fix tests: update snapshots, add promise returns.

* version being added to panelData in the wrong spot caused isDirty flag to be true when it shouldn't be

* Fix unmounting/mounting problem with panels due to view/edit mode switch

* Fix bug where panels get squashed to one side when view mode is changed while a panel is expanded.

* Update snapshots to match wrong view mode comparison

* Improve naming of a variable

* Fix issue with pop over hiding behind tile maps

* Previous panel.js included ui/doc_table and ui/visualize - needed to include them in the chain for Dash only mode but not in that file.

* Fix bad merge: remove baseline screenshots
2017-09-26 18:02:13 -04:00
Jonathan Budzenski
b278ad96a9 [functional tests] Remove default screenshots (#14122)
* [functional tests] Remove default screenshots

* Remove baseline screenshots
2017-09-26 08:37:12 -05:00
Nathan Reese
30cc42f4ba Input Control visualization (#13314)
* react editor example

* ensure props are not updated

* use new stageEditorParams method to stage parameter changes

* make component stateless

* use terms_vis_editor component

* get add button to work

* update vis controller to display terms input controls

* update componenent when query bar updates

* add functional test

* lay ground work for different control types in single visulization

* make editors for range and text controls

* text control

* implement type ahead suggestor for text control

* add range slider

* some CSS work

* add submit button, move control init functionallity under control_factory

* add custom options for control types

* provide buttons to move controls up and down

* Make ControlEditor component and clean up styling of editor

* styling work

* multi select for terms dropdown control

* add option to disable filter staging, only enable submit button when filters are staged

* clean up range styling

* rename top level vis folder

* cleanup

* move control type select out of each control editor

* dark theme styling

* use ui/public/filter_manager/lib/phrases.js to build phrases filter, add tests to range filter manager

* use savedObjectsClient to get index patterns

* remove text control and add id to controls for react tracking

* ensure fields get updated when index pattern changes

* update PropTypes for react 15.6.1

* update to latest react-select to avoid isMounted deprecation warnings

* fix input controls functional test

* rename termsControl to listControl to be more generic

* add function test for clear button, refactor directory structure

* functional tests for updateFiltersOnChange is true

* fix react-select clipping problem in dashboard

* try clicking option instead of pressing enter to set react-select value in functional tests

* react-select css

* clean up control_editor component, make ListControlEditor component be function

* add jest test for vis_editor component and accessibility

* add decimal places option to range slider

* add jest test for InputControlVis component

* add default to switch blocks, split editor into seperate tabs, use shallow in snapshot tests

* fix race condition in field_select, update index_pattern_select to fetch indexPatterns on each filter

* clean up control initialization

* use htmlIdGenerator to avoid html element id conflicts

* update functional test to support new editor tabs

* finish jest tests for sub componenets

* mark vis as experimental, refactor buttons for better usability

* fix bug in list control where unable to select options containing numbers and options containing commas. Truncate display of long list options

* fix chart types functional test

* fix jest tests, add margin to action buttons

* remove binds from render functions

* experement with native input range sliders

* Revert "experement with native input range sliders"

This reverts commit aed599e88a.

* Use Promise.resolve in tests and replace _createRequest with searchSource.fetch

* add inputs to range control
2017-09-20 06:22:55 -06:00
Spencer
48d35f81fd create babel-preset and babel-register modules (#13973)
* [babel] create babel-preset and babel-register modules

* [babel-preset] add comments to babel-preset-env.target choices

* [babel-preset] use more normal BUILT_WITH_BABEL signal

* [babel-register] extended comment about filtering ./src in dist

* [babel-preset] stage of class properties has changed, sorta
2017-09-19 17:44:47 -07:00
Stacey Gammon
c3c55ded22 Allow custom timeouts on click (#14042) 2017-09-19 09:56:40 -04:00
Thomas Neirynck
e8b43b55e9 Allow panning beyond dateline (#13955) 2017-09-18 12:42:03 -04:00
Brandon Kobel
0971e6a2ac Removing mapper.dynamic setting from the esArchiver mappings (#13970)
index.mapper.dynamic should not be used for 6.0+ indices, so this commit
removes it from the esArchiver mappings.json for kibana

Related elastic/elasticsearch#25734
2017-09-13 07:14:18 -04:00
Stacey Gammon
60ad20f8c1 fix wrapped retry error. This was copied code from 6.x, which didn't have the back ported version (#13967) 2017-09-12 20:25:54 -04:00
Stacey Gammon
f55c9da6f2 Investigate 6.0 flaky tile map test (#13942) 2017-09-12 08:38:22 -04:00
Stacey Gammon
d853fcae11 Fix map updates not propagating to the dashboard (#13589)
* Add failing tests

* Add fix by preventing uiState from being directly updated in visualization.

* Add test that would catch error caused by this PR in regards to filter agg

* Fix issue with uiState triggering dirty dashboard state by introducing temporary "sessionState" on a vis

* Click go after toggling the switch

* add more tests to ensure getRequestAggs functions as intented

* Go back to old zoom calculations. Update vis test data

I think because mapCollar is no longer saved in uiState, the save
recenters the data and we get slightly different data points from the
test data.  As far as my eye can tell, everything is working as
intended.

* fixes and tests

- incorporate the new init function which fixes the bug where we lose
map bounds data on a fresh save
- add a test that would have caught that
- adjust tests due to bug where map bounds is changing slightly.  File
another issue for that separately as it doesn’t actually affect the
users map experience.

* Fix tests

Tests relied on my original logic of defaulting to the saved zoom state
and not relying on uiState, so I went back to that logic.  Also found
another bug where mapZoom of 0 was being considered invalid, but it is
actually a valid zoom level.

* Since leaflet upgrade 'path.leaflet-clickable' can't be used to retrieve circles anymore

* Avoid stale element reference

I suspect because the page is changing, you have to keep fetching the
element afresh.  I don’t see this error on my local but saw it on
jenkins.

* remove spy select from PageObjects.visualize.getDataTableData

The function is used in the Data Table visualization where the spy pane
select doesn’t exist.
2017-09-07 08:43:19 -04:00
Lukas Olson
f2f759f6ed Fix "is one of" filter editor (#13771)
* Keep params so phrases editor works after closing and opening

* Add functional test
2017-09-06 20:40:31 -07:00
Rashmi Kulkarni
4cc98fc3ad fix create_index_pattern_method to handle no timefields (#13852) 2017-09-05 15:22:53 -07:00
Tim Roes
301452ffcb Improve accessibility of the visualize editor (#13780)
* Use aria-expanded and better labels for agg collapsables

* Fix all agg options collapsables, fix #12892

* Label all vis editor inputs correctly, fix #11859

* Fix broken functional test
2017-08-31 11:46:02 +02:00
Peter Pisljar
9786e453c3 visual builder should set vis.initialized when ready (#13779)
* tsvb needs to set vis.initialized

* adding visual builder integration test
2017-08-31 08:57:34 +02:00
Stacey Gammon
fa2edcaf20 Investigate flaky add new visualization link test (#13755) 2017-08-30 09:42:04 -04:00
Lukas Olson
19ac99a388 Re-enable filter editor suggestions (#13376)
* Re-enable filter editor suggestions

* Use search instead of include

* Escape query

* Show spinner

* Use include rather than search

* Add additional regex and explanation for parameters

* Add suggestions API test

* Make sure test actually runs

* Use send instead of query

* Fix suggestions API test
2017-08-25 16:38:49 -07:00
Chris Roberson
9175137c57 "Create index pattern" wizard. (#13454)
* Create Index Pattern Creation wizard.
- Create a directive for each step in the wizard.
- Reorganize files into conventional folder structure.
- Rename files with more conventional and consistent naming patterns.
- Display indices, partial matches, exact matches.
- Add loading, empty, and success states.
- Add option to include system indices.

* Temp: comment out and mock getIndices functionality.

* Hook up data seaching

* Add for/id connections for form inputs and labels

* Automatically append a wildcard

* Highlight the index pattern in the results

* Ensure we only remove the last character if it's a `*`

* Auto hide index pattern id controls

* Ensure this link is tabbable

* Move the advanced fields down

* Use toggle button

* This shouldn't ever be required

* Revert "This shouldn't ever be required"

This reverts commit b6e31e79308271e7f04ea1d42ce66e32e7aa0612.

* Update based on comments in PR

* Ffew more changes

* Port changes from Tyler's PR, https://github.com/elastic/kibana/pull/13353

* Remove unnecessary file

* Fix broken functional tests

* Copy changes

* Fix functional tests

* Remove loading from the main select, and move to an additional select

* Show help text when loading

* Fix sorting

* Fixing broken functional tests

* Couple changes from PR review

* Ensure input field does not show a red border until touched

* More descriptive and consistent copy
2017-08-24 09:04:28 -04:00
Nathan Reese
599c8c4220 Upgrade kibana to leaflet 1.x (#12367)
* upgrade leaflet modules to 1.x latest

* fix css for leaflet controls

* update draw options so it is easier to see polygon when drawing

* fix chrome touch issues with closing polygon in leaflet draw

* use canvas renderer

* use leaflet-responsive-popup to avoid tooltip cutoff

* remove radius configuration from leaflet heatmap

* make blur a factor of radius. Set maxZoom to map zoom since new values are calculated per precision

* use _.get to avoid error, cannot read property of undefined

* add cluster size slider

* experiments with image differences

* onload not onLoad

* use canvas dimensions

* compare map canvas to stored PNG of map canvas

* remove pixelmatch from project dependecies

* fix broken test - rounding error

* add expected image tests for geohash layers shaded circles and geohash grids

* bump z-index of vis-spy

* update functional test expected data

* update to leaflet 1.2.0

* revert to leaflet 1.0.3 and update expected data set for map functional tests

* test geohash_layer heatmap in unit test

* update region_map functional test since it can not longer pluck map vectors from DOM

* update documentation
2017-08-22 17:26:30 -06:00
Nathan Reese
0d281a7566 Replace "marked" with "markdown-it" (#13623)
* add markdown functional test

* update markdown vis to use markdown-it

* migrate markdown angular filter to markdown-it

* place other uses of marked and remove dependency

* update breaking changes documenation and set linkify to true
2017-08-22 16:29:40 -06:00
Rashmi Kulkarni
bf8fb46830 added a helper method- selectIndexPattern method (#13568)
* added selectIndexPattern method
* removed the additional sleep
2017-08-21 17:18:49 -07:00
CJ Cenizal
64a1e0cf7f [Accessibility] Make table pagination controls keyboard-accessible. (#13541)
* Make table pagination controls keyboard-accessible. Update KuiLink so it can be used on a button element.
* Add additional properties to link mixin to make kuiLink look the same for both buttons and anchor tags.
* Fix tests.
2017-08-18 17:11:36 -07:00
spalger
8cd269678a remove spammy console.log() 2017-08-16 19:32:34 -07:00
Stacey Gammon
bbabe48b36 Avoid a wrapped retry and use exists instead of find, which will take up all the time allotted for the retry if it fails once (#13467) 2017-08-11 11:34:30 -04:00
Spencer
7e16d19249 [npm] move personal forks into elastic org (#13410) 2017-08-09 12:31:30 -07:00
Spencer
8a64872ecb [fix/UiSettings] ignore certain errors (#13079)
* [SavedObjectClient] emit detectable errors

* [uiSettingsService] consume new SavedObjectsClient errors

* [SavedObjectsClient] expose errorTypeHelpers as such

* [elasticsearch/tests] recreate error for each test

* [http] wait for elasticsearch plugin to be ready

* [shortUrl/tests] ensure that create request responds with 200

* [shortUrl] use errorTypeHelpers to filter errors

* [uiSettings/savedObjectsClientStub] stub errorTypeHelpers

* [SavedObjectsClient/errors] expose error module so tests can make errors

* [shortUrl/tests] use actual SavedObjectsClient errors

* [uiSettings/savedObjectsClientStub] use actual errors lib

* [SavedObjectsClient] use decorate instead of "wrap"

* [server/routes/uiSettings] refactor routes to forward Boom errors from uiSettings

* [uiSettings] colocate routes and service

* [testUtils/esTestCluster] use more standard api style

* [testUtils/es] add createCallCluster util

* [testUtils/esTestCluster] add getters for client/callCluster

* [es/healthcheck] ensure that healtcheck stops when server is stopped

* [uiSettings/routes] add param/payload validation

* [uiSettings/routes] add tests that verify error behaviors
2017-08-08 17:55:36 -07:00
Matt Bargar
542d553fe2 Make filter pills keyboard accessible (#13331)
Fixes #12639

It's now possible to tab to each filter's actions and interact with them via the keyboard.

In order to get the actions to show/hide on both mouse hover and action focus I had to create a new filter-pill component that could manage a bit of state to track whether the user was interacting with a given pill or not.
2017-08-08 13:06:20 -04:00
Stacey Gammon
9aed822726 Use find service instead of remote (#13296)
* Use find service instead of remote which doesn't have built in safety checks for stale elements

* use data-test-subj instead of id

* add missing function and awaits

* Did not realize WebElements could find descendants

Added some extra functionality for this in find and testSubjects
service, and using in the one place it’s required.
2017-08-08 11:32:13 -04:00
Stacey Gammon
6e744521b3 Create the concept of embeddableHandlers (#12146)
* Move dashboard panel rendering logic to each registered type.

* Remove dashboard knowledge of click and brush handlers for visualizations

Move it to the VisualizeEmbeddableHandler.

* merge master with manual changes

* No need to use lodash

* Add EmbeddableHandler base class

* Use correct path to embeddable_handlers_registry

* clean up

* Set visualize scope uiState that is of type PersistedState, otherwise it won't actually be set.

* add retry to loading saved search data

* Fix handleError param and remove unnecessary private param

* Rename savePanelState updatePanel and return the new object rather than mutating the original

* Make ContainerAPI a base class and move the dashboard specific functionality into a new class

* Make api's async and clean up documentation

* Fix panel tests

* Fix bug which broke tests - need to pass container-api to dashboard-panel

* Address code comments

- Rename onFilter to addFilter
- Use angular promises instead of async/await
- fix jsdoc
- rename createChildUiState to getInitialState

* changed the wrong variable name

* no need for async or Promise.reject on interface

* add tests that will fail due to spy pane issue in this PR

* Fix logic with spy pane toggle

There is still a bit of a bug here as mentioned in
https://github.com/elastic/kibana/issues/13340 but it will be fixed
separately as it’s also an issue in master

* Fix failing test
2017-08-08 11:27:30 -04:00
Stacey Gammon
161b07ab4a Fix full screen toggle button when panel is expanded (#13320)
* Add failing tests

* Fix style issues with full screen toggle
2017-08-07 09:14:33 -04:00
Spencer
8ee85f8fed Add some testSubject helpers (#13305)
* [testSubjects] add getVisibleTextAll() helper

* [testSubjects] add isSelected() and isSelectedAll() helpers

* [testSubjects/setValue] support wrappers around inputs

* [testSubjects] add isEnabled() helper

* fix typo
2017-08-04 18:49:12 -07:00
Lukas Olson
14c9b7e06a Use ui-select for agg selector (#13292)
* Use ui-select for agg selector

* Fix functional tests

* Fix functional tests

* Fix test

* Fix visualize page object

* Use sortPrefixFirst in agg selector

* Fix unit tests

* Fix unit test

* Use not(.ng-hide) rather than last-child
2017-08-03 13:46:18 -07:00
Stacey Gammon
4f5313a088 Make sure no one can show the chrome if the default setting is hidden. (#13250)
* Make sure no one can show the chrome if the default setting is hidden.

add tests

Fixes https://github.com/elastic/kibana/issues/13040

* Improve variable and function names and fix tests
2017-08-03 11:25:38 -04:00
Matt Bargar
18f8455711 Add some functional tests for query language switching (#13036)
* Add some functional tests for query language switching
2017-07-31 18:24:46 -04:00
Nathan Reese
abcc055f97 update spy table headers when columns update (#13130)
* update paginated table headers with columns update

* remove unneeded sleep

* update getDataTableHeaders to preffered format

* use data-test-subj attribute for functional tests instead of CSS selectors
2017-07-31 12:45:38 -06:00
Spencer
6748b22d03 Implement esTestCluster test util (#13099)
* [es/tests] remove unused module

* [testUtil/es] add utility for starting es nodes in tests

* [ftr/tests] use esTestCluster util to start es

* [es/tests/routes] use esTestCluster to start own es

* [testUtils/kbnServer] disable uiSettings unless plugins are enabled

* [testUtils/esTestCluster] use standard test es port by default

* [server/http/tests] add esTestCluster to setup

* [test/config] unify es test config into a single module

* [testUtils/esTestCluster] directory is no longer configurable

* [testUtils/esTestCluster] throw when es.start() is called again without es.stop()

* [testUtils/esTestCluster] is* checks should not mutate state
2017-07-28 09:47:41 -07:00
Felix Stürmer
2430fed459 Use version 0.9.0 of eslint-config-kibana (#13177) 2017-07-28 18:03:34 +02:00
Chris Roberson
389115cad0 Ensure conflicted fields can be searchable and/or aggregatable (#13070)
* Ensure that conflict fields can be searchable and/or aggregatable in the UI

* Use `some` instead of `reduce`

* Revert UI changes

* Attempt to convert multiple ES types to kibana types, and if they all resolve to the same kibana type, there is no conflict

* Add comma back

* Cleaner code

* Add tests

* Update failing test to handle searchable and aggregatable properly

* Add functional test to ensure similar ES types are properly merged

* Update tests

* Revert shard size
2017-07-28 10:45:43 -04:00
Stacey Gammon
589df61e03 Stabilize and bring back flaky tests (#13034)
* Stabalize tests and bring back flaky test

* Try to fix flaky map radius visualize test

* fix flaky tile map zoom test

* Try to fix flaky zoom test by avoiding zooming in and out with spy panel open

* Remove duplicate wrapped retry around find methods

The retry was moved internally, around a check for stale elements as
well, so this should no longer be neccessary.
2017-07-27 15:26:09 -04:00
Stacey Gammon
fa302a16f3 ensure timezone attribute in tests is adhered to (#13121)
* ensure timezone attribute is adhered to

Two issues - one the archiver was loading the visualize mapping after
the config setting so it was bring overwritten, and two,
uiSettings.replace wasn’t working correctly to begin with.

* extra line to ensure server is stabilized to prevent transitory failures
2017-07-26 12:15:56 -04:00
Stacey Gammon
fbec367c16 skip flaky discover test (#13114)
Caused last 4 builds to fail on master.

Will attempt to bring back in
https://github.com/elastic/kibana/pull/13034
2017-07-26 08:39:08 -04:00
Stacey Gammon
c8848a4a7d remove inline awaits (#13043)
* remove inline awaits

* testSubjects.find now always returns a promise, so we need to make sure there is no more inlining

* more find conversions

* need to pass property name

* Make sure async functions are awaited on.
2017-07-25 15:07:02 -04:00
Nathan Reese
e3ea7f2550 TEST - Fix flaky map functional test (#13039)
* add time to toggleSpyTable to give time for tab to open and map to adjust

* make open and close spy panel functions that retry until panel is in correct state
2017-07-21 16:05:54 -06:00
Chris Earle
4fc2a96324 [Test] Field List Pagination doesn't need so many constants (#13028)
Some of these can be inferred by the others, which makes the test a little
more flexible in the face of changing data.
2017-07-21 14:29:00 -04:00
Matt Bargar
d379e9a35b Implement new Kibana query language (#12624)
Initial version of an experimental new query language for Kibana.
2017-07-21 11:55:15 -04:00
Nathan Reese
72f6b8a37f Filter geohash_grid aggregation to map view box with collar (#12806)
* filter geo hash agg - merged with vis refactor

* get collar size from geohash aggregation

* fix getBounds

* add test for _buckets to handle single bucket case

* use _getGeoHashAgg to update precision

* call reload when map bounds outside of map collar

* update fit control to use geo_bounds aggregation metric

* remove geo_hash param collarScale

* fix precision parameter test

* refactor _geo_hash.js test for readability

* do not trim map bounds

* only change aggregation state when data needs to be refected because zoom changed or map bounds are outside of collar

* remove extra geo_utils.js file from tile_map plugin

* only filter geoJson layer on client when results are not filtered on server

* set up layer options before creating geoJson layer

* add updateExtent back

* add getUntrimmedBounds, clean up filter option verbage, remove scale param from scaleBounds function

* move check for server-side filtering for updateExtent into geohash_layer

* move fetchBounds to geohash_layer

* fix _tile_map functional test, response data is different because of added filter aggregation
2017-07-21 07:35:46 -06:00
Chris Earle
92acce2798 [Tests] Adjust makelog mappings and associated tests (#13014)
This updates the function tests by:

Changing logstash_functional's _type from docs (changed in #13001) to doc.
Adding the original _type (apache or nginx) as a new field named type to logstash_functional's documents.
Updated the mappings to include the expected type field.
Did the same for makelogs by removing _default_ and other _types in favor of doc and the new type field.
Dropped the single_type setting from makelogs.
Updated associated tests that were looking for _type values of apache and nginx.
2017-07-20 18:57:56 -04:00
Nathan Reese
7c7f5716c8 update logstash data for single type (#13001) 2017-07-20 09:17:05 -06:00
Tyler Smalley
3c0c0ff441 Use single ES document type (#12794)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2017-07-19 09:27:16 -07:00
Stacey Gammon
31b33659ca Fix search issue on listing page + tests (#12618)
* Fix search issue on listing page + tests

* fix test case inconsistency

* use backtics to create the search string
2017-07-14 12:27:06 -07:00
Spencer
10656c2108 [ftr/kbnServer] prevent caching errors when fetching status (#12848) 2017-07-13 17:02:28 -07:00
Court Ewing
60c636ba4d Remove field_stats pre-flight option for index patterns (#12814)
* Remove field_stats pre-flight option for index patterns

This feature was originally added to make searches against Elasticsearch
more performant when searching across many indices, such as when dealing
with daily indices that have accumulated for years. Elasticsearch now
automatically optimizes index access once a certain amount of shards are
in play, so Kibana doesn't need to hack its own solution.

This option can be removed entirely as existing index patterns that had
this option configured will degrade gracefully.

* test: fix parse error test to account for multiple shards
2017-07-12 20:14:26 -04:00
Spencer
10d243de15 [master] [elasticsearch] patch mappings that are missing types (#12783) (#12817)
* [elasticsearch] patch mappings that are missing types

* [elasticsearch/healthCheck] fix tests

* fix doc typo

* [tests/functional/dashboard] fix suite name

* [es/healthCheck/ensureTypesExist] limit randomness a bit

* [test/functional] update es archives with complete mappings

(cherry picked from commit 929aa8efae)
2017-07-12 17:11:26 -07:00
Tyler Smalley
0d502aec49 Use SavedObjectsClient for Courier Index Pattern (#12719)
* Index pattern is created, by default, with a random ID by Elasticsearch
* Updated all references requiring the pattern itself to use indexPattern.title
* Advanced options toggle added to index pattern creation page to provide a specified ID
* If an index pattern does not exist, the user is given a link to create a pattern with the referenced ID.
2017-07-11 13:18:26 -07:00
Tyler Smalley
44dedd6091 Uses SavedObjectsClient for UI Settings (#12747) 2017-07-11 12:33:58 -07:00
Thomas Neirynck
b86f97ce0f Visualize refactor (#12715)
This reorganizes the internals of Visualize. The main contributions are:
- separation of Editor from Visualization. This allows users to create editors separate from their Visualization. Both Timelion and TSVB are examples of visualizations not using the sidebar editor
- no longer restricted to just use angular as a rendering technology
- introduction of API object, which avoids the need to pull in modules directly, like time-filter or filter-bar
2017-07-09 09:51:29 -04:00
Thomas Neirynck
c20a48cbc9 Revert "Visualize Refactor (#11786)" (#12711)
This reverts commit 3000221fac.

This change broke Xpack, due to some modules being moved to a different location.
2017-07-07 16:32:18 -04:00
Peter Pisljar
3000221fac Visualize Refactor (#11786)
* converting Vis to es6 class

* <visualize>, <visualization> and <visualization-editor>

* editor, responseHandler and requestHandler registries

* updating visualize editor app

* vis, default editor, request handlers and vis types

* updating vis types

* updating kibana to work with new visualize

* migrating existing visualizations

* fixing bugs with rebase

fixing tests

fixing tsvb auto apply button

fix tsvb resizing issue

update scope.$apply for react editor components

re-render react component when vis.params are updated (#12347)

fixing heatmap

remove obsolete maps_renderbot indirection

remove cruft/ remove custom resizing and hook into global event

fixing brush event

fixing resize event for vislib_vis_type

fixing legend

changing based on nathans review

* fixing tests

* fixing renderComplete issues with editor

* map updates

* fixing maps zoom

* fixing based on nathans review

* fixing render complete issue and doulbe rendering with maps

* trying to get maps in order .... wip

* removing resize method from visualizations

* changing the rendering process a bit

* fixing metric chart type auto changing

* minor simplifications in coordinate map viz

* more simplications now we only have single render

* minor fixes

* do not recreate layer when not necessary

* minor changes

* fixing maps bounding box filter

* fixing desaturation option

* fix zoom settings when toggling between WMS/basemap

* adding status to the render method (to figure out what changed)

* fixing legend open icon going out of page

* skip index selection for timelion

* timelion brush fix

* fixing circular json issue

* fix faulty rebase

* fixing updateStatus

* removing timelion requesthandler registration

* removing double slash

* fixing maps

* add debug statement

* test CI with guard statement

* fixing rebase
2017-07-07 17:10:32 +02:00
Stacey Gammon
b463aebfb6 show the spy toggle in an expanded panel on hover (#12550)
* show the spy toggle in an expanded panel on hover

the css was wrong because the expanded panel is no longer inside
gridster.  Added tests that would have caught this.

* rename toggleSpyPane to toggleSpyPanel
2017-06-30 13:38:00 -04:00
Spencer
aa729af3a1 [ftr/dashboard+scripting] disable unstable tests (#12592) 2017-06-30 00:03:18 -07:00
Peter Pisljar
3269965dfb removing old point series defaults (#11958)
This fixes issues where properties from the visualizations saved in older versions were not applied to the Visualization.

This also addressed the fontSize of metrics not being applied on the Dashboard.
2017-06-21 16:08:08 -04:00
Spencer
ba199bdca2 [5.5] [api/indexPatterns/fields] convert all es errors to Boom errors (#12435)
(cherry picked from commit 6d605ec30a)
2017-06-20 18:37:12 -07:00
Nathan Reese
1423d068f8 Scaled date format for date histogram aggregation (#12384)
* provide getFormat function to date_histogram

* move format object creation to time_buckets

* fix broken test

* pass getConfig to field format constructor since field formatters no longer manage config themselves

* fix _agg_config testing of agg without getFormat method. Old test used date_histogram which now has getFormat, so needed a new agg type

* update expect values for area chart data

* fix expect for visualize app vertical bar

* fix expect for visualize app heatmap chart
2017-06-19 18:48:36 -06:00
spalger
445c47e248 [ftr/leadfoot] fix function signature 2017-06-19 12:51:19 -07:00
spalger
a736754f14 [ftr/leadfoot] retry session creation before timeout 2017-06-19 12:49:00 -07:00
spalger
a84f75ca11 [ftr/chromedriver] replace comments with debug logs 2017-06-14 14:56:21 -07:00
Spencer
1119414b49 [indexPatterns] remove support for time patterns (#12158)
* [indexPatterns] remove support for time patterns

* Revert "[indexPatterns] remove support for time patterns"

This reverts commit 4263e37c66.

* [indexPatterns] remove ability to create time-based patterns

* [indexPattern/routes] fix export of routes for stub

* [Storage] export Storage class for testing

* [indexPatterns/unsupportedTimePatterns] add tests

* [indexPatterns] focus warning check module

* [indexPatterns/tests] fix method name

* add metion of this change to migration docs

* disable warnings by default until we have a migration tool

* prevent the warning from disapearing

* fix grammar

* enabled warnings in the tests
2017-06-13 17:22:41 -07:00
dave.snider@gmail.com
dedef146ec Palette swap for accessibility / kibana 6 (#12085)
Recolor Kibana for Accessibility. Attempt to clean up spacing / layout irregularities by adding some level of global variable control. Major changes are:

* better animation against login
* switch to colored kibana logo
* add docs for secondary buttons in kui, addjust hover states
* simplify focus states
* adjust svg rects for discover graph to be lighter
* add ui select overwrite file, adjust new filter selector to match palette changes
* make spy usable in discovery
* panel withHeader removed completely, tests updated
2017-06-13 14:05:59 -07:00
Thomas Neirynck
781a7b56b5 Revert "disable save button if visualization is dirty (#11576)" (#12152)
This reverts commit efc621826b.
2017-06-12 15:55:06 -04:00
Spencer
fe1ca5d399 force timeout, logs indicate that pings are getting stuck (#12251)
* force timeout, logs indicate that pings are getting stuck

(cherry picked from commit ff6a71819be272253d969a0be681dc9749a0f00d)

* actually reject the promise
2017-06-12 12:45:06 -07:00
Joe Fleming
c400d604dd remove intern setup (#12201)
#10937 seems to have brought this file back, likely as part of a bad merge resolution
2017-06-06 13:30:26 -07:00
Stacey Gammon
718fdc066a Preserve the saved vis url when using the add new vis link from dashboard (#11932)
* Preserve the saved vis url when using the add new vis link from dashboard

Fixes https://github.com/elastic/kibana/issues/11078

* Store the edit url in browser history as well

* Fix tests by reordering them.

* add a more explanatory comment
2017-06-06 14:52:17 -04:00
Shaunak Kashyap
27745f72a3 Revert the Getting Started page (#12154)
* Revert "When on an embedded page, bypass Getting Started gate check (#12040)"

This reverts commit 05293f1c8d.

* Revert "Making tweaks. (#12003)"

This reverts commit aa3fa06f61.

* Revert "Functional tests for the Getting Started page (#11850)"

This reverts commit 099178a7ca.

* Revert "Prevent flicker on Getting Started page (#11826)"

This reverts commit c4b3ade27d.

* Revert "Getting Started page (#11805)"

This reverts commit 32eff371f2.

* Remove check for Getting Started page from navigateToApp
2017-06-05 14:18:30 -07:00
Spencer
e5deca679c [IndexPatterns] Support cross cluster search (#11114)
* [indexPatterns] support cross cluster patterns

* [vis] remove unused `hasTimeField` param

* [indexPatterns/create] fix method name in view

* [indexPatterns/create] disallow expanding with ccs

* [indexPatterns/create] field fetching is cheaper, react faster

* [indexPatterns/resolveTimePattern/tests] increase readability

* [tests/apiIntegration/indexPatterns] test conflict field output

* [indexPatterns/fieldCaps/readFieldCapsResponse] add unit tests

* [test/apiIntegration] ensure random word will not be valid

* [indexPatterns/ui/client] remove unused import

* remove use of auto-release-sinon

* [indexPatterns/create] don't allow expand when cross cluster

* [indexPatternsApiClient/stub] use angular promises

* [indexPatterns/create] add tests for base create ui behaviors
2017-06-02 14:26:58 -07:00
Stacey Gammon
40bc831d80 Update dashboard based on url changes (#12123)
* Update dashboard based on url changes

* make clickSelector a retry in case it fails the first time
2017-06-02 12:38:47 -04:00
Spencer
14014872aa [eslint] Upgrade to latest shared eslint config (#12129)
* [eslint] upgrade to latest eslint-config-kibana

* [eslint] autofix violations discovered by updated rules

* [eslint] remove import resolver
2017-06-01 17:52:39 -07:00
Aleh Zasypkin
4bc4c58d8c Get rid of auto-release-sinon in favour of built-in sinon.sandbox functionality. (#12099) 2017-06-01 10:27:08 +02:00
Thomas Neirynck
2270a6c24f Add Region Map Visualization
- Users can now create choropleth maps. This requires configuring an inner join between the results of a term-aggregation and a reference vector layer. This vector layer needs to be in the GeoJson format. By default, Kibana uses vector layers serverd by a data service hosted by Elastic. Users can also bring in their own layers by adding configuration entries in the kibana.yml. These need to point to a CORS-enabled data service that accepts requests from the Kibana application.
- For clarity, the tilemap is renamed to Coordinate Map.
- A new manifest is published by Elastic. this includes metadata for the available tilemap services, as well as metadata for the available vector data layers.
2017-05-31 16:56:02 -04:00
Stacey Gammon
20e5eae94f Clean up clone tests to new style so they actually run (#12032)
* Clean up clone tests to new style so they actually run

* Use new retry service

* Use correct case with the dashboard copy name
2017-05-31 16:36:03 -04:00
Stacey Gammon
5bc5c03ab8 fix dashboard view/edit flaky test (#12026)
* attempt to fix dashboard view/edit flaky test

hope to fix https://github.com/elastic/kibana/issues/12014

* Need to wait for global loading indicator to be hidden once top nav is visible

* use Error object for throw

* inline function only used once
2017-05-31 12:29:08 -04:00
Peter Pisljar
b53724bb36 vislib gauge chart (#10336)
* gauge chart

* adding ranges and color options

* adding green to red color pallete

* adding more options

* fixing based on tanya's review

* fixing label positions

* improving range settings

* percentage mode applies to legend

* hidding labels when too long

* updating based on ui rview

* rebasing on master

* adding unit tests

* adding selenium tests

* fixing tests

* adding metric gauge type

* removing metric vis

* adding metric and goal charts

* updating options

* fixing bugs

* fixing based on review from Thomas

* updating icons

* fixing tests

* updating based on last review

* hide some settings if only one range

* fixing tests

* removing unsupported aggs

* fixing defaults

* fixing options

* fixing error with inverse color schema

* adding spacing to info icon

* fixing some tiny issues
2017-05-31 09:30:18 +02:00
Court Ewing
2876f1fdf6 Revert "Switch to Yarn (#11637)"
This reverts commit 71a9b8b6bc.

Until we get all the relevant infra configured with yarn as well.
2017-05-27 08:51:19 -04:00
Spencer
71a9b8b6bc Switch to Yarn (#11637) 2017-05-26 19:32:03 -07:00
Spencer
b6b71a6506 [tests] remove unused visual_regression suite (#12046) 2017-05-26 14:57:36 -07:00
Stacey Gammon
c90ea5b993 Fix a type error from the default to named conversion (#12021)
* Fix a type error from the default to named conversion

add tests that would have caught it.

* address code review comments
2017-05-26 14:59:44 -04:00
Spencer
eb31af6d7b [tests/functional] catch and ignore errors during stabilization (#11906) 2017-05-25 14:06:54 -07:00
Spencer
84ea502205 [indexPatterns/field] remove indexed/analyzed/doc_values awareness (#11969)
* [indexPatterns/field] replace mapping awareness with readFromDocValues

* move link to more details to proper location

* Address kjbekkelund's feedback

* let the prs speak for themselves
2017-05-25 12:58:23 -07:00
Stacey Gammon
1f72d49108 Allow plugins to hide write controls in the dashboard app (#11537)
* Implement a way to hide write controls from dashboard

* Add roles definition to the saved dashboard object

* Remove roles from dashboard

* Use an angular provider to control the hideWriteControls flag

* Add an api to chrome to show only a single app by id

* Refactor injectVars logic

* Fix tests

* Refactor kibana root controller

* add additional test functionality

* Missed a couple spots for hiding edit controls

* add retry and help text for dash only mode failures

See if it helps. Tests pass locally.

* Move element into screen when clicking

* use shorthand for object creation

* Hide checkboxes, show 'no dashboard' message with the button
2017-05-25 15:32:57 -04:00
Shaunak Kashyap
099178a7ca Functional tests for the Getting Started page (#11850)
* Adding some more functionality to the Getting Started page object

* Using optOut method from Getting Started page object

* Adding functional tests for Getting Started page

This set of tests specifically tests the scenarios under which a user should or should not get redirected to the Getting Started page

* Adding log.debug message

* Conforming to HTML style guide

* Using new GettingStarted page object methods + opting out

* Adding test for nav being shown

* Removing unnecessary line

* Navigate to Discover expecting to be redirected to the Getting Started page

* Trying beforeEach instead of before

* Remove LS data index + load empty kibana index

* Removing unnecessary line

* Fixing order of operations
2017-05-23 07:09:04 -07:00
Lee Drengenberg
1689fd89da Allow creating different index patterns with different time fields (#11926)
* Allow creating different index patterns with different time fields

* Fix indentation
2017-05-19 15:32:55 -05:00
Stacey Gammon
3caf5d7125 Introduce Clone feature in view mode (#10925)
* Introduce Clone feature in view mode

* Use a new react modal for cloning dashboards

* Fix focus issues and tests

Unfortunately can’t run jest tests outside of the ui_framework at this
time.

* Add tests for dashboard clone modal

* move the jest tests out of the __tests__ directory

It’ll cause failures for the normal unit test runs

* use react instead of angular for overlay and loading of dom element

* Append 'Copy' to the title in the clone dialog so by default it doesn't clash

* address code comments
2017-05-19 09:51:26 -04:00
Spencer
c9c8e8d066 [tests/functional] opt out of getting started on navigation (#11881)
* [tests/functional] automatically opt-out of getting started page on navigation

* [test/functional/commonPage] avoid circular reference

* [test/functional/commonPage] move check for getting started after url has settled

* [gettingStarted] prevent route resolution by returning halt promises

* [test/functional/commonPage] wait for kibana to load before checking for getting started

* [uiRoutes/setupWork] provide a token that can be thrown to halt setup work

* [ui/routes] rename reference to WAIT_FOR_URL_CHANGE_TOKEN

* address review feedback
2017-05-18 19:33:53 -07:00
spalger
4692d195d9 [ftr] upgrade log level for chromedriver pings 2017-05-18 08:01:27 -07:00
Felix Stürmer
bc64b9a3aa [context view] Apply filters to the context query (#11466)
This adds the ability to display a filter bar in the Context view and to apply those filters to the queries. It also modifies the link from the Discover view to the Context view to copy the currently defined filters when switching. New filters can be added from within the Context view using the icons in the expanded detail rows.
2017-05-18 12:05:38 +02:00
Spencer
d3ba428796 [ftr] make room for more projects (#11848)
Squashed commit of the following:

commit 659ea986fdeb9a5ff2ca1fa5360cccb01c671ede
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 09:19:22 2017 -0700

    [test/*/fixtures] rename es_archives to es_archiver

commit d3667457c78e88e2d6974f3c38dd0fe61b846b91
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 08:22:03 2017 -0700

    [ftr/config] fix default directory value functions

commit 9a6a2cc0b295e2281e83da04fcea40e9d6f00781
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 07:30:52 2017 -0700

    fix import paths

commit fcb65a877d54b5b1d36b8c81f1264b36845e826e
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 21:39:57 2017 -0700

    [grunt/ftr] use named exports for configs

commit 7d7f38c7615cdbf8eb0119efc0f2a5188bca8792
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:50:04 2017 -0700

    [test] remove unnecessary directory definitions

commit 0c28984669768482f0a2ee7fc2800d5bcaf49025
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:46:29 2017 -0700

    [ftr/config] make default directories relative to config path

commit cd2f33612624cacffec138797f3fc0f4ecb46cca
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:32:12 2017 -0700

    [test/common] put server config into common

commit 7851ed811a236576c63bd20850b3ef2099be2a4e
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:18:20 2017 -0700

    [grunt] "deprecate" test:api:runner task

commit b2ac4c26593a1947c94f0168191fe8123ff74122
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:15:41 2017 -0700

    [ftr] accept the project name as an unnamed arg

commit 47e292894fc70c0a04883403c50c5d2ae0738d76
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:56:34 2017 -0700

    [ftr/grunt] convert ftr task to multi-task with config

commit 83375855f88e5e7b3fa8b6a1c5d24a9f54766ce5
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:54:54 2017 -0700

    [test/functional] move fixtures into test/functional project

commit 05994e9c92cf134c58f831c285b3b522a801acbc
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:02:51 2017 -0700

    [src/test_utils] merge with test/utils directory

commit c77ee5ed36b8b7eadf876cb6d9482a49dfc92b66
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:53:00 2017 -0700

    [test/api_integration] migrate api tests to functional test runner

commit ca328c34648dd7e07f70e1844e07cfc392e41103
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:50:12 2017 -0700

    [esArchiver] refresh modified indices after load

commit cde74a540850fd97578f441d6dccaefd1444e656
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:46:48 2017 -0700

    [test/functional] move shared services into test/common

commit 0ea2646aea5817f6d1595e6ae0d356c426f138f0
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 22:51:23 2017 -0700

    [scripts/mocha] run _mocha script when debugging

commit 1cc80600d90e318d4738920aa557d124075a4570
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 22:48:12 2017 -0700

    [ftr/config] allow child config files to have no testFiles config

commit 2bb6c957443b18cebc419baa6f9db301c8f4dc4f
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 21:52:26 2017 -0700

    [ftr] move screenshots into test/functional
2017-05-17 18:53:45 -07:00
Stacey Gammon
a9ee082660 Fix modals in react (#11714)
* fix focused button not being set

Need to do it in a timeout because ng-react hasn’t loaded the react
code yet, so it can’t find the buttons.

* add a test

that would have caught the issue, and also change the default focused
button for the listing delete page since it’s a destructive action.

* Add a comment

* Push focusing of default button into react code

* Push ESC key handling into react as well

* Remove ESC tests in angular form

They don’t pass, I’m guessing because of the way it’s triggered, but
these test cases should now be handled in jest.  Also confirmed it
works as expected with the modal.

* Address code review comments

* Use autoFocus
2017-05-17 09:48:26 -04:00
Stéphane Campinas
efc621826b disable save button if visualization is dirty (#11576) 2017-05-16 09:47:46 -04:00
Spencer
419f3132b8 [tests/functional] stop setting the default test timeout everywhere (#11777) 2017-05-15 16:46:04 -07:00
Shaunak Kashyap
32eff371f2 Getting Started page (#11805)
* Getting Started page (#11673)

* Initial code

* Renaming files/folders

* Notes and changes from HTML/CSS review

* CSS changes

* Fixing transform units

* Fleshing out logo circle

* Adding logos

* Un-nesting styles

* Adding kuiText class on <p> elements

* Making shield icon 404 go away

* Using trustAsHtml filter; using registry

* Adding code for registry

* Adding images

* Hooking up the opt-out link

* Fixing linter issues

* Fix issue with refresh bringing back nav

* Removing load_default module

* Use GETTING_STARTED_ROUTE constant

* Allow topMessage to be a directive

* Adding kuiLink CSS class to anchor elements

* Adding alt text to images

* Replace getters with regular methods

* Remove leftover comment

* Removing unnecessary comment

* Fixing typo in comment

* Adding comments for message properties

* Fixing typo in method name

* Defining custom CSS class

* Fixing method call

* Creating custom CSS classes

* Adding documentation links

* Use a instead of button for demo link

* Allow directives in manage and monitor messages

* Refactoring shared code into single ui/public/getting_started folder

* Adding README

* Fixing whitespace in/around links

* Trim messages before setting them

* Decorate in-app links with opt-out attribute

* Opt out of the Getting Started page if the user already has index patterns

* Adding more commentary around expectations of setTopMessage use

* Using ng-src and ng-href attributes where attr values are angular expressions

* Importing the directive before using it

* Using ui/registry for message registries

* Renaming service => helpers to clarify intent

* Adding explanatory comment

* Adding "or"

* Fixing div id

* Breaks out the inject logic into another directive

* Adding Getting Started page object for functional tests

* Consolidate into one registry

* Fixes incorrect classes

* Changes how styles are applied to injected-items items

* Modifying class name per CSS style guide

* Adding getting started doc link

* Removing unused import

* Attempting to fix breaking build

Apparently the Getting Started page is preventing access to Console (Dev Tools, really) so the functional tests for Console are failing. This commit opts the user out of the Getting Started page before attempting to navigate to Console.

* Cleanup on aisle testbed! (#11765)

* Navigate to getting started page so we can opt out of it
2017-05-15 14:04:16 -07:00
Court Ewing
b09d131b80 Revert "Getting Started page (#11673)" (#11788)
This reverts commit 211b3d4c1c.

This was breaking builds, so we revert until we figure out why.
2017-05-15 09:59:35 -04:00
Shaunak Kashyap
211b3d4c1c Getting Started page (#11673)
* Initial code

* Renaming files/folders

* Notes and changes from HTML/CSS review

* CSS changes

* Fixing transform units

* Fleshing out logo circle

* Adding logos

* Un-nesting styles

* Adding kuiText class on <p> elements

* Making shield icon 404 go away

* Using trustAsHtml filter; using registry

* Adding code for registry

* Adding images

* Hooking up the opt-out link

* Fixing linter issues

* Fix issue with refresh bringing back nav

* Removing load_default module

* Use GETTING_STARTED_ROUTE constant

* Allow topMessage to be a directive

* Adding kuiLink CSS class to anchor elements

* Adding alt text to images

* Replace getters with regular methods

* Remove leftover comment

* Removing unnecessary comment

* Fixing typo in comment

* Adding comments for message properties

* Fixing typo in method name

* Defining custom CSS class

* Fixing method call

* Creating custom CSS classes

* Adding documentation links

* Use a instead of button for demo link

* Allow directives in manage and monitor messages

* Refactoring shared code into single ui/public/getting_started folder

* Adding README

* Fixing whitespace in/around links

* Trim messages before setting them

* Decorate in-app links with opt-out attribute

* Opt out of the Getting Started page if the user already has index patterns

* Adding more commentary around expectations of setTopMessage use

* Using ng-src and ng-href attributes where attr values are angular expressions

* Importing the directive before using it

* Using ui/registry for message registries

* Renaming service => helpers to clarify intent

* Adding explanatory comment

* Adding "or"

* Fixing div id

* Breaks out the inject logic into another directive

* Adding Getting Started page object for functional tests

* Consolidate into one registry

* Fixes incorrect classes

* Changes how styles are applied to injected-items items

* Modifying class name per CSS style guide

* Adding getting started doc link

* Removing unused import
2017-05-12 11:35:01 -07:00
CJ Cenizal
3cb51f4c04 Improve Visualize screen-reader accessibility: (#11599)
- Add aria-label to Tile Map visualization's 'Fit Data Bounds' button.
- Add aria-label for Visualize Editor sidebar index pattern.
- Add aria-label to Time Series Visual Builder Annotation icon options.
- Add aria-label for Time Series Visual Builder AggSelectOption.
- Add aria-label to Time Series Visual Builder Annotation selected icon option.
- Adjust aria-labels for Heatmap visualization options.
- Adjust aria-labels for ValueAxes add and remove buttons.
2017-05-11 15:02:12 -07:00
Spencer
ca049508c2 [ci] only build kibana once (#11717) 2017-05-11 13:12:30 -07:00
Spencer
2e7fed87fd [ftr] take screenshots on failure (#11709)
* [tests/functional] move screenshots to their own service

* [ftr] add testFailure and testHookFailure lifecycle hooks

* [tests/functional/screenshots] cleanup old screenshots at startup

* [test/functional/screenshots] take screenshots when tests fail

* [cli_plugin/install] fix test

* [ui/scanner] fix test
2017-05-11 12:07:23 -07:00
Thomas Neirynck
c946b43f3e When using WMS, the zoom settings of the manifest should not be used (#11707)
When a user configures a WMS, we should not use the zoom-settings from the manifest. These depend on the user's license level, and are not relevant when using a 3rd party WMS service.
2017-05-11 09:32:03 -04:00
CJ Cenizal
c861dc2bc4 Make Discover table keyboard accessible. (#11604)
* Make Discover table carets tabbable.
* Make Discover table tabs tabbable.
* Make Discover table icon buttons tabbable.
2017-05-10 10:45:05 -07:00
Jonathan Budzenski
d2bf8707a6 Remove jenkins_build_snapshot. Closes #10973 (#11203) 2017-05-10 06:13:56 -05:00
archana
4c3f39e949 [Typo] Change all indicies to indices (#11564) 2017-05-09 20:52:54 -05:00
Rashmi Kulkarni
f2f313875c Selenium Test for TagCloud Visualization (#11636)
Selenium Test incorporating TagCloud Viz
2017-05-09 16:47:42 -07:00
Spencer
9f0caba9b6 Fix default time field selection (#11664)
* [indexPattern/create] fix test subject

* [indexPattern/create] only auto-select when there is more than one time field

* [indexPatterns/create] describe weird timeField auto-selection

* [indexPattern/create] update no-date-field text

* restore functional test changes in 02787e3df5
2017-05-09 16:05:19 -07:00
Stacey Gammon
a25d99d210 Hide the second toast when adding a new visualization straight from dashboard (#11621)
* Hide the second toast when adding a new visualization straight from dashboard

* fix tests that assume two notifications

* fix another tests that assumes two toasts
2017-05-08 10:29:18 -04:00
Thomas Neirynck
1b1605edf9 move pointseries test module (#11635) 2017-05-08 08:07:39 -04:00
Stacey Gammon
536be5d5e0 test support (#11477)
* test support

* Move custom find timeout logic into find service

* Fix the error in tests by combining the calls.

Seems to work locally like this.
2017-05-06 07:36:16 -04:00
Spencer
993216c099 [ftr/chromedriver] actually wait between pings (#11634) 2017-05-05 16:02:33 -07:00
CJ Cenizal
16f55d118f Improve Dashboard screen-reader accessibility. (#11600)
* Improve Dashboard screen-reader accessibility:
- Add aria-label for Dashboard Add Panel tabs.
- Add aria-label for Dashboard Panel title.
- Refactor empty Dashboard prompt message to improve accessibility.
- Adjust aria-labels for Dashboard query bar.
- Adjust aria-labels for Dashboard Landing Page table.
- Adjust aria-labels and interactive elements of Dashboard Panel actions buttons.
2017-05-05 13:21:55 -07:00
Peter Pisljar
815b082799 using ui-select for field selection in visualize (#10998)
* using ui-select for field selection in visualize

* adding a limit and infinite scroll

* fixing based on CJ's comments

* Add sort prefix first utility

* Add sortPrefixFirst tests

* updating uiSelect to use the new filter

* rebasing on master

* adding uiSelect to top hits sort-on input

* fixing tests
2017-05-05 10:48:04 +02:00
Spencer
4c6c401576 increase chromedriver startup timout to 15 seconds (#11609) 2017-05-04 16:18:34 -07:00
CJ Cenizal
e91c99f2b2 Create CollapseButton component class to standardize appearance of this button. (#11462)
* Create CollapseButton component class to standardize appearance of this button.
* Fix positioning of LocalSearch icon.
* Update collapsible-sidebar directive and Discover page object to use test subject selector.
* Refactor 'closed' class assignment.
2017-05-04 13:58:06 -07:00
Spencer
f76bef46c0 [ftr] remove digdug, use chromedriver directly (#11558)
* [ftr] remove digdug, use chromedriver directly

why?
 - digdug is meant to be used by intern, and expects a certain lifecycle that the FTR has tried and continuously fails to mimic
 - rather than continue trying to force digdug into the stack, just spawn chromedriver ourselves. We know how to handle it
 - cleans up verbose remote logging while we're in there, since selenium-standalone-server went with digdug, which was previously doing the verbose logging
 - deprecate config.servers.webdriver
 - add config.chromedriver.url
 - if url at config.chromedriver.url points to a server that responds to http requests use it as the chromedriver instance, enables running chrome in a VM or container
 - if pings to config.chromedriver.url fail a local chromedriver is started

* address review requests
2017-05-04 13:27:18 -07:00
Lee Drengenberg
5ba57f7c62 Change expected data to match change in table UI (#11495)
* Change expected data to match change in table UI

* fix more expected results for data UI change

* Revert one previous change and fix one other test

* fix last issues

* missed splitting the last array element

* missed splitting the last array element
2017-04-28 13:41:45 -05:00
ppisljar
144cf70cdb Revert "fixing heatmap black squares (#11121) (#11191)"
This reverts commit da327af5f5.
2017-04-28 10:12:55 +02:00
Spencer
36ccbc1465 Tweaks needed for integrating with the functional test runner (#11469)
* [git] ignore the entire root optimize directory

* [ftr] fix readConfigFile export

* [ftr/config] set default hostname and protocols for urls

* [chrome] make top-level chrome a test-subject

* [ftr/CommonPage] only auto-login when not navigating to the login page
2017-04-27 09:01:54 -07:00
Thomas Neirynck
73f2ff513a Make lon/lat comparison less strict in selenium test (#11464)
Make comparison on location less strict. Depending on the browser, the location might be slightly off after the decimal point.
2017-04-27 11:32:52 -04:00
Shaunak Kashyap
02787e3df5 Removes the "Index contains time-based events" checkbox (#11409)
* Removing "Index contains time-based events" checkbox

* Rename label

* Adding "No Time Filter field" to time field select list

* Using translation for i18n and consistency with label on create form

* More useful verbiage

* Updating copy

* Adding help block below select for added clarity

* Removing functional tests that used time-based events checkbox

* s/INDEX/INDICES/ to be reflect reality

* Fixing logic error

* Updating functional test to match new behavior

* Use controller property instead of inline expression

* More readable variable name
2017-04-26 16:25:00 -07:00
Thomas Neirynck
984aaa80cf Align zoom level settings (#11399)
- allow 0-level for WMS services
- use zoom level 2, centered at 0,0 as new default when tilemap viz opens
2017-04-25 23:02:39 -04:00
CJ Cenizal
4209774dde Deprecate Bootstrap buttons (#11352)
* Migrate Console to kuiButton.

* Convert angular-bootstrap Timepicker and Tabs components to use kuiButtons.

* Convert Timelion to use kuiButtons.

* Convert Visualize and visTypes to use kuiButtons.
- Convert Heatmap vistype to use kuiButtons.
- Convert Visualize editor, AggTypes controls, and Heatmap options to use kuiButtons.
- Convert VisType control rows_or_columns to kuiButton.
- Adjust formatting of kuiButtons in AggTypes controls and Heatmap options.
- Convert Visualization save prompt to use kuiButtons.
- Convert visualize legend to use kuiButtons.
- Convert Visualize Spy to use kuiSelect instead of Bootstrap buttons.

* Convert Notify to use kuiButtons.
- Fix appearance of Notifier countdown.

* - Convert Dashboard to use kuiButtons and kuiMenuButtons.
- Convert Dashboard save panel to use KuiButtons.

* Convert Discover sidebar to use kuiButtons, and have an improved UX and accessibility.
- Convert Discover field chooser to use kuiButtons.
- Convert Discover no-results to use kuiButtons.
- Convert Discover save panel to use KuiButtons.

* Convert filter bar to use kuiButtons.

* Convert fatal splash screen to use UI Framework components.

* Convert number list to use kuiButtons.

* Convert stringify color editor to use kuiButtons.

* Convert timepicker directive to use kuiButtons.

* Convert Index Pattern Management to use kuiButtons.
- Convert Index Pattern Management field editor to use kuiButtons.
- Remove unnecessary ng-class from Create Index Pattern submit button.

* Remove unused global_config.html partial.

* Fix functional tests.
- Rename discover-save-search-btn test subject selector to discoverSaveSearchButton.
- Convert Notifier tests to use kuiButtons.
- Convert functional tests to use test subject selectors instead of relying on btn classes.
- Update HeaderPage and VisualizePage page objects to refer to timePickerGoButton.
- Fix broken functional tests for Discover, Visualize, and Settings.
- Fix failing Discover scripted fields tests.

* Fix visual bugs with FieldChooser string, Notifier buttons, and NumberList.

* Fix Number List so the 'remove' buttons are small.

* Fix FieldEditor to have space between Popularity input and dec/increment buttons.

* Update FieldChooser string partial to have padding around 'Visualize' button.
2017-04-24 16:35:58 -07:00
CJ Cenizal
b5d1df929a Refactor and document Visualize, Visualize Editor, and Visualization Spy. (#11359)
* Refactor and document Visualize, Visualize Editor, and Visualization Spy.
2017-04-24 12:58:15 -07:00
Jonathan Budzenski
5a6766bb50 [test/dashboard] Retry filter check (#11372)
* [test/dashboard] Retry filter check

* [test/dashboard] Use await on getFilters
2017-04-21 16:01:35 -05:00
archana
476031b4ea Run tests against an actual Kibana build (#11237)
* build before running selenium

* change directory into built snapshot

* WIP: what is in the build dir

* WIP: skip unit tests

* run selenium on build

* [functional tests on build] Derive version

* [functional tests on build] Missing folder name prefix

* WIP: debug on ubuntu VM

* WIP: double kibana stabilize timeout

* WIP: remove ubuntu VM debug change

* WIP: add logs for docParams

* WIP: add logs for es

* build release version without -SNAPSHOT-

* [functional test release] Cleanup
2017-04-21 11:08:36 -05:00
CJ Cenizal
a605b7f478 Refactor Index Pattern Creation logic. (#11210)
* Reorder Create Index Pattern logic so local functions are before scope methods.
* Extract some Index Pattern Creation logic into sendCreateIndexPatternRequest and getDefaultPatternForInterval services.
* Use UI Framework typography components for Index Pattern Creation header.
* Separate user-specified variables for configuring the index pattern from controller variables, which just change the UI state.
* Rename index to newIndexPattern for clarity.
* Use controllerAs and fat arrow functions in Create Index Pattern.
2017-04-18 14:30:57 -07:00
Spencer
0c67890bd9 [dashboard] disable toast auto-hiding (#11248)
* [dashboard] disable toast auto-hiding

* [functional/service/kibanaServer] describe disableToastAutohide() method
2017-04-15 18:08:24 -07:00
Spencer
811ed5b5f5 Cleanup some FunctionalTestRunner tidbits (#11211)
* [esArchiver] match functionalTestRunner --config default

* [functionalTestRunner] expose readConfigFile function

* [functionalTestRunner/mocha reporter] define undefined variable

* [functionalTests/services/remote] log tunnel output in verbose mode
2017-04-13 12:15:01 -07:00
Peter Pisljar
766646c5be fixing heatmap black squares (#11121) 2017-04-12 18:40:58 +02:00
Spencer
90434765c0 [functionalTestRunner] replace intern (#10910)
* [functional_test_runner] replace functional testing tools with custom/pluggable solution

* [functional_test_runner] Convert unit tests to commonjs format

* [functional_test_runner] Fix dashboard test in wrong mode

* [functional_test_runner] Add dashboardLandingPage test subject

* [functional_test_runner] Get Visualize page object

* [functional_test_runner] Fix outdated references

* [functional_test_runner] Fix more outdated refs

* [functional_test_runner] Remove duplicate tests

* [functional_test_runner] Improve test readability

* [functional_test_runner] 😞 So many duplicate methods

* [functional_test_runner] Move mgmt `before` outside toplevel describe

* [functional_test_runner] Settings page obj missing methods

* [functional_test_runner] Add improvements from @gammon

* [functional_test_runner] Fix return statements in async funcs

* [functional_test_runner] Move before() to correct scope

* [functional_test_runner] Add after() hooks to remove index patterns

* [functional_test_runner] Attempt to fix vertical bar chart tests

* [functional_test_runner] Clean up

* [functional_test_runner] Reinstate unit tests

* [functional_test_runner] Set default loglevel back to info

* [functional_test_runner] Replace `context`s with `describe`s

* [functional_test_runner] Better error handling

* [functional_test_runner] Add in new Tile Map tests

* Incorporate changes from master

* [functional_test_runner] validate that every test file has a single top-level suite

* Update contributing doc with link to full doc

* [docs] Spelling and grammar fixes

* docs: writing and running functional tests

* [docs] Move plugin doc to plugin area

* [docs] Housekeeping. Doc in wrong place

* [docs] Remove dup doc file

* [grunt] Only run mocha_setup when running tests, not every grunt task
2017-04-11 17:01:06 -05:00
Jonathan Budzenski
6d254a3cc9 [functional tests] Wait for url to update when removing all filters (#11108)
* [functional tests] Wait for url to update when removing all filters

* [functional tests] waitUntilUrlFound -> waitUntilUrlIncludes
2017-04-10 16:00:44 -05:00
Thomas Neirynck
b1a7f22be3 add the functional tilemap test (#10992)
Since the unit-tests now verify all colors and sizing as well, this integration test is mainly relevant for verifying the zooming behavior.
2017-04-06 12:08:33 -04:00
Stacey Gammon
b3eb25d648 Put share link back in edit mode (#11003)
* Put share link back in edit mode

See https://github.com/elastic/kibana/issues/10951 for background and
reasoning

* Preserve backward compatibility with pre 5.3 dashboard links

* Fix paths so create and edit use landing page as a substring

Apparently it has to be this way for the chrome nav to handle app
navigation the right way.

* Replace more strings with constants

* Update tests to point to new default dashboard url landing page

* [utils] move encodeQueryComponent into shared utils

* [uiNavLink] allow specifying subUrl pattern

* [dashboards] use dashboard urls that are more like before 5.3

* update comments

* Remove one comment, add another

* Remove failing toJSON test since the function was removed

Submitting now, but pending feedback that toJSON was removed
intentionally.

* Fix tests that need subUrlBase set manually

* fix bad markup in breadcrumbs

* Preserve 5.3 create dashboard links!

* add a comment
2017-04-05 17:03:48 -04:00
CJ Cenizal
14ed2e55e6 Re-implement Visualize Wizard using Gallery component for selecting visualization type (#10972)
* Add Gallery and GalleryButton components to UI Framework.
* Re-implement Visualize Wizard using Gallery component for selecting visualization type.
2017-04-05 12:39:35 -07:00
Lee Drengenberg
62774e608c Log Kibana URL when a test fails (#10979)
* Log Kibana URL when a test fails

* minor syntax fix - (thanks @cjcenizal )
2017-04-05 11:52:20 -05:00
Brandon Kobel
36f676cc2d Adding the data- prefix to the shared-item HTMLElements (#10888) 2017-04-05 08:03:46 -04:00
Stacey Gammon
1486188d08 Convert default to named exports - errors (#10986)
* Convert default to named exports - errors

* Make all error classes use class syntax and extends

add tests

* Extending Error apparently doesn't work

* Merge PR #11004 to try to fix test failures
2017-04-04 08:47:33 -04:00
Felix Stürmer
18e0252522 Factor out column manipulation in the doc table (#10681)
* Factor out column manipulation in the doc table

This refactoring effort turns the implicit manipulation of the set of
columns that was scattered throughout the doc table and the field
chooser into explicit function calls. This brings with it the following
improvements:

* The column manipulation code is not duplicated (DRY)
* The controller stays in control (IOC)
* If the required functions are not provided by the controller,
  manipulation of the columns is disabled.

Additionally, the `discover_field` now uses a properly isolated scope
instead of accessing inherited properties of the scope.

* Make filter addition and removal in tests more reliable

* Change function name to plural, move up ng-if

* Remove inconsistent variable initialization

* Fix function name typo

* Save the state in the action instead of a $watch
2017-04-03 18:13:50 +02:00
Thomas Neirynck
556bfab85d Geocentroid / tilemap bug fixes (#10871)
- adds the geo-centroid metric as the new default for visualizations
- various bug fixes and improvements
    - avoid unnecessary calls to manifest
    - avoid map flicker when zooming
    - enable scroll/pinch/touch zooming
    - avoid heatmap errors
    - ensure map fills screen in dashboard
    - ensure fit works consistently
    - relax tilemap constraints
    - remove support for multi-maps
- this refactor sets the stage for new vector map visualization which will reuse the same map components
2017-03-29 11:23:35 -04:00
Lukas Olson
b11bbc44a4 Fix interval drop-down for date histogram in discover (#10384)
* Hide the time interval select on blur

* Show scale warning on discover and keep drop-down

* Show scale without need to hover over info icon

* Remove unused variables

* Fix discover page object tests

* Fix getChartInterval in functional test
2017-03-28 16:51:12 -07:00
Spencer
e67790037a [esArchiver] combine elasticDump and ScenarioManager (#10359)
* As a part of bringing functional testing to plugins, esArchiver gives these plugins a way to capture and reload es indexes without needing to write a bunch of custom code. It works similarly to the elasticDump and ScenarioManager tools that it replaces.

Differences:
  - Streaming implementation allows for much larger archives
  - CLI for creating and using archives
  - Configurable archive location
  - Stores the data in gzipped files (better for source control, searching, large archives)
  - Automatically identifies and upgrades Kibana config documents

Methods:
  - `#load(name)`: import an archive
  - `#loadIfNeeded(name)`: import an archive, but skip the documents what belong to any existing index
  - `#unload(name)`: delete the indexes stored in an archive

CLI operations:
  - `./bin/es_archiver save <name> [index patterns...]`: save the mapping and documents in one or more indexes that match the wild-card patterns into an the `<name>` archive
  - `./bin/es_archiver load <name>`: load the mapping and documents from the `<name>` archive

* [functional_tests/common/nagivate] check for statusPage

* [es_archiver] move bins into new scripts dir

* [functional_tests/apps/context] use esArchiver

* [esArchiver] general improvements after showing to a few folks

 - remove auto-upgrading config doc logic (until we have better access to kibana version info)
 - export unload command
 - remove preemptive checks in favor of reacting to errors
 - use type "doc" vs "hit" for doc records (consistency)
 - wrote a bunch of pending tests to think though and plan

* [esArchiver] make log a stream that writes to itself

* [esArchiver] fill in stats and archive format tests

* [esArchiver] splitup action logic

* [esArchiver/cli] fix cli --help output and comment

* [esArchiver] remove type-based param coercion

* [esArchiver/log] use strings for log levels

* [esArchvier] remove unused var

* [esArchiver/indexDocRecordsStream] add tests

* [esArchive] fill in remaining tests

* [esArchiver] fix dem tests

* [eslint] remove unused vars

* [esArchiver/loadIfNeeded] fix call to load()

* [esArchiver] remove loadDumpData helpers
2017-03-27 15:29:14 -04:00
Stacey Gammon
1cd1dc9abd View edit 5 (#10585)
* Start at view/edit mode 4

* Revert back to save panel

- Get rid of `clone`
- Get rid of rename

* Move order of top nav component around so no chance of hitting Edit -> Cancel

* Update "lose changes" confirmation dialog

- Change the string and button text
- Set default focus on the cancel button.

* Remove DashboardViewMode

It was previously used when viewMode wasn’t stored in appState, in
order to keep an unsaved dashboard, that was just saved, in Edit mode.
This is unnecessary in the latest iteration.

* Pull time filter out of dashboard_state

* Fix edit controls bug, add more tests, make other tests more stable.

* Remove unnecessary logic, unapplied query bug fix, code clean up

* Fix bug on filter reloading, add tests & clean up

* Fix issue with move and remove icons showing up in expanded panel mode

and add tests to catch it.

* Fix issue with lose changes not resetting panel state

and add tests.

* General Clean Up

- Merge function only used in one spot inline.

Add comments

* address code review comments

* Stop using static + class to namespace functions

Instead, export each function individually.

* Show dashed border on maximized panels in edit mode.

* Be more methodical about ensuring the modal dialog hides before continuing.

* abide by new no unused vars rule
2017-03-23 10:15:30 -04:00
Jonathan Budzenski
28021f815f [lint] Fix no-undef errors (#10859) 2017-03-22 16:35:06 -07:00
Stacey Gammon
fd7801137a Introduce tests for add new visualization link (#10785)
* Introduce tests for add new visualization link

* address code review comment
2017-03-22 16:40:16 -04:00
Richard Hoffman
b4c18e4aa4 Indexed fields type filter (#10708)
* Add a dropdown to filter indexed fields by type

Added tests and test subjects for index pattern filters

Use UI Framework components

Change index field filter to use kuiFieldGroup, move filters below tabs

* Dynamically load indexed type filter based on existing field types

* Iterate over fields once to get types / languages

* Only check scripted flag for checking scripted lang fields, all other
fields should have their type added to type filter
2017-03-22 14:42:35 -05:00
Spencer
d8d65526c6 [eslint] enable no undef (#10825)
* [codeshift] add proper ignore comments

* [codeshift] apply require-to-import transform

* [codeshift/fixup] remove duplicate imports

* [eslint] upgrade config for react "unused" support

* [codeshift] apply remove-unused-imports transform

* [codeshift] apply remove-unused-basic-requires transform

* [codeshift] apply remove-unused-function-arguments transform

* [lintroller] fix argument list spacing

* [codeshift] apply remove-unused-basic-bars transform

* [codeshift/fixup] fixup unused basic var removals

* manually apply remove-unused-assignments transform

* [codeshift] reapply remove-unused-imports transform

* [codeshift] reapply remove-unused-function-arguments transform

* [eslint] autofix param spacing

* manually fix remaining no-undef errors

* use more descriptive file ignore pattern

* add eslint-plugin-react peerDependency

* replace values that looked unused in tests

* remove // kibana-jscodeshift-no-babel comment

* remove import statements from code required by api tests

* Remove '// kibana-jscodeshift-ignore' comments

* address review feedback

* remove remnant of removed if condition
2017-03-22 07:08:23 -07:00
MathijsHoogland
1b7af072d7 Syntax fixes test code (#10747)
* Removed a comma that should not be there.

* Should use double quotes if an expression is in a string.
2017-03-12 11:58:36 -07:00
Court Ewing
9e39956c27 build: always run build task in jenkins (#10689)
We always run the build task now in jenkins jobs rather than only in the
core builds. This ensures that the build task runs in PR builds even
though the build artifacts are not used for anything.

Ideally all the selenium tests would run against this build rather than
it just being something that gets ran and forgotten about, but this is a
first step.
2017-03-03 12:57:21 -05:00
Chris Cowan
4f3e625d7f Time Series Metric Visualizations (#9725)
* Initial import

* updating the editor width to match the new specs

* Adding tribe node support

* Adding tests for server libs

* removing bluebird

* removing extra cruft

* Fixing the font sizes

* Fixed the updating code

* Adding brushing

* Fixing linting issues

* Adding global filters

* Adding missing packages

* Default gauge style to half circle

* Fixing the markdown css bug

* Adding tests for the get_vis_data api

* Adding time offset

* Adding time offset to each type

* fixing bugs from time offset

* adding index pattern option to series

* Adding index pattern overrides

* Adding index pattern overrides

* Fixing tests

* Fixing brushing in the vis editor

* Changing the label

* Change the behavior of selecting a pipeline agg when only one exists.

* Refactoring series a bit

* Changing series options to just options

* Making sure we honor the toaster container height

* Adding first tests

* renaming vis_config to panel_config

* renaming vis_config to panel_config

* Adding more tests

* adding more tests

* removing api subdirectory

* refactoring get_vis_data (breaking it up and removing unused imports)

* reorganizing the visualization directory

* Re-organizing directory layouts and moving things to more logical places

* Refactoring React compontents to use ES6 syntax and adding propTypes for each. Also refactored out splats as much as possible.

* Adding serial differencing

* Refactored gauge to use 2 components instead of 4

* Finishing react refactor on visualizations. Consolidated legned funtionality

* Refactoring series config and removing a bunch of duplicate code

* fixing series config name

* Fixing numbers and strings (doesnt matter which it is); Fixing classname

* Changing the way the dark theme works

* Adding new vis into list for test

* Adding empty bucket check

* Fixing the index patterns in the aggs

* Fixing typo

* Refactoring vis_data

* Fixing std_metric

* Fixing refresh-hack

* Adding tests for get_splits, get_last_metric, map_bucket

* Fixing the error handing

* removing restrictions

* Sometimes values are strings or numbers... it doesn't matter

* Adding new color options for splits

* Fixing colors

* fixing size

* Adding support for fitlers agg

* Fixing tests

* Fixing splits for filters

* Fixing Top N to work better with fitlers

* Adding annotation editor

* initial work for annotations

* Finalizing annotations

* Fixing label

* making it expandable

* Fixing hacks fixed by #10175

* Fixing bars to use the same stacking options as lines

* Getting rid of align by colons

* removing unused depends

* removing unused depends

* Changing to readable lodash function

* Adding missing parens

* refactoring custom color picker

* Removing string refs and converting uncontrolled components

* Fixing the controlled components where value maybe null; converting error to css

* refactoring styles from components

* fixing the refresh behavoir borked by fullEditor

* Adding the executor service

* Fixing the test directories

* fixing save

* Adding filter ratios

* Fixing controlled components

* Trying to fix the weird typing

* Fixing offset bug with days

* Adding percentile rank

* Fixing yaxis updates; fixing percentile rank layout; adding steps to line chart

* removing unused depends

* Fixed a bug with the index patterns updating; fixed bug with charts rendering too much

* Fixing tests

* Commenting out React tests because the ENV must have change and they are no longer working

* Moving bucket transform

* moving calculate auto

* Moving calculate_indices

* moving extended_stats_types && get_agg_value

* moving get_buckets_path

* moving get_sibling_agg_value

* moving parse_settings

* moving series_agg

* Moving unit_to_seconds

* Fixing tests

* Fixing per PR

* Renaming vars to make it more clear what's happening

* Changing the way testible functions are exported

* fixing tests

* removing unused imports; fixing typos; fixing package name

* Name has to match the plugin path

* Fixing typos; removing unused imports

* fixing tests

* rearanging and removing unused imports

* Fixing a bug with unque names for radio buttons on the same form

* Fixing filter ratio to use a metric instead of just count

* fixing a bug with the new filter ratios

* Fixing the file path from the #8

* Fixing renderComplete trigger; Fixing embedded mode; Changing names for Timelion and Time Series Visual Builder

* Fixing name

* Fixing docs

* Fixing a typo for the field select for terms splits

* Fixing tests
2017-03-02 13:07:28 -07:00
CJ Cenizal
d6bf621258 Update Index Pattern header to use UI Framework components. (#10390)
* Update Index Pattern header to use UI Framework components.
* Fix functional tests.
2017-02-27 16:21:49 -08:00
Spencer
805cac2dde [functional tests] implement clickTestSubject helper (#10576)
Calling `.findTestSubject().click()` seems to be particularly error prone. This helper combines to the two actions and wraps them in a retry so we don't have to keep scattering `PageObject.common.try()` calls throughout the tests.
2017-02-27 14:37:46 -07:00
Peter Pisljar
7084d5573f using field formatters for heatmap legend (#10529)
* using field formatters for heatmap legend

* fixing test
2017-02-24 21:06:22 +01:00
Stacey Gammon
c253583a3d Warn if the title is a duplicate (#10321)
* Warn if the title is a duplicate

* warn when copyOnSave is checked.  add a test

* update message

* fix tests

* Fix issues with substring matching

add more tests.

* make case insensitive and return matching title

* Fix bug caused by subtle difference between this.type and type

Add a comment and rename one of the variables to make the distinction
clearer.

* add debug messages.

* fix tests again

* uncomment out tests

* more debug messages

* save more screenshots

* Need to wait till save finishes or the page may redirect the url after the page has navigated away

* address code review comments
2017-02-24 09:26:37 -05:00
Peter Pisljar
4c5044a302 Clarifying changing chart type option (#10463)
* fixing #10427

* fixing test
2017-02-24 10:28:47 +01:00
Brandon Kobel
a0536b1fce Fixing a naming collision the shared-item visualize tests were hitting (#10517) 2017-02-22 16:48:35 -05:00
Felix Stürmer
85facdd04d Show event context (#9198)
This adds a link to the detail view of discover rows to switch to a view of the documents immediately before and after the selected document. Since that view uses the timestamp field of the index pattern, it is only available for time-based indices.

See #9198 for detailed screenshots.
2017-02-22 18:27:49 +01:00
Brandon Kobel
0bd7f4264e Executing the visualize shared-item title/description tests in a try (#10441)
This function test can be flaky if we try to grab the attributes before
the visualization has finished rendering, so we're wrapping it in a try
2017-02-22 07:14:21 -05:00
Brandon Kobel
2fb2b4ca6c Adding attributes to be used by sharing (#10234)
* Adding attributes to be used by sharing

* Moving the shared-item tags for dashboard panels

* Switching from shared-item-title/description to just title/description

* Removing move noise

* Fixing typo

* Adding data- prefix before attributes, began writing tests

Adding shared-item title tests

Switching up the panel tests

Adding description tests

Fixing linting

Adding dashboard timefilter test

Adding visualization shared-item tests

Adding shared-timefilter tests

Adding discover shared-item tests

* Fixing shared-items-count on dashboard

* Fixing functional test data for discover and visualize
2017-02-17 06:59:36 -05:00
Peter Pisljar
4c85fd4954 Vislib Point Series Charts (#9642)
* adding vislib chart grid

* updating vislib to correctly render all new features

* adding new options to kibana visualizations

* update vis icon on save

* updating documentation

* fixing unit tests

* cleaning up

* updating based on UI review

* adding visualize editor unit tests

* selenium tests

* additional option tabs

* some more changes to the tabs/options [thanks CJ]

* going back from Category/Value axis to X/Y axis

* fixing unselected dropdown options

* updating based on last UI review

* updating based on last review

* updating based on last review

* fixing issue with axis titles

* allowing to specify only upper or only lower data bound

* updating based on brandons review

* fixing horizontal bar chart labels

* fixing test

* adding backward compatibility

* updating based on last review

* fixing selenium tests
2017-02-15 17:54:42 +01:00
Felix Stürmer
2796e7798b Stabilize tests involving absolute timepicker (#10308)
* Stabilize tests involving absolute timepicker

The asynchronous nature of angular's digest cycle and the page rendering
in the browser can lead to situations in which
`isGlobalLoadingIndicatorHidden()` returns true because the loading
triggered by the previous action has not yet started. In this case
subsequent actions incorrectly assume the loading has already been
completed. This is probably responsible for the flakiness described in #10302.

The newly introduced `waitUntilLoadingHasFinished` first waits for a
duration up to `defaultTimeout` for the loading indicator to appear
before waiting for it to be hidden again. In the best case this will
reduce the false positive rate of `setAbsoluteTimerange()`. In the worst
case the function will wait `defaultTimeout` longer than when just using
`isGlobalLoadingIndicatorHidden`.

fixes #10302
2017-02-14 19:09:53 +01:00
Richard Hoffman
8b4c052889 babel 6 upgrade (#9702)
* [npm] upgrade babel

The upgrade to babel 6 requires an upgrade to all of the associated modules, which meant that a few other things changed at the same time. The most notable is the way that we handle our babel-options, which is now done with an npm module and includes using the babel-loader's "presets" query string param.

This meant changes to the babel_options.js module and extending it to help setting up the "babel-register" module, which was previously copy-pasted in several places.

* [mtodules] upgrade to support babel6 module semantics

* [eslint] fix lint errors

* [babel] ignoer massive fixture files

* [cli/errors] use Object.setPrototypeOf since subclassing Error is broken

* [babel] Upgrading core babel libraries

[babel] Use WIP babel-6-fix branch of babel-preset-kibana

* Fix broken test

* [babel] Reverse unnecessary module.exports changes

* Fix notifier

* Use babel presets and plugins directly

* [babel/options] resolve preset/plugins paths for better plugin compatibility

* [babel/options] use babel-preset-env for correct node settings

* [babel] cache babel compilation in webpack like we thought we were
2017-02-09 14:48:55 -07:00
Jonathan Budzenski
0d9e51f72f [functional tests] Remove include_in_all (#10268)
* [functional tests] Remove include_in_all

* [functional tests] Get milliseconds from date
2017-02-09 13:52:07 -06:00
Stacey Gammon
20ea24f358 Refactor out state logic from dashboard directive (and a bugfix) (#10152)
* New state and tests and time fixes

* Code review comments

* Remove saving filters if "enter" hasn't been pressed
2017-02-09 09:37:37 -05:00
CJ Cenizal
740fa072db Fix race condition caused by Visualize page object's clickNewSearch method. (#10231)
* Add a sleep to Header page object's clickTimepicker method, to wait for the page to render on Jenkins.

* Add a sleep to Visualize page object's clickNewSearch method, to wait for the page to render on Jenkins.

* Wait for loading indicator to disappear to signify completion of clickNewSearch() in Visualize page object.

* Wrapper Header page object's clickTimepicker method in a try block.
2017-02-07 13:09:12 -08:00
CJ Cenizal
a5705f8dd0 Add landing page with table to Visualize app. (#9605)
* Refactor Visualize Wizard to use explicit controller names, instead of defining them dynamically.
* Add landing page with table to Visualize app.
* Update Visualize wizard UI.
* Add kuiIcon--basic and support icons in Table component. Display icons in Visualize landing page.
* Refactor Visualize Wizard templates to use import syntax.
* Set kuiViewContent width to 100% to avoid it shrink wrapping its content.
* Move ToolBar buttons to the right side. Remove labels and add tooltips.
* Remove unused Visualize load menu template.
* Disable timepicker in Visualization listing.
* Change Visualize route names. Add omitPages attribute to breadcrumbs directive. Make Visualize breadcrumbs into links.
* Remove Open and New menu buttons from Visualize.
* Add ConfirmationModal for deleting visualizations.
* Implement sorting for name and type columns in Visualize listing.
* Refactor Visualize routes into VisualizeConstants file. Fix functional tests.
* Add pager_controls directive and pager service. Add pagination to Dashboard and Visualize landing pages. Change Dashboard listing to use hrefs for each dashboard.
* Use ng-if instead of ng-hide to hide/reveal Table action buttons in Dashboard listing.
* Redirect from old Visualize wizard routes to new ones.
* Use ViewContent and Title components in Visualize wizard.
* Fix Visualize and Dashboard listing table logic so that selection only applies to the current page of items.
* Paging clears the selection.
* Searching clears the selection.
* Sorting clears the selection.
* Use consistent "Create" terminology in both Visualize and Dashboard for creating new items.
* Use NoItems and PromptForItems components in Visualize listing view.
* Use $injector to inject dependencies in Visualize and Dashboard listing.
2017-02-06 14:41:21 -08:00
Court Ewing
3cb5ffb477 test: try() separately on confirm modal actions (#10087)
Rather than wrapping two discrete webdriver requests in a single try()
block, we do each request in its own block to help prevent inconsistent
failures.
2017-01-27 08:03:15 -05:00
Thomas Neirynck
1df8e80bc2 Should only support 10 zoom levels. (#10041)
The map service is dialed back to only support 10 zoom levels iso. 12. Update corresponding integration test.
2017-01-25 09:48:18 -05:00
Stacey Gammon
5ba6603042 Dashboard landing page (#10003)
* Introduce dashboard landing page

Still TODO:
 - Add clickable breadcrumbs
 - Remove New and Open top nav options

* use clickable breadcrumbs instead of 'New' and 'Open' nav items

* code cleanup

improve tests

* Add new empty dashboard styling

* Fix selenium tests

* Address code review comments

- rename bread_crumb_url => bread_crumb_urls
- fix reporting link in dash (separate PR)
- Use NoItems instead of PromptForItems when searching
- Style fixes

* Use a constant for the landing page url

* Fix tests
2017-01-25 09:44:40 -05:00
Stacey Gammon
9c28e63949 Use better confirm button text. rename safe confirm. (#9984)
* Use better confirm button text. rename safe confirm.

Use confirm_modal_promise only when it’s easier than using
confirm_modal directly.

change all native confirmations to the new dialog

* address code review comments

* Be consistent with the confirm button text pattern

Address other code review comments

* remove default option for confirmButtonText

Require onConfirm and confirmButtonText for confirmModal

* fix tests for no longer using alertText

* address code review comments Round 2
2017-01-24 15:23:03 -05:00
Stacey Gammon
0f0981c5e9 Restructure dashboard files and folders (#9969)
* Restructure dashboard files and folders

* Try to stay DRY

avoid duplicate ‘dashboard’ naming when unnecessary

* rename index => dashboard and add an index.js with imports

rename style

* un-dig
2017-01-20 10:01:55 -05:00
Lukas Olson
3f6fe6a271 Close timepicker when a filter/interval is selected (#9618)
* Close timepicker when a filter/interval is selected

* Copy absolute variables before sending

* Use & instead of = for directive binding

* Fix timepicker tests

* Fix timepicker tests and remove tests that no longer apply
2017-01-10 11:32:34 -07:00
Stacey Gammon
d295553d95 fix selenium tests broken by default panel size change (#9802) 2017-01-09 17:03:27 -05:00
Jonathan Budzenski
980b67ed68 [test fixtures] string -> text/keyword for logstash data (#9799) 2017-01-09 15:00:16 -06:00
Thomas Neirynck
929b4de122 Read map service metadata from external service (#8630)
This modifies the way Kibana reads out metadata about the TMS service used in the Tilemap Visualization.

- Kibana now uses an external service that exposes a 'manifest'. This contains metadata about one or more available TMS services
- Kibana continues to respect the configuration of the kibana.yml file. If a custom TMS service is set here, the manifest will not be consulted
- This also adds an API extension point for other plugins to add additional query parameters to the requests to the manifest service and for the individual tile requests to the TMS.
2017-01-03 17:33:26 -05:00
Peter Pisljar
ae150f5835 Vislib heatmap visualization (#9403)
* adding UI styles (should extract)

* adding heatmap vislib type

* adding heatmap visualization

* adding documentation

* renaming heatmap options

* fixing options issues

* fixing color selection

* fixing / adding tests

* adding more color schemas

* adding more options

* adding cell labels

* fixing selenium test

* only allow to rotate labels by 90 degrees

* converting color number slider to number input

* hide labels if they don't fit

* fixing small issues

* improved range options

* fixing based on Thomas' review

* rebasing on master and fixing linting issues

* adding selenium tests

* fixing alerts

* fixing padding

* fixing based on review

* fixing math

* fixing custom range options

* removing $timeout

* notification in case labels were hidden

* fixing tests

* fixing based on last review

* fixing based on thomas' review
2016-12-26 19:15:50 +01:00
Lee Drengenberg
0cbec2cad7 New scripted field tests (#9242)
* [WIP] new scripted field tests

* Final improvements on 12 new tests for 1 expression and 2 painless scripted fields

* Add try loops around testing first Discover doc

* Set timezone to UTC and adjusted data accordingly

* Added boolean and date Painless scripted field types

* Remove unused (non-working) methods

* Fix lint error

* Added several data-test-subj attributes and used them in the tests

* Reverting previous change to getBarChartData
2016-12-20 12:19:59 -06:00
Spencer
db60725a02 [eslint] enable object-curly-spacing and no-global-assign (#9486)
* [eslint] update eslint config to 0.3.0

* [eslint] autofix

* [fixtures/hits] reformat to comply with max-len lint rule
2016-12-14 13:29:32 -07:00
Spencer
e488a16e6f [eslint] reenable no-extra-semi and quotes rules (#9473)
* [eslint] re-enable no-extra-semi and quotes rules

* [eslint] update to version 0.2.2 of eslint config

* [eslint] autofix
2016-12-13 18:17:47 -07:00
Spencer
2f6654bcec [eslint] re-enable no-var and prefer-const (#9455)
* [eslint] enable no-var and autofix

* [eslint] enable prefer-const and autofix

* [eslint] fix autofix-incompatible no-var and prefer-const violations
2016-12-13 10:44:27 -07:00
Spencer
0c736724b0 Upgrade eslint (#9357)
* upgrade eslint, all related deps, and config files

* replace gruntify-eslint with basic eslint-cli wrapper

* arrow-IIFEs must be invoked outside of the parens

* move import statements before their use

* reindent to satisfy new indentation check algorithm

* place missing semicolon

* ignore copy-pasted decode geohash code

* [grunt/eslint] fix argument spacing

* [gurnt/eslint] add comment about contents of report

* [grunt/tasks] use `export default`
2016-12-12 13:44:18 -07:00
Jim Unger
6e819c11b8 Remove legacy pipelines code (#9397)
* Removes legacy pipelines code from kibana core_plugin

* removes pipelines tests
2016-12-08 16:05:18 -06:00
Peter Pisljar
b19794585b Vislib Point Series updates (#9044)
Multiple changes to the Vislib point series charts. Before each of the chart (bar/area/line) would be an independent unit responsible for drawing all of its parts (axes, titles). This change splits things up so we can have greater control and better code reuse.

converting to ES6
moving axes out of each chart
joining both axes types (x and y) into a common axis type
allowing multiple axes
allowing top/bottom/left/right axis positioning
introducing new chart type 'point_series' which can combine bar/line/area series
making each of the series (bar/line/area) direction independent (vertical/horizontal charts)
2016-12-06 12:55:17 +01:00
Thomas Neirynck
31a6cbab6d Add Tag Cloud Visualization
A tag cloud visualization is a visual representation of text data, typically used to visualize free form text. Tags are usually single words. The font size of word corresponds  with its importance.
2016-11-21 17:03:25 -05:00
CJ Cenizal
f0a8887f7b Update PageObjects for Visualize, Dashboard, and Discover to use data-test-subj selectors for menu items. (#9133)
* Update PageObjects for Visualize, Dashboard, and Discover to use data-test-subj selectors for menu items.

* Run checkPlugins task as part of test:ui:runner task.
2016-11-19 10:08:43 -08:00
Stéphane Campinas
0b877f6313 Exclusion of source fields (#7402)
* added source filtering

* ditched the new 'retrieved fields' tab and added checkbox to exclude a field in the field control

* disable field exclusion checkbox if field is a metafield

* [indexPattern] copy excluded field property when refreshing fields

* [indexPattern/field] move isMetaField consideration into Field

* [indexPattern/edit] invert the "retreived" column, for accuracy

* [indexPattern/field] touchup the field.exclude message

* Fix typo

* [indexPattern] handle index patterns without fields

* [courier/searchSource] auto add source filter for index pattern

* [docTable] remove irrelevant test about source filtering

* [settings/indices] cleanup imports

* [settings/indexPattern/fields] add "field filters" tab

* [imports] fix old testUtils import

* [ui/fieldWildcard] add lib to match names based on field-style wildcards

* [settings/fieldFilters] list filter matches, remove excluded fields from fieldata_fields

* [fieldWildcard] properly escape regexp control chars

* [settings/indexPatterns] mark fields excluded if they match an exclude pattern

* [fieldWildcard] properly bind the regexp to the ends

* [indexPattern] remove unneeded lodash chain

* [settings/indices] use settings-indices- prefix for tab direcives

* corrected rebase on master

* Do not match exclusion on meta/scripted fields. Disable filter bar when on 'Filter fields' tab. Removed exclusion checkbox in the field controls page. Corrected typos. Improved documentation phrasing.

* corrected error in merge with _index_pattern

* removed unused code

* added missing fieldFilters to test dumps

* corrected merge with master

* removed default empty array in the index pattern schema, and check if fieldFilters exists

* restricts the source with the exclusion patterns set for that index pattern

* renamed field filters to source filters and explicitely retrieve the source in the doc controller

* renamed variables/moved files from field filters to source filters

* Renamed _field_types.js to _edit_sections.js to better reflect what it is for. Corrected editting typo. Renamed exclude column name to excluded. Corrected HTML styling. Removed unused config parameters in field_wildcard.

* Removed lines that were specifying the _source field since they were made unnecessary by https://github.com/elastic/kibana/pull/7402/files#diff-d1695ba2026ff89878f9e4f4de683758R50

* moved fielddata_fields source filtering to where it is initialized

* two-column layout for the source filters indices section

* corrected tests

* use the same table layout as in the other index sections.
Filter input correctly restricts source filters.
Do not match .keyword fields.

* Filter out .raw suffix from possible matches.
Removed unused HTML file.
Corrected bug that allowed to save an empty source filter.

* exclude is deprecated, should be excludes

* improved description

* changed as per code review

* removed filtering logic for keyword and raw fields
2016-11-01 10:48:43 -07:00
Lee Drengenberg
8ed3b333b0 Port #8880 to master Support Cloud testing (#8915)
* Support Cloud Kibana UI testing master

* Add xpack file

* cherry-pick 9f63224e77
2016-11-01 10:44:12 -05:00
CJ Cenizal
59d65fd672 Fix bug where the loading indicator was wider than the screen (#8854)
* Fix bug where the loading indicator was wider than the screen, allowing you to drag a dashboard panel very wide and break the UI.
* Refactor kbnLoadingIndicator to be a standalone component.
* Make loadingIndicator fixed position so it doesn't disrupt the layout when it appears and disappears.
* Uncouple from .spinner styles.
* Set a max-width on it.
* Rename Common PageObject getSpinnerDone method to isGlobalLoadingIndicatorHidden.
2016-10-31 16:08:38 -07:00
Peter Pisljar
4755a39a7d Do not use angular debug mode unless in development (#7929)
* fix #7125 - disable angular debug info
2016-10-29 17:12:51 +02:00
CJ Cenizal
b5444c41c8 Integrate Kibana UI Framework CSS.
- Migrate to new localNav component and subcomponent styles.
- Add support for multi-slot transclusion to kbnTopNav.
- Update Dashboard, Discover, Management, Visualize, Dev Tools, Timelion to use kbnTopNav consistently.
- Update these apps to also display localNavDropdowns consistently, including Timepicker (this mostly meant adding titles).
- Add checkLicenses npm script.
- Add .fullWidth utility class and use it to make search forms 100% width.
2016-10-26 21:39:47 -07:00
Felix Stürmer
e100e1f5c9
Add test to verify umlaut in vis name
Relates to #8705
2016-10-19 11:16:43 +02:00
Felix Stürmer
731fe7924a
Use let/const where appropriate 2016-10-17 18:14:05 +02:00
Felix Stürmer
956834430a
Take screenshots after assertions
The screenshots are now taken after the corresponding assertions are
made to make sure they actually depict the expected ui state.
2016-10-17 13:14:32 +02:00
Felix Stürmer
a5fe202432
Extract expected values into separate variables
to match convention
2016-10-14 10:48:50 +02:00