Upgrade EUI to v91.3.1 (#173569)

`v91.0.0-backport.0``v91.3.1`

⚠️ The largest set of changes in this PR that touch source code (as
opposed to test code) are related to several **EuiDataGrid** redesigns,
particularly around the toolbar, column cell headers, and cell actions.
We **strongly** recommend QAing your EuiDataGrid usages, **especially**
if you have custom CSS styling on data grid cells.

| Changes | Screencap |
|--------|--------|
| Cell actions and popover | <img
src="6462d983-307f-4a3c-84b1-36d9b276c9a0"
width="240" alt=""> |
| Column headers | <img
src="3fd64a15-829a-48f3-9dba-9dae3c73e6b2"
alt="" width="360"> |
| Toolbar | <img
src="f876f6d7-635d-497a-b1e7-9daf4e6fd3e3"
alt="" width="240"> |

---

## [`v91.3.1`](https://github.com/elastic/eui/releases/v91.3.1)

**Bug fixes**

- Moved `EuiDataGrid`'s header cells' `dataGridHeaderCellActionButton`
test subject attribute from to the clickable button, for easier E2E
testing ([#7427](https://github.com/elastic/eui/pull/7427))
- Fixed `EuiBasicTable`/`EuiInMemoryTable` actions to correctly show as
disabled when rows are being selected
([#7428](https://github.com/elastic/eui/pull/7428))

## [`v91.3.0`](https://github.com/elastic/eui/releases/v91.3.0)

- Added `esqlVis`, `pipeBreaks`, and `pipeNoBreaks` icon glyphs.
([#7399](https://github.com/elastic/eui/pull/7399))
- Updated `EuiDataGridSchemaDetector`'s comparator arguments to include
entry indexes ([#7406](https://github.com/elastic/eui/pull/7406))

## [`v91.2.0`](https://github.com/elastic/eui/releases/v91.2.0)

- Added `endpoint` glyph to `EuiIcon`
([#7383](https://github.com/elastic/eui/pull/7383))

**Bug fixes**

- Fixed a bug with `EuiSelectable`s with custom `truncationProps`, where
scrollbar widths were not being accounted for
([#7392](https://github.com/elastic/eui/pull/7392))

## [`v91.1.0`](https://github.com/elastic/eui/releases/tag/v91.1.0)

- Updated `EuiDataGrid` cell actions to display above cells instead of
within them, to avoid content clipping issues
([#7343](https://github.com/elastic/eui/pull/7343))
- Updated `EuiDataGrid` cell expansion popovers to sit on top of cells
instead of below/next to them
([#7343](https://github.com/elastic/eui/pull/7343))
- Updated `EuiListGroupItem` to render an external icon and screen
reader affordance for links with `target` set to to `_blank`
([#7352](https://github.com/elastic/eui/pull/7352))
- Updated `EuiListGroupItem` with a new `external` prop, which allows
enabling or disabling the new external link icon
([#7352](https://github.com/elastic/eui/pull/7352))
- Updated `EuiText` to no longer set any opinionated styles on child
`<img>` tags - use `EuiImage` for image display within text instead
([#7360](https://github.com/elastic/eui/pull/7360))
- Improved `EuiBasicTable`/`EuiInMemoryTable`s mobile UI for custom
actions ([#7361](https://github.com/elastic/eui/pull/7361))
- Added a new `EuiDataGridToolbarControl` subcomponent, which is useful
for rendering your own custom `EuiDataGrid` toolbar buttons while
matching the look of the default controls
([#7369](https://github.com/elastic/eui/pull/7369))
- Updated `EuiDataGrid`'s toolbar controls to show active/current counts
in badges, and updated the Columns button icon
([#7369](https://github.com/elastic/eui/pull/7369))
- Updated `EuiButtonEmpty` to allow passing `false` to `textProps`,
which allows rendering custom button content without an extra text
wrapper ([#7369](https://github.com/elastic/eui/pull/7369))
- Updated `EuiDataGrid` column header cells to show the sort arrow after
the heading text, instead of before
([#7371](https://github.com/elastic/eui/pull/7371))
- Updated `EuiDataGrid`'s column header actions icon from a chevron to
`boxesVertical` ([#7371](https://github.com/elastic/eui/pull/7371))
- Updated the actions column in `EuiBasicTable` and `EuiInMemoryTable`s.
Alongside `name`, the `description`, `href`, and `data-test-subj`
properties now also accept an optional callback that the current `item`
will be passed to ([#7373](https://github.com/elastic/eui/pull/7373))
- Updated `EuiContextMenuItem` with a new `toolTipProps` prop
([#7373](https://github.com/elastic/eui/pull/7373))
- `EuiSelectable` now allows configurable text truncation via
`listProps.truncationProps`
([#7388](https://github.com/elastic/eui/pull/7388))
- `EuiTextTruncate` now supports a new `calculationDelayMs` prop for
working around font loading or layout shifting scenarios
([#7388](https://github.com/elastic/eui/pull/7388))

**Bug fixes**

- Fixed incorrect `EuiPopover` positioning calculations when `hasArrow`
was set to false ([#7343](https://github.com/elastic/eui/pull/7343))
- Fixed `EuiSuperSelect` to render options with falsy values (false, 0,
and ''), but not nullish values (undefined or null)
([#7362](https://github.com/elastic/eui/pull/7362))
- Fixed `EuiSuperSelect`'s typing to allow non-string values (e.g.,
booleans or numbers) ([#7362](https://github.com/elastic/eui/pull/7362))
- Fixed `EuiDataGrid`'s numeric and currency column heading cells to be
correctly right-aligned
([#7371](https://github.com/elastic/eui/pull/7371))
- Fixed `EuiBasicTable` and `EuiInMemoryTable` actions not showing
tooltip descriptions when rendered in the all actions popover menu
([#7373](https://github.com/elastic/eui/pull/7373))
- Fixed missing underlines on `EuiContextMenu` link hover
([#7373](https://github.com/elastic/eui/pull/7373))
- Fixed visual text truncation of `EuiBreadcrumb`s with `popoverContent`
([#7375](https://github.com/elastic/eui/pull/7375))
- Fixed `EuiFormRow`s with `hasEmptyLabelSpace` being very slightly off
in vertical alignment
([#7380](https://github.com/elastic/eui/pull/7380))

**Deprecations**

- Deprecated `EuiContextMenuItem`'s `toolTipTitle` prop. Use
`toolTipProps.title` instead
([#7373](https://github.com/elastic/eui/pull/7373))
- Deprecated `EuiContextMenuItem`'s `toolTipPosition` prop. Use
`toolTipProps.position` instead
([#7373](https://github.com/elastic/eui/pull/7373))

**Accessibility**

- Fixed custom `EuiBasicTable`/`EuiInMemoryTable` rendering nested
interactive custom actions
([#7361](https://github.com/elastic/eui/pull/7361))
- Fixed `EuiBasicTable` and `EuiInMemoryTable` actions not correctly
reading out action descriptions to screen readers
([#7373](https://github.com/elastic/eui/pull/7373))
- Fixed `EuiBasicTable` and `EuiInMemoryTable` primary actions not
visibly appearing on keyboard focus
([#7373](https://github.com/elastic/eui/pull/7373))

---------

Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
This commit is contained in:
Cee Chen 2024-01-05 08:22:42 -08:00 committed by GitHub
parent f8408eeb7a
commit 7357af5c1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 442 additions and 324 deletions

View file

@ -102,7 +102,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.9.1-canary.1",
"@elastic/ems-client": "8.5.1",
"@elastic/eui": "91.0.0-backport.0",
"@elastic/eui": "91.3.1",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",

View file

@ -35,6 +35,7 @@ exports[`#start() returns \`Context\` component 1`] = `
"euiCodeBlockFullScreen.fullscreenCollapse": "Collapse",
"euiCodeBlockFullScreen.fullscreenExpand": "Expand",
"euiCollapsedItemActions.allActions": "All actions",
"euiCollapsedItemActions.allActionsDisabled": "Individual item actions are disabled when rows are being selected.",
"euiCollapsibleNavBeta.ariaLabel": "Site menu",
"euiCollapsibleNavButton.ariaLabelClose": "Close navigation",
"euiCollapsibleNavButton.ariaLabelCollapse": "Collapse navigation",
@ -53,15 +54,12 @@ exports[`#start() returns \`Context\` component 1`] = `
"euiColumnActions.moveRight": "Move right",
"euiColumnActions.sort": [Function],
"euiColumnSelector.button": "Columns",
"euiColumnSelector.buttonActivePlural": [Function],
"euiColumnSelector.buttonActiveSingular": [Function],
"euiColumnSelector.dragHandleAriaLabel": "Drag handle",
"euiColumnSelector.hideAll": "Hide all",
"euiColumnSelector.search": "Search",
"euiColumnSelector.searchcolumns": "Search columns",
"euiColumnSelector.selectAll": "Show all",
"euiColumnSorting.button": "Sort fields",
"euiColumnSorting.buttonActive": [Function],
"euiColumnSorting.clearAll": "Clear sorting",
"euiColumnSorting.emptySorting": "Currently no fields are sorted",
"euiColumnSorting.pickFields": "Pick fields to sort by",
@ -110,6 +108,7 @@ exports[`#start() returns \`Context\` component 1`] = `
"euiDataGridSchema.jsonSortTextDesc": "Large-Small",
"euiDataGridSchema.numberSortTextAsc": "Low-High",
"euiDataGridSchema.numberSortTextDesc": "High-Low",
"euiDataGridToolbarControl.badgeAriaLabel": [Function],
"euiDatePopoverButton.invalidTitle": [Function],
"euiDatePopoverButton.outdatedTitle": [Function],
"euiDatePopoverContent.absoluteTabLabel": "Absolute",
@ -133,6 +132,8 @@ exports[`#start() returns \`Context\` component 1`] = `
"euiDisplaySelector.rowHeightLabel": "Row height",
"euiDualRange.sliderScreenReaderInstructions": "You are in a custom range slider. Use the Up and Down arrow keys to change the minimum value. Press Tab to interact with the maximum value.",
"euiErrorBoundary.error": "Error",
"euiExternalLinkIcon.ariaLabel": "External link",
"euiExternalLinkIcon.newTarget.screenReaderOnlyText": "(opens in a new tab or window)",
"euiFieldPassword.maskPassword": "Mask password",
"euiFieldPassword.showPassword": "Show password as plain text. Note: this will visually expose your password on the screen.",
"euiFilePicker.clearSelectedFiles": "Clear selected files",
@ -185,8 +186,6 @@ exports[`#start() returns \`Context\` component 1`] = `
"euiKeyboardShortcuts.title": "Keyboard shortcuts",
"euiKeyboardShortcuts.upArrowDescription": "Move one cell up",
"euiKeyboardShortcuts.upArrowTitle": "Up arrow",
"euiLink.external.ariaLabel": "External link",
"euiLink.newTarget.screenReaderOnlyText": "(opens in a new tab or window)",
"euiLoadingChart.ariaLabel": "Loading",
"euiLoadingStrings.ariaLabel": "Loading",
"euiMark.highlightEnd": "highlight end",

View file

@ -167,6 +167,13 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'ARIA label and tooltip content describing a button that expands an actions menu',
}
),
'euiCollapsedItemActions.allActionsDisabled': i18n.translate(
'core.euiCollapsedItemActions.allActionsDisabled',
{
defaultMessage: 'Individual item actions are disabled when rows are being selected.',
description: 'Title content when the actions popover toggle is disabled',
}
),
'euiCollapsibleNavBeta.ariaLabel': i18n.translate('core.euiCollapsibleNavBeta.ariaLabel', {
defaultMessage: 'Site menu',
}),
@ -252,16 +259,6 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'euiColumnSelector.searchcolumns': i18n.translate('core.euiColumnSelector.searchcolumns', {
defaultMessage: 'Search columns',
}),
'euiColumnSelector.buttonActiveSingular': ({ numberOfHiddenFields }: EuiValues) =>
i18n.translate('core.euiColumnSelector.buttonActiveSingular', {
defaultMessage: '{numberOfHiddenFields} column hidden',
values: { numberOfHiddenFields },
}),
'euiColumnSelector.buttonActivePlural': ({ numberOfHiddenFields }: EuiValues) =>
i18n.translate('core.euiColumnSelector.buttonActivePlural', {
defaultMessage: '{numberOfHiddenFields} columns hidden',
values: { numberOfHiddenFields },
}),
'euiColumnSorting.clearAll': i18n.translate('core.euiColumnSorting.clearAll', {
defaultMessage: 'Clear sorting',
}),
@ -280,11 +277,6 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'euiColumnSorting.button': i18n.translate('core.euiColumnSorting.button', {
defaultMessage: 'Sort fields',
}),
'euiColumnSorting.buttonActive': ({ numberOfSortedFields }: EuiValues) =>
i18n.translate('core.euiColumnSorting.buttonActive', {
defaultMessage: '{numberOfSortedFields, plural, one {# field} other {# fields}} sorted',
values: { numberOfSortedFields },
}),
'euiColumnSortingDraggable.activeSortLabel': ({ display }: EuiValues) =>
i18n.translate('core.euiColumnSortingDraggable.activeSortLabel', {
defaultMessage: '{display} is sorting this data grid',
@ -673,6 +665,11 @@ export const getEuiContextMapping = (): EuiTokensObject => {
description: 'Descending size label',
}
),
'euiDataGridToolbarControl.badgeAriaLabel': ({ count }: EuiValues) =>
i18n.translate('core.euiDataGridToolbarControl.badgeAriaLabel', {
defaultMessage: 'Active: {count}',
values: { count },
}),
'euiDatePopoverButton.invalidTitle': ({ title }: EuiValues) =>
i18n.translate('core.euiDatePopoverButton.invalidTitle', {
defaultMessage: 'Invalid date: {title}',
@ -830,11 +827,11 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'core.euiInlineEditForm.saveButtonAriaLabel',
{ defaultMessage: 'Save edit' }
),
'euiLink.external.ariaLabel': i18n.translate('core.euiLink.external.ariaLabel', {
'euiExternalLinkIcon.ariaLabel': i18n.translate('core.euiExternalLinkIcon.ariaLabel', {
defaultMessage: 'External link',
}),
'euiLink.newTarget.screenReaderOnlyText': i18n.translate(
'core.euiLink.newTarget.screenReaderOnlyText',
'euiExternalLinkIcon.newTarget.screenReaderOnlyText': i18n.translate(
'core.euiExternalLinkIcon.newTarget.screenReaderOnlyText',
{
defaultMessage: '(opens in a new tab or window)',
}

View file

@ -45,6 +45,17 @@ Array [
],
"display": <div
aria-label="timestamp - this field represents the time that events occurred."
css={
Object {
"map": undefined,
"name": "1sxf1pk",
"next": undefined,
"styles": "
text-align: left;
",
"toString": [Function],
}
}
>
<EuiToolTip
content="This field represents the time that events occurred."
@ -1422,6 +1433,17 @@ Array [
],
"display": <div
aria-label="timestamp - this field represents the time that events occurred."
css={
Object {
"map": undefined,
"name": "1sxf1pk",
"next": undefined,
"styles": "
text-align: left;
",
"toString": [Function],
}
}
>
<EuiToolTip
content="This field represents the time that events occurred."
@ -1593,6 +1615,17 @@ Array [
],
"display": <div
aria-label="timestamp - this field represents the time that events occurred."
css={
Object {
"map": undefined,
"name": "1sxf1pk",
"next": undefined,
"styles": "
text-align: left;
",
"toString": [Function],
}
}
>
<EuiToolTip
content="This field represents the time that events occurred."

View file

@ -40,14 +40,20 @@
border-bottom: $euiBorderThin;
}
.euiDataGridRowCell--controlColumn:hover::after,
.euiDataGridRowCell--controlColumn:focus::after,
.euiDataGridRowCell--controlColumn.euiDataGridRowCell--open::after {
border-color: transparent;
}
.euiDataGridRowCell--controlColumn .euiDataGridRowCell__content,
.euiDataGridRowCell.euiDataGridRowCell--controlColumn[data-gridcell-column-id='openDetails'],
.euiDataGridRowCell.euiDataGridRowCell--controlColumn[data-gridcell-column-id='select'] {
padding-left: 0;
padding-right: 0;
}
.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover,
.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover .euiDataGridRowCell__actions--overlay {
.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover {
background-color: tintOrShade($euiColorLightShade, 50%, 0);
}
@ -55,8 +61,8 @@
background-color: transparent; // otherwise the grid scrollbar border visually conflicts with the grid toolbar controls
}
.euiDataGridRowCell__autoHeight,
.euiDataGridRowCell__lineCountHeight {
.euiDataGridRowCell__content--autoHeight,
.euiDataGridRowCell__content--lineCountHeight {
white-space: pre-wrap;
}
}
@ -79,10 +85,7 @@
.euiDataGridHeader {
.euiDataGridHeaderCell__content {
@include euiTextTruncate;
overflow: hidden;
white-space: pre-wrap;
flex-grow: 1;
}
.euiDataGridHeaderCell__popover {
@ -114,15 +117,15 @@
.unifiedDataTable__rowControl {
// fine-tuning the vertical alignment with the text for any row height setting
margin-top: -3px;
.euiDataGridRowCell__defaultHeight & { // "Single line" row height setting
margin-top: -$euiSizeXS;
.euiDataGridRowCell__content--defaultHeight & { // "Single line" row height setting
margin-top: 0;
}
}
.unifiedDataTable__descriptionList {
// force the content truncation when "Single line" row height setting is active
.euiDataGridRowCell__defaultHeight & {
.euiDataGridRowCell__content--defaultHeight & {
-webkit-line-clamp: 1;
display: -webkit-box;
-webkit-box-orient: vertical;

View file

@ -15,6 +15,7 @@ import {
EuiScreenReaderOnly,
EuiToolTip,
} from '@elastic/eui';
import { css } from '@emotion/react';
import type { DataView } from '@kbn/data-views-plugin/public';
import { ToastsStart, IUiSettingsClient } from '@kbn/core/public';
import { DocViewFilterFn } from '@kbn/unified-doc-viewer/types';
@ -189,7 +190,12 @@ function buildEuiGridColumn({
});
column.display = (
<div aria-label={primaryTimeAriaLabel}>
<div
aria-label={primaryTimeAriaLabel}
css={css`
text-align: left;
`}
>
<EuiToolTip content={primaryTimeTooltip}>
<>
{timeFieldName} <EuiIcon type="clock" />

View file

@ -6,15 +6,13 @@
* Side Public License, v 1.
*/
import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
import classNames from 'classnames';
import {
EuiButtonEmpty,
EuiCheckbox,
EuiContextMenuItem,
EuiContextMenuPanel,
EuiCopy,
EuiDataGridCellValueElementProps,
EuiNotificationBadge,
EuiDataGridToolbarControl,
EuiPopover,
EuiFlexGroup,
EuiFlexItem,
@ -183,33 +181,20 @@ export function DataTableDocumentToolbarBtn({
isOpen={isSelectionPopoverOpen}
panelPaddingSize="none"
button={
<EuiButtonEmpty
size="xs"
color="text"
<EuiDataGridToolbarControl
iconType="documents"
onClick={toggleSelectionToolbar}
data-selected-documents={selectedDocs.length}
data-test-subj="dscGridSelectionBtn"
isSelected={isFilterActive}
className={classNames({
// eslint-disable-next-line @typescript-eslint/naming-convention
euiDataGrid__controlBtn: true,
'euiDataGrid__controlBtn--active': isFilterActive,
})}
badgeContent={selectedDocs.length}
>
<EuiFlexGroup responsive={false} direction="row" alignItems="center" gutterSize="s">
<EuiFlexItem grow={false}>
<FormattedMessage
id="unifiedDataTable.selectedRowsButtonLabel"
defaultMessage="Selected"
description="Selected documents"
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiNotificationBadge color="subdued">{selectedDocs.length}</EuiNotificationBadge>
</EuiFlexItem>
</EuiFlexGroup>
</EuiButtonEmpty>
<FormattedMessage
id="unifiedDataTable.selectedRowsButtonLabel"
defaultMessage="Selected"
description="Selected documents"
/>
</EuiDataGridToolbarControl>
}
>
{isSelectionPopoverOpen && <EuiContextMenuPanel items={getMenuItems()} />}

View file

@ -85,7 +85,7 @@ export const LICENSE_OVERRIDES = {
'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/ems-client@8.5.1': ['Elastic License 2.0'],
'@elastic/eui@91.0.0-backport.0': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@91.3.1': ['SSPL-1.0 OR Elastic License 2.0'],
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODCBy license https://github.com/mattcg/language-subtag-registry
'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary
'@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause)

View file

@ -141,7 +141,7 @@ class DataDownloadOptions extends Component<DataDownloadOptionsProps, DataDownlo
defaultMessage="Download the data in table format"
/>
}
toolTipPosition="left"
toolTipProps={{ position: 'left' }}
>
<FormattedMessage
id="data.inspector.table.formattedCSVButtonLabel"
@ -157,7 +157,7 @@ class DataDownloadOptions extends Component<DataDownloadOptionsProps, DataDownlo
defaultMessage="Download the data as provided, for example, dates as timestamps"
/>
}
toolTipPosition="left"
toolTipProps={{ position: 'left' }}
>
<FormattedMessage id="data.inspector.table.rawCSVButtonLabel" defaultMessage="Raw CSV" />
</EuiContextMenuItem>,

View file

@ -179,13 +179,13 @@ exports[`UrlFormatEditor should render normally 1`] = `
URL template help
</span>
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -244,13 +244,13 @@ exports[`UrlFormatEditor should render normally 1`] = `
Label template help
</span>
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -2,7 +2,7 @@
padding: $euiSizeS $euiSizeS $euiSizeXS;
}
.dscGridToolbarControlButton .euiDataGrid__controlBtn {
.dscGridToolbarControlButton .euiDataGridToolbarControl {
block-size: $euiSizeXL;
border: $euiBorderThin;
border-radius: $euiBorderRadiusSmall;
@ -13,10 +13,7 @@
block-size: $euiSize;
}
// cancel default background and font changes
&.euiDataGrid__controlBtn--active {
font-weight: $euiFontWeightMedium;
}
// cancel default background changes
&:active, &:focus {
background: transparent;
}

View file

@ -60,7 +60,7 @@ export class InspectorViewChooser extends Component<Props, State> {
this.closeSelector();
}}
toolTipContent={view.help}
toolTipPosition="left"
toolTipProps={{ position: 'left' }}
data-test-subj={`inspectorViewChooser${view.title}`}
>
{view.title}

View file

@ -35,13 +35,13 @@ exports[`NotFoundErrors component renders correctly for index-pattern type 1`] =
>
Saved objects APIs
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -87,13 +87,13 @@ exports[`NotFoundErrors component renders correctly for index-pattern-field type
>
Saved objects APIs
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -139,13 +139,13 @@ exports[`NotFoundErrors component renders correctly for search type 1`] = `
>
Saved objects APIs
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -189,13 +189,13 @@ exports[`NotFoundErrors component renders correctly for unknown type 1`] = `
>
Saved objects APIs
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -6,40 +6,27 @@
*/
import React, { type FC } from 'react';
import { css } from '@emotion/react';
import { BarSeries, Chart, Settings, ScaleType, LEGACY_LIGHT_THEME } from '@elastic/charts';
import { euiTextTruncate, type EuiDataGridColumn } from '@elastic/eui';
import { euiThemeVars } from '@kbn/ui-theme';
import { mathWithUnits, type UseEuiTheme, type EuiDataGridColumn } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { isUnsupportedChartData, ChartData } from '../lib/field_histograms';
import { useColumnChart } from '../hooks/use_column_chart';
const cssHistogram = css({
const cssHistogram = ({ euiTheme }: UseEuiTheme) => ({
width: '100%',
height: `calc(${euiThemeVars.euiSizeXL} + ${euiThemeVars.euiSizeXXL})`,
height: mathWithUnits([euiTheme.size.xl, euiTheme.size.xxl], (x, y) => x + y),
});
const cssHistogramLegend = css([
css`
${euiTextTruncate()}
`,
{
color: euiThemeVars.euiColorMediumShade,
display: 'block',
overflowX: 'hidden',
margin: `${euiThemeVars.euiSizeXS} 0 0 0`,
fontSize: euiThemeVars.euiFontSizeXS,
const cssHistogramLegend = ({ euiTheme }: UseEuiTheme) =>
({
color: euiTheme.colors.mediumShade,
marginTop: euiTheme.size.xs,
fontStyle: 'italic',
fontWeight: 'normal',
textAlign: 'left',
},
]);
const cssHistogramLegendNumeric = css([cssHistogramLegend, { textAlign: 'right' }]);
} as const);
interface Props {
chartData: ChartData;
@ -100,12 +87,17 @@ export const ColumnChart: FC<Props> = ({
</div>
)}
<div
css={columnType.schema === 'number' ? cssHistogramLegendNumeric : cssHistogramLegend}
className="eui-textTruncate"
css={cssHistogramLegend}
data-test-subj={`${dataTestSubj}-legend`}
>
{legendText}
</div>
{!hideLabel && <div data-test-subj={`${dataTestSubj}-id`}>{columnType.id}</div>}
{!hideLabel && (
<div data-test-subj={`${dataTestSubj}-id`} className="eui-textTruncate histogramLabel">
{columnType.id}
</div>
)}
</div>
);
};

View file

@ -7,7 +7,6 @@
import { isEqual } from 'lodash';
import React, { memo, useEffect, useRef, FC } from 'react';
import { css } from '@emotion/react';
import {
EuiButtonEmpty,
@ -24,6 +23,8 @@ import {
EuiSpacer,
EuiTitle,
EuiToolTip,
UseEuiTheme,
mathWithUnits,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
@ -35,18 +36,49 @@ import { isPopulatedObject } from '@kbn/ml-is-populated-object';
import { euiDataGridStyle, euiDataGridToolbarSettings, INDEX_STATUS } from '../lib/common';
import { UseIndexDataReturnType } from '../lib/types';
const cssOverride = css({
'.euiDataGridRowCell--boolean': { textTransform: 'none' },
// Overrides to align the sorting arrow, actions icon and the column header when no chart is available,
// to the bottom of the cell when histogram charts are enabled.
// Note that overrides have to be used as currently it is not possible to add a custom class name
// for the EuiDataGridHeaderCell - see https://github.com/elastic/eui/issues/5106
'.euiDataGridHeaderCell': {
'.euiDataGridHeaderCell__sortingArrow,.euiDataGridHeaderCell__icon,.euiPopover': {
marginTop: 'auto',
const histogramHeaderProps = { className: 'cellHeaderWithHistogramChart' };
const cssOverride = ({ euiTheme }: UseEuiTheme) =>
({
'.euiDataGridRowCell--boolean': { textTransform: 'none' },
// When a histogram chart is present in the column header, absolutely position
// the sorting arrow and actions icon so that the chart can expand to the full width
// of the header
'.cellHeaderWithHistogramChart': {
'.euiDataGridHeaderCell__content': {
width: '100%',
textAlign: 'left', // Should be overridden by EuiDataGrid's base CSS for numeric & currency schema
},
'.euiDataGridHeaderCell__sortingArrow': {
position: 'absolute',
bottom: 0,
right: euiTheme.size.base, // Positioned to the left of the actions icon
// If the arrow is visible, ensure the icon is as well
'+ .euiPopover .euiDataGridHeaderCell__icon': {
width: 'auto',
opacity: '1',
},
},
'.euiDataGridHeaderCell__button > .euiPopover': {
position: 'absolute',
bottom: 0,
right: 0,
},
// Re-apply cell icon affordances manually (due to absolute positioning)
'.histogramLabel': {
transition: `margin ${euiTheme.animation.fast} ease-in`,
},
'&:hover, &:focus-within, &:has(.euiPopover-isOpen)': {
'.histogramLabel': {
marginRight: euiTheme.size.base,
},
},
'&:has(.euiDataGridHeaderCell__sortingArrow)': {
'.histogramLabel': {
marginRight: mathWithUnits([euiTheme.size.xl, euiTheme.size.xxs], (x, y) => x + y),
},
},
},
},
});
} as const);
export const DataGridTitle: FC<{ title: string }> = ({ title }) => (
<EuiTitle size="xs">
@ -264,6 +296,7 @@ export const DataGrid: FC<Props> = memo(
aria-label={isWithHeader(props) ? props.title : ''}
columns={columnsWithCharts.map((c) => {
c.initialWidth = 165;
if (chartsVisible) c.displayHeaderCellProps = histogramHeaderProps;
return c;
})}
columnVisibility={{ visibleColumns, setVisibleColumns }}

View file

@ -0,0 +1,14 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import '@emotion/react';
import type { UseEuiTheme } from '@elastic/eui';
declare module '@emotion/react' {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Theme extends UseEuiTheme {}
}

View file

@ -14,6 +14,7 @@
"include": [
"**/*.ts",
"**/*.tsx",
"./emotion.d.ts", // Emotion EUI theme typing
],
"exclude": [
"target/**/*"

View file

@ -118,14 +118,19 @@ const EuiDataGridContainer = styled.div<{ hideLastPage: boolean }>`
${({ hideLastPage }) => `${hideLastPage ? 'display:none' : ''}`};
}
}
div .euiDataGridRowCell__contentWrapper {
div .euiDataGridRowCell {
display: flex;
align-items: center;
}
div .euiDataGridRowCell--lastColumn .euiDataGridRowCell__content {
flex-grow: 0;
div .euiDataGridRowCell > [data-focus-lock-disabled] {
display: flex;
align-items: center;
flex-grow: 1;
width: 100%;
}
div .euiDataGridRowCell__content {
flex-grow: 1;
}
div .siemEventsTable__trSupplement--summary {
display: block;
}

View file

@ -284,7 +284,7 @@ const FieldPanel: FC<FieldPanelProps> = ({
disabled: caseAttachmentButtonDisabled,
...(caseAttachmentButtonDisabled
? {
toolTipPosition: 'left' as const,
toolTipProps: { position: 'left' as const },
toolTipContent: i18n.translate(
'xpack.aiops.changePointDetection.attachToCaseTooltipContent',
{

File diff suppressed because one or more lines are too long

View file

@ -27,22 +27,26 @@ export const useStyles = () => {
& .euiDataGrid--headerUnderline .euiDataGridHeaderCell {
border-bottom: ${euiTheme.border.width.thick} solid ${euiTheme.colors.fullShade};
}
& .euiDataGridRowCell__contentByHeight + .euiDataGridRowCell__expandActions {
padding: 0;
}
& .euiButtonIcon[data-test-subj='docTableExpandToggleColumn'] {
color: ${euiTheme.colors.primary};
}
& .euiDataGridRowCell {
font-size: ${euiTheme.size.m};
}
& .euiDataGridRowCell__expandFlex {
align-items: center;
// Vertically center content
.euiDataGridRowCell__content {
display: flex;
align-items: center;
}
}
& .euiDataGridRowCell.euiDataGridRowCell--numeric {
text-align: left;
}
& .euiDataGridHeaderCell--numeric .euiDataGridHeaderCell__content {
flex-grow: 0;
text-align: left;
}
& .euiDataGrid__controls {
gap: ${euiTheme.size.s};
}
@ -55,7 +59,7 @@ export const useStyles = () => {
font-size: ${euiTheme.size.m};
font-weight: ${euiTheme.font.weight.bold};
border-right: ${euiTheme.border.thin};
margin-right: ${euiTheme.size.s};
margin-inline: ${euiTheme.size.s};
padding-right: ${euiTheme.size.m};
}
& .euiDataGrid__rightControls {

View file

@ -7,11 +7,23 @@
import React from 'react';
import moment, { type MomentInput } from 'moment';
import { css } from '@emotion/react';
import { EuiToolTip } from '@elastic/eui';
import { CSP_MOMENT_FORMAT } from '../common/constants';
// Offset top-aligned tooltips so that cell actions are visible
const datagridToolTipOffset = css`
&[data-position='top'] {
margin-block-start: -8px;
}
`;
export const TimestampTableCell = ({ timestamp }: { timestamp: MomentInput }) => (
<EuiToolTip position="top" content={moment(timestamp).format(CSP_MOMENT_FORMAT)}>
<EuiToolTip
position="bottom"
css={datagridToolTipOffset}
content={moment(timestamp).format(CSP_MOMENT_FORMAT)}
>
<span>{moment(timestamp).fromNow()}</span>
</EuiToolTip>
);

View file

@ -45,21 +45,24 @@ export const useStyles = () => {
}
& .euiDataGridRowCell {
font-size: ${euiTheme.size.m};
// Vertically center content
.euiDataGridRowCell__content {
display: flex;
align-items: center;
}
}
& .euiDataGridRowCell__actions > [data-test-subj='euiDataGridCellExpandButton'] {
/* EUI QUESTION: Why is this being done via CSS instead of setting isExpandable: false in the columns API? */
& .euiDataGridRowCell__actions > .euiDataGridRowCell__expandCell {
display: none;
}
& .euiDataGridRowCell__actions--overlay {
padding: 0;
}
& .euiDataGridRowCell__contentWrapper {
display: flex;
align-items: center;
}
& .euiDataGridRowCell.euiDataGridRowCell--numeric {
text-align: left;
}
& .euiDataGridHeaderCell--numeric .euiDataGridHeaderCell__content {
flex-grow: 0;
text-align: left;
}
`;
const highlightStyle = css`

View file

@ -88,6 +88,7 @@ export const SeverityMap = ({ severityMap, total }: Props) => {
`}
anchorClassName={css`
height: ${euiTheme.size.xl};
flex-grow: 1;
display: flex;
align-items: center;
`}

View file

@ -130,13 +130,13 @@ exports[`extend index management ilm summary extension should render a phase def
>
Edit policy in ILM
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -301,13 +301,13 @@ exports[`extend index management ilm summary extension should render a step info
>
Edit policy in ILM
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -468,13 +468,13 @@ exports[`extend index management ilm summary extension should render an error pa
>
Edit policy in ILM
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -636,13 +636,13 @@ exports[`extend index management ilm summary extension should render the tab whe
>
Edit policy in ILM
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -85,13 +85,13 @@ export const AlertDropdown = () => {
: inlineLogViewTooltipContent
: undefined
}
toolTipTitle={
!canCreateAlerts
toolTipProps={{
title: !canCreateAlerts
? readOnly
? readOnlyUserTooltipTitle
: inlineLogViewTooltipTitle
: undefined
}
: undefined,
}}
>
<FormattedMessage
id="xpack.infra.alerting.logs.createAlertButton"

View file

@ -76,7 +76,7 @@ export const ToolbarButton: React.FunctionComponent<ToolbarButtonProps> = ({
}}
textProps={{
...textProps,
className: classNames('kbnToolbarButton__text', textProps?.className),
className: classNames('kbnToolbarButton__text', textProps && textProps.className),
}}
{...rest}
size={size}

View file

@ -38,13 +38,13 @@ exports[`RequestTrialExtension component should display when enterprise license
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -114,13 +114,13 @@ exports[`RequestTrialExtension component should display when license is active a
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -190,13 +190,13 @@ exports[`RequestTrialExtension component should display when license is not acti
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -266,13 +266,13 @@ exports[`RequestTrialExtension component should display when platinum license is
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -38,13 +38,13 @@ exports[`RevertToBasic component should display when license is about to expire
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -112,13 +112,13 @@ exports[`RevertToBasic component should display when license is expired 1`] = `
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -186,13 +186,13 @@ exports[`RevertToBasic component should display when trial is active 1`] = `
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -38,13 +38,13 @@ exports[`StartTrial component when trial is allowed display for basic license 1`
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -112,13 +112,13 @@ exports[`StartTrial component when trial is allowed should display for expired e
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -186,13 +186,13 @@ exports[`StartTrial component when trial is allowed should display for expired p
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -260,13 +260,13 @@ exports[`StartTrial component when trial is allowed should display for gold lice
>
subscription features
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -87,13 +87,13 @@ Array [
>
Elasticsearch Service Console
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -107,13 +107,13 @@ Array [
>
Logs and metrics
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -127,13 +127,13 @@ Array [
>
the documentation page.
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -154,13 +154,13 @@ Array [
>
Elasticsearch Service Console
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -174,13 +174,13 @@ Array [
>
Logs and metrics
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -194,13 +194,13 @@ Array [
>
the documentation page.
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -14,6 +14,7 @@ export const SUBMIT_BUTTON = '#submit-button';
export const RESULTS_TABLE = 'osqueryResultsTable';
export const RESULTS_TABLE_BUTTON = 'dataGridFullScreenButton';
export const RESULTS_TABLE_COLUMNS_BUTTON = 'dataGridColumnSelectorButton';
export const RESULTS_TABLE_CELL_WRRAPER = 'EuiDataGridHeaderCellWrapper';
export const getIdFormField = () => cy.get('input[name="id"]');

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { RESULTS_TABLE_BUTTON } from '../screens/live_query';
import { RESULTS_TABLE_BUTTON, RESULTS_TABLE_COLUMNS_BUTTON } from '../screens/live_query';
import { closeToastIfVisible, generateRandomStringName } from './integrations';
import {
checkResults,
@ -45,7 +45,7 @@ export const getSavedQueriesComplexTest = () =>
cy.contains('Exit fullscreen').should('exist');
// hidden columns
cy.contains('columns hidden').should('not.exist');
cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns35');
cy.getBySel('dataGridHeaderCell-osquery.cmdline').click();
cy.contains(/Hide column$/).click();
cy.getBySel('dataGridHeaderCell-osquery.cwd').click();
@ -54,10 +54,10 @@ export const getSavedQueriesComplexTest = () =>
cy.getBySel('dataGridHeaderCell-osquery.disk_bytes_written.number').click();
cy.contains(/Hide column$/).click();
cy.contains('columns hidden').should('exist');
cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns32/35');
// change pagination
cy.getBySel('pagination-button-next').click().wait(500).click();
cy.contains('columns hidden').should('exist');
cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns32/35');
// enter fullscreen
cy.getBySel(RESULTS_TABLE_BUTTON).trigger('mouseover');
@ -69,7 +69,7 @@ export const getSavedQueriesComplexTest = () =>
cy.getBySel('dataGridHeaderCell-osquery.egid').click();
cy.contains(/Sort A-Z$/).click();
cy.contains('columns hidden').should('exist');
cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns32/35');
cy.getBySel(RESULTS_TABLE_BUTTON).trigger('mouseover');
cy.contains(/Enter fullscreen$/).should('exist');

View file

@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`PromptPage renders as expected with additional scripts 1`] = `"<html lang=\\"en\\"><head><title>Elastic</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><script src=\\"/mock-basepath/some/script1.js\\"></script><script src=\\"/mock-basepath/some/script2.js\\"></script><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">Some Title</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-1vwhzjf-euiText-m-euiTextColor-subdued\\"><div>Some Body</div></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><span>Action#1</span></div><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><span>Action#2</span></div></div></div></div></div></div></div></section></main></div></body></html>"`;
exports[`PromptPage renders as expected with additional scripts 1`] = `"<html lang=\\"en\\"><head><title>Elastic</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><script src=\\"/mock-basepath/some/script1.js\\"></script><script src=\\"/mock-basepath/some/script2.js\\"></script><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">Some Title</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-eqvwj3-euiText-m-euiTextColor-subdued\\"><div>Some Body</div></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><span>Action#1</span></div><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><span>Action#2</span></div></div></div></div></div></div></div></section></main></div></body></html>"`;
exports[`PromptPage renders as expected without additional scripts 1`] = `"<html lang=\\"en\\"><head><title>Elastic</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">Some Title</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-1vwhzjf-euiText-m-euiTextColor-subdued\\"><div>Some Body</div></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><span>Action#1</span></div><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><span>Action#2</span></div></div></div></div></div></div></div></section></main></div></body></html>"`;
exports[`PromptPage renders as expected without additional scripts 1`] = `"<html lang=\\"en\\"><head><title>Elastic</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">Some Title</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-eqvwj3-euiText-m-euiTextColor-subdued\\"><div>Some Body</div></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><span>Action#1</span></div><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><span>Action#2</span></div></div></div></div></div></div></div></section></main></div></body></html>"`;

View file

@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`UnauthenticatedPage renders as expected 1`] = `"<html lang=\\"en\\"><head><title>Elastic</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">We hit an authentication error</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-1vwhzjf-euiText-m-euiTextColor-subdued\\"><p>Try logging in again, and if the problem persists, contact your system administrator.</p></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><a href=\\"/some/url?some-query=some-value#some-hash\\" rel=\\"noreferrer\\" class=\\"euiButton eui-8utmkn-euiButtonDisplay-m-defaultMinWidth-fill-primary\\" data-test-subj=\\"logInButton\\"><span class=\\"eui-1bascr2-euiButtonDisplayContent\\">Log in</span></a></div></div></div></div></div></div></div></section></main></div></body></html>"`;
exports[`UnauthenticatedPage renders as expected 1`] = `"<html lang=\\"en\\"><head><title>Elastic</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">We hit an authentication error</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-eqvwj3-euiText-m-euiTextColor-subdued\\"><p>Try logging in again, and if the problem persists, contact your system administrator.</p></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><a href=\\"/some/url?some-query=some-value#some-hash\\" rel=\\"noreferrer\\" class=\\"euiButton eui-8utmkn-euiButtonDisplay-m-defaultMinWidth-fill-primary\\" data-test-subj=\\"logInButton\\"><span class=\\"eui-1bascr2-euiButtonDisplayContent\\">Log in</span></a></div></div></div></div></div></div></div></section></main></div></body></html>"`;
exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"<html lang=\\"en\\"><head><title>My Company Name</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">We hit an authentication error</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-1vwhzjf-euiText-m-euiTextColor-subdued\\"><p>Try logging in again, and if the problem persists, contact your system administrator.</p></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><a href=\\"/some/url?some-query=some-value#some-hash\\" rel=\\"noreferrer\\" class=\\"euiButton eui-8utmkn-euiButtonDisplay-m-defaultMinWidth-fill-primary\\" data-test-subj=\\"logInButton\\"><span class=\\"eui-1bascr2-euiButtonDisplayContent\\">Log in</span></a></div></div></div></div></div></div></div></section></main></div></body></html>"`;
exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"<html lang=\\"en\\"><head><title>My Company Name</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">We hit an authentication error</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-eqvwj3-euiText-m-euiTextColor-subdued\\"><p>Try logging in again, and if the problem persists, contact your system administrator.</p></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><a href=\\"/some/url?some-query=some-value#some-hash\\" rel=\\"noreferrer\\" class=\\"euiButton eui-8utmkn-euiButtonDisplay-m-defaultMinWidth-fill-primary\\" data-test-subj=\\"logInButton\\"><span class=\\"eui-1bascr2-euiButtonDisplayContent\\">Log in</span></a></div></div></div></div></div></div></div></section></main></div></body></html>"`;

View file

@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ResetSessionPage renders as expected 1`] = `"<html lang=\\"en\\"><head><title>Elastic</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><script src=\\"/mock-basepath/internal/security/reset_session_page.js\\"></script><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">You do not have permission to access the requested page</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-1vwhzjf-euiText-m-euiTextColor-subdued\\"><p>Either go back to the previous page or log in as a different user.</p></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><a href=\\"/path/to/logout\\" rel=\\"noreferrer\\" class=\\"euiButton eui-8utmkn-euiButtonDisplay-m-defaultMinWidth-fill-primary\\" data-test-subj=\\"ResetSessionButton\\"><span class=\\"eui-1bascr2-euiButtonDisplayContent\\">Log in as different user</span></a></div><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><button class=\\"euiButtonEmpty eui-9ywwuh-euiButtonDisplay-euiButtonEmpty-m-empty-primary\\" type=\\"button\\" id=\\"goBackButton\\"><span class=\\"euiButtonEmpty__content eui-1bascr2-euiButtonDisplayContent\\"><span class=\\"eui-textTruncate euiButtonEmpty__text\\">Go back</span></span></button></div></div></div></div></div></div></div></section></main></div></body></html>"`;
exports[`ResetSessionPage renders as expected 1`] = `"<html lang=\\"en\\"><head><title>Elastic</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><script src=\\"/mock-basepath/internal/security/reset_session_page.js\\"></script><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">You do not have permission to access the requested page</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-eqvwj3-euiText-m-euiTextColor-subdued\\"><p>Either go back to the previous page or log in as a different user.</p></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><a href=\\"/path/to/logout\\" rel=\\"noreferrer\\" class=\\"euiButton eui-8utmkn-euiButtonDisplay-m-defaultMinWidth-fill-primary\\" data-test-subj=\\"ResetSessionButton\\"><span class=\\"eui-1bascr2-euiButtonDisplayContent\\">Log in as different user</span></a></div><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><button class=\\"euiButtonEmpty eui-9ywwuh-euiButtonDisplay-euiButtonEmpty-m-empty-primary\\" type=\\"button\\" id=\\"goBackButton\\"><span class=\\"euiButtonEmpty__content eui-1bascr2-euiButtonDisplayContent\\"><span class=\\"eui-textTruncate euiButtonEmpty__text\\">Go back</span></span></button></div></div></div></div></div></div></div></section></main></div></body></html>"`;
exports[`ResetSessionPage renders as expected with custom page title 1`] = `"<html lang=\\"en\\"><head><title>My Company Name</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><script src=\\"/mock-basepath/internal/security/reset_session_page.js\\"></script><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">You do not have permission to access the requested page</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-1vwhzjf-euiText-m-euiTextColor-subdued\\"><p>Either go back to the previous page or log in as a different user.</p></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><a href=\\"/path/to/logout\\" rel=\\"noreferrer\\" class=\\"euiButton eui-8utmkn-euiButtonDisplay-m-defaultMinWidth-fill-primary\\" data-test-subj=\\"ResetSessionButton\\"><span class=\\"eui-1bascr2-euiButtonDisplayContent\\">Log in as different user</span></a></div><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><button class=\\"euiButtonEmpty eui-9ywwuh-euiButtonDisplay-euiButtonEmpty-m-empty-primary\\" type=\\"button\\" id=\\"goBackButton\\"><span class=\\"euiButtonEmpty__content eui-1bascr2-euiButtonDisplayContent\\"><span class=\\"eui-textTruncate euiButtonEmpty__text\\">Go back</span></span></button></div></div></div></div></div></div></div></section></main></div></body></html>"`;
exports[`ResetSessionPage renders as expected with custom page title 1`] = `"<html lang=\\"en\\"><head><title>My Company Name</title><style></style><style data-emotion=\\"eui \\"></style></style><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.css\\" rel=\\"stylesheet\\"/><link href=\\"/mock-server-basepath/100500/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.v8.light.css\\" rel=\\"stylesheet\\"/>MockedFonts<link rel=\\"alternate icon\\" type=\\"image/png\\" href=\\"/mock-server-basepath/ui/favicons/favicon.png\\"/><link rel=\\"icon\\" type=\\"image/svg+xml\\" href=\\"/mock-server-basepath/ui/favicons/favicon.svg\\"/><script src=\\"/mock-basepath/internal/security/reset_session_page.js\\"></script><meta name=\\"theme-color\\" content=\\"#ffffff\\"/><meta name=\\"color-scheme\\" content=\\"light dark\\"/></head><body><div data-test-subj=\\"promptPage\\" style=\\"min-block-size:max(460px, 100vh);padding-block-start:var(--euiFixedHeadersOffset, 0)\\" class=\\"euiPageTemplate eui-cjgvy1-euiPageOuter-row-grow\\"><main id=\\"EuiPageTemplateInner_generated-id\\" class=\\"eui-nq554q-euiPageInner\\"><section class=\\"eui-68douo-euiPageSection-grow-l-center-transparent\\"><div class=\\"eui-1sghhs8-euiPageSection__content-l-center\\"><div class=\\"euiPanel euiPanel--plain euiEmptyPrompt euiEmptyPrompt--vertical euiEmptyPrompt--paddingLarge eui-12g67tv-euiPanel-m-plain-hasShadow\\"><div class=\\"euiEmptyPrompt__main\\"><div class=\\"euiEmptyPrompt__icon\\"><span data-euiicon-type=\\"warning\\" color=\\"danger\\"></span></div><div class=\\"euiEmptyPrompt__content\\"><div class=\\"euiEmptyPrompt__contentInner\\"><h2 class=\\"euiTitle eui-smz32e-euiTitle-m\\">You do not have permission to access the requested page</h2><div class=\\"euiSpacer euiSpacer--m eui-jv9za2-euiSpacer-m\\"></div><div class=\\"euiText eui-eqvwj3-euiText-m-euiTextColor-subdued\\"><p>Either go back to the previous page or log in as a different user.</p></div><div class=\\"euiSpacer euiSpacer--l eui-p2o3x6-euiSpacer-l\\"></div><div class=\\"euiFlexGroup euiEmptyPrompt__actions eui-12cw070-euiFlexGroup-m-center-center-column\\"><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><a href=\\"/path/to/logout\\" rel=\\"noreferrer\\" class=\\"euiButton eui-8utmkn-euiButtonDisplay-m-defaultMinWidth-fill-primary\\" data-test-subj=\\"ResetSessionButton\\"><span class=\\"eui-1bascr2-euiButtonDisplayContent\\">Log in as different user</span></a></div><div class=\\"euiFlexItem eui-kpsrin-euiFlexItem-growZero\\"><button class=\\"euiButtonEmpty eui-9ywwuh-euiButtonDisplay-euiButtonEmpty-m-empty-primary\\" type=\\"button\\" id=\\"goBackButton\\"><span class=\\"euiButtonEmpty__content eui-1bascr2-euiButtonDisplayContent\\"><span class=\\"eui-textTruncate euiButtonEmpty__text\\">Go back</span></span></button></div></div></div></div></div></div></div></section></main></div></body></html>"`;

View file

@ -8,6 +8,7 @@
import moment from 'moment-timezone';
import React from 'react';
import { FormattedRelative } from '@kbn/i18n-react';
import type { EuiToolTipProps } from '@elastic/eui';
import { useDateFormat, useTimeZone, useUiSetting$ } from '../../lib/kibana';
import { getOrEmptyTagFromValue } from '../empty_value';
@ -98,16 +99,22 @@ interface FormattedDateProps {
fieldName: string;
value?: string | number | null;
dateFormat?: string;
tooltipProps?: Partial<EuiToolTipProps>;
}
export const FormattedDate = React.memo<FormattedDateProps>(
({ value, fieldName, className = '', dateFormat }): JSX.Element => {
({ value, fieldName, className = '', dateFormat, tooltipProps }): JSX.Element => {
if (value == null) {
return getOrEmptyTagFromValue(value);
}
const maybeDate = getMaybeDate(value);
return maybeDate.isValid() ? (
<LocalizedDateTooltip date={maybeDate.toDate()} fieldName={fieldName} className={className}>
<LocalizedDateTooltip
date={maybeDate.toDate()}
fieldName={fieldName}
className={className}
tooltipProps={tooltipProps}
>
<PreferenceFormattedDate value={maybeDate.toDate()} dateFormat={dateFormat} />
</LocalizedDateTooltip>
) : (

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiToolTip, type EuiToolTipProps } from '@elastic/eui';
import { FormattedRelative } from '@kbn/i18n-react';
import moment from 'moment';
import React from 'react';
@ -15,10 +15,12 @@ export const LocalizedDateTooltip = React.memo<{
date: Date;
fieldName?: string;
className?: string;
}>(({ children, date, fieldName, className = '' }) => (
tooltipProps?: Partial<EuiToolTipProps>;
}>(({ children, date, fieldName, className = '', tooltipProps }) => (
<EuiToolTip
data-test-subj="localized-date-tool-tip"
anchorClassName={className}
{...tooltipProps}
content={
<EuiFlexGroup data-test-subj="dates-container" direction="column" gutterSize="none">
{fieldName != null ? (

View file

@ -31,7 +31,7 @@ const CloseButton = styled(EuiButtonIcon)`
top: 4px;
`;
const ViewSelect = styled(EuiSuperSelect)`
const ViewSelect = styled(EuiSuperSelect<string>)`
width: 170px;
`;

View file

@ -299,7 +299,7 @@ export const useBulkActions = ({
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
icon: undefined,
},
{
@ -311,7 +311,7 @@ export const useBulkActions = ({
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
icon: undefined,
},
{
@ -337,7 +337,7 @@ export const useBulkActions = ({
toolTipContent: !hasActionsPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
icon: undefined,
},
{
@ -349,7 +349,7 @@ export const useBulkActions = ({
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
icon: undefined,
},
{
@ -361,7 +361,7 @@ export const useBulkActions = ({
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
icon: undefined,
},
{
@ -382,7 +382,7 @@ export const useBulkActions = ({
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
icon: undefined,
},
{
@ -397,7 +397,7 @@ export const useBulkActions = ({
'data-test-subj': 'deleteRuleBulk',
disabled: isDeleteDisabled,
onClick: handleDeleteAction,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
icon: undefined,
},
],
@ -415,7 +415,7 @@ export const useBulkActions = ({
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
},
{
key: i18n.BULK_ACTION_DELETE_TAGS,
@ -426,7 +426,7 @@ export const useBulkActions = ({
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
},
],
},
@ -443,7 +443,7 @@ export const useBulkActions = ({
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
},
{
key: i18n.BULK_ACTION_DELETE_INDEX_PATTERNS,
@ -454,7 +454,7 @@ export const useBulkActions = ({
toolTipContent: missingActionPrivileges
? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES
: undefined,
toolTipPosition: 'right',
toolTipProps: { position: 'right' },
},
],
},

View file

@ -71,15 +71,18 @@ const EuiDataGridContainer = styled.div<GridContainerProps>`
}};
}
}
div .euiDataGridRowCell__contentWrapper {
div .euiDataGridRowCell {
display: flex;
align-items: center;
}
div .euiDataGridRowCell__content {
div .euiDataGridRowCell > [data-focus-lock-disabled] {
display: flex;
align-items: center;
flex-grow: 1;
width: 100%;
}
div .euiDataGridRowCell--lastColumn .euiDataGridRowCell__content {
flex-grow: 0;
div .euiDataGridRowCell__content {
flex-grow: 1;
}
div .siemEventsTable__trSupplement--summary {
display: block;

View file

@ -144,7 +144,7 @@ export const PolicyArtifactsList = React.memo<PolicyArtifactsListProps>(
},
disabled: isGlobal,
toolTipContent: isGlobal ? labels.listRemoveActionNotAllowedMessage : undefined,
toolTipPosition: 'top' as const,
toolTipProps: { position: 'top' as const },
'data-test-subj': 'remove-from-policy-action',
};
return {

View file

@ -284,13 +284,13 @@ exports[`Field Renderers #whoisRenderer it renders correctly against snapshot 1`
>
iana.org
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -1118,13 +1118,13 @@ tr:hover .c2:focus::before {
>
9987
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -1957,13 +1957,13 @@ tr:hover .c2:focus::before {
>
80
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -2406,13 +2406,13 @@ tr:hover .c2:focus::before {
>
tls.fingerprints.ja3.hash-value
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -2504,13 +2504,13 @@ tr:hover .c2:focus::before {
>
tls.client_certificate.fingerprint.sha1-value
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -2602,13 +2602,13 @@ tr:hover .c2:focus::before {
>
tls.server_certificate.fingerprint.sha1-value
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -389,8 +389,11 @@ describe('StatefulOpenTimeline', () => {
/>
</TestProviders>
);
wrapper.find('[data-test-subj="euiCollapsedItemActionsButton"]').first().simulate('click');
wrapper.find('[data-test-subj="delete-timeline"]').first().simulate('click');
wrapper
.find('button[data-test-subj="euiCollapsedItemActionsButton"]')
.first()
.simulate('click');
wrapper.find('button[data-test-subj="delete-timeline"]').first().simulate('click');
wrapper.find('button[data-test-subj="confirmModalConfirmButton"]').first().simulate('click');
await waitFor(() => {
@ -666,16 +669,16 @@ describe('StatefulOpenTimeline', () => {
/>
</TestProviders>
);
wrapper.find('[data-test-subj="euiCollapsedItemActionsButton"]').first().simulate('click');
wrapper.find('[data-test-subj="open-duplicate"]').first().simulate('click');
await waitFor(() => {
wrapper.update();
wrapper
.find('button[data-test-subj="euiCollapsedItemActionsButton"]')
.first()
.simulate('click');
wrapper.find('button[data-test-subj="open-duplicate"]').first().simulate('click');
expect((queryTimelineById as jest.Mock).mock.calls[0][0].timelineId).toEqual(
mockOpenTimelineQueryResults.timeline[0].savedObjectId
);
expect((queryTimelineById as jest.Mock).mock.calls[0][0].duplicate).toEqual(true);
});
expect((queryTimelineById as jest.Mock).mock.calls[0][0].timelineId).toEqual(
mockOpenTimelineQueryResults.timeline[0].savedObjectId
);
expect((queryTimelineById as jest.Mock).mock.calls[0][0].duplicate).toEqual(true);
});
describe('Create rule from timeline', () => {

View file

@ -855,13 +855,13 @@ exports[`Details Panel Component DetailsPanel:NetworkDetails: rendering it shoul
>
iana.org
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -11,6 +11,7 @@ import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui';
import { isNumber, isEmpty } from 'lodash/fp';
import React from 'react';
import { css } from '@emotion/css';
import { SENTINEL_ONE_AGENT_ID_FIELD } from '../../../../../common/utils/sentinelone_alert_check';
import { SentinelOneAgentStatus } from '../../../../../detections/components/host_isolation/sentinel_one_agent_status';
@ -48,6 +49,13 @@ import { UserName } from './user_name';
// simple black-list to prevent dragging and dropping fields such as message name
const columnNamesNotDraggable = [MESSAGE_FIELD_NAME];
// Offset top-aligned tooltips so that cell actions are more visible
const dataGridToolTipOffset = css`
&[data-position='top'] {
margin-block-start: -8px;
}
`;
const FormattedFieldValueComponent: React.FC<{
asPlainText?: boolean;
/** `Component` is only used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality */
@ -109,6 +117,14 @@ const FormattedFieldValueComponent: React.FC<{
return <>{value}</>;
} else if (fieldType === DATE_FIELD_TYPE) {
const classNames = truncate ? 'eui-textTruncate eui-alignMiddle' : undefined;
const date = (
<FormattedDate
className={classNames}
fieldName={fieldName}
value={value}
tooltipProps={{ position: 'bottom', className: dataGridToolTipOffset }}
/>
);
return isDraggable ? (
<DefaultDraggable
field={fieldName}
@ -119,10 +135,10 @@ const FormattedFieldValueComponent: React.FC<{
tooltipContent={null}
value={`${value}`}
>
<FormattedDate className={classNames} fieldName={fieldName} value={value} />
{date}
</DefaultDraggable>
) : (
<FormattedDate className={classNames} fieldName={fieldName} value={value} />
date
);
} else if (PORT_NAMES.some((portName) => fieldName === portName)) {
return (
@ -274,6 +290,8 @@ const FormattedFieldValueComponent: React.FC<{
<TruncatableText data-test-subj="truncatable-message">
<EuiToolTip
data-test-subj="message-tool-tip"
position="bottom"
className={dataGridToolTipOffset}
content={
<EuiFlexGroup direction="column" gutterSize="none">
<EuiFlexItem grow={false}>

View file

@ -1309,13 +1309,13 @@ tr:hover .c4:focus::before {
>
9987
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -2309,13 +2309,13 @@ tr:hover .c4:focus::before {
>
80
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -2827,13 +2827,13 @@ tr:hover .c4:focus::before {
>
tls.fingerprints.ja3.hash-value
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -2935,13 +2935,13 @@ tr:hover .c4:focus::before {
>
tls.client_certificate.fingerprint.sha1-value
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
@ -3043,13 +3043,13 @@ tr:hover .c4:focus::before {
>
tls.server_certificate.fingerprint.sha1-value
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -55,19 +55,17 @@ export const ConnectorsCallout = () => {
</p>
<EuiFlexGroup alignItems="center" gutterSize="m">
<EuiFlexItem grow={false}>
<p>
<EuiButton
color="primary"
fill
data-test-subj="connectors-callout-cta"
onClick={() => createConnector()}
isLoading={isLoading}
>
{i18n.translate('xpack.serverlessSearch.selectClient.connectorsCallout.cta', {
defaultMessage: 'Create a connector',
})}
</EuiButton>
</p>
<EuiButton
color="primary"
fill
data-test-subj="connectors-callout-cta"
onClick={() => createConnector()}
isLoading={isLoading}
>
{i18n.translate('xpack.serverlessSearch.selectClient.connectorsCallout.cta', {
defaultMessage: 'Create a connector',
})}
</EuiButton>
</EuiFlexItem>
<EuiFlexItem />
{showConnectors &&
@ -85,14 +83,12 @@ export const ConnectorsCallout = () => {
))}
{showConnectors && (
<EuiFlexItem grow={false}>
<p>
<EuiText color="subdued" size="s">
<FormattedMessage
id="xpack.serverlessSearch.selectClient.connectorsCallout.etc"
defaultMessage="and more"
/>
</EuiText>
</p>
<EuiText color="subdued" size="s">
<FormattedMessage
id="xpack.serverlessSearch.selectClient.connectorsCallout.etc"
defaultMessage="and more"
/>
</EuiText>
</EuiFlexItem>
)}
</EuiFlexGroup>

View file

@ -564,9 +564,6 @@
"core.euiCodeBlockAnnotations.ariaLabel": "Cliquez pour afficher une annotation de code pour la ligne {lineNumber}",
"core.euiColorPickerSwatch.ariaLabel": "Sélectionner {color} comme couleur",
"core.euiColumnActions.sort": "Trier {schemaLabel}",
"core.euiColumnSelector.buttonActivePlural": "{numberOfHiddenFields} colonnes masquées",
"core.euiColumnSelector.buttonActiveSingular": "{numberOfHiddenFields} colonne masquée",
"core.euiColumnSorting.buttonActive": "{numberOfSortedFields, plural, one {Champ #} many {# champs} other {# champs triés}}",
"core.euiColumnSortingDraggable.activeSortLabel": "{display} trie cette grille de données",
"core.euiColumnSortingDraggable.removeSortLabel": "Retirer {display} du tri de la grille de données",
"core.euiColumnSortingDraggable.toggleLegend": "Sélectionner la méthode de tri pour {display}",
@ -819,8 +816,6 @@
"core.euiKeyboardShortcuts.title": "Raccourcis clavier",
"core.euiKeyboardShortcuts.upArrowDescription": "Aller une cellule vers le haut",
"core.euiKeyboardShortcuts.upArrowTitle": "Flèche vers le haut",
"core.euiLink.external.ariaLabel": "Lien externe",
"core.euiLink.newTarget.screenReaderOnlyText": "(souvre dans un nouvel onglet ou une nouvelle fenêtre)",
"core.euiLoadingChart.ariaLabel": "Chargement",
"core.euiLoadingStrings.ariaLabel": "Chargement",
"core.euiMark.highlightEnd": "mettre la fin en surbrillance",

View file

@ -564,9 +564,6 @@
"core.euiCodeBlockAnnotations.ariaLabel": "クリックすると、行番号{lineNumber}のコード注釈が表示されます",
"core.euiColorPickerSwatch.ariaLabel": "{color}を色として選択します",
"core.euiColumnActions.sort": "{schemaLabel}の並べ替え",
"core.euiColumnSelector.buttonActivePlural": "{numberOfHiddenFields}列が非表示です",
"core.euiColumnSelector.buttonActiveSingular": "{numberOfHiddenFields}列が非表示です",
"core.euiColumnSorting.buttonActive": "{numberOfSortedFields, plural, other {#個のフィールド}}が並べ替えられました",
"core.euiColumnSortingDraggable.activeSortLabel": "{display}はこのデータグリッドを並べ替えています",
"core.euiColumnSortingDraggable.removeSortLabel": "データグリッドの並べ替えから{display}を削除",
"core.euiColumnSortingDraggable.toggleLegend": "{display}の並べ替え方法を選択",
@ -833,8 +830,6 @@
"core.euiKeyboardShortcuts.title": "キーボードショートカット",
"core.euiKeyboardShortcuts.upArrowDescription": "セルを1つ上に移動",
"core.euiKeyboardShortcuts.upArrowTitle": "上向き矢印",
"core.euiLink.external.ariaLabel": "外部リンク",
"core.euiLink.newTarget.screenReaderOnlyText": "(新しいタブまたはウィンドウで開く)",
"core.euiLoadingChart.ariaLabel": "読み込み中",
"core.euiLoadingStrings.ariaLabel": "読み込み中",
"core.euiMark.highlightEnd": "ハイライト終了",

View file

@ -564,9 +564,6 @@
"core.euiCodeBlockAnnotations.ariaLabel": "单击以查看行 {lineNumber} 的代码注释",
"core.euiColorPickerSwatch.ariaLabel": "将 {color} 选为颜色",
"core.euiColumnActions.sort": "排序 {schemaLabel}",
"core.euiColumnSelector.buttonActivePlural": "{numberOfHiddenFields} 列已隐藏",
"core.euiColumnSelector.buttonActiveSingular": "{numberOfHiddenFields} 列已隐藏",
"core.euiColumnSorting.buttonActive": "{numberOfSortedFields, plural, other {# 个字段}}已排序",
"core.euiColumnSortingDraggable.activeSortLabel": "{display} 正在排序此数据网格",
"core.euiColumnSortingDraggable.removeSortLabel": "从数据网格排序中移除 {display}",
"core.euiColumnSortingDraggable.toggleLegend": "为 {display} 选择排序方法",
@ -833,8 +830,6 @@
"core.euiKeyboardShortcuts.title": "快捷键",
"core.euiKeyboardShortcuts.upArrowDescription": "上移一个单元格",
"core.euiKeyboardShortcuts.upArrowTitle": "向上箭头键",
"core.euiLink.external.ariaLabel": "外部链接",
"core.euiLink.newTarget.screenReaderOnlyText": "(在新选项卡或窗口中打开)",
"core.euiLoadingChart.ariaLabel": "正在加载",
"core.euiLoadingStrings.ariaLabel": "正在加载",
"core.euiMark.highlightEnd": "高亮显示结尾",

View file

@ -108,8 +108,8 @@ describe('useRulesListColumnSelector', () => {
{ field: 'schedule.interval', name: 'Interval' },
]);
const { getByText } = render(<>{ColumnSelector}</>);
expect(getByText('1 column hidden')).toBeInTheDocument();
const { getByLabelText } = render(<>{ColumnSelector}</>);
expect(getByLabelText('- Active: 5 out of 6')).toBeInTheDocument();
});
it('Lets hide last lastExecutionDate, Interval and duration columns', () => {
@ -127,7 +127,7 @@ describe('useRulesListColumnSelector', () => {
{ field: 'notify', name: 'Html Notify' },
]);
const { getByText } = render(<>{ColumnSelector}</>);
expect(getByText('3 columns hidden')).toBeInTheDocument();
const { getByLabelText } = render(<>{ColumnSelector}</>);
expect(getByLabelText('- Active: 3 out of 6')).toBeInTheDocument();
});
});

View file

@ -178,13 +178,13 @@ exports[`PingListExpandedRow renders link to docs if body is not recorded but it
>
docs
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -65,13 +65,13 @@ Array [
>
Set tags
<span
class="emotion-euiLink__externalIcon"
class="emotion-EuiExternalLinkIcon"
data-euiicon-type="popout"
>
External link
</span>
<span
class="emotion-euiScreenReaderOnly-euiLink__screenReaderText"
class="emotion-euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>

View file

@ -211,7 +211,7 @@ export default function ({ getService }: FtrProviderContext) {
await transform.table.assertTransformRowActionMissing(transformId, 'Reauthorize');
} else {
await transform.testExecution.logTestStep('should show disabled action menu button');
await transform.table.assertTransformRowActionsButtonEnabled(transformId, false);
await transform.table.assertTransformRowActionsEnabled(transformId, false);
}
await transform.table.clearSearchString(testDataList.length);
});

View file

@ -271,7 +271,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
legend: '7 categories',
colorStats: [
{ color: '#000000', percentage: 20 },
{ color: '#54B399', percentage: 75 },
{ color: '#54B399', percentage: 80 },
],
},
{

View file

@ -97,10 +97,7 @@ export default function ({ getService }: FtrProviderContext) {
await transform.table.filterWithSearchString(transformConfigWithPivot.id, 1);
await transform.testExecution.logTestStep('should show the actions popover');
await transform.table.assertTransformRowActionsButtonEnabled(
transformConfigWithPivot.id,
true
);
await transform.table.assertTransformRowActionsEnabled(transformConfigWithPivot.id, true);
await transform.table.assertTransformRowActions(transformConfigWithPivot.id, false);
await transform.testExecution.logTestStep('should have the edit action enabled');

View file

@ -97,10 +97,7 @@ export default function ({ getService }: FtrProviderContext) {
await transform.table.filterWithSearchString(transformConfigWithPivot.id, 1);
await transform.testExecution.logTestStep('should display a disabled actions popover');
await transform.table.assertTransformRowActionsButtonEnabled(
transformConfigWithPivot.id,
false
);
await transform.table.assertTransformRowActionsEnabled(transformConfigWithPivot.id, false);
await transform.testExecution.logTestStep('should show content in the expanded table row');
await transform.table.assertTransformExpandedRow();

View file

@ -1187,6 +1187,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
async changeTableSortingBy(colIndex = 0, direction: 'none' | 'ascending' | 'descending') {
const el = await this.getDatatableHeader(colIndex);
await el.moveMouseTo({ xOffset: 0, yOffset: -20 }); // Prevent the first data row's cell actions from overlapping/intercepting the header click
await el.click();
let buttonEl;
if (direction !== 'none') {

View file

@ -428,6 +428,16 @@ export class TagManagementPageObject extends FtrService {
await checkbox.click();
}
/**
* Select all checkboxes
*/
async selectAllTagRows() {
const checkbox = await this.testSubjects.find(
'tagsManagementTable table-is-ready > checkboxSelectAll'
);
await checkbox.click();
}
/**
* Returns true if the tag bulk action menu is displayed, false otherwise.
*/

View file

@ -6,6 +6,7 @@
*/
import expect from '@kbn/expect';
import { asyncForEach } from '@kbn/std';
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
@ -426,19 +427,23 @@ export function TransformTableProvider({ getPageObject, getService }: FtrProvide
});
}
public async assertTransformRowActionsButtonEnabled(
transformId: string,
expectedValue: boolean
) {
const isEnabled = await testSubjects.isEnabled(
this.rowSelector(transformId, 'euiCollapsedItemActionsButton')
);
expect(isEnabled).to.eql(
expectedValue,
`Expected transform row actions button to be '${
expectedValue ? 'enabled' : 'disabled'
}' (got '${isEnabled ? 'enabled' : 'disabled'}')`
public async assertTransformRowActionsEnabled(transformId: string, expectedValue: boolean) {
await this.ensureTransformActionsMenuOpen(transformId);
// Check whether all menu actions are disabled
let allDisabled = true;
const actions = await find.allByCssSelector('.euiBasicTable__collapsedAction');
await asyncForEach(actions, async (action) => {
if (await action.isEnabled()) {
allDisabled = false;
}
});
expect(allDisabled).to.eql(
!expectedValue,
`Expected all transform row actions to '${expectedValue ? 'not' : ''}' be disabled.`
);
await this.ensureTransformActionsMenuClosed();
}
public async assertTransformRowActions(transformId: string, isTransformRunning = false) {

View file

@ -340,7 +340,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
const link = await testSubjects.find('case-table-column-external');
const upToDate = await testSubjects.find('case-table-column-external-upToDate');
expect(await link.getVisibleText()).equal('ROC-526\n(opens in a new tab or window)');
expect(await link.getVisibleText()).equal('ROC-526');
expect(await upToDate.getVisibleText()).equal('is up to date');
});

View file

@ -43,6 +43,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
}
};
const unselectTags = async () => {
if (await tagManagementPage.isSelectionColumnDisplayed()) {
await tagManagementPage.selectAllTagRows();
await tagManagementPage.selectAllTagRows();
}
};
const addFeatureControlSuite = ({ user, description, privileges }: FeatureControlUserSuite) => {
const testPrefix = (allowed: boolean) => (allowed ? `can` : `can't`);
@ -69,6 +76,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`${testPrefix(privileges.delete)} bulk delete tags`, async () => {
await selectSomeTags();
expect(await tagManagementPage.isBulkActionPresent('delete')).to.be(privileges.delete);
await unselectTags();
});
it(`${testPrefix(privileges.create)} create tag`, async () => {

View file

@ -1740,10 +1740,10 @@
resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314"
integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ==
"@elastic/eui@91.0.0-backport.0":
version "91.0.0-backport.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-91.0.0-backport.0.tgz#821306a580cc8fcf1a142106e425f3fcd1bebfbf"
integrity sha512-2T+8JiPs1Ejh2T8l7cwqv/IIlNV6I9RbXtJ60L9U4lJGtS/R8zIoikrR/2SEs8bXwyXXg4i/trhfbYbylAvZpw==
"@elastic/eui@91.3.1":
version "91.3.1"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-91.3.1.tgz#2289b1683f0409c043150c39f5fb7233aa7beb16"
integrity sha512-zxnhBaAsykmDqjbZ3i++CFTyv2dKZSe3UUZKSgYj5MaMnbE86uzeWGjhp3gh1b+LxJZP2672MbNZ6qxVOh1vcQ==
dependencies:
"@hello-pangea/dnd" "^16.3.0"
"@types/lodash" "^4.14.198"