Open seanrathier opened 1 week ago
/ci
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)
/ci
Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app
id | before | after | diff |
---|---|---|---|
cloudSecurityPosture |
448.5KB | 448.7KB | +190.0B |
To update your PR or re-run it, just comment with:
@elasticmachine merge upstream
Summary
This change resolves the Benchmark Rules page's performance when enabling or disabling rules. Most of the work was converting the
change_csp_rule_state
to use the ReactQueryuseMutation
hook. This change introduces optimistic updating of the cached data, while at the same time performing the HTTP request to bulk update to mute or unmute the rules.Should anything fail with the HTP request, the snapshot of the data taken before the cache was optimistically updated will replace the mutated data.
Other changes:
refetch
call in the rules_table and instead opted to use theinvalidateQueries
await
from the originalinvalidateQueries
as these can be executed in the background.useMemo
hook from the table columns because there was no visual difference and it introduces more complexity for the execution.https://github.com/elastic/kibana/assets/4624273/43a0d7e8-cd20-4cc8-8213-aa600d74efff
Checklisthttps://github.com/elastic/kibana/pull/182768/files
For maintainers