Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications how workspace details, rather than the actual resource #3747

Merged
merged 4 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading