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.
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.
* 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
add support for extracting default messages from code strings like:
formatMessage();
intl.formatMessage();
props.intl.formatMessage();
this.props.intl.formatMessage();
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.
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>
* 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
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.
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.
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.
* 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.
* 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"
* [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
* 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
* Typescriptify dashboard panel actions
Doesn't include build_context_menu because that has some eui dependencies, will tackle in another PR.
* early exit
* 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