Skip to content

Commit

Permalink
Merge branch 'main' into siem-explore-137436
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 3, 2022
2 parents dae05df + a8d54b3 commit e7b40ab
Show file tree
Hide file tree
Showing 38 changed files with 597 additions and 290 deletions.
3 changes: 3 additions & 0 deletions docs/user/security/audit-logging.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ Possible values:
| *Field*
| *Description*

| `user.id`
| Unique identifier of the user across sessions (See {ref}/user-profile.html[user profiles]).

| `user.name`
| Login name of the user.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,13 @@ class FilterEditorUI extends Component<FilterEditorProps, State> {
</div>

<EuiPopoverFooter paddingSize="s">
<EuiFlexGroup direction="rowReverse" alignItems="center" responsive={false}>
{/* Adding isolation here fixes this bug https://github.com/elastic/kibana/issues/142211 */}
<EuiFlexGroup
direction="rowReverse"
alignItems="center"
style={{ isolation: 'isolate' }}
responsive={false}
>
<EuiFlexItem grow={false}>
<EuiButton
fill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ interface FieldSelectProps {
fullWidth?: boolean;
}

const getPreselectedFields = (
const getPlaceholderValue = (
placeholder?: string,
options?: Array<EuiComboBoxOptionOption<string>>
) => placeholder && findInGroupedOptions(options, placeholder)?.label;
) => {
if (!placeholder) {
return;
}
return findInGroupedOptions(options, placeholder)?.label || placeholder;
};

export function FieldSelect({
label,
Expand Down Expand Up @@ -138,7 +143,7 @@ export function FieldSelect({
onNewItemAdd={onNewItemAdd.bind(undefined, props.index)}
onDeleteItem={onDeleteItem.bind(undefined, props.index)}
onChange={onFieldSelectItemChange.bind(undefined, props.index)}
placeholder={getPreselectedFields(placeholder, groupedOptions)}
placeholder={getPlaceholderValue(placeholder, groupedOptions)}
disableAdd={!allowMultiSelect || selectedIds?.length >= MAX_MULTI_FIELDS_ITEMS}
disableDelete={!allowMultiSelect || selectedIds?.length <= 1}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const AnnotationRow = ({
label={
<FormattedMessage
id="visTypeTimeseries.annotationsEditor.timeFieldLabel"
defaultMessage="Time field (required)"
defaultMessage="Time field"
/>
}
restrict={RESTRICT_FIELDS}
Expand All @@ -165,6 +165,10 @@ export const AnnotationRow = ({
})
}
indexPattern={model.index_pattern}
placeholder={
fetchedIndex?.indexPattern?.timeFieldName ??
fetchedIndex?.defaultIndex?.timeFieldName
}
fields={fields}
/>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import React from 'react';
import { EuiPageContentBody_Deprecated as EuiPageContentBody, EuiText } from '@elastic/eui';
import { EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
import { UiActionsStart, VISUALIZE_GEO_FIELD_TRIGGER } from '@kbn/ui-actions-plugin/public';
Expand Down Expand Up @@ -45,7 +45,7 @@ export function GeoFieldWorkspacePanel(props: Props) {
}

return (
<EuiPageContentBody className="lnsWorkspacePanelWrapper__pageContentBody">
<div className="lnsWorkspacePanelWrapper__pageContentBody">
<EuiText className="lnsWorkspacePanel__emptyContent" textAlign="center" size="s">
<div>
<h2>
Expand All @@ -72,6 +72,6 @@ export function GeoFieldWorkspacePanel(props: Props) {
</DragDrop>
</div>
</EuiText>
</EuiPageContentBody>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
EuiText,
EuiButtonEmpty,
EuiLink,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiButton,
EuiSpacer,
EuiTextColor,
Expand Down Expand Up @@ -618,9 +617,7 @@ export const InnerWorkspacePanel = React.memo(function InnerWorkspacePanel({
value={dropProps.value}
order={dropProps.order}
>
<EuiPageContentBody className="lnsWorkspacePanelWrapper__pageContentBody">
{renderWorkspaceContents()}
</EuiPageContentBody>
<div className="lnsWorkspacePanelWrapper__pageContentBody">{renderWorkspaceContents()}</div>
</DragDrop>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import './workspace_panel_wrapper.scss';

import React, { useCallback } from 'react';
import {
EuiPageContent_Deprecated as EuiPageContent,
EuiPageSection,
EuiPageTemplate,
EuiFlexGroup,
EuiFlexItem,
EuiButton,
Expand Down Expand Up @@ -117,92 +118,93 @@ export function WorkspacePanelWrapper({
warningMessages.push(...requestWarnings);
}
return (
<>
<EuiPageTemplate direction="row" grow={true} offset={0} minHeight={0} responsive={[]}>
{!(isFullscreen && (autoApplyEnabled || warningMessages?.length)) && (
<EuiFlexGroup
alignItems="flexEnd"
gutterSize="s"
direction="row"
className={classNames('lnsWorkspacePanelWrapper__toolbar', {
'lnsWorkspacePanelWrapper__toolbar--fullscreen': isFullscreen,
})}
responsive={false}
>
{!isFullscreen && (
<EuiFlexItem>
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false} wrap={true}>
<EuiFlexItem grow={false}>
<ChartSwitch
data-test-subj="lnsChartSwitcher"
visualizationMap={visualizationMap}
datasourceMap={datasourceMap}
framePublicAPI={framePublicAPI}
/>
</EuiFlexItem>

{activeVisualization && activeVisualization.renderToolbar && (
<EuiPageSection grow={false} paddingSize="none" color="transparent">
<EuiFlexGroup
alignItems="flexEnd"
gutterSize="s"
direction="row"
className={classNames('lnsWorkspacePanelWrapper__toolbar', {
'lnsWorkspacePanelWrapper__toolbar--fullscreen': isFullscreen,
})}
responsive={false}
>
{!isFullscreen && (
<EuiFlexItem>
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false} wrap={true}>
<EuiFlexItem grow={false}>
<NativeRenderer
render={activeVisualization.renderToolbar}
nativeProps={{
frame: framePublicAPI,
state: visualizationState,
setState: setVisualizationState,
}}
<ChartSwitch
data-test-subj="lnsChartSwitcher"
visualizationMap={visualizationMap}
datasourceMap={datasourceMap}
framePublicAPI={framePublicAPI}
/>
</EuiFlexItem>

{activeVisualization && activeVisualization.renderToolbar && (
<EuiFlexItem grow={false}>
<NativeRenderer
render={activeVisualization.renderToolbar}
nativeProps={{
frame: framePublicAPI,
state: visualizationState,
setState: setVisualizationState,
}}
/>
</EuiFlexItem>
)}
</EuiFlexGroup>
</EuiFlexItem>
)}

<EuiFlexItem grow={false}>
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false}>
{warningMessages?.length ? (
<EuiFlexItem grow={false}>
<WarningsPopover>{warningMessages}</WarningsPopover>
</EuiFlexItem>
) : null}

{!autoApplyEnabled && (
<EuiFlexItem grow={false}>
<EuiButton
disabled={autoApplyEnabled || changesApplied}
fill
className={
'lnsWorkspacePanelWrapper__applyButton ' +
DONT_CLOSE_DIMENSION_CONTAINER_ON_CLICK_CLASS
}
iconType="checkInCircleFilled"
onClick={() => dispatchLens(applyChanges())}
size="m"
data-test-subj="lnsApplyChanges__toolbar"
minWidth="auto"
>
<FormattedMessage
id="xpack.lens.editorFrame.applyChangesLabel"
defaultMessage="Apply changes"
/>
</EuiButton>
</EuiFlexItem>
)}
</EuiFlexGroup>
</EuiFlexItem>
)}

<EuiFlexItem grow={false}>
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false}>
{warningMessages?.length ? (
<EuiFlexItem grow={false}>
<WarningsPopover>{warningMessages}</WarningsPopover>
</EuiFlexItem>
) : null}

{!autoApplyEnabled && (
<EuiFlexItem grow={false}>
<EuiButton
disabled={autoApplyEnabled || changesApplied}
fill
className={
'lnsWorkspacePanelWrapper__applyButton ' +
DONT_CLOSE_DIMENSION_CONTAINER_ON_CLICK_CLASS
}
iconType="checkInCircleFilled"
onClick={() => dispatchLens(applyChanges())}
size="m"
data-test-subj="lnsApplyChanges__toolbar"
minWidth="auto"
>
<FormattedMessage
id="xpack.lens.editorFrame.applyChangesLabel"
defaultMessage="Apply changes"
/>
</EuiButton>
</EuiFlexItem>
)}
</EuiFlexGroup>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexGroup>
</EuiPageSection>
)}

<EuiPageContent
className={classNames('lnsWorkspacePanelWrapper', {
'lnsWorkspacePanelWrapper--fullscreen': isFullscreen,
})}
color="transparent"
hasBorder={false}
hasShadow={false}
<EuiPageSection
grow={true}
paddingSize="none"
contentProps={{
className: classNames('lnsWorkspacePanelWrapper', {
'lnsWorkspacePanelWrapper--fullscreen': isFullscreen,
}),
}}
>
<WorkspaceTitle />
{children}
</EuiPageContent>
</>
</EuiPageSection>
</EuiPageTemplate>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@
* 2.0.
*/
import React, { FC } from 'react';
import { EuiBadge, EuiIcon, EuiInMemoryTable, EuiToolTip } from '@elastic/eui';
import {
EuiBadge,
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiInMemoryTable,
EuiToolTip,
useEuiTheme,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import { EuiBasicTableColumn } from '@elastic/eui/src/components/basic_table/basic_table';
import { FIELD_FORMAT_IDS } from '@kbn/field-formats-plugin/common';
import type {
Expand All @@ -27,6 +36,7 @@ export const AllocatedModels: FC<AllocatedModelsProps> = ({
const bytesFormatter = useFieldFormatter(FIELD_FORMAT_IDS.BYTES);
const dateFormatter = useFieldFormatter(FIELD_FORMAT_IDS.DATE);
const durationFormatter = useFieldFormatter(FIELD_FORMAT_IDS.DURATION);
const euiTheme = useEuiTheme();

const columns: Array<EuiBasicTableColumn<AllocatedModel>> = [
{
Expand Down Expand Up @@ -97,11 +107,36 @@ export const AllocatedModels: FC<AllocatedModelsProps> = ({
'data-test-subj': 'mlAllocatedModelsTableThroughput',
},
{
name: i18n.translate(
'xpack.ml.trainedModels.nodesList.modelsList.modelAvgInferenceTimeHeader',
{
defaultMessage: 'Avg inference time',
}
name: (
<EuiToolTip
display={'block'}
title={
<FormattedMessage
id="xpack.ml.trainedModels.nodesList.modelsList.modelAvgInferenceTimeTooltipHeader"
defaultMessage="Average inference time"
/>
}
content={
<FormattedMessage
id="xpack.ml.trainedModels.nodesList.modelsList.modelAvgInferenceTimeTooltipMessage"
defaultMessage="If caching is enabled, fast cache hits are included when calculating the average inference time."
/>
}
>
<EuiFlexGroup gutterSize={'xs'}>
<EuiFlexItem grow={false} css={{ minWidth: 0 }}>
<span css={{ overflow: 'hidden', textOverflow: 'ellipsis' }}>
<FormattedMessage
id="xpack.ml.trainedModels.nodesList.modelsList.modelAvgInferenceTimeHeader"
defaultMessage="Avg inference time"
/>
</span>
</EuiFlexItem>
<EuiFlexItem grow={false} css={{ minWidth: euiTheme.euiTheme.size.m }}>
<EuiIcon size="s" color="subdued" type="questionInCircle" className="eui-alignTop" />
</EuiFlexItem>
</EuiFlexGroup>
</EuiToolTip>
),
width: '100px',
truncateText: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export function SeriesActions({ seriesId, series, seriesConfig, onEditClick }: P
aria-label={EDIT_SERIES_LABEL}
size="s"
onClick={onEditClick}
data-test-subj={`editSeries${seriesId}`}
/>
</EuiToolTip>
</EuiFlexItem>
Expand Down
Loading

0 comments on commit e7b40ab

Please sign in to comment.