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 <[email protected]>

* Update to target workspace and remove description

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

* Add bottom Close button for copy result flyout

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

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

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

* Hide workspace column and filter when in a workspace

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

* Add tooltip for table refresh button

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

* Update objects to assets in top right buttons

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

* Update objects to assets in flyout

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

* Changeset file for PR #8265 created/updated

* Reduce page content padding for new updated UX

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

* Update meta title

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

* Update object to asset

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

---------

Signed-off-by: Lin Wang <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
wanglam and opensearch-changeset-bot[bot] authored Sep 29, 2024
1 parent c1a349a commit 3ef1e09
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 = () => {
if (currentWorkspaceId) {
return workspaceAssetsTitle;
}
if (useUpdatedUX) {
return assetsTitle;
}
return savedObjectsTitle;
};

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

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

Please sign in to comment.