Skip to content

Commit

Permalink
Merge branch '7.15' into backport/7.15/pr-110345
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Aug 28, 2021
2 parents a87c47b + 1cd0d6f commit 7eb1b99
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ UI_SETTINGS: {
readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: "timepicker:refreshIntervalDefaults";
readonly TIMEPICKER_QUICK_RANGES: "timepicker:quickRanges";
readonly TIMEPICKER_TIME_DEFAULTS: "timepicker:timeDefaults";
readonly INDEXPATTERN_PLACEHOLDER: "indexPattern:placeholder";
readonly FILTERS_PINNED_BY_DEFAULT: "filters:pinnedByDefault";
readonly FILTERS_EDITOR_SUGGEST_VALUES: "filterEditor:suggestValues";
readonly AUTOCOMPLETE_USE_TIMERANGE: "autocomplete:useTimeRange";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ UI_SETTINGS: {
readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: "timepicker:refreshIntervalDefaults";
readonly TIMEPICKER_QUICK_RANGES: "timepicker:quickRanges";
readonly TIMEPICKER_TIME_DEFAULTS: "timepicker:timeDefaults";
readonly INDEXPATTERN_PLACEHOLDER: "indexPattern:placeholder";
readonly FILTERS_PINNED_BY_DEFAULT: "filters:pinnedByDefault";
readonly FILTERS_EDITOR_SUGGEST_VALUES: "filterEditor:suggestValues";
readonly AUTOCOMPLETE_USE_TIMERANGE: "autocomplete:useTimeRange";
Expand Down
1 change: 0 additions & 1 deletion src/plugins/data/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const UI_SETTINGS = {
TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: 'timepicker:refreshIntervalDefaults',
TIMEPICKER_QUICK_RANGES: 'timepicker:quickRanges',
TIMEPICKER_TIME_DEFAULTS: 'timepicker:timeDefaults',
INDEXPATTERN_PLACEHOLDER: 'indexPattern:placeholder',
FILTERS_PINNED_BY_DEFAULT: 'filters:pinnedByDefault',
FILTERS_EDITOR_SUGGEST_VALUES: 'filterEditor:suggestValues',
AUTOCOMPLETE_USE_TIMERANGE: 'autocomplete:useTimeRange',
Expand Down
1 change: 0 additions & 1 deletion src/plugins/data/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,6 @@ export const UI_SETTINGS: {
readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: "timepicker:refreshIntervalDefaults";
readonly TIMEPICKER_QUICK_RANGES: "timepicker:quickRanges";
readonly TIMEPICKER_TIME_DEFAULTS: "timepicker:timeDefaults";
readonly INDEXPATTERN_PLACEHOLDER: "indexPattern:placeholder";
readonly FILTERS_PINNED_BY_DEFAULT: "filters:pinnedByDefault";
readonly FILTERS_EDITOR_SUGGEST_VALUES: "filterEditor:suggestValues";
readonly AUTOCOMPLETE_USE_TIMERANGE: "autocomplete:useTimeRange";
Expand Down
1 change: 0 additions & 1 deletion src/plugins/data/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,6 @@ export const UI_SETTINGS: {
readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: "timepicker:refreshIntervalDefaults";
readonly TIMEPICKER_QUICK_RANGES: "timepicker:quickRanges";
readonly TIMEPICKER_TIME_DEFAULTS: "timepicker:timeDefaults";
readonly INDEXPATTERN_PLACEHOLDER: "indexPattern:placeholder";
readonly FILTERS_PINNED_BY_DEFAULT: "filters:pinnedByDefault";
readonly FILTERS_EDITOR_SUGGEST_VALUES: "filterEditor:suggestValues";
readonly AUTOCOMPLETE_USE_TIMERANGE: "autocomplete:useTimeRange";
Expand Down
11 changes: 0 additions & 11 deletions src/plugins/data/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,17 +473,6 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
})
),
},
[UI_SETTINGS.INDEXPATTERN_PLACEHOLDER]: {
name: i18n.translate('data.advancedSettings.indexPatternPlaceholderTitle', {
defaultMessage: 'Index pattern placeholder',
}),
value: '',
description: i18n.translate('data.advancedSettings.indexPatternPlaceholderText', {
defaultMessage:
'The placeholder for the "Index pattern name" field in "Management > Index Patterns > Create Index Pattern".',
}),
schema: schema.string(),
},
[UI_SETTINGS.FILTERS_PINNED_BY_DEFAULT]: {
name: i18n.translate('data.advancedSettings.pinFiltersTitle', {
defaultMessage: 'Pin filters by default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
EuiIcon,
EuiBadge,
EuiButtonIcon,
EuiOutsideClickDetector,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -100,9 +99,6 @@ export function SelectableUrlList({
onTermChange();
onApply();
setPopoverIsOpen(false);
if (searchRef) {
searchRef.blur();
}
}
};

Expand All @@ -120,15 +116,11 @@ export function SelectableUrlList({

const closePopover = () => {
setPopoverIsOpen(false);
if (searchRef) {
searchRef.blur();
}
};

// @ts-ignore - not sure, why it's not working
useEvent('keydown', onEnterKey, searchRef);
useEvent('escape', () => setPopoverIsOpen(false), searchRef);
useEvent('blur', () => setPopoverIsOpen(false), searchRef);

useEffect(() => {
if (searchRef && initialValue) {
Expand Down Expand Up @@ -207,65 +199,63 @@ export function SelectableUrlList({
allowExclusions={true}
>
{(list, search) => (
<EuiOutsideClickDetector onOutsideClick={() => closePopover()}>
<EuiPopover
panelPaddingSize="none"
isOpen={popoverIsOpen}
display={'block'}
button={search}
closePopover={closePopover}
style={{ minWidth: 400 }}
anchorPosition="downLeft"
ownFocus={false}
<EuiPopover
panelPaddingSize="none"
isOpen={popoverIsOpen}
display={'block'}
button={search}
closePopover={closePopover}
style={{ minWidth: 400 }}
anchorPosition="downLeft"
ownFocus={false}
>
<div
style={{
width: searchRef?.getBoundingClientRect().width ?? 600,
maxWidth: '100%',
}}
>
<div
style={{
width: searchRef?.getBoundingClientRect().width ?? 600,
maxWidth: '100%',
}}
>
<PopOverTitle />
{searchValue && (
<StyledRow darkMode={darkMode}>
<EuiText size="s">
<FormattedMessage
id="xpack.apm.ux.url.hitEnter.include"
defaultMessage="Hit {icon} or click apply to include all urls matching {searchValue}"
values={{
searchValue: <strong>{searchValue}</strong>,
icon: (
<EuiBadge color="hollow">
Enter <EuiIcon type="returnKey" />
</EuiBadge>
),
}}
/>
</EuiText>
</StyledRow>
)}
{list}
<EuiPopoverFooter paddingSize="s">
<EuiFlexGroup style={{ justifyContent: 'flex-end' }}>
<EuiFlexItem grow={false}>
<EuiButton
fill
size="s"
onClick={() => {
onTermChange();
onApply();
closePopover();
}}
>
{i18n.translate('xpack.apm.apply.label', {
defaultMessage: 'Apply',
})}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPopoverFooter>
</div>
</EuiPopover>
</EuiOutsideClickDetector>
<PopOverTitle />
{searchValue && (
<StyledRow darkMode={darkMode}>
<EuiText size="s">
<FormattedMessage
id="xpack.apm.ux.url.hitEnter.include"
defaultMessage="Hit {icon} or click apply to include all urls matching {searchValue}"
values={{
searchValue: <strong>{searchValue}</strong>,
icon: (
<EuiBadge color="hollow">
Enter <EuiIcon type="returnKey" />
</EuiBadge>
),
}}
/>
</EuiText>
</StyledRow>
)}
{list}
<EuiPopoverFooter paddingSize="s">
<EuiFlexGroup style={{ justifyContent: 'flex-end' }}>
<EuiFlexItem grow={false}>
<EuiButton
fill
size="s"
onClick={() => {
onTermChange();
onApply();
closePopover();
}}
>
{i18n.translate('xpack.apm.apply.label', {
defaultMessage: 'Apply',
})}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPopoverFooter>
</div>
</EuiPopover>
)}
</EuiSelectable>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ class ImageUpload extends React.Component {
onValueChange: PropTypes.func.isRequired,
typeInstance: PropTypes.object.isRequired,
resolvedArgValue: PropTypes.string,
argValue: PropTypes.string,
assets: PropTypes.object.isRequired,
};

constructor(props) {
super(props);

const url = props.resolvedArgValue || null;
const url = props.resolvedArgValue || props.argValue || null;

let urlType = Object.keys(props.assets).length ? 'asset' : 'file';
// if not a valid base64 string, will show as missing asset icon
Expand Down Expand Up @@ -143,7 +143,7 @@ class ImageUpload extends React.Component {
file: <FileForm loading={loading} onChange={this.handleUpload} />,
link: (
<LinkForm
url={url}
url={selectedAsset.id ? '' : url}
inputRef={(ref) => (this.inputRefs.srcUrlText = ref)}
onSubmit={this.setSrcUrl}
/>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
.euiDataGridRowCell--boolean {
text-transform: none;
}

// Override to align the sorting arrow at the bottom when histogram charts are enabled
.euiDataGridHeaderCell .euiDataGridHeaderCell__sortingArrow {
margin-top: auto;
margin-bottom: 0;
}
}
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,6 @@
"data.advancedSettings.histogram.maxBarsTitle": "バケットの最大数",
"data.advancedSettings.historyLimitText": "履歴があるフィールド (例:クエリインプット) に個の数の最近の値が表示されます",
"data.advancedSettings.historyLimitTitle": "履歴制限数",
"data.advancedSettings.indexPatternPlaceholderText": "「管理 > インデックスパターン > インデックスパターンを作成」で使用される「インデックスパターン名」フィールドのプレースホルダーです。",
"data.advancedSettings.indexPatternPlaceholderTitle": "インデックスパターンのプレースホルダー",
"data.advancedSettings.metaFieldsText": "_source の外にあり、ドキュメントが表示される時に融合されるフィールドです",
"data.advancedSettings.metaFieldsTitle": "メタフィールド",
"data.advancedSettings.pinFiltersText": "フィルターがデフォルトでグローバル (ピン付けされた状態) になるかの設定です",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,6 @@
"data.advancedSettings.histogram.maxBarsTitle": "最大存储桶数",
"data.advancedSettings.historyLimitText": "在具有历史记录(例如查询输入)的字段中,显示此数目的最近值",
"data.advancedSettings.historyLimitTitle": "历史记录限制",
"data.advancedSettings.indexPatternPlaceholderText": "在“管理”>“索引模式”>“创建索引模式”中“索引模式名称”字段的占位符。",
"data.advancedSettings.indexPatternPlaceholderTitle": "索引模式占位符",
"data.advancedSettings.metaFieldsText": "_source 之外存在的、在显示我们的文档时将合并进其中的字段",
"data.advancedSettings.metaFieldsTitle": "元字段",
"data.advancedSettings.pinFiltersText": "筛选是否应默认有全局状态(置顶)",
Expand Down

0 comments on commit 7eb1b99

Please sign in to comment.