Skip to content

Commit

Permalink
Merge branch 'workspace-duplicate' of github.com:yubonluo/OpenSearch-…
Browse files Browse the repository at this point in the history
…Dashboards into workspace-duplicate

# Conflicts:
#	src/core/server/saved_objects/service/lib/repository.ts
#	src/plugins/workspace/public/components/delete_workspace_modal/delete_workspace_modal.tsx
#	src/plugins/workspace/server/routes/index.ts
  • Loading branch information
yubonluo committed Mar 12, 2024
2 parents ab0dad8 + 2296b15 commit 9147366
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/core/public/saved_objects/simple_saved_object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class SimpleSavedObject<T = unknown> {
public error: SavedObjectType<T>['error'];
public references: SavedObjectType<T>['references'];
public updated_at: SavedObjectType<T>['updated_at'];
public workspaces: SavedObjectType<T>['workspaces'];

constructor(
private client: SavedObjectsClientContract,
Expand All @@ -64,6 +65,7 @@ export class SimpleSavedObject<T = unknown> {
references,
migrationVersion,
updated_at: updateAt,
workspaces,
}: SavedObjectType<T>
) {
this.id = id;
Expand All @@ -73,6 +75,7 @@ export class SimpleSavedObject<T = unknown> {
this._version = version;
this.migrationVersion = migrationVersion;
this.updated_at = updateAt;
this.workspaces = workspaces || [];
if (error) {
this.error = error;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export interface SavedObjectsBulkUpdateObject<T = unknown>
* Note: the default namespace's string representation is `'default'`, and its ID representation is `undefined`.
**/
namespace?: string;
workspaces?: string[];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import { i18n } from '@osd/i18n';
import { useObservable } from 'react-use';
import { useOpenSearchDashboards } from '../../../../opensearch_dashboards_react/public';
import { WorkspaceClient } from '../../workspace_client';
import { getAllowedTypes } from './get_allowed_types';
import { moveToTargetWorkspace } from './move_to_target_workspace';

type WorkspaceOption = EuiComboBoxOptionOption<WorkspaceAttribute>;

Expand Down Expand Up @@ -196,7 +198,7 @@ export function DeleteWorkspaceModal(props: DeleteWorkspaceModalProps) {
onClick={deleteWorkspace}
fill
color="danger"
disabled={value !== 'delete'}
disabled={value !== 'delete' || isLoading}
>
Delete
</EuiButton>
Expand Down

0 comments on commit 9147366

Please sign in to comment.