[Dashboard] Prevent duplicate saves when rapidly clicking save button#233573
[Dashboard] Prevent duplicate saves when rapidly clicking save button#233573nickofthyme merged 5 commits intoelastic:mainfrom
Conversation
…new dashboard results in multiple dashboards being created
…new dashboard results in multiple dashboards being created
# Conflicts: # src/platform/plugins/shared/dashboard/public/dashboard_api/save_modal/save_modal.tsx
|
@elasticmachine merge upstream |
|
/ci |
ThomThomson
left a comment
There was a problem hiding this comment.
Changes LGTM! Thank you for the contribution, and using the method shorthand here makes sense.
|
@elasticmachine merge upstream |
|
/ci |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
|
@elasticmachine run docs-build |
|
Not sure if anyone has seen #233933 but these same to be related fixes |
There was a problem hiding this comment.
Yeah this may solve the issue for dashboards but the modal logic is not consistently expecting the onSave call to return a promise all the way up the call stack to the root async function performing the save.
That said I think it's still worth merging this PR and giving @kvanerum credit for the fix until #233933 get reviewed and merged.
|
Starting backport for target branches: 8.19, 9.1 https://github.com/elastic/kibana/actions/runs/17474637050 |
…elastic#233573) Fixes elastic#231314 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit c2c4c80)
…elastic#233573) Fixes elastic#231314 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit c2c4c80)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…button (#233573) (#234097) # Backport This will backport the following commits from `main` to `9.1`: - [[Dashboard] Prevent duplicate saves when rapidly clicking save button (#233573)](#233573) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kris Van Erum","email":"34942518+kvanerum@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-09-04T19:29:33Z","message":"[Dashboard] Prevent duplicate saves when rapidly clicking save button (#233573)\n\nFixes #231314 \n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"c2c4c80926ef266f43a882983e68cc253c75b892","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","💝community","backport:version","v9.2.0","v9.1.4","v8.19.4"],"title":"[Dashboard] Prevent duplicate saves when rapidly clicking save button","number":233573,"url":"https://github.com/elastic/kibana/pull/233573","mergeCommit":{"message":"[Dashboard] Prevent duplicate saves when rapidly clicking save button (#233573)\n\nFixes #231314 \n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"c2c4c80926ef266f43a882983e68cc253c75b892"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/233573","number":233573,"mergeCommit":{"message":"[Dashboard] Prevent duplicate saves when rapidly clicking save button (#233573)\n\nFixes #231314 \n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"c2c4c80926ef266f43a882983e68cc253c75b892"}},{"branch":"9.1","label":"v9.1.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kris Van Erum <34942518+kvanerum@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
… button (#233573) (#234096) # Backport This will backport the following commits from `main` to `8.19`: - [[Dashboard] Prevent duplicate saves when rapidly clicking save button (#233573)](#233573) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kris Van Erum","email":"34942518+kvanerum@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-09-04T19:29:33Z","message":"[Dashboard] Prevent duplicate saves when rapidly clicking save button (#233573)\n\nFixes #231314 \n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"c2c4c80926ef266f43a882983e68cc253c75b892","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","💝community","backport:version","v9.2.0","v9.1.4","v8.19.4"],"title":"[Dashboard] Prevent duplicate saves when rapidly clicking save button","number":233573,"url":"https://github.com/elastic/kibana/pull/233573","mergeCommit":{"message":"[Dashboard] Prevent duplicate saves when rapidly clicking save button (#233573)\n\nFixes #231314 \n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"c2c4c80926ef266f43a882983e68cc253c75b892"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/233573","number":233573,"mergeCommit":{"message":"[Dashboard] Prevent duplicate saves when rapidly clicking save button (#233573)\n\nFixes #231314 \n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"c2c4c80926ef266f43a882983e68cc253c75b892"}},{"branch":"9.1","label":"v9.1.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kris Van Erum <34942518+kvanerum@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…elastic#233573) Fixes elastic#231314 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…elastic#233573) Fixes elastic#231314 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…elastic#233573) Fixes elastic#231314 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Fixes #231314
Code for ignoring extra clicks was already present
kibana/src/platform/plugins/shared/saved_objects/public/save_modal/saved_object_save_modal.tsx
Line 272 in 33ea794
The
saveDashboardcallback was not handling the asynchronousonSavemethod correctly.