* 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>
* adding new no data screen
* adding no data screen on observability page
* fixing i18n
* i18n
* fixing test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* use existing filterManager
* remove unused default value
* unit test
* fix type
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Recover from artifact not found errors in `getLastComputedManifest()` + some changes to logger calls
* Recover from errors while retrieving the internal artifact map
* Use `EndpointError` in ManifestManager and capture more metadata around error
* Convert some logger.debug calls to logger.error + use EndpointError
* fix: consolidate hasUpgrade logic
* tidy: move type defs to top of file
* test: add unit tests for actions menu
* tidy: PR feedback
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>
Creating new rules in Stack Management does not work. Editing existing rules should work. If you enable editing rules, you also have to enable creating rules. Make it so when you attempt to create a rule in stack management it shows a warning telling you to go create the rule in APM.
* Add host.os.name.caseless field and runtime field
* Tests
* Only add backwards compatibility mappings to old indices by version
* Always update aliases_version field even if there are no compat mappings
* Add test for newest index version
* More comments
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>
* remove custom kibana server settings for reporting in default x-pack test config
* have tests use the deprecated built-in role granting reporting access
* restore test user default privilege for canvas
* fix app privileges in tests
* fix test_user not able to access canvas in the dashboard test
* simplify some tests setup
* update csv export timerange and snapshot
* update fn tests for app privileges
* fix feature controls test
* Update discover_security.ts
* fix reporting tests
* test using defaults in the security privilege test
* fix read-only privileges with url_create Permalinks
* fix security api anonymous
* fix anonymous capabilities tests
* fix discover csv export tests
* Update screenshots.ts
* update discover csv fn tests
* update snapshots
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* New `ArtifactEntryCard` component
* Refactored ContextMenuItemNavByRouter and moved it to top-level components + new ActionsContextMenu component + add context menu to card
* Refactor Trusted App grid to use new ArtifactEntryCard
* new Trusted Apps generator + refactor existing of TA script to use it
* policy details support for custom back link
* bug fix: paginated content should not trigger a change to adjust paging settings unless loading is done
Previously we were accepting "string | undefined" as `state` parameter.
But if the `state` was not present in the URL, we received null.
That was breaking the confidential flow in cases where `state` was not provided.
This commit changes the type of parameter to "string | null" and fixes the flow in such cases.
* implemention of usng support fixing #76144
* linting fixes
* lint fixes
* pr code edits
* fixed utm zone and added error proofing
* removing any data types and replacing with explicit ones
* avoiding render of unused components
* fixing linting issues
Co-authored-by: Michael Ihde <mihde@spectric.com>
Adds the ability for users to control whether a layer should refresh on auto-update or when the refresh-button is clicked. This is required to display static layers from geo-data indexed in Elasticsearch.
* Setting event log indices to hidden
* Cleaning up cluster client and adding unit tests
* Unit tests
* Unit tests
* Unit tests
* Unit tests
* PR feedback
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* remove extraneous tooltip
remove remove extraneous tooltip from Recent Activity table on the Source Overview page
* remove unused import
* rename trigger name to something more relevant
In https://github.com/elastic/kibana/pull/109008, we fixed an issue where Role mappings were not populated on changes (adding/deleting). However, we did not apply the same fix for Users in the table under Role mappings. This PR does that.
This PR fixes a bug in both App Search and Workplace Search where the role mappings flyout state was not being cleared when updating a role mapping. The issue is that the state of the flyout is determined by the existence of a role mapping and this was not being cleared when the role mapping was saved.
This ensures that the config object given to the `AuditService` setup
method is in fact the `xpack.security.audit.*` config options.
Previously the entire `xpack.security.*` config object would be passed
in.
The reason why this didn't fail the tests before was that both happen to
have a similarly named config option called `enabled`, which these tests
rely on.
* Refactored `FormFunction` to ts.
* Converted components to ts and added types for expression_types.
* Fixed types and refactored `function_component`.
* Added types to base_form, function_form, transform, etc.
* Arg types added.
* Moved model to ts and fixed all types.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Reporting] Remove `any`, improve telemetry schema for completeness
* remove another any
* rename file per exported function
* test variable name
* use variable for DRY
* update reporting telemetry contract
* added csv_searchsource_immediate to telemetry
* fix types
* update jest snapshots
* remove tests on large literal objects
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.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
A bugfix for significant terms on the ES side resulted in changes to assertions we have for api integration tests for APM correlations. This PR updates the affected tests.
## 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_
* Switch the overview to single column when we're at < 1200px
* Hide sparkplots on transactions, dependencies, and instances tables at widths where they could be easily cut off
* Right-align sparkplot columns
* Make chart heights match latency chart height when showing a single column
* Make all impact bars fixed 96px width
* Make values be shown before sparklines
* Make SparkPlots `overflow: 'hidden'`
* Remove fixed widths from columns
* Return breakpoint and width from `useBreakpoints`
* Rename "breakPoint" to "breakpoint" everywhere to match what EUI does
* Replace `ServiceListMetric` (on used on service list) with `ListMetric` (used when sparkplots are conditionally shown)
Fixes#110165.
* Add new policy tabs layout with policy settings and trusted apps tab. Only visible with feature flag enabled
* Add URL state of which tab is selected. Also refactored policy_details component. Hide sticky bar at bottom when trustedApps tab is selected
* Fix wrong constant path in routing
* Don't refresh policyItem if is not necessary
* Remove old code and use new form layout component even if FF is disabled
* Split test file
* Clean test file with unused mocks
* Fixes failing test
* Address pr comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Convert App Search server routes to new prefix
* Update frontend route prefixes for App Search
* Convert Workplace Search server routes to new prefix
* Update frontend route prefixes for Workplace Search
* Convert Enterprise Search server routes to new prefix
* Update frontend route prefixes for Enterprise Search