Skip to content

Commit

Permalink
[Feature] Setup workspace skeleton and implement basic CRUD API (open…
Browse files Browse the repository at this point in the history
…search-project#130)

* feature: setup workspace skeleton and implement basic CRUD API on workspace

Signed-off-by: Zhou Su <[email protected]>

* feat: remove useless required plugins and logger typo

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: setup public side skeleton

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: Zhou Su <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: Zhou Su <[email protected]>
  • Loading branch information
2 people authored and wanglam committed Feb 22, 2024
1 parent 352d304 commit 9325402
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/core/types/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export interface WorkspaceAttribute {
color?: string;
icon?: string;
reserved?: boolean;
defaultVISTheme?: string;
}
2 changes: 1 addition & 1 deletion src/plugins/workspace/opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "workspace",
"version": "opensearchDashboards",
"server": true,
"ui": false,
"ui": true,
"requiredPlugins": [
"savedObjects"
],
Expand Down
11 changes: 9 additions & 2 deletions src/plugins/workspace/server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export function registerRoutes({
},
id
);
if (!result.success) {
return res.ok({ body: result });
}

return res.ok({
body: result,
Expand All @@ -102,7 +105,9 @@ export function registerRoutes({
request: req,
logger,
},
attributes
{
...attributes,
}
);
return res.ok({ body: result });
})
Expand Down Expand Up @@ -130,7 +135,9 @@ export function registerRoutes({
logger,
},
id,
attributes
{
...attributes,
}
);
return res.ok({ body: result });
})
Expand Down

0 comments on commit 9325402

Please sign in to comment.