mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* [Uptime] Remove pointless max search size box (#29992) This box is just confusing. You can only see 100 results so we should just hard-code that. Having it is left-over from a previous design. * Update snap
This commit is contained in:
parent
8375eba2cb
commit
cf2ec5ed4c
4 changed files with 5 additions and 60 deletions
|
@ -93,27 +93,6 @@ exports[`PingList component renders sorted list without errors 1`] = `
|
|||
/>
|
||||
</EuiFormRow>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem
|
||||
component="div"
|
||||
grow={true}
|
||||
>
|
||||
<EuiFormRow
|
||||
describedByIds={Array []}
|
||||
fullWidth={false}
|
||||
hasEmptyLabelSpace={false}
|
||||
label="Max Search Size"
|
||||
>
|
||||
<EuiFieldNumber
|
||||
compressed={false}
|
||||
defaultValue="200"
|
||||
fullWidth={false}
|
||||
isLoading={false}
|
||||
max={10000}
|
||||
min={0}
|
||||
onBlur={[MockFunction]}
|
||||
/>
|
||||
</EuiFormRow>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
<EuiInMemoryTable
|
||||
columns={
|
||||
|
@ -378,27 +357,6 @@ exports[`PingList component renders unsorted list of many monitors without error
|
|||
/>
|
||||
</EuiFormRow>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem
|
||||
component="div"
|
||||
grow={true}
|
||||
>
|
||||
<EuiFormRow
|
||||
describedByIds={Array []}
|
||||
fullWidth={false}
|
||||
hasEmptyLabelSpace={false}
|
||||
label="Max Search Size"
|
||||
>
|
||||
<EuiFieldNumber
|
||||
compressed={false}
|
||||
defaultValue="200"
|
||||
fullWidth={false}
|
||||
isLoading={false}
|
||||
max={10000}
|
||||
min={0}
|
||||
onBlur={[MockFunction]}
|
||||
/>
|
||||
</EuiFormRow>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
<EuiInMemoryTable
|
||||
columns={
|
||||
|
|
|
@ -260,7 +260,7 @@ describe('PingList component', () => {
|
|||
const component = shallowWithIntl(
|
||||
<PingList
|
||||
loading={false}
|
||||
maxSearchSize={200}
|
||||
maxSearchSize={100}
|
||||
pingResults={allPings}
|
||||
searchSizeOnBlur={jest.fn()}
|
||||
selectedOption={{ label: 'All', value: '' }}
|
||||
|
|
|
@ -7,7 +7,6 @@ import {
|
|||
EuiBadge,
|
||||
EuiComboBox,
|
||||
EuiComboBoxOptionProps,
|
||||
EuiFieldNumber,
|
||||
EuiFlexGroup,
|
||||
EuiFlexItem,
|
||||
EuiFormRow,
|
||||
|
@ -169,20 +168,6 @@ export const PingList = (props: PingListProps) => {
|
|||
/>
|
||||
</EuiFormRow>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem>
|
||||
<EuiFormRow
|
||||
label={i18n.translate('xpack.uptime.pingList.maxSearchSizeLabel', {
|
||||
defaultMessage: 'Max Search Size',
|
||||
})}
|
||||
>
|
||||
<EuiFieldNumber
|
||||
defaultValue={props.maxSearchSize.toString()}
|
||||
min={0}
|
||||
max={10000} // 10k is the max default size in ES, and a good max sane size for this page
|
||||
onBlur={props.searchSizeOnBlur}
|
||||
/>
|
||||
</EuiFormRow>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
<EuiInMemoryTable
|
||||
loading={loading}
|
||||
|
|
|
@ -13,6 +13,8 @@ import { UptimeCommonProps } from '../../../uptime_app';
|
|||
import { PingList } from '../../functional';
|
||||
import { getPingsQuery } from './get_pings';
|
||||
|
||||
const DEFAULT_MAX_SEARCH_SIZE = 100;
|
||||
|
||||
interface PingListProps {
|
||||
monitorId?: string;
|
||||
sort?: UMPingSortDirectionArg;
|
||||
|
@ -54,7 +56,7 @@ export class PingListQuery extends React.Component<Props, PingListState> {
|
|||
this.state = {
|
||||
statusOptions,
|
||||
selectedOption: statusOptions[2],
|
||||
maxSearchSize: 200,
|
||||
maxSearchSize: DEFAULT_MAX_SEARCH_SIZE,
|
||||
};
|
||||
}
|
||||
public render() {
|
||||
|
@ -80,7 +82,7 @@ export class PingListQuery extends React.Component<Props, PingListState> {
|
|||
? selectedOption.value
|
||||
: '',
|
||||
// TODO: get rid of the magic number
|
||||
size: this.state.maxSearchSize || size || 200,
|
||||
size: this.state.maxSearchSize || size || DEFAULT_MAX_SEARCH_SIZE,
|
||||
sort: sort || 'desc',
|
||||
}}
|
||||
query={getPingsQuery}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue