* Added data-test-subj for ILM policies row and added a functional UI test to create a new ILM policy.
* Removed .only from test to allow entire test suite to run again.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* wip
* Moving catchError so observable stream does not complete. Adding retry on failure
* Using retryWhen. Updating unit tests
* PR fixes
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Documentation for scaling Kibana alerting, what configurations can change, what impacts they have, etc.
Scaling Alerting relies heavily on scaling Task Manager, so these docs also document Task manager Health Monitoring and scaling.
Before we removed environment from the UI filters (#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.
Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.
This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.
Add an API test for this case.
Fixes#93385.
* Escape quotes in list ids and quote the id in KQL query
* Remove decodeURIComponent because too many KQL queries don't handle quotes
* Add quotes to user supplied IDs for other KQL queries
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* WIP analytics polish
* Working on tests.
* Finishing up tests.
* Updating the engine overview page.
* eslint fixes
* i18n fixes
* Icons feedback
- Remove unused svg file
- Add TODO comment
- Add test coverage
* linting - unnecessary ternaries
* EnginesOverview feedback
TotalCharts
- adjust chart height
- tests: simplify / convert back to shallow
RecentApiLogs
- switch to DataPanel
* DataPanel feedback
Component
- move CSS table bg override out from being an AnalyticsTable concern to a DataPanel concern
+ bem naming, todo comment
- add responsive={false} for better mobile UX
- add className and data-test-subj prop passing
- change title to pass full heading tags rather than a string
- move subtitle below title for better screen reader order
- add index.ts export
Tests
- capitalization for consistency, ordering/describe
- remove data-test-subjs on source code (simpler to grab & inspect tags directly so we can more easily call .text() on passed content)
- add new tests for props (fliled/className/data-test-subj)
Usage
- update other files using DataPanel to start passing heading tags + use index export
- fix RecentApiLogs tests
- change RecentQueries section to use a DataPanel (per Davey)
* Analytics tags - updates & responsive tweaks
Tags
- Rename to more general tags.tsx file
- Add CSS limiting width of variable length tags
- Break up into two separate components for easier readability & testing
- Split up tags column constants so that the wider tables can use the old tags list component
Tables
- add isSmall flag to AnalyticsTable to use new tag count component
- reduce actions column width
- revert unnecessary table test changes
Analytics
- add custom CSS that switches tables/panels into full-width earlier
* AnalyticsSection fixes
- fix responsive behavior with icon
- add missing AnalyticsSection branch coverage
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
## Problem
Blocks of 10-15 `import`s are common in the plugin and there a few places which have ~50 lines of `import`s. It makes it more difficult to understand the where/why of what's being imported.
We've had instances while files import from the same module in different lines. i.e.
```ts
import { a } from './file';
... 5-10 lines later
import { b } from './file';
```
## Proposed solution
Add a lint rule to enforce a convention on the module `import` order. This can help in the same way Prettier & ESLint help to format type signatures or other code. It makes it easier to understand or notice any changes in the code. It's also able to be fixed automatically (`node scripts/eslint.js --fix` or any existing "format on save" in an editor).
## This PR
replaces #92980 (based on https://github.com/elastic/kibana/pull/92980#pullrequestreview-601070556)
### Lint rule
f9be98d Add eslint rule to enforce/autofix import group order. Use the same rule as a few other plugins. Groups `import` statements by type as shown in the [lint rule docs](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#importorder-enforce-a-convention-in-module-import-order
). The order is:
1. node "builtin" modules
2. "external" modules
3. "internal" modules
4. modules from a "parent" directory
5. "sibling" modules from the same or a sibling's directory, "index" of the current directory, everything else
e.g.
```typescript
import fs from 'fs';
import path from 'path';
import _ from 'lodash';
import chalk from 'chalk';
import foo from 'src/foo';
import foo from '../foo';
import qux from '../../foo/qux';
import bar from './bar';
import baz from './bar/baz';
import main from './';
```
The [lint rule](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#importorder-enforce-a-convention-in-module-import-order) is relatively light handed. It only ensures the `imports` are groups together in the given order. It doesn't alphabetize or otherwise sort the order of the files.
e.g. imports aren't rewritten to be in alphabetical order. This is fine
```ts
import from './c';
import from './a';
import from './b';
```
The [docs show other options](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#options) and 2831f02bc7/.eslintrc.js (L1138-L1168) uses many of them
### Newlines option
The newlines settings means a change from something like
```typescript
import fs from 'fs';
import path from 'path';
import _ from 'lodash';
import chalk from 'chalk';
import foo from 'src/foo';
import foo from '../foo';
import qux from '../../foo/qux';
import bar from './bar';
import baz from './bar/baz';
import main from './';
```
to
```typescript
import fs from 'fs';
import path from 'path';
import _ from 'lodash';
import chalk from 'chalk';
import foo from 'src/foo';
import foo from '../foo';
import qux from '../../foo/qux';
import bar from './bar';
import baz from './bar/baz';
import main from './';
```
Added it as a separate commit 2831f02 in case we want to avoid it, but I believe it's an improvement overall. Especially on the files with 25+ lines of imports. Even the "worst case" of something like this isn't bad (IMO). Especially since it's an automatic reformat like anything else in prettier
```typescript
import fs from 'fs';
import _ from 'lodash';
import foo from '../foo';
import main from './';
```
* Writing failing test for duplicate ids
* Test is correctly failing prior to bug fix
* Working jest tests
* Adding more jest tests
* Fixing jest tests
* Adding await and gzip
* Fixing type errors
* Updating log message
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
The threat intel data that we are loading for these tests was previously
copy/pasted, resulting in all docs having the same @timestamp value.
This resulted in nondeterministic ordering which manifested as test
failures.
This fixes the issue by giving a unique timestamp to each indicator
document, and then unskips/updates tests according to this new ordering.
* add start and stop endpoint tests
* add start and stop within spaces endpoint tests
* move start and start_spaces tests to separate files
* wip: move stop and stop_spaces to separate files
* use slow running job config so job is still running when stop request happens
* check started job state is actually started
* check job is stopped after stopping
* add debug logs
* ensure jobs are created/started before stopping attempt
* remove unnecessary debug logs
* rename ml:fileDataVisualizerMaxFileSize to fileUppload:maxFileSize
* add saved object migration
* file preview
* importing status
* remove console statement
* import complete view
* fix geojson_importer test
* tslint
* i18n fixes
* cleanup
* update documenation for advanced setting rename
* advanced settings usage_collection
* remove ml:fileDataVisualizerMaxFileSize from schemas and types
* add copy buttons for import response and fix geojson upload functional tests
* tslint
* remove clipboard-read check
* return early if env does not support reading from clipboard
* fix reporting tests
* review feedback
* update GeoJsonFileSource to support showing results trimmed icon and tooltip
* add fileUpload to useMlKibana context and replace dependencyCache with useMlKibana
* tslint
* review feedback
* lower case file name
* default to selecting geo_shape when file contains both points and shapes
* fix wizard onError callback to not advance to next step
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Alerting][Docs] Moved alerting links from hard-coded to documentation link service
* fixed due to comments
* Update x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
* fixed jest tests
* fixed due to comments
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
* [Misc cleanup] Move Access type to common
- it was being duplicated in server/check_access and InitialAppData
+ add mock access data to DEFAULT_INITIAL_APP_DATA
+ update server/ tests to account for access in DEFAULT_INITIAL_APP_DATA
* Update AppSearchConfigured to pass props to AppLogic vs calling initializeAppData
+ update tests to rerender a wrapper rather than doing {...DEFAULT_INITIAL_APP_DATA} repeatedly
* Update AppLogic to set values from props rather than a listener
- main goal of this PR is to prevent the flash of state between mount and initializeX being called
- note: I recommend turning off whitespace changes in the test file
* Update AppLogic typing so that app data is always expected
- which it should be in any case in a production environment
- note: I could have changed InitialAppData to remove the ? optional notation, but decided on this route instead since InitialAppData affects more than just App Search (e.g. server, WS), and I didn't want this to have potential far-reaching side effects
* Update type scenarios where AppLogic values were previously thought potentially undefined
- which is mostly just configuredLimits it looks like
* [PR feedback] Type name
* [APM] Fixes duplicate ML job creation for existing environments (#85023)
* Removes commented out test code.
* Adds API integration tests
* clean up code for readability
* Add routes for role mapings
* Initial copy/paste
* Update RoleMappingsRouter
- Update all paths
- Change router to use children instead of render props
- Remove legacy app chrome
* Update RoleMappings
- Update all paths
- Use global flash messages
* Update RoleMapping
- Update all paths
- Use global flash messages
- Add types to fix errors
- Use React Router Hooks instead of legacy withRouter HOC
* Fix path in index and add route helper
* Update paths in RoleMappingsLogic
* Remove history in favor of KibanaLogic.navigateToUrl
* Add Role type
* Remove ID prop
This is not needed because the ID is actually passed in the URL itself and is not a requirement in the body of the request
* Replace contextual flash messages with global
It appeared that the server sometimes sent flash messages with the API response, but I checked the Rails server code and there is no `flashMessages` sent back from the server so I am omitting that from the `RoleMappingsServerDetails` interface as well.
* Replace Rails http with kibana http
* Fix route path
* Add route and update global navigation
* Add breadcrumb/page title
* Update flash messages in RoleMapping
I did this for RoleMappings but forgot this one
* Use explicit AttributeName type instead of string
* Add i18n
* Fix type issue
Because the shared role mapping components work for both App Search and Workplace Search, the more generic string is used here because App Search has different role names.
* Add tests for components and router
* Add optional to interface
In the case of a new role mapping, the server is called at the ‘/new’ route and the server responds without a roleMapping prop, as it has not yet been created.
* Add tests for RoleMappingsLogic
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* New empty MetaEngineCreation component
* Added MetaEngineCreation to AppSearchConfigured router
* Empty MetaEngineCreationLogic
* Add rawName value and setRawName action to MetaEngineCreationLogic
* Add indexedEngineNames value and setIndexedEngineNames action to MEtaEngineCreationLogic
* Add selectedIndexedEngineNames value and setIndexedEngineNames action to MetaEngineCreationLogic
* Add description to MetaEngineCreation
* Add name selector to MetaEngineCreationLogic
* Added MetaEngineCreationNameInput to MetaEngineCreation
* Add fetchIndexedEngineNames listener to MetaEngineCreationLogic
* Call fetchIndexedEngineNames when MetaEngineCreation first renders
* Add EuiComboBox for selectedEngineNames to MetaEngineCreation
* WIP Add meta engine source engine limit warning to MetaEngineCreation
* Add submitEngine listener to MetaEngineCreationLogic
* Add onEngineCreationSuccess to MetaEngineCreationLogic
* Fixing tests for MetaEngineCreationLogic
* Fix tests for MetaEngineCreation
* Add Create a meta engine button to EnginesOverview
* Use DEFAULT_META for fetching indexed engine names in MetaEngineCreationLogic
* Copy fixes
* Updating POST /api/engines tests
* Add noItemsMessage prop to EnginesTable
* Add empty prompt to Meta Engines table in EnginesOverview
* Apply suggestions from code review
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Better form functionality in MetaEngineCreation
* Fix errors from github
* More MetaEngineCreation coverage
* Meta MetaEngineCreationLogic coverage
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation_logic.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation_logic.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/constants.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* remove logic that disables SS action in cold if no rollover and always show replicas field
* update test coverage to be consistent with new form behaviour and expand hot phase without rollover test
* only licensing can disable searchable snapshot field
* clean up i18n
* remove ss field callout
* update error reporting logic to include causes chain, also update UI to show causes
* updated searchable snapshot field in hot phase callout
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* ui enhancement
* fix actions
* unit test
* update row actions
* add case status all
* update find status
* fix type
* remove all case count from dropdown
* fix type error
* fix unit test
* disable bulk actions on status all
* clean up
* fix types
* fix cypress tests
* review
* review
* update status is only available for individual cases
* update available actions on status all
* fix unit test
* remove lodash get
* rename status all
* omit status if it is set to all
* do not sent status if itis set to all
* Remove all status from the backend
* Hide actions on all status
* fix unit test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Fixes chart histograms for runtime fields. The runtime field configurations were not passed on to the endpoint to fetch the charts data, so charts ended up being empty with a 0 documents legend.
* bring back case connector to design
* disable connector sir in collection
* missing to only create collection type
* fix fields connector when you need to hide service-now sir
* [Alerting][Docs] Changed alerting documentation to poin to a single source of explaining the configurations.
* fixed due to comments
* fixed due to comments
* Apply suggestions from code review
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
* fixed due to comments
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
* Threshold cardinality validation
* Remove comments
* Fix legacy threshold signal dupe mitigation
* Add find_threshold_signals tests
* remove comment
* bug fixes
* Fix edit form value initialization for cardinality_value
* Fix test
* Type and test fixes
* Tests/types
* Reenable threshold cypress test
* Schema fixes
* Types and tests, normalize threshold field util
* Continue cleaning up types
* Some more pre-7.12 tests
* Limit cardinality_field to length 1 for now
* Cardinality to array
* Cardinality to array
* Tests/types
* cardinality can be null
* Handle empty threshold field in bulk_create_threshold_signals
* Remove cardinality_field, cardinality_value
resolves https://github.com/elastic/kibana/issues/91686
The poor email action has not had great success in setting TLS options
correctly. Prior to 7.11, it was basically always setting `rejectUnauthorized`
to false, so was never validating certificates. Starting in 7.11.0, it
started respecting TLS certificates, but there are some simple/test servers
in use that use self-signed certificates.
The real fix for this will be the resolution of issue
https://github.com/elastic/kibana/issues/80120 , but until then, this PR
does a special-case check if the `secure` option is off (so the email client
connects with a plain socket and then upgrades to TLS via STARTTLS) and both
the user and password for the server are not set, then it will use
`rejectUnauthorized: false`. Otherwise, it uses the global configured value
of this setting.
This also changes some other cases, where `secure: true` often did not
set any `rejectUnauthorized` property at all, and so did not get verified.
Now in all cases, `rejectUnauthorized` will be set, and the value will
correspond to the globally configured value, except for the special case
checked here, and when a proxy is in use (that logic did not change).
So it is possible this would break customers, who were using insecure servers
and email action worked, but with this fix the connections will be rejected.
They should have been rejected all this time though.
The work-around for this problem, if we don't implement a fix like this, is
that customers will need to set the global `rejectUnauthorized` to `false`,
which means NONE of their TLS connections for any actions will be verified.
Which seems extreme.
* Update copy of rule config
* Encode threat index as part of our named query
* Add index to named query, and enrich both id and index
We still need mappings and to fix integration tests, but this generates
the correct data.
* Update integration tests with new enrichment fields
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Removing empty collections when not filtering on status
* Fixing add comment response
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Reporting] Clean up logger instances and mocks
* revert logging changes, just keep test changes
* remove fluff
* clean up too much logger.clone
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* update mocked index
* update mocked index
* update mocked index
* remove unused mock data
* update mock data
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add field for providing format in percentage mode
* Fix CI
* Add tests
* Fix ci
* Fix some remarks
* Fix ci
* Fix some remarks
* Fix ci
* Fix width
* Fix some remarks
* Fix text
* Fix i18n
* Remove unneeded import
* Remove unneeded code
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This fixes the interpretation of the end timestamp in the log stream embeddable such that it rounds it up. Without this a date range of `now/d` to `now/d` would be resolved to a zero-duration time range even though the date picker semantics are "Today".
* First pass at bringing in more logging
* Adding more logging to routes
* Adding more logging fixing tests
* Removing duplicate case string in logs
* Removing unneeded export
* Fixing type error
* Adding line breaks to make the messages more readable
* Fixing type errors
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add server route and logic listener
* [Misc] Remove 'Set' from 'deleteCurationSet'
- to match createCuration
- IMO, this language isn't necessary if we're splitting up Curations and CurationLogic - the context is fairly evident within a smaller and more modular logic file
* Add CurationQueries component
+ accompanying CurationQueriesLogic & CurationQuery row
* Add CurationCreation view
* fix get_sharing_data to provide a list of fields if none are selected as columns in the saved search
* add logging for download CSV that fields must be selected as columns
* add more functional test coverage
* fix ts in test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Alerts][Docs] Extended README.md and the user docs with the licensing information.
* Apply suggestions from code review
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
* fixed due to comments
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
* remove logic that disables SS action in cold if no rollover and always show replicas field
* update test coverage to be consistent with new form behaviour and expand hot phase without rollover test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Event Log] Extended README.md with the documentation for a REST API and Start plugin contract.
* Apply suggestions from code review
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
* fixed due to comments
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Previously there were a large number of jest specs that utilized
the ThemeProvider (from styled-components package) to inject EUI
themes into the mounted components. The full EUI theme is almost
never necessary for unit tests as each tested component usually
consumes no more than a single field or two from the EUI theme.
In certain cases, the theme was not used at all. This change is
intended to remove all unnecessary ThemeProviders from the suites,
and replaces the imported EUI theme json files with mock themes
customized for each tested component. With this change, snapshots
are now significantly smaller, and tests are lighter.
Closes#64092.
* updated logic for hiding recommended allocation options on cloud and moved tests over from legacy test folder
* added version check and tests for version check to enable pre v8 behaviour
* implement feedback to make tests more legible, fix test names and minor refactors
* added additional callout for data tier state, also added some new copy specific to the migration of a deployment on cloud
* remove unused stackVersion context value
* address windows max path length constraint
* - Fix botched conflict resolution!
- Addressed PR feedback, updated data allocation field for readability; added comments and refactored default allocation notice and warning
- Added one more test case for on cloud; when to show the call to migrate to node roles
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
We were seeing flake tests with the error messages:
```ts
expected '<button.euiButton.euiButton--primary>' to have text 'Install 2 Elastic prebuilt rules ', but the text was 'Install 1 Elastic prebuilt rule '
```
Running this locally several times I was able to reproduce the flake. I was able to see that the click handler when clicked on the check boxes is not always taking effect for the first check box. A common issue with Cypress is that a lot of page loads and JS activities on pages can add/remove click handlers quickly such as when we are frosting and un-frosting a loading screen.
When we try and click on the click handlers for a test and the click handlers are not added yet, we miss one or more and end up with a flake test. Instead we can click as fast as possible using `pipe` and then checking that the check box is clicked before continuing using a `should`
Even though the loading screen is done frosting in these tests, the click handler can take one or two milliseconds before they end up being added to the checkboxes.
**Analysis**
When you have the flake and fail you can scroll in Cypress and pin a point in time and see that indeed we did not get the first checkbox checked even though we had a click. Which makes sense as within a few milliseconds the click handlers are added and we do check the second checkbox:
<img width="2083" alt="analysis" src="https://user-images.githubusercontent.com/1151048/109119992-a19d1b80-7702-11eb-882a-c035eba97455.png">
### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* Distinguish source and destination config for indicator matches
We were previously conflating the path to retrieve indicator fields with
the path to persist indicator fields, since they were the same value.
To reduce friction in use with the new filebeat modules, we've decided
to make the default source path threatintel.indicator. However, we still
want to persist to threat.indicator, so we add a new constant, here.
* Update our integration tests following change of default
These tests were assuming a default path of threat.indicator. Since that
is the ECS standard, we're not going to rewrite the tests but instead
just add this rule override. In the future if the default changes, this
parameter might be unnecessary.
* DRY up unit tests a bit
* Add a note for future devs
If/when that constant changes, I imagine this will be useful context.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
### Summary
This PR is a follow-up to #89066 - which fixed the same issue occurring with indicator match lists UI. The lack of stable ids for exception item entries resulted in some funky business by where invalid values could overwrite other values when deleting entries in the builder.
* Adds references from byValue panels when saving dashboard
* Remove extra spaces
* Rework a type check
* Fix type check
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Unskipping test
* Increasing runAt time
* Increasing runAt time
* Logging
* Increasing wait time even more
* Removing logs
* Resetting task status
* Re-enabling all tests
* Re-enabling all tests
* Adding comment
- Removed the icon from the "View correlations" button
- Moved the tabs to the FlyoutHeader
- Removed unneeded spacers in the content
- Reduced the filtering by callout and button
- Made the introduction text color `subdued` to make it less noisy
- Reduced ImpactBar size and extended width so the bar itself is `100`
- Changed the selected term visualization color to `euiColorVis2` because the `euiColorAccent` is not great for visualizations.
- Changed the latency distribution visualization color to `euiColorVis1` to make it consistent with the Transactions visualization colors in the other charts.
`environment` is still used in `uiFilters` in UX, but not anywhere else.
It was removed when removing environment from UI filters for the rest of APM and broke UX's environment switcher. Put it back.
* Removing REST API from README. Updating configuration docs
* Updating action config docs
* Cleaning up action type configs in README and user docs
* Cleaning up action type configs in README and user docs
* Fixing formatting
* Apply suggestions from code review
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
* PR fixes
* Update x-pack/plugins/actions/README.md
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Doing a quick refactor to help with #90634 . While working on #90634 found that I would introduce a circular dependency if I didn't refactor the hook used by the exception builder component to make use of the existing useApi hook in the lists plugin.
#90634 adds temporary ids to item entries to mitigate some React key requirements and the logic to remove/add these id's isn't at the boundary but in the hooks (so as not to pollute the data for everyone wanting to use the api.
An upside is that it removed some of the looping and seemed to speed things up a bit. I briefly considered adding the bulk SO endpoints for exception items, but they are still experimental.
* Make kuery a standalone query parameter instead of part of uiFilters
* Move getEsFilters helper to RUM
* Move query utils from "common" to "server" (it uses esKuery from the data plugin, which is exported from server, not common.)
* Move uiFiltersRt to RUM routes
References #84526.
* Create table pagination helpers
* Update Curations table to use new pagination helpers
* Update Credentials table to use new helpers
+ update to use DEFAULT_META and pass page[size] customization
+ update useEffect to manually call fetchCredentials on current page change
+ update table to pass empty prompt within table (rather than instead of), and add a loading indicator
- update deleteApiKey to re-fetch credentials from API rather than modify the in-memory array (which more correctly handles pagination)
* Update Engines table to use new helpers
Server:
+ update server route to take page[current] (consistent w/ other routes) and page[size]
- remove custom param translation (passing as-is)
- remove ENGINES_PAGE_SIZE constant, basically stored within DEFAULT_META now and page size is passed from client-side
- remove misc header cruft from engines table
EnginesLogic:
- Update http calls to send page[current] & page[size] (same as other files)
- Change individual *Total/*Page vars to store the meta obj coming back from the API (same as other logic files)
- Change on*Load actions to simply pass the API response (update typing to clarify)
- Add new individual enginesLoading/metaEnginesLoading vars so that tables can show individual loading indicators between pagination
- Change dataLoading to a selector (should only show on initial page load, and should use table loading indicators after)
EnginesTable:
- Update props to more closely match EuiBasicTable (items, onChange, add loading) so users can do a simple pass-through
- Reorganize tests so that language block doesn't need its own custom wrapper vars
- Remove empty data test (no longer really testing anything meaningful) and add loading test
EnginesOverview:
- Update to use new helpers, values, props, etc.
- Add new test for onPaginate handlers
* Add new reusable FormattedDateTime helper
* Update Analytics RecentQueriesTable to use helper
* Update CurationsTable to use new helper
- requires adding a utility fn to convert the server-sent string to a Date-parseable string
* Update EnginesTable to use FormattedDateTime
- mostly to standardize/DRY out the FormattedDate display style
- adds a new hasTime flag since the EnginesTable does not display time
* [PR feedback] hasTime -> hideTime
The `reloadAlerts` properties in `AlertAdd` and `AlertEdit` are confusing property names.
In this PR we deprecate those and replace them with `onSave`.