mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[ResponseOps]]MaintenaceWindow] Increase MW table limit to 1k (#198504)
Here in this PR I am increasing the limit for MW to 1K. Even I've changed schema for query params(deleted maybe) I did not add additional tests, because we already have one integration test for the case, when we do not have `page` and `per_page` params.
This commit is contained in:
parent
76ccc9c562
commit
3413cbbb1b
1 changed files with 18 additions and 20 deletions
|
@ -12,26 +12,24 @@ const MAX_DOCS = 10000;
|
||||||
|
|
||||||
export const findMaintenanceWindowsRequestQuerySchema = schema.object(
|
export const findMaintenanceWindowsRequestQuerySchema = schema.object(
|
||||||
{
|
{
|
||||||
page: schema.maybe(
|
// we do not need to use schema.maybe here, because if we do not pass property page, defaultValue will be used
|
||||||
schema.number({
|
page: schema.number({
|
||||||
defaultValue: 1,
|
defaultValue: 1,
|
||||||
min: 1,
|
min: 1,
|
||||||
max: MAX_DOCS,
|
max: MAX_DOCS,
|
||||||
meta: {
|
meta: {
|
||||||
description: 'The page number to return.',
|
description: 'The page number to return.',
|
||||||
},
|
},
|
||||||
})
|
}),
|
||||||
),
|
// we do not need to use schema.maybe here, because if we do not pass property per_page, defaultValue will be used
|
||||||
per_page: schema.maybe(
|
per_page: schema.number({
|
||||||
schema.number({
|
defaultValue: 1000,
|
||||||
defaultValue: 20,
|
min: 0,
|
||||||
min: 0,
|
max: 100,
|
||||||
max: 100,
|
meta: {
|
||||||
meta: {
|
description: 'The number of maintenance windows to return per page.',
|
||||||
description: 'The number of maintenance windows to return per page.',
|
},
|
||||||
},
|
}),
|
||||||
})
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
validate: (params) => {
|
validate: (params) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue