Commit graph

18109 commits

Author SHA1 Message Date
Nathan Reese
67401cea92
Eui 3.6.0 (#21968)
* bump EUI to 3.6.0

* replace CopyButton with EuiCopy

* remove snapshot file from deleted CopyButton component
2018-08-15 06:46:35 -06:00
Jen Huang
341d5008dc
Fix saving index pattern when there is a conflict (#21947) 2018-08-14 22:21:36 -07:00
Spencer
e49d5f3b10
[uiSettings] support overriding uiSettings from the config file (#21628)
This PR implements the `uiSettings.overrides` setting which [when stored in kibana.yml or passed as config args when starting Kibana] allows forcing some uiSettings to always have a specific value. This setting accepts a map of uiSetting keys to values that will always be used to override whatever is stored in the config saved object.

![image](https://user-images.githubusercontent.com/1329312/43619094-feded1ae-9680-11e8-9ec3-c12d4d949c46.png)

When users view the settings in the advanced settings UI they are disabled and describe why they can't be changed.

![image](https://user-images.githubusercontent.com/1329312/43618938-2cdee0f4-9680-11e8-9ed6-f384d4ee78f6.png)

Attempting to change these values from the uiSettings client/service/api is also prevented, causing a 400 error to be thrown and/or sent as the response.
2018-08-14 21:52:35 -07:00
Caroline Horn
53a69f6a29
Convert all Less files to Sass in Dashboard, using EUI variable scope (#21374) 2018-08-14 19:05:33 -04:00
Spencer
5db7245196
[typescript] continue to use the default config in development (#21966)
* [typescript] continue to use the default config in development

In #21865 we tried to make a separate config file that would be used for
browser TS files by excluding them from the default config file and
adding a second that included them. This works fine in the build, but
IDE integrations rely on being able to automatically discover a
`tsconfig.json` file in a parent directory of the file being edited,
which doesn't work when the tsconfig.json file is found, but excludes
the file being edited. In this situation IDE integrations silently
fallback to the default TSConfig settings, which don't show the types of
compiler errors that will become issues in CI, like implicit any
warnings.

This implements the original strategy we tried in #21865 of mutating the
tsconfig.json file before we run the tsc in the build so that the config
files select the right files at build time.

* [tslint] remove browser config from default projects list since it is empty

* [build/ts] fix typo
2018-08-14 15:27:07 -07:00
Jonathan Budzenski
cd433cc2ef
[build] clean @types from distributions (#21565) 2018-08-14 16:30:39 -05:00
Spencer
3b8e95758c
[retry] implement waitFor method (#21747)
We currently use the `retry` service to call a function over and over in a loop, waiting for it to run without throwing an error, and ultimately failing if it does not succeed before a timeout is exceeded. This is the easiest way to get certain interactions to work, either because we don't know when we should be able to execute the interaction successfully, or because the timing is just too tricky to plan out correctly. Another place where we are using the `retry` service, which I don't think is appropriate, is when we need to wait for a certain condition to be met. This is where `retry.waitFor()` comes in:

```js
await retry.waitFor('dashboard search to be enabled', async () => {
  const searchInput = await testSubjects.find('savedObjectFinderSearchInput');
  return await searchInput.isEnabled();
})
```

The `retry.waitFor()` method behaves much like the `retry.try()` method behind the scenes, calling a function over and over, but instead of waiting for it to run without throwing an error it waits for it to return a "truthy" value. It also requires a description string that is used to make rather nice log output and a more descriptive error message than something like https://github.com/elastic/kibana/blob/master/test/functional/apps/dashboard/_data_shared_attributes.js#L61-L67
2018-08-14 13:35:32 -07:00
dave.snider@gmail.com
a9b3a44110
update gitignore and remove monitoring css file (#21962) 2018-08-14 10:56:40 -07:00
Spencer
c01c2f95e7
[toasts] migrate toastNotifications to the new platform (#21772)
Fixes #20698

As part of the transition of APIs necessary for migrating the Chrome to the new platform, this moves the core logic for the toastNotifications out of `ui/notify` and into the new platform as the `core.notifications.toasts` service. I chose to use the `notifications` namespace here as I plan for the [`banners` service](494c267cd9/src/ui/public/notify/banners/banners.js) from `ui/notify` to eventually live at `core.notifications.banners`. If you disagree with this strategy and would prefer that we use something like `core.toastNotifications` let me know.

For the most part this service just does the same thing as the ui service did, so functionality should be exactly the same. To test the notifications I suggest using the testbed like so: https://gist.github.com/spalger/81097177c88dee142700fab25de88932
2018-08-14 09:27:12 -07:00
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