OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
fix(create-index): add debouncer for index name input and try to fix …
…some ccs weighted requests
Description
This pr do is following:
- Adds a debouncer for the input form for the name of the newly created index (timeout set to 700 ms)
- Fixes calling useEffect 3 times due to obscure dependency indexPatterns.length
- I'm not sure what I did right, but I tried to get rid of heavy requests to the elastic if it's CCS. I need the help of the community here, maybe I did it wrong. Added flag skipCCS in function getIndices.
this pr was an attempt to solve the following problem: when creating a new ccs index, the dashboard loaded the opensearch cluster very heavily. It turned out that in the first useEffect pulled 3 requests, the same requests were performed for each letter. Maybe my skipCCS is not needed, because the debouncer and fixing useEffect dependencies will not make many requests and the "opensearch" request will not load the opensearch cluster.
@ashwin-pc JFYI :)