-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Workspace] Fix workspace update issue #8570
[Workspace] Fix workspace update issue #8570
Conversation
Signed-off-by: yubonluo <[email protected]>
It looks a little bit weird to me that we are refreshing the page after update the workspace detail, I remember we already have the refresh logic for |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8570 +/- ##
==========================================
- Coverage 60.96% 60.92% -0.04%
==========================================
Files 3776 3777 +1
Lines 89680 89843 +163
Branches 14055 14083 +28
==========================================
+ Hits 54671 54737 +66
- Misses 31593 31672 +79
- Partials 3416 3434 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Agree with you. I think the navigate away modal issue should come from default values not updated. I'm prefer to add some method to update the defaultValuesRef in useWorkspaceForm hook. |
Signed-off-by: yubonluo <[email protected]>
…/OpenSearch-Dashboards into 2.17/fix-workspace-update-issue
Sure, the code has been updated. When user updates the workspace, the detail page will not be refreshed and |
src/plugins/workspace/public/components/workspace_form/use_workspace_form.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: yubonluo <[email protected]>
src/plugins/workspace/public/components/workspace_form/use_workspace_form.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: yubonluo <[email protected]>
const getSubmitFormData = (submitFormData: WorkspaceFormDataState) => { | ||
return { | ||
name: submitFormData.name!, | ||
description: submitFormData.description, | ||
color: submitFormData.color || '#FFFFFF', | ||
features: submitFormData.features, | ||
permissionSettings: submitFormData.permissionSettings as WorkspacePermissionSetting[], | ||
selectedDataSourceConnections: submitFormData.selectedDataSourceConnections, | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like the return value is same as WorkspaceFormDataState? can we use WorkspaceFormDataState
diectly? or {...WorkspaceFormDataState}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there are some differences between the type of return values and WorkspaceFormDataState, such as the useCase attribute.
* fix workspace update issue Signed-off-by: yubonluo <[email protected]> * Changeset file for PR #8570 created/updated * optimize the code Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> --------- Signed-off-by: yubonluo <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 9cad0a3) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix workspace update issue * Changeset file for PR #8570 created/updated * optimize the code * optimize the code * optimize the code --------- (cherry picked from commit 9cad0a3) Signed-off-by: yubonluo <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* fix workspace update issue Signed-off-by: yubonluo <[email protected]> * Changeset file for PR opensearch-project#8570 created/updated * optimize the code Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> --------- Signed-off-by: yubonluo <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* fix workspace update issue Signed-off-by: yubonluo <[email protected]> * Changeset file for PR opensearch-project#8570 created/updated * optimize the code Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> * optimize the code Signed-off-by: yubonluo <[email protected]> --------- Signed-off-by: yubonluo <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
2024-10-12.13.29.04.mp4
Issues Resolved
Screenshot
2024-10-12.14.40.25.mp4
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration