Skip to content
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

Merged
merged 5 commits into from
Oct 3, 2024

Conversation

raintygao
Copy link
Contributor

@raintygao raintygao commented Oct 1, 2024

Description

  1. support use case as router search populate for workspace create and list page
  2. remove owners column in workspace list page

Screenshot

image

image

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

  • feat: Support use case populate for workspace create and list page

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 71.05263% with 11 lines in your changes missing coverage. Please review.

Project coverage is 60.95%. Comparing base (638f753) to head (06d0020).
Report is 121 commits behind head on main.

Files with missing lines Patch % Lines
...rkspace/public/components/workspace_list/index.tsx 71.42% 1 Missing and 3 partials ⚠️
...components/workspace_creator/workspace_creator.tsx 70.00% 2 Missing and 1 partial ⚠️
src/plugins/workspace/public/utils.ts 62.50% 1 Missing and 2 partials ⚠️
...ins/workspace/public/components/utils/workspace.ts 83.33% 0 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
Linux_1 28.92% <71.05%> (+0.01%) ⬆️
Linux_2 56.35% <ø> (ø)
Linux_3 37.78% <ø> (ø)
Linux_4 29.95% <ø> (ø)
Windows_1 28.94% <71.05%> (+0.01%) ⬆️
Windows_2 56.31% <ø> (ø)
Windows_3 37.78% <ø> (ø)
Windows_4 29.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Hailong-am
Hailong-am previously approved these changes Oct 2, 2024
Comment on lines +28 to +34
<Router>
<Switch>
<Route>
<WorkspaceCreatorApp {...props} />
</Route>
</Switch>
</Router>
Copy link
Collaborator

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?

Copy link
Member

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?

Copy link
Contributor Author

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}`;
Copy link
Collaborator

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

Copy link
Contributor Author

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.

Copy link
Contributor

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

@Hailong-am Hailong-am merged commit 49cca7b into opensearch-project:main Oct 3, 2024
67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 3, 2024
…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>
SuZhou-Joe pushed a commit that referenced this pull request Oct 3, 2024
…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>
@ananzh ananzh added the v2.18.0 label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants