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] Support workspace initial page #7708

Merged
merged 7 commits into from
Aug 20, 2024

Conversation

yubonluo
Copy link
Contributor

Description

Support workspace initial page.

  • If login user has no workspace, it would show the initial page
  • If login user has more than one workspaces, it would not show the initial page
  • Dashboard admin can click the create workspace button
  • Create workspace button do not been shown for non admin user

Issues Resolved

#7707

Screenshot

2024-08-14.14.30.46.mp4

Testing the changes

  1. Clone the latest osd code and run yarn osd bootstrap
  2. Modify config/opensearch_dashboards.yml
workspace.enabled: true 
uiSettings:
  overrides:
    "home:useNewHomePage": true
  1. Run yarn start --no-base-path
  2. Input url http://localhost:5601

Changelog

  • feat: Support workspace initial 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 Aug 14, 2024

Codecov Report

Attention: Patch coverage is 93.10345% with 2 lines in your changes missing coverage. Please review.

Project coverage is 63.83%. Comparing base (6877bea) to head (5fac3d7).
Report is 191 commits behind head on main.

Files with missing lines Patch % Lines
src/plugins/workspace/public/plugin.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7708      +/-   ##
==========================================
+ Coverage   63.81%   63.83%   +0.02%     
==========================================
  Files        3651     3652       +1     
  Lines       80954    81021      +67     
  Branches    12893    12900       +7     
==========================================
+ Hits        51662    51721      +59     
- Misses      26126    26132       +6     
- Partials     3166     3168       +2     
Flag Coverage Δ
Linux_1 30.10% <93.10%> (?)
Linux_2 55.89% <ø> (+0.05%) ⬆️
Linux_3 40.44% <ø> (+0.02%) ⬆️
Linux_4 31.31% <ø> (+0.02%) ⬆️
Windows_1 30.11% <93.10%> (+0.06%) ⬆️
Windows_2 55.85% <ø> (+0.05%) ⬆️
Windows_3 40.44% <ø> (+0.02%) ⬆️
Windows_4 31.31% <ø> (+0.02%) ⬆️

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.

@ruanyl ruanyl added the v2.17.0 label Aug 15, 2024
@SuZhou-Joe
Copy link
Member

@yubonluo Could you please give a screenshot on how the page will look like in dark mode?

@yubonluo
Copy link
Contributor Author

@yubonluo Could you please give a screenshot on how the page will look like in dark mode?
This is the page in the dark mode

image

@SuZhou-Joe
Copy link
Member

Overall LGTM but the dark mode seems a little bit weird, maybe we need a banner for dark mode.

Signed-off-by: yubonluo <[email protected]>
Signed-off-by: yubonluo <[email protected]>
Signed-off-by: yubonluo <[email protected]>
@yubonluo
Copy link
Contributor Author

Overall LGTM but the dark mode seems a little bit weird, maybe we need a banner for dark mode.

The initial has supported dark mode.
image


export const WorkspaceInitialApp = () => {
return (
<I18nProvider>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe could move I18nProvider to renderInitialApp

@ruanyl ruanyl merged commit 9aeebec into opensearch-project:main Aug 20, 2024
67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 20, 2024
* Support workspace initial page

Signed-off-by: yubonluo <[email protected]>

* Changeset file for PR #7708 created/updated

* optimzie the code

Signed-off-by: yubonluo <[email protected]>

* fix the test error

Signed-off-by: yubonluo <[email protected]>

* add dark mode svg url

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 9aeebec)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Qxisylolo pushed a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Aug 20, 2024
* Support workspace initial page

Signed-off-by: yubonluo <[email protected]>

* Changeset file for PR opensearch-project#7708 created/updated

* optimzie the code

Signed-off-by: yubonluo <[email protected]>

* fix the test error

Signed-off-by: yubonluo <[email protected]>

* add dark mode svg url

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>
ruanyl pushed a commit that referenced this pull request Aug 21, 2024
* Support workspace initial page



* Changeset file for PR #7708 created/updated

* optimzie the code



* fix the test error



* add dark mode svg url



---------



(cherry picked from commit 9aeebec)

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>
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