mirror of
https://github.com/elastic/kibana.git
synced 2025-04-22 17:04:01 -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(
|
||||
{
|
||||
page: schema.maybe(
|
||||
schema.number({
|
||||
defaultValue: 1,
|
||||
min: 1,
|
||||
max: MAX_DOCS,
|
||||
meta: {
|
||||
description: 'The page number to return.',
|
||||
},
|
||||
})
|
||||
),
|
||||
per_page: schema.maybe(
|
||||
schema.number({
|
||||
defaultValue: 20,
|
||||
min: 0,
|
||||
max: 100,
|
||||
meta: {
|
||||
description: 'The number of maintenance windows to return per page.',
|
||||
},
|
||||
})
|
||||
),
|
||||
// we do not need to use schema.maybe here, because if we do not pass property page, defaultValue will be used
|
||||
page: schema.number({
|
||||
defaultValue: 1,
|
||||
min: 1,
|
||||
max: MAX_DOCS,
|
||||
meta: {
|
||||
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.number({
|
||||
defaultValue: 1000,
|
||||
min: 0,
|
||||
max: 100,
|
||||
meta: {
|
||||
description: 'The number of maintenance windows to return per page.',
|
||||
},
|
||||
}),
|
||||
},
|
||||
{
|
||||
validate: (params) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue