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

Feature/current workspace in server side #18

Closed

Conversation

SuZhou-Joe
Copy link
Owner

Description

Issues Resolved

Screenshot

Testing the changes

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

@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 77.50000% with 9 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (workspace-pr-integr@efe6254). Click here to learn what that means.

Files Patch % Lines
src/core/server/utils/workspace.ts 77.77% 0 Missing and 2 partials ⚠️
...ver/saved_objects/workspace_id_consumer_wrapper.ts 90.47% 0 Missing and 2 partials ⚠️
...ore/server/saved_objects/import/check_conflicts.ts 0.00% 0 Missing and 1 partial ⚠️
...rc/core/server/saved_objects/routes/bulk_create.ts 0.00% 1 Missing ⚠️
src/core/server/saved_objects/routes/create.ts 0.00% 1 Missing ⚠️
src/core/server/saved_objects/routes/export.ts 0.00% 1 Missing ⚠️
src/core/server/saved_objects/routes/find.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##             workspace-pr-integr      #18   +/-   ##
======================================================
  Coverage                       ?   66.41%           
======================================================
  Files                          ?     3321           
  Lines                          ?    64675           
  Branches                       ?    10512           
======================================================
  Hits                           ?    42954           
  Misses                         ?    19133           
  Partials                       ?     2588           
Flag Coverage Δ
Linux_ 66.41% <77.50%> (?)

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.

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe force-pushed the feature/current-workspace-in-server-side branch 2 times, most recently from c8bda17 to 78286c2 Compare March 27, 2024 06:03
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe force-pushed the feature/current-workspace-in-server-side branch from 78286c2 to 357efa8 Compare March 28, 2024 02:21
…#312)

* feat: add APIs to support plugin state in request

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add APIs to support plugin state in request

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe force-pushed the feature/current-workspace-in-server-side branch from 1690013 to 1b32316 Compare April 1, 2024 09:14
SuZhou-Joe and others added 5 commits April 2, 2024 15:37
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
* feat: unite feature set

Signed-off-by: tygao <tygao@amazon.com>

* update feature utils

Signed-off-by: tygao <tygao@amazon.com>

* update feature utils

Signed-off-by: tygao <tygao@amazon.com>

* use featureMatchConfig

Signed-off-by: tygao <tygao@amazon.com>

* update

Signed-off-by: tygao <tygao@amazon.com>

* add util test

Signed-off-by: tygao <tygao@amazon.com>

* unite feature set

Signed-off-by: tygao <tygao@amazon.com>

---------

Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
* Add workspace overview page (#19)

* feat: add workspace overview page

Signed-off-by: Lin Wang <wonglam@amazon.com>

* refactor: move paths to common constants

Signed-off-by: Lin Wang <wonglam@amazon.com>

* feat: add workspace overview item by custom nav in start phase

Signed-off-by: Lin Wang <wonglam@amazon.com>

* refactor: change to currentWorkspace$ in workspace client

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>

* restore yml

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Co-authored-by: Lin Wang <wonglam@amazon.com>
wanglam and others added 15 commits April 7, 2024 13:02
* [Workspace]Add permission control logic for workspace (opensearch-project#6052)

* Add permission control for workspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add changelog for permission control in workspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix integration tests and remove no need type

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update permission enabled for workspace CRUD integration tests

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Change back to config schema

Signed-off-by: Lin Wang <wonglam@amazon.com>

* feat: do not append workspaces field when no workspaces present (#6)

* feat: do not append workspaces field when no workspaces present

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: do not append workspaces field when no workspaces present

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: authInfo destructure (#7)

* fix: authInfo destructure

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test error

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Fix permissions assign in attributes

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Remove deleteByWorkspace since not exists

Signed-off-by: Lin Wang <wonglam@amazon.com>

* refactor: remove formatWorkspacePermissionModeToStringArray

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Remove current not used code

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add missing unit tests for permission control

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update workspaces API test describe

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace CRUD API integration tests failed

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Address PR comments

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Store permissions when savedObjects.permissions.enabled

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add permission control for deleteByWorkspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update src/plugins/workspace/server/permission_control/client.ts

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Update src/plugins/workspace/server/permission_control/client.ts

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Refactor permissions field in workspace create and update API

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace CRUD API integration tests

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>

* Convert permission settings in client side

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace list always render

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
…roject#6303) (opensearch-project#315)

* feat: add APIs to support plugin state in request (opensearch-project#312)

* feat: add APIs to support plugin state in request



* feat: add APIs to support plugin state in request



---------



* feat: update CHANGELOG



* feat: update



* feat: use request app to store request workspace id



* feat: remove useless if



---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
…pensearch-project#5815)

* add log explorer re-directon modal

Signed-off-by: Eric <menwe@amazon.com>

* adjustments to comments

Signed-off-by: Eric <menwe@amazon.com>

* add one missing i18n

Signed-off-by: Eric <menwe@amazon.com>

* add redirection text to group title

Signed-off-by: Eric <menwe@amazon.com>

* include changes in changelog

Signed-off-by: Eric <menwe@amazon.com>

* remove redundent title addition and unnecessary modal toggle functions

Signed-off-by: Eric <menwe@amazon.com>

* remove one comment

Signed-off-by: Eric <menwe@amazon.com>

* add i18n

Signed-off-by: Eric <menwe@amazon.com>

* add unit tests for modal

Signed-off-by: Eric <menwe@amazon.com>

* test id change

Signed-off-by: Eric <menwe@amazon.com>

* add devDependencies for tests

Signed-off-by: Eric <menwe@amazon.com>

* use open confirm api and move mock file to discover mock folder

Signed-off-by: Eric <menwe@amazon.com>

* remove unused type

Signed-off-by: Eric <menwe@amazon.com>

* remove modal for log explorer redirection

Signed-off-by: Eric <menwe@amazon.com>

* modify changelog

Signed-off-by: Eric <menwe@amazon.com>

* remove modal test

Signed-off-by: Eric <menwe@amazon.com>

* remove one modal related test

Signed-off-by: Eric <menwe@amazon.com>

---------

Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
…shboard (opensearch-project#5934)

Remove default sort to use saved search sort.

Issue Resolve
opensearch-project#5933

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
* [Discover] Fixes safari overflow bug

---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
Co-authored-by: Miki <amoo_miki@yahoo.com>
…g to top (opensearch-project#6008)

* [BUG][Discover] Enable 'Back to Top' Feature in Discover for scrolling to top

dscCanvas is the one with scrollable prop. Set window.scrollTo(0, 0) on table will
not work. In this PR, we add a ref to EuiPanel directly.

Issue Resolve:
opensearch-project#6006

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Co-authored-by: Miki <amoo_miki@yahoo.com>
* adds callback ref to lazy loading sentinel
---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
…-project#6170)

* [Discover] options button in canvas to toggle legacy mode

Removes top nav bar link and provides a button option.

Issue:
n/a

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe closed this Jul 19, 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.

9 participants