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

Fix/cypress #2

Open
wants to merge 138 commits into
base: workspace
Choose a base branch
from
Open

Fix/cypress #2

wants to merge 138 commits into from

Conversation

SuZhou-Joe
Copy link
Owner

@SuZhou-Joe SuZhou-Joe commented Sep 6, 2023

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

Check List

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

ruanyl and others added 30 commits August 3, 2023 17:21
add license header

Signed-off-by: Yulong Ruan <[email protected]>
* feat: add workspace creator page

Signed-off-by: Lin Wang <[email protected]>

* feat: integrate with application workspace template

Signed-off-by: Lin Wang <[email protected]>

* feat: add max-width and remove image wrapper if not exists

Signed-off-by: Lin Wang <[email protected]>

* feat: update filter condition to align with collapsible nav

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
* fix: validation & query

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: modify file name to reduce confusion

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add landing logic to retrive workspace id

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type error

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type error

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: make client more robust

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: use Subject

Signed-off-by: SuZhoue-Joe <[email protected]>

---------

Signed-off-by: SuZhoue-Joe <[email protected]>
* feat: integrate with workspace create API

Signed-off-by: Lin Wang <[email protected]>

* feat: update to i18n text for toast

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
* feat: add currentWorkspace$

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type error

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add emit on currentWorkspace$

Signed-off-by: SuZhoue-Joe <[email protected]>

---------

Signed-off-by: SuZhoue-Joe <[email protected]>
Add workspace dropdown list 

---------

Signed-off-by: zhichao-aws <[email protected]>
Signed-off-by: SuZhoue-Joe <[email protected]>
Signed-off-by: suzhou <[email protected]>
Co-authored-by: SuZhoue-Joe <[email protected]>
* feat: init workspace menu stage 1

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

* fix: remove port diff

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

* feat: update menu logic

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

---------

Signed-off-by: tygao <[email protected]>
* fix import error

Signed-off-by: Hailong Cui <[email protected]>

* fix osd bootstrap failure

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
* feat: add workspace overview page

Signed-off-by: Lin Wang <[email protected]>

* refactor: move paths to common constants

Signed-off-by: Lin Wang <[email protected]>

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

Signed-off-by: Lin Wang <[email protected]>

* refactor: change to currentWorkspace$ in workspace client

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
fix failed test snapshots

temporary fix: fetch functional test from main branch

fixed git error which cannot find ref due to feature branch `workspace`
not exists on repo opensearch-dashboards-functional-test

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
)

* change to currentWorkspace, wrap title using i18n

Signed-off-by: zhichao-aws <[email protected]>

* change import

Signed-off-by: zhichao-aws <[email protected]>

* directly return [] if currentWorkspace is null

Signed-off-by: zhichao-aws <[email protected]>

---------

Signed-off-by: zhichao-aws <[email protected]>
* feat: update workspace switch

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

* fix: fix switch error

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

* fix: fix prettier after merge

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

* chore: remove extra code after merge

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

---------

Signed-off-by: tygao <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2023

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (afa373a) 65.72% compared to head (a6adcf0) 66.06%.

❗ Current head a6adcf0 differs from pull request most recent head 5e9a3f9. Consider uploading reports for the commit 5e9a3f9 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##           workspace       #2      +/-   ##
=============================================
+ Coverage      65.72%   66.06%   +0.34%     
=============================================
  Files           3336     3384      +48     
  Lines          64543    64906     +363     
  Branches       10285    10465     +180     
=============================================
+ Hits           42420    42882     +462     
+ Misses         19644    19453     -191     
- Partials        2479     2571      +92     
Flag Coverage Δ
Linux_ 66.06% <87.42%> (?)
Linux_1 ?
Linux_3 ?
Windows_1 ?
Windows_2 ?
Windows_3 ?
Windows_4 ?

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

Files Coverage Δ
packages/osd-pm/src/utils/package_json.ts 66.66% <ø> (ø)
packages/osd-pm/src/utils/project.ts 66.26% <100.00%> (+4.62%) ⬆️
packages/osd-std/src/index.ts 92.30% <100.00%> (ø)
packages/osd-ui-shared-deps/theme.ts 41.66% <100.00%> (ø)
src/cli_plugin/install/settings.js 100.00% <100.00%> (ø)
src/core/common/logos/get_logos.mock.ts 100.00% <100.00%> (ø)
src/core/public/chrome/chrome_service.mock.ts 100.00% <ø> (ø)
src/core/public/chrome/chrome_service.tsx 91.42% <100.00%> (-0.24%) ⬇️
...c/core/public/chrome/ui/header/collapsible_nav.tsx 95.45% <ø> (-0.07%) ⬇️
src/core/public/chrome/ui/header/header.tsx 75.00% <ø> (ø)
... and 84 more

... and 409 files with indirect coverage changes

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

…roject#128)

* feat: setup mechanism to register different implementation on query DSL

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: some optimization on error message and response

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless clause

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: move some code to a util function

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Hailong-am and others added 14 commits September 7, 2023 16:18
* hide import for application home page

Signed-off-by: Hailong Cui <[email protected]>

* add workpspace into gotoApp link

Signed-off-by: Hailong Cui <[email protected]>

* remove special logic for management workspace

Signed-off-by: Hailong Cui <[email protected]>

* variable name change and more UTs

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
SuZhou-Joe added a commit that referenced this pull request Oct 17, 2023
Signed-off-by: SuZhou-Joe <[email protected]>
SuZhou-Joe added a commit that referenced this pull request Mar 1, 2024
Signed-off-by: SuZhou-Joe <[email protected]>
SuZhou-Joe added a commit that referenced this pull request Mar 5, 2024
Signed-off-by: SuZhou-Joe <[email protected]>
SuZhou-Joe added a commit that referenced this pull request Mar 11, 2024
…objects client wrapper (opensearch-project#230)

* feat: add basic workspace saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* feat: add unit test (#2)

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update client wrapper

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

* feat: init permission control in workspace plugin

Signed-off-by: Lin Wang <[email protected]>

* Support disable permission check on workspace (opensearch-project#228)

* support disable permission check for workspace

Signed-off-by: Hailong Cui <[email protected]>

* fix typos

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>

* feat: add ACLSearchParams consumer in repository (#3)

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: ACLSearchParams missing in search dsl

Signed-off-by: Lin Wang <[email protected]>

* test: add integration test for workspace saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* style: add empty line under license

Signed-off-by: Lin Wang <[email protected]>

* test: enable workspace permission control for integration tests

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspace into includeHiddenTypes (opensearch-project#249)

* feat: add workspace into includeHiddenTypes of client wrapper and permission control client

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: hiddenType side effect

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* fix workspace client wrapper integration tests

Signed-off-by: Lin Wang <[email protected]>

* add permissions fields to workspace CRUD APIs

Signed-off-by: Lin Wang <[email protected]>

* Move WorkspacePermissionMode inside workspace plugin

Signed-off-by: Lin Wang <[email protected]>

* Address pr comments

Signed-off-by: Lin Wang <[email protected]>

* Remove ACLSearchParams in public SavedObjectsFindOptions

Signed-off-by: Lin Wang <[email protected]>

* Remove lodash and Add default permissionModes

Signed-off-by: Lin Wang <[email protected]>

* feat: address concerns on ensureRawRequest (#4)

* feat: address concerns on ensureRawRequest

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add check for empty array

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: make find api backward compatible

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless code

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* Update annotations and  error

Signed-off-by: Lin Wang <[email protected]>

* Add unit tests for worksapce saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* Remove getPrincipalsOfObjects in permission

Signed-off-by: Lin Wang <[email protected]>

* Fix permissionEnabled flag missed in workspace plugin setup test

Signed-off-by: Lin Wang <[email protected]>

* Change back to Not Authorized error

Signed-off-by: Lin Wang <[email protected]>

* Fix unit tests for query_params and plugin setup

Signed-off-by: Lin Wang <[email protected]>

* Fix unittests in workspace server utils

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspacesSearchOperators to decouple ACLSearchParams

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update test cases

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize test cases

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: omit defaultSearchOperator in public savedobjetcs client

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: omit workspacesSearchOperator field

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: tygao <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Co-authored-by: Lin Wang <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
Co-authored-by: Hailong Cui <[email protected]>
SuZhou-Joe added a commit that referenced this pull request Mar 18, 2024
…objects client wrapper (opensearch-project#230)

* feat: add basic workspace saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* feat: add unit test (#2)

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update client wrapper

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

* feat: init permission control in workspace plugin

Signed-off-by: Lin Wang <[email protected]>

* Support disable permission check on workspace (opensearch-project#228)

* support disable permission check for workspace

Signed-off-by: Hailong Cui <[email protected]>

* fix typos

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>

* feat: add ACLSearchParams consumer in repository (#3)

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: ACLSearchParams missing in search dsl

Signed-off-by: Lin Wang <[email protected]>

* test: add integration test for workspace saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* style: add empty line under license

Signed-off-by: Lin Wang <[email protected]>

* test: enable workspace permission control for integration tests

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspace into includeHiddenTypes (opensearch-project#249)

* feat: add workspace into includeHiddenTypes of client wrapper and permission control client

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: hiddenType side effect

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* fix workspace client wrapper integration tests

Signed-off-by: Lin Wang <[email protected]>

* add permissions fields to workspace CRUD APIs

Signed-off-by: Lin Wang <[email protected]>

* Move WorkspacePermissionMode inside workspace plugin

Signed-off-by: Lin Wang <[email protected]>

* Address pr comments

Signed-off-by: Lin Wang <[email protected]>

* Remove ACLSearchParams in public SavedObjectsFindOptions

Signed-off-by: Lin Wang <[email protected]>

* Remove lodash and Add default permissionModes

Signed-off-by: Lin Wang <[email protected]>

* feat: address concerns on ensureRawRequest (#4)

* feat: address concerns on ensureRawRequest

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add check for empty array

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: make find api backward compatible

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless code

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* Update annotations and  error

Signed-off-by: Lin Wang <[email protected]>

* Add unit tests for worksapce saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* Remove getPrincipalsOfObjects in permission

Signed-off-by: Lin Wang <[email protected]>

* Fix permissionEnabled flag missed in workspace plugin setup test

Signed-off-by: Lin Wang <[email protected]>

* Change back to Not Authorized error

Signed-off-by: Lin Wang <[email protected]>

* Fix unit tests for query_params and plugin setup

Signed-off-by: Lin Wang <[email protected]>

* Fix unittests in workspace server utils

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspacesSearchOperators to decouple ACLSearchParams

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update test cases

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize test cases

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: omit defaultSearchOperator in public savedobjetcs client

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: omit workspacesSearchOperator field

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: tygao <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Co-authored-by: Lin Wang <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
Co-authored-by: Hailong Cui <[email protected]>
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