* [TSVB] Remove the input string mode
* Fix some tests
* Add some functional tests and fix failing CI
* Update telemetry mappings
* Rename useStringIndices to allowStringIndices, move it from TSVB to Data constants and refactor test
* Apply text suggestions from code review
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
* Apply formatting and remove unused translations
* Fix labels
* Remove unused import
* Move popover toggling to checkIndexPatternSelectionModeSwitchIsEnabled function to prevent flakiness
* Update some visual_builder_page functions
* Remove accidentally added newlines
* Move TSVB ui settings to constants, remove tooltip and update popover text
* Handle the case of editing advanced settings is restricted
* Add requiresPageReload to UI setting and condition for the case the setting is already enabled
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
* only use relative time filter when generating share data
* Added comment on absolute time filter.
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
* improve discover search session relative time range test
* update discover tests and types for passing in data plugin to getSharingData function
* updated reporting to pass in data plugin to getSharingData, also updates jest tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
* first pass at any cleanup
* fix types on TableListView
* change generic constraint
* fix lint
* fix TS in no data card
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fixed bug with treating null argument as the expression function.
* Added a test for checking if a null argument is processeded correctly.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix and re-enable Vega test to be consistent with development/CI
* Remove skip comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Pie] Loads the no results screen if all slices have zero value
* Add a functional test
* Apply PR changes
* Display no results component if the chart metric has negative values
* Nits
* Apply some of the PR comments
* Change the negative values text
* Update src/plugins/vis_types/pie/public/pie_component.test.tsx
Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
* Update src/plugins/vis_types/pie/public/pie_component.test.tsx
Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
* Add deprecation warning when unknown types are present
* fix and add service tests
* remove export
* plug deprecation route
* add integration test for new route
* add unit test for getIndexForType
* add unit tests
* improve deprecation messages
* add FTR test
* fix things due to merge
* change the name of the deprecation provider
* improve message
* improve message again
* version 1 of fix: we set the time range on the search source at CSV generation time
* updated jest tests and updated API for getSharingData
* make time range optional for getSharingData
* pivot to updating "getTime" functionality by introducing a new flag
* update jest snapshots
* update comment
* refactored coerceToAbsoluteTime -> coerceRelativeTimeToAbsoluteTime and updated behaviour to be more specific
* fix jest test
* do not change createFilter API, rather create new createRelativeFilter API, also only use this in one place in discover
* update jest tests
* update mock
* update jest test mock
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Use date_histogram instead of auto_date_histogram in pipeline aggregations
* Fix ci
* Fix eslint
* start disable parent pipeline aggs and show error
* Fix CI
* Fix eslint
* Fix CI
* Add functional tests
* Some fixes
* Fix lint
* Use agg_utils
* Fix lint
* Fix text
* Fix lint
* Fix tests
* Fixed condition
* Fix math aggregation
* math should pass panel type as prop
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Use resolve instead of get for saved query service
* Update tests
* Update src/plugins/data/public/query/saved_query/saved_query_service.ts
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Revert step 4
* Make saved queries share-capable
* Fix test
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Use resolve instead of get for saved query service
* Update tests
* Update src/plugins/data/public/query/saved_query/saved_query_service.ts
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Revert step 4
* Fix test
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* account for banners when data grid is full screen
* account for banner when canvas is full screen
* change height per feedback
* add withKibana
* rm withKibana; move vars out of Fullscreen
* Use hasHeaderBanner$
* add banner height var comments
* fix ts error
Co-authored-by: Catherine Liu <catherine.liu@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* use correct styles when after split we have only one series
* Fix lint
* Fix comments
* remove unused styles
* Update _vis_with_splits.scss
* Fix lint
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [TSVB] Support custom field format
Add format_label response processor for series vis data and bucket key formatting to process_bucket for table vis data
* Add ignore_field_formatting for series to support value formatting for all panel types except markdown
* Fix type issue for visData and rename getCustomFieldFormatter to createCustomFieldFormatter
* Update vis.test to cover custom field formats logic and add a migration script to set ignore_field_formatting to true for the series
* Move createCustomFieldFormatter to a separate file, make formatting respect only active metrics field name, refactor vis files and fix label formatting only for grouped by terms series
* Remove services, add getFieldFormatsService to use it in format_label and get_table_data, replace getCustomFieldFormatter with createCustomFieldFormatter
* Update plugin.ts
* Update start for plugin.ts
* Add formatting for annotations and markdown values
* Refactor some code
* Update some naming and conditions
* Fix formatting of data type labels
* In process_bucket fix case for no getFieldFormatByName
* Add field formatting functional tests for all panel types
* Update tests to make them run correctly for firefox
* Update _tsvb_markdown test setup
* Move series ignoreFieldFormatting check to a separate file, change convertSeriesToVars signature, update migration script and refactor a bit functional tests
* Fix type check for timeseries_visualization.tsx
* Update migrations.js test expected version to 7.15
* Fix tests in _tsvb_chart.ts
* Fix merge conflict remove process_bucket.js
* Update process_bucket.test.ts
* Fix markdown labels formatting
* Add ignore_field_formatting for annotations, enhanced migration script to set that flag to true, refactor data_format_picker
* Fix migration script and add disabling for ignore component when string index pattern is used
* Add supporting URL and color formatters in tsvb table
* Fix eslint
* Remove ignore formatting component, add field formatting option to TSVB data format picker and make it default, remove migration script, update tests and refactor some files
* Fix failing tests, refactor create_field_formatter and add test to it, update some other files
* Fix series formatting for top hit when it has not numeric result
* Handle no fieldFormatMap case for table/vis.js
* Remove "Default" option form DataFormatPicker when index pattern is string, fix markdown variables issue and refactor some code
* Chore(TSVB): Replace aggregations lookup with map
* Fix types, update test expected data and remove unused translations
* Fix i18 check and useEffect in agg.tsx
* Handle aggregations field formatting case
* Fix agg_utils, vis and check_if_numeric_metric tests
* Correct typo and refactor condition in std_metric
* Fix type check
* Get rid of IFieldType
* Add URL and color formatting for topN and metric tabs, fix setting initial custom formatter and switching formatter in agg.tsx
* Update tsvb.asciidoc
* Remove link icon from Date format field help text, update click logic for top N in case of custom field format and fix CI
* Remove unused import
* Revert top N bar extra logic for click
* Refactor some code in agg.tsx
* Add URL and color formatting to Gauge
* Fix bug with terms formatting, refactor some code, update create_field_formatter
* Add comments to _gauge.scss
* Remove unnecessary await
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
* [graph] Make Graph saved object share-capable
Step 4 of https://www.elastic.co/guide/en/kibana/master/sharing-saved-objects.html#sharing-saved-objects-faq-changing-object-ids
* bump migration version to fix the test
* test
* Revert "bump migration version to fix the test"
This reverts commit 04d2f49386.
* Revert "test"
This reverts commit 7b0a74d431.
* Fix Core migration integration tests
The existing tests incorrectly asserted an object's `migrationVersion`
solely based on the registered type's `migration` field; in reality, the
`convertToMultiNamespaceTypeVersion` field is also used when determining
an object's `migrationVersion`. This commit simply updates the test to
reflect that.
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Remove timelion app and stuff which related to it
* Fix CI
* Fix lint
* Fix tests
* Fix tests
* Fis tests
* Fix some comments
* Clean up
* fix CI
* fix some comments
* Fix deprecation examples
* Return `enabled` property in config for timelion vis
* Remove unused angular lib
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
* Move legacy dashboards API to core and adds usage data
* More legacy_export plugin removal
* Log a warning for deprecated dashboard import/export API
* Review comments
## Summary
This PR resolves issue <https://github.com/elastic/kibana/issues/110041> reported by @snide to enable schema-driven sorting descriptions in column headers.
@chandlerprall recommends obtaining a **+1** from the Machine Learning and Observability solutions, because the fix updates an `i18n` constant in Kibana common to all consumers of `EuiDataGrid`.
## Details
Thanks @chandlerprall for paring on this!
The Alerts table, `Host > Events`, and other `EuiDataGrid`-based views in the Security Solution make use of the default [`EuiDataGrid` schemas](https://elastic.github.io/eui/#/tabular-content/data-grid-schemas-and-popovers).
The default schemas enable `EuiDataGrid` to automatically display, for example, `Old-New` and `New-Old` sorting descriptions for datetime fields, as opposed to generic `A-Z` and `Z-A` descriptions.
The following (shared) Kibana `i18n` constant in `src/core/public/i18n/i18n_eui_mapping.tsx` is expected to be rendered a `string` at runtime:
```ts
'euiColumnActions.sort': ({ schemaLabel }: EuiValues) =>
i18n.translate('core.euiColumnActions.sort', {
defaultMessage: 'Sort {schemaLabel}',
values: { schemaLabel },
}),
```
But the constant was rendered in `EuiDataGrid` column headers as `[object Object]` when schemas were enabled, as shown in the screenshot below:
![column-header-object-object](https://user-images.githubusercontent.com/4459398/132079843-a8b0f5e5-9d47-4816-8baa-e29577511bf1.png)
_Above: The `sortTextAsc/Desc` text was rendered as `[object Object]`_
The temporary workaround described by [#110041](https://github.com/elastic/kibana/issues/110041) ensured that `Sort A-Z` and `Sort Z-A` labels were always displayed (in lieu of `[object Object]`), as shown in the screenshot below:
![image](https://user-images.githubusercontent.com/324519/130789326-bfe67cae-e4f7-469a-9b57-320cbf733cc8.png)
_Above: `Sort A-Z` and `Sort Z-A` labels were always displayed as a workaround_
The fix in this PR updates the following (shared) Kibana `i18n` constant in `src/core/public/i18n/i18n_eui_mapping.tsx` to use a `FormattedMessage`:
```ts
'euiColumnActions.sort': ({ schemaLabel }: EuiValues) => (
<FormattedMessage
id="core.euiColumnActions.sort"
defaultMessage="Sort {schemaLabel}"
values={{ schemaLabel }}
/>
),
```
, which ensures a schema-specific sorting label is displayed as-expected.
It also removes the workaround, as shown in the animated gif below:
![after](https://user-images.githubusercontent.com/4459398/132080352-1ee41a7e-8884-45ad-ae3c-daa9a0127aac.gif)
_Above: Schema-specific sorting descriptions are displayed for `datetime`, `text`, and `numeric` column headers_
* [sample data] update web log geo.src field to match country code of geo.coordinates
* fix functional tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add verification code protection
* Fix bug where verification code could be less than 6 digits
* Added suggestions from code review
* fix type errors
* Added suggestions from code review
* first iteration of canvas reporting using v2 PDF generator
* updated jest test
* made v2 report URLs compatible with spaces and simplified some code
* remove non-existent import
* updated import of lib
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Added `tagCloud` to canvas.
* Added `icon` to the `tagCloud` element.
* Added column name support at `tag_cloud`.
* Added condition to `vis_dimension` not to pass invalid index.
Added check of accessor index, if such column exists at vis_dimension.
Removed checks of column existance from TagCloudChart.
Added test for accessing data by column name in addition to a column number.
Updated tag_cloud element in Canvas.
Fixed types. Removed almost all `any` and `as` types.
* Added test suites for `vis_dimension` function.
* Added tests for DatatableColumn accessors at tag_cloud_fn and to_ast.
* Refactored metrics, tagcloud and tests.
Added valid functional tests to metrics and tag_cloud.
Fixed types of metrics_vis.
Added handling of empty data at tag_cloud renderer.
* Added storybook ( still doesn't work ).
* Fixed some mistakes.
* Added working storybook with mocks.
* Added clear storybook for tag_cloud_vis_renderer.
* Updated the location of vis_dimension test after movement of the function.
* Fixed unused type.
* Fixed tests and added handling of the column name at `visualizations/**/*/prepare_log_table.ts`
* Reduced the complexity of checking the accessor at `tag_cloud_chart.tsx`
* Added comments at unclear places of code.
* Added the logic for disabling elements for renderers from disabled plugins.
* removed garbage from `kibana.yml`.
* Fixed element_strings.test error.
* Made changes, based on nits.
* Fixed mistake.
* Removed `disabled` flag for `expression_*` plugins.
* recovered lost comments at the unclear places.
* removed dead code.
* fixed test errors.
* Fixed test error, I hope.
* fixed more tests.
* fixed code, based on nits.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Remove kibana.defaultAppId setting
* Fix typings
* Remove plugin dependency
* Use proper navigation method to get to home
* Default route for home
* Address discover new routing code
* Make non existing /kibana URLs working
* Fix space awareness
* Remove documentation
* Remove the setting from docker file
* Make defaultRoute forward work properly
* Add forward_url tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* added initial version of locator
* removed unused params and added jest test
* updated functional test to expect PDF reports to be available when vis is new
* fix TS: remove unkown field
* added some docs and removed unused code
* AggsConfigOption -> AggsConfigSerialized
* moved locator to common
* fixed building of "create" path and updated test snapshots
* updated import
* update encoding behaviour
* added time range from timefilter to locator params request
* add index pattern and search id to URL params
* reading index pattern from search source if it is there for the locator
* remove "type" from locator params, update comments and test
* removed duplicate identifier
* remove unused type
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Adds a workaround for EQL bug: https://github.com/elastic/elasticsearch/issues/77152
Adds the safety feature mentioned here: https://github.com/elastic/kibana/issues/110802
Adds the ability to ignore particular [fields](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#search-fields-param) when the field is merged with [_source](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering). Also fixes an EQL bug where EQL is introducing the meta field of `_ignored` within the fields and causing documents to not be indexable when we merge with the fields from EQL.
Alerting document creation uses the fields API to get [runtime field](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html), [constant keyword](https://www.elastic.co/guide/en/elasticsearch/reference/master/keyword.html#constant-keyword-field-type), etc... that are only available within the [fields API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#search-fields-param) and then merges the field values not found within the `_source` document with the `_source` document and then finally indexes this merged document as an alert document.
This fix/ability is a "safety feature" in that if a problematic [runtime field](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html), [constant keyword](https://www.elastic.co/guide/en/elasticsearch/reference/master/keyword.html#constant-keyword-field-type) is discovered or another bug along the stack we can set a `kibana.yml` key/value pair to ignore the problematic field.
This _WILL NOT_ remove problematic fields from the `_source` document. This will only ignore problematic constant keyword, runtime fields, aliases, or anything else found in the fields API that is causing merge issues.
This PR:
* Adds a `alertIgnoreFields` `kibana.yml` array key with a default of an empty array if not specified.
* Plumbs the `alertIgnoreFields` through the stack and into the fields/_source merge strategies of `missingFields` and `allFields`
* Adds a temporary `isEqlBug77152` where it hard codes an ignore of `_ignored` until the EQL problem is fixed and then we will remove the workaround
* Adds unit tests
* Adds e2e tests which covers the described use cases above.
The `alertIgnoreFields` key/value within `kibana.yml` if set should be an array of strings of each field you want to ignore. This can also contain regular expressions as long as they are of the form, `"/regex/"` in the array.
Example if you want to ignore fields that are problematic called "host.name" and then one in which you want to ignore all fields that start with "user." using a regular expression:
```yml
xpack.securitySolution.alertIgnoreFields: ['host.name', '/user\..*/']
```
Although there are e2e tests which exercise the use cases...
If you want to manual test the EQL bug fix you would add these documents in dev tools:
```json
# Delete and add a mapping with a small ignore_above.
DELETE eql-issue-ignore-fields-delme
PUT eql-issue-ignore-fields-delme
{
"mappings" : {
"dynamic": "strict",
"properties" : {
"@timestamp": {
"type": "date"
},
"some_keyword" : {
"ignore_above": 5,
"type" : "keyword"
},
"other_keyword" : {
"ignore_above": 10,
"type" : "keyword"
}
}
}
}
# Add a single document with one field that will be truncated and a second that will not.
PUT eql-issue-ignore-fields-delme/_doc/1
{
"@timestamp": "2021-09-02T04:13:05.626Z",
"some_keyword": "longer than normal",
"other_keyword": "normal"
}
```
Then create an alert which queries everything from it:
<img width="1155" alt="Screen Shot 2021-09-01 at 10 15 06 PM" src="https://user-images.githubusercontent.com/1151048/131781042-faa424cf-65a5-4ebb-b801-3f188940c81d.png">
and ensure signals are created:
<img width="2214" alt="Screen Shot 2021-09-01 at 10 30 18 PM" src="https://user-images.githubusercontent.com/1151048/131782069-b9ab959c-f22d-44d5-baf0-561fe349c037.png">
To test the manual exclusions of any other problematic fields, create any index which has runtime fields or `constant keywords` but does not have anything within the `_source` document using dev tools. For example you can use `constant keyword` like so
```json
PUT constant-keywords-deleme
{
"mappings": {
"dynamic": "strict",
"properties": {
"@timestamp": {
"type": "date"
},
"testing_ignored": {
"properties": {
"constant": {
"type": "constant_keyword",
"value": "constant_value"
}
}
},
"testing_regex": {
"type": "constant_keyword",
"value": "constant_value"
},
"normal_constant": {
"type": "constant_keyword",
"value": "constant_value"
},
"small_field": {
"type": "keyword",
"ignore_above": 10
}
}
}
}
PUT constant-keywords-deleme/_doc/1
{
"@timestamp": "2021-09-02T04:20:01.760Z"
}
```
Set in your `kibana.yml` the key/value of:
```yml
xpack.securitySolution.alertIgnoreFields: ['testing_ignored.constant', '/.*_regex/']
```
Setup a rule to run:
<img width="1083" alt="Screen Shot 2021-09-01 at 10 23 23 PM" src="https://user-images.githubusercontent.com/1151048/131781696-fea0d421-836f-465c-9be6-5289fbb622a4.png">
Once it runs you should notice that the constant values for testing are not on the signals table since it only typically exists in the fields API:
<img width="1166" alt="Screen Shot 2021-09-01 at 10 26 16 PM" src="https://user-images.githubusercontent.com/1151048/131781782-1684fb1d-bed9-4cf0-be9a-0abe1f0f34d1.png">
But the normal one still exists:
<img width="1136" alt="Screen Shot 2021-09-01 at 10 26 31 PM" src="https://user-images.githubusercontent.com/1151048/131781827-5450c693-de9e-4285-b082-9f7a2cbd5d07.png">
If you change the `xpack.securitySolution.alertIgnoreFields` by removing it and re-generate the signals you will see these values added back.
### Checklist
Delete any items that are not applicable to this PR.
- [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
- [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/master/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
* remove unnecessary ts-ignore
* add context propagation to x-opaque-id header tests
* run tests on CI
* simplify logging. the action purpose follows from the context name
* extend tests with the assertion against execution_context from the Kibana logs
* split JSON log records only
* apply suggestions proposed by Spencer
* Move to vis_types folder part 2
* fix jest tests
* do some tests
* revert
* Test Tiago's fix
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* We should use 'sort' from terms for 'GroupBy'
* Fix conflicts
* Fix import
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
In #110116 I added the `RedirectAppLinks` component, which makes it so links outside the app automatically do not cause a page reload.
This component inserts a div into the DOM. Apparently this also caused the text areas in the request and response tabs of the request inspector to be collapsed to zero height.
Remove `RedirectAppLinks` and handle the navigation with an `onClick` callback instead.
* [eslint] add rule to prevent export* in plugin index files
* deduplicate export names for types/instances with the same name
* attempt to auto-fix duplicate exports too
* capture exported enums too
* enforce no_export_all for core too
* disable rule by default, allow opting-in for help fixing
* update tests
* reduce yarn.lock duplication
* add rule but no fixes
* disable all existing violations
* update api docs with new line numbers
* revert unnecessary changes to yarn.lock which only had drawbacks
* remove unnecessary eslint-disable
* rework codegen to split type exports and use babel to generate valid code
* check for "export types" deeply
* improve test by using fixtures
* add comments to some helper functions
* disable fix for namespace exports including types
* label all eslint-disable comments with related team-specific issue
* ensure that child exports of `export type` are always tracked as types
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Upgrade EUI to v37.3.1
* Update i18n token mappings
* Skip i18n_eui_mapping defString checks for functions
* Update snapshots
* Update failing Security tests with extra nodes
* Remove hook cleanup now that elastic/eui#5068 is merged
* [i18n PR feedback] Prefer specific token skipping over all functions skipping
* Revert "Remove hook cleanup now that elastic/eui#5068 is merged"
This reverts commit e40ebfa929.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix logging for existing integration test
* First stab at limiting batches to batchSizeBytes
* Fix tests
* Fix batch size calculation, NDJSON needs to be terminated by an empty line
* Integration tests
* Fix type failures
* rename migration integration tests and log files to be consistent & more descriptive
* Review feedback
* Remove duplication of fatal error reasons
* migrations.maxBatchSizeBytes to docker environment vars
* docs for migrations.maxBatchSizeBytes
* wip to remove rbac
* Revert "[Cases] Include rule registry client for updating alert statuses (#108588)"
This reverts commit 1fd7038b34.
This leaves the rule registry mock changes
* remove rbac on Trend/Count alert
* update detection api for status
* remove @kbn-alerts packages
* fix leftover
* Switching cases to leverage update by query for alert status
* Adding missed files
* fix bad logic
* updating tests for use_alerts_privileges
* remove index alias/fields
* fix types
* fix plugin to get the right index names
* left over of alis on template
* forget to use current user for create/read route index
* updated alerts page to not show table when no privileges and updates to tests
* fix bug when switching between o11y and security solution
* updates tests and move to use privileges page when user tries to access alerts without proper access
* updating jest tests
* pairing with yara
* bring back kbn-alerts after discussion with the team
* fix types
* fix index field for o11y
* fix bug with updating index priv state
* fix i18n issue and update api docs
* fix refresh on alerts
* fix render view on alerts
* updating tests and checking for null in alerts page to not show no privileges page before load
* fix details rules
Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
Co-authored-by: Yara Tercero <yara.tercero@elastic.co>
When the observability:enableInspectEsQueries advanced setting is enabled, show an inspector that includes all queries through useFetcher.
Remove the callout.
* first pass at renaming exports
* type fixes
* fix jest test
* look for correct error type
* remove transitional error
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Add a locator for the console and use it in home and overview.
Fix a bug where the dev tools and management links were not showing on the analytics overview page:
Since the locator's getUrl method is async, pass in the URLs as props into the right side items instead of passing in basePath and hard-coding them.
Add RedirectAppLinks to inspector plugin so we don't have to have an onClick handler for the console link.
Fixes#110076.
* Add field type restriction for terms agg
* Fix test
* Add restriction for 'group by' in table
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Lens] Inspect flyout should be available in editor mode.
* fix typo
* add test
* add functional tests for inspector
* toMatchInlineSnapshot -> toMatchSnapshot
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* very wip, updating dashboard integration to use v2 reports. at the moment time filters are not working correctly
* added missing dependency to hook
* added tests and refined ForwadedAppState interface
* remove unused import
* updated test because generating a report from an unsaved report is possible
* migrated locator to forward state on history only, reordered methods on react component
* remove unused import
* update locator test and use panel index number if panelIndex does not exist
* ensure locator params are serializable
* - moved getSerializableRecord to locator.ts to ensure that the
values we get from it will never contain something that cannot
be passed to history.push
- updated types to remove some `& SerializableRecord` instances
- fixed embeddable drilldown Jest tests given that we no longer
expect state to be in the URL
* update generated api docs
* remove unused variable
* - removed SerializedRecord extension from dashboard locator params
interface
- factored out state conversion logic from the locator getLocation
* updated locator jest tests and SerializableRecord types
* explicitly map values to dashboardlocatorparams and export serializable params type
* use serializable params type in embeddable
* factored out logic for converting panels to dashboard panels map
* use "type =" instead of "interface"
* big update to locator params: type fixes and added options key
* added comment about why we are using "type" alias instead of "interface" declaration
* simplify is v2 job param check
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Add a "Open in Dev Tools" link to the request inspector.
Allow the dev tools to open data uris that are lz-string encoded (the same method used by TypeScript Playground, which are a lot shorter than a base64 encoded string.)
* Chore(TSVB): Replace aggregations lookup with map
* Fix types, update test expected data and remove unused translations
* Correct typo and refactor condition in std_metric
* Fix metric type
* Fix CI and label for Bucket Script
* Update agg_utils.test expected data
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* make owner attribute required
* Add owner properties in more places
* add test for owner attribute
* add error check too in the test
* Fix tests
* fix tests and update docs
* wip
* More test fixes
* Fix All The Errorz
* Adding more owner attributes
* Update x-pack/test/saved_object_api_integration/common/fixtures/saved_object_test_plugin/kibana.json
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
* Update x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/kibana.json
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
* commeeeooonnnn
* Update docs
* soooo many kibanajsons
* adjust plugin generator to add an owner
* Add owner to the plugin generator scripts
* update snapshot
* Fix snapshot
* review updates
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Saved Search Embeddable] Do not set source if reading fields from source enabled
* Extract functionality to a helper function and added unit tests
* Fix unit test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Moved data fetching from react component into embeddable class. This cleans up the component, and allows for more accurate comparison before firing async requests
* Migrate Index Management to use internal EuiCodeEditor.
* Migrate Rollup to use internal EuiCodeEditor.
* Migrate Snapshot and Restore to use internal EuiCodeEditor.
* Migrate Watcher to use internal EuiCodeEditor.
* Add default setOptions values to EuiCodeEditor.
* [XY, Pie] Long legend values support
* Update vislib snapshots
* Fix truncate labels to work only for slice labels positioned outside the chart
* Address PR comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [TSVB] Supports legends with long values
* Add a unit test
* Design optimization
* Revert changes
* Add the missing prop type
* Ensure that the limits are respected
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Maps] reverse geocoding tutorial
* reverse geocoding step
* add final step
* use dash delemiter instead of underscore in file name
* add float to step 3 so its on the same page
* add into to step 3
* Abort full screen in dashboard and maps when user clicks back button
* remove doc changes from another PR
* remove change in file heading
* tslint and fix unit test
* eslint
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [TSVB] Markdown variables are not available on the first rendering
Closes: #108721
* Update editor_controller.tsx
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* balance solutions
* clean up solution changes
* change footer button size
* update management section
* apply max-width to management items
* remove right side items from page header
* add data content update
* illustration poc
* add data content updates per feedback
* img size and alignment
* moved shared images to shared assets folder
* more solutions clean up
* rm unneeded import
* remove references to subtitle and appDescriptions
* update tests and snapshots
* more test and snapshot updates
* restore solution sort order
* ts and jest fixes; thx catherine!
* i18n fixes
* use new `KibanaPageTemplateSolutionNavAvatar` comp
* change solution imgs from png to svg
* update tests and snapshots
* rm spacer and update snapshots
* account for flex margin changes in img offset
* Change "Kibana" overview page text to "Analytics"
* update overview icon to match hp changes
* update snapshots
* center justify solutions and update snapshots
* update snapshots
* title case dev tools and stack management
* update text and snapshots
* fix merge error
* apply caroline's suggested style tweaks
* clean up css and update snapshots
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* share between aggs only field and base params: json, label, time shift.
* Fix some remarks
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [NoDataPage] Updating the default messages and reusing `title` as default `button` label
* Update default description for agent
* Overview page i18n and snaps
* Make indexPattern only read only in Discover permission
* Fix test failures
* Address review comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Update dependency @elastic/elasticsearch to ^8.0.0-canary.15
* update tests for new error message building mechanism
* fix integration tests
* fix functional test
* mute new type errors
* fix new type errors
* bump es client to canaary.16
* fix integration test
* fix type errors in infra plugin
* mute type error in ml plugin
* fix type errors in monitoring plugin
* fix and mute errors in security solution plugin
* bump version to canary.18
* remove an unnecessary change
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: restrry <restrry@gmail.com>
* es-query types
* jest and lint
* cc
* options
* type
* types for kuery FUNCTIONS
* doc
* sec fixes
* typey type
* test typescript
* test
* fixes
* test
* cr
* cleanup a bit more
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* searchsource should send all index patterns defined on the runtime field
* fix jest test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* balance solutions
* clean up solution changes
* change footer button size
* update management section
* apply max-width to management items
* remove right side items from page header
* add data content update
* illustration poc
* add data content updates per feedback
* img size and alignment
* moved shared images to shared assets folder
* more solutions clean up
* rm unneeded import
* remove references to subtitle and appDescriptions
* update tests and snapshots
* more test and snapshot updates
* restore solution sort order
* ts and jest fixes; thx catherine!
* i18n fixes
* use new `KibanaPageTemplateSolutionNavAvatar` comp
* change solution imgs from png to svg
* update tests and snapshots
* rm spacer and update snapshots
* account for flex margin changes in img offset
* Change "Kibana" overview page text to "Analytics"
* update overview icon to match hp changes
* update snapshots
* center justify solutions and update snapshots
* update snapshots
* title case dev tools and stack management
* update text and snapshots
* fix merge error
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Set up tsconfigs
- Required if we're going to have several different Cypress suites (one for each plugin/product essentially) in order for global cy.() commands and it()/describe() to register as expected
@see https://docs.cypress.io/guides/tooling/typescript-support#Clashing-types-with-Jest
* Set up shared commands and routes
NOTE: Unlike ent-search, shared/ will *not* have its own set of tests - rather, shared/cypress is a resource/set of helpers for other test suites to extend/import/etc.
* Create basic Enterprise Search Overview E2E tests
- For happy path testing, we _likely_ shouldn't need more than these tests going forward
- If we ever want to add an error connecting test however, this is likely where it should go (or alternatively, use Kibana's FTR with Enterprise Search host set but not spun up)
* Set up App Search Cypress test scaffolding
- placeholder/hello world test only
* Set up Workplace Search Cypress test scaffolding
- placeholder/hello world test only
* Add helper script and update README
* Add config setup & documentation for potentially running Cypress against Kibana functional server
* PR feedback: Fix typescript project names
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Use empty state page template
* Remove unused translations
* Fixed snaps
* Use docLinks service
* Fix test
* Revert "Use docLinks service"
Use exisiting docLinks.ELASTIC_WEBSITE_URL instead
* Update learn more link and test
* fix test
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* provide execution context information for task.run and alert.execute
* log default space
* expose setRequestId to plugins for cases when a runtime scope exists outside of requestHandler
* fix typescript errors in jest test files
Unfortunately, some of the tests are still failing. Not quite sure what's
going on, but it looks like the calls to `withContext()` are not returning
the result of the function passed in, but only in the tests. Because the
code seems to run fine when I run Kibana - but perhaps we're just lucky
and don't need the results the tests are looking for, for my simple
smoke tests. But seems unlikely to me - guessing the mock is not being
set up correctly, or there's some weird interaction with jest mocks
and async hooks.
* fix alerting unit tests
* add tests that withContext is called even when exection_context service is disabled
* update docs
* add fakerequestid registration
* do not attach request id when undefined (FakeRequest, for example)
* Revert "add fakerequestid registration"
This reverts commit ca5a396dcc.
* not to expose setRequestId for time being
* cleanup alerting code
* update docs
* add a unit test for alerting execution context
* add a test for execution context of task runner
* improve description readability
* update type definitons
* fall back to unknownId if no requestId is provided
Co-authored-by: Patrick Mueller <pmuellr@gmail.com>
* eui to 37.1.0
* i18n tokens
* license checker
* disabled prop
* i18n shapshot
* date title snapshots
* date title formatting
* date title formatting
* Revert "disabled prop"
This reverts commit 68a48c4352.
* date title formatting
* eui to 37.2.0
* trial: outsideClickCloses
* Revert "trial: outsideClickCloses"
This reverts commit 4da2299e4f.
* eui to 37.1.1
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [TSVB] Fix UI issue with padding on showing annotations
* try to fix CI
* move 19 to constant
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Export EuiCodeEditor from es_ui_shared and consume it in Grok Debugger. Remove warning from EuiCodeEditor.
* Lazy-load code editor so it doesn't bloat the EsUiShared plugin bundle.
* Refactor mocks into a shared jest_mock.tsx file.
* Adding host_risk_score_latest to the list of patterns to track for telemetry
* Adding a test
* Removing extra spaces at end of line- should make the linter happy
* Log the failing request and response code when an action throws a response error
* Provide useful log message when migrations fail due to ES 413 Request Entity Too Large
* Don't log request body for unexpected ES request failures
* Fix types
* CR feedback: fix order of ES request debug log
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Set up tsconfigs
- Required if we're going to have several different Cypress suites (one for each plugin/product essentially) in order for global cy.() commands and it()/describe() to register as expected
@see https://docs.cypress.io/guides/tooling/typescript-support#Clashing-types-with-Jest
* Set up shared commands and routes
NOTE: Unlike ent-search, shared/ will *not* have its own set of tests - rather, shared/cypress is a resource/set of helpers for other test suites to extend/import/etc.
* Create basic Enterprise Search Overview E2E tests
- For happy path testing, we _likely_ shouldn't need more than these tests going forward
- If we ever want to add an error connecting test however, this is likely where it should go (or alternatively, use Kibana's FTR with Enterprise Search host set but not spun up)
* Set up App Search Cypress test scaffolding
- placeholder/hello world test only
* Set up Workplace Search Cypress test scaffolding
- placeholder/hello world test only
* Add helper script and update README
* Add config setup & documentation for potentially running Cypress against Kibana functional server
* PR feedback: Remove unnecessary return true
* very wip
* - Reached first iteration of reporting body value being saved with
the report for **PDF**
- Removed v2 of the reporting since it looks like we may be able
to make a backwards compatible change on existing PDF/PNG
exports
* reintroduced pdfv2 export type, see https://github.com/elastic/kibana/issues/99890\#issuecomment-851527878
* fix a whol bunch of imports
* mapped out a working version for pdf
* refactor to tuples
* added v2 pdf to export type registry
* a lot of hackery to get reports generated in v2
* added png v2, png reports with locator state
* wip: refactored for loading the saved object on the redirect app URL
* major wip: initial stages of reporting redirect app, need to add a way to generate v2 reports!
* added a way to generate a v2 pdf from the example reporting plugin
* updated reporting example app to read and accept forwarded app state
* added reporting locator and updated server-side route to not use Boom
* removed reporting locator for now, first iteration of reports being generated using the reporting redirect app
* version with PNG working
* moved png/v2 -> png_v2
* moved printable_pdf/v2 -> printable_pdf_v2
* updated share public setup and start mocks
* fix types after merging master
* locator -> locatorParams AND added a new endpoint for getting locator params to client
* fix type import
* fix types
* clean up bad imports
* forceNow required on v2 payloads
* reworked create job interface for PNG task payload and updated consumer code report example for forcenow
* put locatorparams[] back onto the reportsource interface because on baseparams it conflicts with the different export type params
* move getCustomLogo and generatePng to common for export types
* additional import fixes
* urls -> url
* chore: fix and update types and fix jest import mocks
* - refactored v2 behaviour to avoid client-side request for locator
instead this value is injected pre-page-load so that the
redirect app can use it
- refactored the interface for the getScreenshot observable
factory. specifically we now expect 'urlsOrUrlTuples' to be
passed in. tested with new and old report types.
* updated the reporting example app to use locator migration for v2 report types
* added functionality for setting forceNow
* added forceNow to job payload for v2 report types and fixed shared components for v2
* write the output of v2 reports to stream
* fix types for forceNow
* added tests for execute job
* added comments, organized imports, removed selectors from report params
* fix some type issues
* feedback: removed duplicated PDF code, cleaned screenshot observable function and other minor tweaks
* use variable (not destructured values) and remove unused import
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* WIP - Improve the way that percentiles are rendered in TSVB
* Adds color picker to percentile and percentile ranks
* initialize color
* Be backwards compatible
* Fixes unit tests
* Add a unit test for percentile rank
* Fix unit tests
* Address PR comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add ability to generate KQL filters in the "must" clause
Also defaults search source to generate filters in the must clause if _score is one of the sort fields
* Update docs
* Review feedback
* Fix tests
* update tests
* Fix merge error
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [build_ts_refs] improve caches, allow building a subset of projects
* cleanup project def script and update refs in type check script
* rename browser_bazel config to avoid kebab-case
* remove execInProjects() helper
* list references for tsconfig.types.json for api-extractor workload
* disable composite features of tsconfig.types.json for api-extractor
* set declaration: true to avoid weird debug error
* fix jest tests
Co-authored-by: spalger <spalger@users.noreply.github.com>
* Use Serializable from package
* Rename to align with core
* fix
* more replacements
* docssss
* fix
* Move it to @kbn/utility-types and remove core export
* buildy build
* tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix behavior for points and bars
* Fix lint
* Fix color for points
* Some fixes
* Fix lint
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add nested context support
* remove execution context service on the client side
ExecutionContextContaier is not compatible with SerializableState, so I had to fall back to passing context as POJO. With this change, using a service looks like overhead.
* update docs
* fix test
* address comments from Josh
* put export back
* update docs
* remove outdated export
* use input.title for unsaved vis
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* filter filter bar suggestions by time (according to flag)
add api integration tests for autocomplete apis
* test fix: setDefaultAbsoluteRange
* timeRangeForSuggestionsOverride
* revert
* tests
* doc
* set time range
* Added tests following code review
* eslint
* fun-ctional tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Upgrade eui to v36.1.0
* Jest snapshots
* More jest snapshots; one test assertion update
* Bump core page load limit
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Lens] Synchronize cursor position for X-axis across all Lens visualizations in a dashboard
Closes: #77530
* add mocks for active_cursor service
* fix jest tests
* fix jest tests
* apply PR comments
* fix cursor style
* update heatmap, jest
* add tests
* fix wrong import
* replace cursor for timelion
* update tsvb_dashboard baseline
* fix CI
* update baseline
* Update active_cursor_utils.ts
* add debounce
* remove cursor from heatmap and pie
* add tests for debounce
* return theme order back
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* First draft migrate timelion to elastic-charts
* Some refactoring. Added brush event.
* Added title. Some refactoring
* Fixed some type problems. Added logic for yaxes function
* Fixed some types, added missing functionality for yaxes
* Fixed some types, added missing functionality for stack property
* Fixed unit test
* Removed unneeded code
* Some refactoring
* Some refactoring
* Fixed some remarks.
* Fixed some styles
* Added themes. Removed unneeded styles in BarSeries
* removed unneeded code.
* Fixed some comments
* Fixed vertical cursor across Timelion visualizations of a dashboad
* Fix some problems with styles
* Use RxJS instead of jQuery
* Remove unneeded code
* Fixed some problems
* Fixed unit test
* Fix CI
* Fix eslint
* Fix some gaps
* Fix legend columns
* Some fixes
* add 2 versions of Timeline app
* fix CI
* cleanup code
* fix CI
* fix legend position
* fix some cases
* fix some cases
* remove extra casting
* cleanup code
* fix issue with static
* fix header formatter
* fix points
* fix ts error
* Fix yaxis behavior
* Fix some case with yaxis
* Add deprecation message and update asciidoc
* Fix title
* some text improvements
* [Timelion Viz] Add functional tests
* Add more complex cases for _timelion
* Update test expected data
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>