Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Wrong size parameter for fetching Destinations in creation of Trigger UI. #70

Closed
crackthecodeabhi opened this issue Jul 15, 2019 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@crackthecodeabhi
Copy link

Hi, while creating Trigger, the list of destinations is fetched using this query
https://kibana.example.com:5601/api/alerting/destinations?_searchsize=200_

The API does not respect the "searchsize parameter", hence, even though i have 30+ destinations, it will fetch only 20, which is default Elasticsearch return size.

The right parameter would be "size", which would fetch the number of given destinations.
https://kibana.eample.in:5601/api/alerting/destinations?_size=200_

I am running Opendistro 0.9.0.0 and ES version 6.7.1

@dbbaughe
Copy link
Contributor

Hi @abhijithshivaswamy,

Thanks for reporting this issue.
It seems to be a simple bug located at:
https://github.com/opendistro-for-elasticsearch/alerting-kibana-plugin/blob/master/public/pages/CreateTrigger/containers/ConfigureActions/ConfigureActions.js#L57

const response = await httpClient.get(
    `../api/alerting/destinations?search${searchText}size=200`
);

Seems there is no equals between search and searchText and no & between search and size.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants