Skip to content

Commit

Permalink
Notifications how workspace details, rather than the actual resource
Browse files Browse the repository at this point in the history
  • Loading branch information
marrobi committed Oct 16, 2023
1 parent 6edea32 commit 8bbb654
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FEATURES:
ENHANCEMENTS:

BUG FIXES:
* Fix notifications displaying workspace name rather than actual resource ([#3746](https://github.com/microsoft/AzureTRE/issues/3746))

COMPONENTS:

Expand Down
2 changes: 1 addition & 1 deletion ui/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tre-ui",
"version": "0.5.10",
"version": "0.5.11",
"private": true,
"dependencies": {
"@azure/msal-browser": "^2.35.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ export const NotificationItem: React.FunctionComponent<NotificationItemProps> =
if (op.resourcePath.indexOf(ApiEndpoint.Workspaces) !== -1) {
const wsId = op.resourcePath.split('/')[2];
let scopeId = (await apiCall(`${ApiEndpoint.Workspaces}/${wsId}/scopeid`, HttpMethod.Get)).workspaceAuth.scopeId;
ws = (await apiCall(`${ApiEndpoint.Workspaces}/${wsId}`, HttpMethod.Get, scopeId)).workspace;

// is actually a workspace operation or workspace child resource operation
// is a workspace child resource operation
if (op.resourcePath.split('/').length >= 3) {
ws = (await apiCall(`${ApiEndpoint.Workspaces}/${wsId}`, HttpMethod.Get, scopeId)).workspace;
resource = ws;
} else {
let r = await apiCall(op.resourcePath, HttpMethod.Get, scopeId);
resource = getResourceFromResult(r);
// is a workspace operation
} else {
resource = ws;
}
} else {
let r = await apiCall(op.resourcePath, HttpMethod.Get);
Expand Down

0 comments on commit 8bbb654

Please sign in to comment.