Skip to content

Commit

Permalink
[Workspace]Fix workspace assets page UI bugs (#8265)
Browse files Browse the repository at this point in the history
* Update the gap between search bar and table

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

* Update to target workspace and remove description

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

* Add bottom Close button for copy result flyout

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

* Update "Objects" to "Assets" in the export modal

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

* Hide workspace column and filter when in a workspace

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

* Add tooltip for table refresh button

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

* Update objects to assets in top right buttons

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

* Update objects to assets in flyout

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

* Changeset file for PR #8265 created/updated

* Reduce page content padding for new updated UX

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

* Update meta title

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

* Update object to asset

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

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 3ef1e09)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent eda4586 commit e9b5157
Show file tree
Hide file tree
Showing 19 changed files with 350 additions and 140 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/8265.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [Workspace]Fix workspace assets page UI bugs ([#8265](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8265))
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ interface MountParams {

let allowedObjectTypes: string[] | undefined;

const title = i18n.translate('savedObjectsManagement.objects.savedObjectsTitle', {
const savedObjectsTitle = i18n.translate('savedObjectsManagement.objects.savedObjectsTitle', {
defaultMessage: 'Saved Objects',
});
const workspaceAssetsTitle = i18n.translate('savedObjectsManagement.objects.workspaceAssetsTitle', {
defaultMessage: 'Workspace assets',
});
const assetsTitle = i18n.translate('savedObjectsManagement.objects.assetsTitle', {
defaultMessage: 'Assets',
});

const SavedObjectsEditionPage = lazy(() => import('./saved_objects_edition_page'));
const SavedObjectsTablePage = lazy(() => import('./saved_objects_table_page'));
Expand All @@ -75,7 +81,19 @@ export const mountManagementSection = async ({
? allowedObjectTypes
: allowedObjectTypes.filter((type) => type !== 'data-source');

coreStart.chrome.docTitle.change(title);
const useUpdatedUX = coreStart.uiSettings.get('home:useNewHomePage');
const currentWorkspaceId = coreStart.workspaces.currentWorkspaceId$.getValue();
const getDocTitle = () => {

Check warning on line 86 in src/plugins/saved_objects_management/public/management_section/mount_section.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/saved_objects_management/public/management_section/mount_section.tsx#L84-L86

Added lines #L84 - L86 were not covered by tests
if (currentWorkspaceId) {
return workspaceAssetsTitle;

Check warning on line 88 in src/plugins/saved_objects_management/public/management_section/mount_section.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/saved_objects_management/public/management_section/mount_section.tsx#L88

Added line #L88 was not covered by tests
}
if (useUpdatedUX) {
return assetsTitle;

Check warning on line 91 in src/plugins/saved_objects_management/public/management_section/mount_section.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/saved_objects_management/public/management_section/mount_section.tsx#L91

Added line #L91 was not covered by tests
}
return savedObjectsTitle;

Check warning on line 93 in src/plugins/saved_objects_management/public/management_section/mount_section.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/saved_objects_management/public/management_section/mount_section.tsx#L93

Added line #L93 was not covered by tests
};

coreStart.chrome.docTitle.change(getDocTitle());

Check warning on line 96 in src/plugins/saved_objects_management/public/management_section/mount_section.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/saved_objects_management/public/management_section/mount_section.tsx#L96

Added line #L96 was not covered by tests

const capabilities = coreStart.application.capabilities;

Expand All @@ -89,8 +107,6 @@ export const mountManagementSection = async ({
return children! as React.ReactElement;
};

const useUpdatedUX = coreStart.uiSettings.get('home:useNewHomePage');

const content = (
<Router history={history}>
<Switch>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e9b5157

Please sign in to comment.