OpenSearch-Dashboards icon indicating copy to clipboard operation
OpenSearch-Dashboards copied to clipboard

fix(create-index): add debouncer for index name input and try to fix …

Open Ahton89 opened this issue 2 years ago • 17 comments

…some ccs weighted requests

Description

This pr do is following:

  1. Adds a debouncer for the input form for the name of the newly created index (timeout set to 700 ms)
  2. Fixes calling useEffect 3 times due to obscure dependency indexPatterns.length
  3. 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 :)

Ahton89 avatar Dec 28 '22 12:12 Ahton89