Commit graph

18100 commits

Author SHA1 Message Date
Jen Huang
1e6fb80be2
Upgrade to EUI 3.4.0 (#21870)
* Upgrade to EUI 3.4.0
* Update snapshots
2018-08-14 08:42:24 -07:00
archana
02067a0d8b
[Saved Objects] Create mappings lib within core/server/saved_objects (#21093)
This commit moves the large majority of the mappings library previously in src/server/mappings into src/core/server/saved_objects/mappings, since mappings should be owned by saved_objects. The kibanaIndexMappingsMixin remains in src/server, but is moved into src/server/saved_objects/mappings, keeping the same folder structure for consistency.
2018-08-14 08:51:00 -05:00
Pete Harverson
fee34f7f9e
[ML] Add aria-label to calendar and jobs list buttons (#21922)
* [ML] Add aria-label to calendar and jobs list buttons

* [ML] Simplify building of Jobs List expanded row icon aria-label
2018-08-14 13:50:36 +01:00
Aleh Zasypkin
e26cfc66d2
Do not limit payload size for requests that are proxied to the legacy Kibana. (#21750) 2018-08-14 07:37:01 +02:00
Josh Dover
17af683933
Reverts breaking change for Status API (#21927)
* Unbreak status API

* Update xpack test

* Bump
2018-08-13 17:26:20 -05:00
Spencer
359ac43ed6
[pageObjects/dashboard] check that save is complete before resolving (#21892)
While debugging failures I saw in #21772 I found myself encountering failure messages like `Error: expected undefined to sort of equal true`, and other more cryptic errors caused by methods like `PageObjects.dashboard.saveDashboard()` not ensuring that the dashboard was actually saved before resolving. As part of the debugging effort I noticed that the `saveDashboard()` method does have some awareness of the success condition, but rather than asserting success within the method it returns a success boolean for the caller to check, which was only being done in a handful of tests in `test/functional/apps/dashboard/_dashboard_time.js` but was ignored the vast majority of the time.

I think that most of the time we are calling `PageObjects.dashboard.saveDashboard()` we correctly assume that if the dashboard couldn't be saved for some reason the promise will be rejected and the test would fail. If the method was called `maybeSaveDashboard()` or `tryToSaveDashboard()` there might be a signal to consumers that they should check for success conditions, but that would also lead to the same checks all over the place. Instead, this PR reverses the responsibility of checking for success so that code calling `PageObjects.dashboard.saveDashboard()` can continue to assume that if something went wrong their test will fail. It also improves the error message by not using `expect(boolean).to.equal(boolean)`, instead implementing a basic `if()` statement and throwing an error with a meaningful message when something goes wrong.

```js
const isDashboardSaved = await testSubjects.exists('saveDashboardSuccess');
expect(isDashboardSaved).to.eql(true);
```

is now

```js
if (!await testSubjects.exists('saveDashboardSuccess')) {
  throw new Error('Expected to find "saveDashboardSuccess" toast after saving dashboard');
}
```

---

I think this type of change could be made to a lot of methods, and would make failures a lot easier to debug and possibly a lot less flaky if we were checking for success conditions in nearly every method we put in our PageObjects. I think it's safe to say that most of the methods we have in PageObjects do not check for actual success criteria, and sometimes that's okay: a method called `clickButton()` can safely resolve once the click method has been called, but a method like `addSampleDataSet()` should be verifying that the sample data set it set out to add was actually added.
2018-08-13 14:46:27 -07:00
archana
4ebd3d3534
[rxjs] Establish interop of rxjs-6 and kbn-observable (#21722)
* [rxjs] Establish interop of rxjs-6 and kbn-observable
* Remove symbol-observable
2018-08-13 13:45:02 -05:00
debadair
0c9657c43b
Fix bad cross doc link to auditing topic (#21938) 2018-08-13 11:17:08 -07:00
Uladzimir Dzmitrachkou
eb43306a1b Convert all Less files to Sass in discover, use EUI variable scope (#21290)
Discover now uses sass for its styling
2018-08-13 10:54:28 -07:00
Jonathan Budzenski
31eee3238d
[build] more cleaning (#21746)
* [build] remove npm

* remove angular-ui-bootstrap

* fix

* remove bodyParser, fetch mock to dev

* remove more packages

* remove check-hash;

* remove babel-eslint

* remove marked-text-renderer

* move fetch-mock to dev dependencies

* Revert "remove babel-eslint"

This reverts commit 37d3df9146cdab24661022b9edf4aa2fd3b14e30.

* fix npm path

* fix again

* remove entire node_modules dir

* CleanNodeTask -> CleanNodeBuildsTask

* move to node folder

* remove more
2018-08-13 12:28:23 -05:00
Brandon Kobel
add876281b
Adding RBAC Phase 1 Docs (#21178)
* Beginning to work on the role management APIs. Added docs for GET

* Adding PUT docs

* Adding PUT details

* Adding delete docs

* Fixing linking

* Adding Kibana privileges section

* Fixing dashboard only mode docs

* Fixing a few more references to managing roles

* Beginning to work on authorization docs, might be moving some to
stack-docs

* Collapsing authorization description in the kibana privileges page

* Adding audit logging section

* Revising the language on the Kibana role management section

* Splitting back out the auth/privileges and adding legacy fallback
details

* Revising language around impact of disabling security

* Changing Kibana to {kib} and Elasticsearch to {es}

* Beginning to work on developer centric docs

* Fixing some formatting, adding some diagrams

* Adding note about the role management APIs

* Adding overview, fixing small syntax issues

* Fixing chunk name for transitioning to application privileges

* Adjusting tone for the authorization introduction

* Changing the tone and structure of the RBAC docs

* Deleting blog stuff after refactoring

* Addressing first round of peer review comments

* Fixing endpoints links

* Peer review suggested edits

* Addressing other PR feedback
2018-08-13 12:06:25 -04:00
dave.snider@gmail.com
01f38a3e85
Convert all Less files to Sass in monitoring, use EUI variable scope (#20995)
Converts monitoring to use Sass instead of less.
2018-08-13 08:18:08 -07:00
Nathan Reese
a0dd3e6089
remove deprectated /shorten API (#21861)
* remove deprectated /shorten API

* breaking change log
2018-08-13 07:27:20 -06:00
Pete Harverson
edc9168d54
[ML] Disable auto focus on job wizard select index or search page (#21913) 2018-08-13 12:29:08 +01:00
pavel06081991
b180031589
Ability to parse formatMessage method from intl prop (#21277)
add support for extracting default messages from code strings like:

formatMessage();
intl.formatMessage();
props.intl.formatMessage();
this.props.intl.formatMessage();
2018-08-13 13:56:26 +03:00
Walter Rafelsberger
3717654d6e
[ML] Fix bucket span estimation for machine learning admin user. (#21866)
This fixes bucket span estimation for the machine learning admin user when security is enabled. The original issue was that the machine learning admin by default doesn't have the necessary permissions to call cluster.getSettings to get the settings search.max_buckets. This is now fixed by using callWithInternalUser() and additional permissions checks.
2018-08-13 09:43:13 +02:00
Tyler Smalley
7c2fd3b768
Dead code removal for React DevTools (#21904)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-08-12 10:29:19 -07:00
Stacey Gammon
62f35df89b
typescript more dashboard panel code (#21810)
* typescript more dashboard panel code

* use ? instead of | undefined
2018-08-12 06:53:13 -04:00
Yuri Astrakhan
222dd91823
Replace Number.parseFloat() with parseFloat() (#21872)
For some reason, Number.parseFloat() does not get
cross-compiled/backported for older browsers, causing an error.
2018-08-11 10:45:06 +03:00
Tyler Smalley
8769110adf
[scss] Adds autoprefixer support and improves watcher (#21656)
This adds support for autoprefixer which we have been using in Webpack.

Additionally, we have improved the watching functionality and now update builds based directly on their dependencies an not an assumption that the files are children.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-08-10 14:24:14 -07:00
Nathan Reese
d605a9c10e
add polyfill for ChildNode remove (#21797)
* add polyfill for ChildNode remove

* call polyfill function

* add files as suggested by jbudz

* remove checks around polyfill

* just use polyfill that mozilla recommends

* add MIT license to file

* suffix file with polyfill, update copyright and link to repo

* update notice.txt
2018-08-10 15:21:11 -06:00
Spencer
06b1af33ab
[build/ts] transpile public code with webpack-specific ts config (#21865)
Right now the build process is running TypeScript code through a single transpilation process which produces the JS code that ships with the distributable. This process causes problems because when running the optimizer from source we use a slightly different config 33c6ade756/src/optimize/base_optimizer.js (L312-L313), which instructs typescript to build modules using ESM, which webpack understands, but in the build we transpile this TypeScript to commonjs, which does not support features that are important to the strategy we are using to maintain BWC with the legacy platform as we migrate to the new platform.

This implements a `tsconfig.browser.json` file at the root of the repository that extends the default `tsconfig.json` file and includes a `src/**/public/**/*` code, which the root `tsconfig.json` file now excludes. This new config file is added to the list of projects that we lint, is shared with webpack, and is built along with the default project in the build process to create JS code that uses esm for webpack to consume.
2018-08-10 13:55:41 -07:00
Nathan Reese
1991b56297
fix 'Add' button in empty dashboard (#21816)
* fix 'Add' button in empty dashboard

* goto dashboard landing page after empty dashboard test

* add comment about event being undefined
2018-08-10 13:36:36 -06:00
Jonathan Budzenski
9cf108c01d
Remove contributors from package.json (#21815) 2018-08-10 13:12:28 -05:00
Tim Roes
133d25aef1
Introduce EditorConfigProvider to customize vis editor (#20519)
* Add possibility to specify base for histogram interval

* Move AggParamsWriter to ES6

* Add param for time_zone in date_histogram

* Prevent writing intervalBase to DSL

* Add basic EditorConfig providers

* Merge multiple configs together

* Allow hiding parameters

* Improve config merging and add tests

* Remove TODO

* Implement review feedback

* Add warning to parameter

* Remove unneeded self
2018-08-10 20:10:07 +02:00
Chris Roberson
9646850306
Fix test (#21882) 2018-08-10 12:44:06 -04:00
Matt Bargar
be23ce4068
Fix query input lag (#21753)
The debounce in ng-model-options was intended to avoid updating the
typeahead suggestions too often. It had the side effect of delaying
query input updates to the model on the angular scope. As a result, if
you typed quickly and hit enter within 100ms, you would submit an out of
date query. This moves the debounce from ng-model-options to the
updateSuggestions method itself.
2018-08-10 11:18:44 -04:00
Peter Pisljar
23edabcd82
fixing onUiState event handler (#21715) 2018-08-10 11:33:05 +02:00
Spencer
141a97d93c
[TypeScript] add type-check script (#19325)
* [TypeScript] add type-check script

* [ci] run scripts/type_check after linting

* [ts] improve filterProjectsByFlag readability

* fix typo

* simplify type signature
2018-08-09 17:19:24 -07:00
Nathan Reese
78e1c8b147
add section about running API tests in functional test documentation (#21738)
* add section about running API tests in functional test documentation

* list valid configs under more section
2018-08-09 15:54:24 -06:00
spalger
cc6e5db602 [kbn-pm] update build 2018-08-09 14:47:01 -07:00
Nathan Reese
803a3f1c2d
Move /shorten to /api/shorten_url (#21808)
* Move /shorten to /api/shorten_url

* better API test assertions

* add API documenation

* use async await

* import dependencies instead of pass in
2018-08-09 15:05:16 -06:00
Court Ewing
d32a65230b
[kbn-pm] remove lodash from test fixtures (#21848) 2018-08-09 16:41:55 -04:00
Josh Dover
33c6ade756
Convert status page to EUI (#21491)
* Convert the status_page plugin to EUI

* Fix uiColor for disabled state
2018-08-09 12:26:17 -05:00
dave.snider@gmail.com
6af72b7d58
IE11 centering issue in dashboard list (#21841)
Fixes a display regression with internet explorer.
2018-08-09 10:19:25 -07:00
Matt Bargar
e0fba828c9
Make query bar autocomplete screen reader accessible (#20740)
Fixes https://github.com/elastic/kibana/issues/20099

I made the changes described by Tim at https://github.com/elastic/kibana/issues/20099 and everything seems to be working. I tried to update the typeahead in such a way that it can be made accessible anywhere it is used, even if there are multiple typeahead instances on a single page.

> (optional) an aria-label on the individual suggestions that should be read out to screen reader. By default the content will be used, and that should be fine (unless you figure out there is too much "noise" elements in it.

I did not do this bit since the text that is read seems reasonable to me, but I'm open to changing it if others feel differently.
2018-08-09 11:23:02 -04:00
Lee Drengenberg
da1268d322
Fix es unzip (#21817)
* Rebuild modulePath correctly if on Windows

* fix it so we create empty dirs like /logs/
2018-08-09 09:08:33 -05:00
CJ Cenizal
e78113c2c1
Make Watcher table width 100% of the view (#21803)
* Show more of the name column in the Watcher watch table by making the table 100% width of the page, and by increasing the column width to 25%.
* Convert all title attributes to kbnTooltip.
* Add title attributes for columns which have tooltip content different from cell content.
2018-08-09 05:57:38 -07:00
Aleh Zasypkin
4cd9699108
Introduce schema.any (#21775) 2018-08-09 11:07:34 +02:00
Maryia Lapata
474714a6e4 Guideline for i18n engine (#20620)
* Add Guideline for i18n engine

* Update Guideline according to changes in i18n engine.

* Update examples in Guideline

* typo

* improve i18n guideline: add table for better view, use single quotes for js strings, fix description for testing, use uniq "message id" name

* fix readme description for guideline

Co-authored-by: maryia-lapata "mary.lopato@gmail.com"
2018-08-09 11:38:38 +03:00
Tiago Costa
06f76ccf6c Upgrade uglifyJS webpack plugin, disabling compress and enabling parallel (#21809) 2018-08-08 16:00:14 -07:00
James Gowdy
1de4523878
[ML] Adding group selector to jobs management (#21780)
* [ML] [WIP] Adding group selector to jobs management

* adding group name validation

* removing comment

* adding keyboard events

* moving new group input to its own component

* changes based on review

* adding tooltip

* adding better error reporting
2018-08-08 22:27:58 +01:00
Nathan Reese
ba47de5273
add "now" query parameter to sample data install endpoint (#20678)
* add now query parameter to sample data install endpoint

* joi returns date, so no need to create a new one

* add API functional tests for now parameter
2018-08-08 09:13:05 -06:00
Stacey Gammon
f76d996f99
Typescriptify dashboard panel actions (#21740)
* Typescriptify dashboard panel actions

Doesn't include build_context_menu because that has some eui dependencies, will tackle in another PR.

* early exit
2018-08-08 10:36:37 -04:00
Chris Roberson
dd40ac3dc2
[Monitoring] Address multiple accessibility issues (#20619)
* Add screen reader only text for monitoring charts

* Add aria label for completed recoveries

* Ensure we have aria label coverage for monitoring chart tooltips

* Ensure table rows are tabbable and include the number of results at the top

* Use EuiScreenReaderOnly

* Updated copy

* Use EUI

* Remove kui usage

* Use an id instead of aria-label

* Show results in the table footer

* Revert "Show results in the table footer"

This reverts commit d622eb7eb4.

* Show total row count within the monitoring table

* PR feedback

* PR feedback

* Ensure all charts show an interval in the tooltip

* Fix padding issue with the cluster status
2018-08-08 10:35:10 -04:00
Pete Harverson
cdc4ab6f67
[ML] Adds Jest tests for the Filter List Settings components (#21782) 2018-08-08 15:22:02 +01:00
Bill McConaghy
f08f92a673
fixing index pattern import (#21743) 2018-08-08 09:52:20 -04:00
Jonathan Budzenski
857e69f93c
[kbn-pm] Add optimize dir to kbn clean (#20945)
* [kbn-pm] Add optimize dir to kbn clean

* update snapshot
2018-08-08 07:39:15 -05:00
Jonathan Budzenski
759024cfc2
[dashboard/test] fix type errors (#21769) 2018-08-08 07:36:53 -05:00
Casper Hübertz
92026c3db8
[DOCS] APM UI docs for ML and query bar features (#21727)
Adding content for Machine Learning integration and query bar UI in the Using the APM UI docs.
2018-08-08 11:54:17 +02:00