Skip to content

Commit

Permalink
[Workspace] Add workspace overview page (opensearch-project#6584)
Browse files Browse the repository at this point in the history
* workspace overview page

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

address review comments

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

address ux review comments

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

Add workspace overview to breadCrumb

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

getting start modal & settings tab

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

home breadcrumb

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

fix rebase issue

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

tmp enable management

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

add workspace overview collapsed into localStorage

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

getting start modal

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

page layout

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

Add test cases

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

fix breadcrumb

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

* fix merge issue

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

* fix wrong dataSourceManagement id

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

* Changeset file for PR opensearch-project#6584 created/updated

* update page layout

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

* overview tab layout update

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

* fix workspace overview page breadcrumb

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

* collapsed setting to be workspace level

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

* fix workspace_overview_modal unit test

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

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_card.tsx

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

* Update src/plugins/workspace/public/components/workspace_overview/workspace_overview_settings.tsx

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

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx

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

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx

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

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx

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

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx

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

* address review comments

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

* address review comments

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

* fix setBreadcrumbs issue

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

* wording change of breadcrumbs

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

* udpate breadcrumb subscription to be a better name

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

* Add unit test

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

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
3 people authored Apr 25, 2024
1 parent a5551b9 commit 9c884b0
Show file tree
Hide file tree
Showing 19 changed files with 1,589 additions and 20 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/6584.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- [Workspace] Add workspace overview page ([#6584](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6584))
42 changes: 42 additions & 0 deletions src/plugins/workspace/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { i18n } from '@osd/i18n';
import { AppCategory } from '../../../core/types';

export const WORKSPACE_FATAL_ERROR_APP_ID = 'workspace_fatal_error';
export const WORKSPACE_CREATE_APP_ID = 'workspace_create';
export const WORKSPACE_LIST_APP_ID = 'workspace_list';
Expand Down Expand Up @@ -37,3 +40,42 @@ export const PRIORITY_FOR_WORKSPACE_ID_CONSUMER_WRAPPER = -3;
export const PRIORITY_FOR_WORKSPACE_UI_SETTINGS_WRAPPER = -2;
export const PRIORITY_FOR_WORKSPACE_CONFLICT_CONTROL_WRAPPER = -1;
export const PRIORITY_FOR_PERMISSION_CONTROL_WRAPPER = 0;

export const WORKSPACE_APP_CATEGORIES: Record<string, AppCategory> = Object.freeze({
// below categories are for workspace
getStarted: {
id: 'getStarted',
label: i18n.translate('core.ui.getStarted.label', {
defaultMessage: 'Get started',
}),
order: 10000,
},
dashboardAndReport: {
id: 'dashboardReport',
label: i18n.translate('core.ui.dashboardReport.label', {
defaultMessage: 'Dashboard and report',
}),
order: 11000,
},
investigate: {
id: 'investigate',
label: i18n.translate('core.ui.investigate.label', {
defaultMessage: 'Investigate',
}),
order: 12000,
},
detect: {
id: 'detect',
label: i18n.translate('core.ui.detect.label', {
defaultMessage: 'Detect',
}),
order: 13000,
},
searchSolution: {
id: 'searchSolution',
label: i18n.translate('core.ui.searchSolution.label', {
defaultMessage: 'Build search solution',
}),
order: 14000,
},
});
19 changes: 19 additions & 0 deletions src/plugins/workspace/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { WorkspaceListApp } from './components/workspace_list_app';
import { WorkspaceUpdaterProps } from './components/workspace_updater';
import { Services } from './types';
import { WorkspaceCreatorProps } from './components/workspace_creator/workspace_creator';
import { WorkspaceOverviewApp } from './components/workspace_overview_app';
import { WorkspaceOverviewProps } from './components/workspace_overview/workspace_overview';

export const renderCreatorApp = (
{ element }: AppMountParameters,
Expand Down Expand Up @@ -75,3 +77,20 @@ export const renderListApp = ({ element }: AppMountParameters, services: Service
ReactDOM.unmountComponentAtNode(element);
};
};

export const renderOverviewApp = (
{ element }: AppMountParameters,
services: Services,
props: WorkspaceOverviewProps
) => {
ReactDOM.render(
<OpenSearchDashboardsContextProvider services={services}>
<WorkspaceOverviewApp {...props} />
</OpenSearchDashboardsContextProvider>,
element
);

return () => {
ReactDOM.unmountComponentAtNode(element);
};
};

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

Loading

0 comments on commit 9c884b0

Please sign in to comment.