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

address review comments

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

address ux review comments

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

Add workspace overview to breadCrumb

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

getting start modal & settings tab

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

home breadcrumb

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

fix rebase issue

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

tmp enable management

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

add workspace overview collapsed into localStorage

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

getting start modal

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

page layout

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

Add test cases

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

fix breadcrumb

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

* fix merge issue

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

* fix wrong dataSourceManagement id

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

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

* update page layout

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

* overview tab layout update

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

* fix workspace overview page breadcrumb

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

* collapsed setting to be workspace level

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

* fix workspace_overview_modal unit test

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

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

Co-authored-by: SuZhou-Joe <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>

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

Co-authored-by: SuZhou-Joe <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>

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

Co-authored-by: SuZhou-Joe <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>

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

Co-authored-by: SuZhou-Joe <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>

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

Co-authored-by: SuZhou-Joe <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>

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

Co-authored-by: SuZhou-Joe <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>

* address review comments

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

* address review comments

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

* fix setBreadcrumbs issue

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

* wording change of breadcrumbs

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

* udpate breadcrumb subscription to be a better name

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

* Add unit test

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

---------

Signed-off-by: Hailong Cui <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: SuZhou-Joe <[email protected]>
  • Loading branch information
3 people authored and LDrago27 committed Jun 3, 2024
1 parent 168b05e commit 02ddfee
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 02ddfee

Please sign in to comment.