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

Add workspace filter/column into saved objects page #211

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

Hailong-am
Copy link
Collaborator

@Hailong-am Hailong-am commented Oct 9, 2023

Description

  1. Add workspace filter into saved objects page
  2. Add workspace column into saved objects page

workspace column
image

workspace filter includes default workspace
image

Issues Resolved

Screenshot

Testing the changes

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

@Hailong-am Hailong-am changed the title Add workspace filter into saved objects page Add workspace filter/column into saved objects page Oct 9, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2023

Codecov Report

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

Project coverage is 66.99%. Comparing base (09cfe94) to head (4804cb3).

Files Patch % Lines
...ment_section/objects_table/saved_objects_table.tsx 62.79% 14 Missing and 2 partials ⚠️
...d_objects_management/server/routes/scroll_count.ts 0.00% 14 Missing ⚠️
...agement_section/objects_table/components/table.tsx 77.77% 0 Missing and 2 partials ⚠️
...c/components/workspace_column/workspace_column.tsx 75.00% 2 Missing ⚠️
...s_management/public/lib/get_saved_object_counts.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                   @@
##           workspace-pr-integr     #211      +/-   ##
=======================================================
- Coverage                66.99%   66.99%   -0.01%     
=======================================================
  Files                     3323     3325       +2     
  Lines                    64460    64535      +75     
  Branches                 10387    10406      +19     
=======================================================
+ Hits                     43188    43233      +45     
- Misses                   18744    18770      +26     
- Partials                  2528     2532       +4     
Flag Coverage Δ
Linux_ 66.32% <55.69%> (?)
_1 32.22% <61.53%> (+0.03%) ⬆️
_2 55.39% <100.00%> (+<0.01%) ⬆️
_3 43.31% <100.00%> (-0.01%) ⬇️
_4 35.14% <52.85%> (+0.05%) ⬆️

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 marked this pull request as draft October 10, 2023 07:21
@Hailong-am Hailong-am force-pushed the workspace_filter branch 2 times, most recently from 1996ecc to d5d3d4f Compare October 17, 2023 03:29
@Hailong-am Hailong-am marked this pull request as ready for review October 17, 2023 03:31
@Hailong-am Hailong-am force-pushed the workspace_filter branch 2 times, most recently from 7de3949 to 25b62bd Compare October 19, 2023 05:37
Signed-off-by: Hailong Cui <ihailong@amazon.com>

fix failed test case

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

move workspace column to its own folder

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

fix test case

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

add test case

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

remove hide import

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Comment on lines 65 to 68
import { WorkspaceObject } from 'opensearch-dashboards/public';
import { DEFAULT_WORKSPACE_ID } from '../../../../../core/public';
import { TableProps } from './components/table';
import { waitFor } from '@testing-library/dom';
Copy link
Collaborator

Choose a reason for hiding this comment

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

These lines should be linted when commit(Absolute import should move before relative import), could you please take a look to see if the lint take effect when you do git commit?

@@ -8,3 +8,5 @@ export const WORKSPACE_TYPE = 'workspace';
export const WORKSPACE_PATH_PREFIX = '/w';

export const PUBLIC_WORKSPACE_ID = 'public';

export const DEFAULT_WORKSPACE_ID = 'default';
Copy link
Collaborator

Choose a reason for hiding this comment

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

In 2.13 I thought default workspace is a virtual workspace? Could we add some comment on it as at first I thought it is a new physical workspace.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sounds good, comments added.

@@ -9,6 +9,7 @@ import { applicationServiceMock, chromeServiceMock, coreMock } from '../../../co
import { WorkspacePlugin } from './plugin';
import { WORKSPACE_FATAL_ERROR_APP_ID, WORKSPACE_OVERVIEW_APP_ID } from '../common/constants';
import { Observable, Subscriber } from 'rxjs';
import { savedObjectsManagementPluginMock } from 'src/plugins/saved_objects_management/public/mocks';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we need to change to a relative path.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks, changed to relative import.

Signed-off-by: Hailong Cui <ihailong@amazon.com>
@Hailong-am Hailong-am merged commit 58f8ea4 into ruanyl:workspace-pr-integr Mar 11, 2024
44 of 45 checks passed
SuZhou-Joe pushed a commit that referenced this pull request Mar 18, 2024
* Add workspace column/filter into saved objects page

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

fix failed test case

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

move workspace column to its own folder

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

* default workspace

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

fix test case

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

add test case

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

remove hide import

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

* address review comments

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

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
ZilongX pushed a commit that referenced this pull request Apr 17, 2024
…ensearch-project#6458)

* Add workspace filter into saved objects page (#211)

* Add workspace column/filter into saved objects page

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

fix failed test case

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

move workspace column to its own folder

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

* default workspace

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

fix test case

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

add test case

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

remove hide import

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

* address review comments

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

---------

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

* replace default workspace with public workspace (#322)

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

* Add workspace filter

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

* revert query params change

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

* udpate test case name to more clear

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

* support public workspace

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

* Add changelog

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

* update fetchExportByTypeAndSearch parameter

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>

* remove virtrual public workspace

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

* update comments

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

* fix public workspace query when permission is not enabled

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

* home dashboards/listing page only show public workspace data

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

* Add more test case

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

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Hailong-am added a commit that referenced this pull request Apr 22, 2024
…t page (#6… (#334)

* [Workspace] Add Workspace filter to saved objects management page (opensearch-project#6458)

* Add workspace filter into saved objects page (#211)

* Add workspace column/filter into saved objects page

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

fix failed test case

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

move workspace column to its own folder

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

* default workspace

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

fix test case

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

add test case

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

remove hide import

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

* address review comments

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

---------

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

* replace default workspace with public workspace (#322)

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

* Add workspace filter

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

* revert query params change

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

* udpate test case name to more clear

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

* support public workspace

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

* Add changelog

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

* update fetchExportByTypeAndSearch parameter

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>

* remove virtrual public workspace

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

* update comments

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

* fix public workspace query when permission is not enabled

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

* home dashboards/listing page only show public workspace data

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

* Add more test case

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

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>

* fix empty workspace

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

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
ruanyl pushed a commit that referenced this pull request May 17, 2024
…ensearch-project#6458) (opensearch-project#6580)

* Add workspace filter into saved objects page (#211)

* Add workspace column/filter into saved objects page

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

fix failed test case

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

move workspace column to its own folder

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

* default workspace

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

fix test case

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

add test case

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

remove hide import

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

* address review comments

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

---------

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

* replace default workspace with public workspace (#322)

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

* Add workspace filter

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

* revert query params change

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

* udpate test case name to more clear

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

* support public workspace

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

* Add changelog

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

* update fetchExportByTypeAndSearch parameter

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>

* remove virtrual public workspace

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

* update comments

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

* fix public workspace query when permission is not enabled

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

* home dashboards/listing page only show public workspace data

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

* Add more test case

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

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
(cherry picked from commit 9408e49)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[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.

4 participants