-
Notifications
You must be signed in to change notification settings - Fork 916
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] feat: support use case populate for workspace create and list page #8422
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8422 +/- ##
=======================================
Coverage 60.95% 60.95%
=======================================
Files 3758 3758
Lines 89305 89326 +21
Branches 13972 13974 +2
=======================================
+ Hits 54439 54453 +14
- Misses 31478 31481 +3
- Partials 3388 3392 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
<Router> | ||
<Switch> | ||
<Route> | ||
<WorkspaceCreatorApp {...props} /> | ||
</Route> | ||
</Switch> | ||
</Router> |
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.
why do we need add router?
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.
I have the same concern that is the HashRouter here necessary?
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.
Yes, we need hashRouter to wrap switch and route.
@@ -23,6 +23,12 @@ export const navigateToWorkspaceDetail = ( | |||
); | |||
}; | |||
|
|||
export const navigateToWorkspaceListWithUseCase = ({ application }: Core, useCaseTitle: string) => { | |||
const url = application.getUrlForApp(WORKSPACE_LIST_APP_ID, { absolute: true }); | |||
const search = `/?useCase=${useCaseTitle}`; |
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.
can we use hash, so that router change is not needed? similar with workspace detail page
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.
Updated. This may just be a boilerplate for now, it actually depends on how @yubonluo uses later.
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.
If necessary in the future, I will make some adjustments when integrating it to the homepage
src/plugins/workspace/public/components/workspace_creator/workspace_creator.tsx
Show resolved
Hide resolved
Signed-off-by: tygao <[email protected]>
Signed-off-by: tygao <[email protected]>
Signed-off-by: tygao <[email protected]>
Signed-off-by: tygao <[email protected]>
…list page (#8422) * feat: support use case populate for workspace create and list page Signed-off-by: tygao <[email protected]> * style: update data source column width Signed-off-by: tygao <[email protected]> * Changeset file for PR #8422 created/updated * update navigate function Signed-off-by: tygao <[email protected]> * test: add utils test Signed-off-by: tygao <[email protected]> --------- Signed-off-by: tygao <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 49cca7b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…list page (#8422) (#8462) * feat: support use case populate for workspace create and list page * style: update data source column width * Changeset file for PR #8422 created/updated * update navigate function * test: add utils test --------- (cherry picked from commit 49cca7b) Signed-off-by: tygao <[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>
Description
Screenshot
Testing the changes
Go to workspace create/list page and use useCase search, for example
http://localhost:6601/app/workspace_list#/?useCase=Security%20Analytics , then you could see security use case to be populated.
Changelog
Check List
yarn test:jest
yarn test:jest_integration