Skip to content

Commit

Permalink
TRE UI does not update when an action on a VM completes
Browse files Browse the repository at this point in the history
  • Loading branch information
marrobi committed Sep 22, 2023
1 parent a59e807 commit 98c4610
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BUG FIXES:
* Upgrade unresticted and airlock base template versions due to diagnostic settings retention period being depreciated ([#3704](https://github.com/microsoft/AzureTRE/pull/3704))
* Fix shared services list return restricted resource for admins causing issues with updates ([#3716](https://github.com/microsoft/AzureTRE/issues/3716))
* Fix grey box appearing on resource card when costs are not available. ([#3254](https://github.com/microsoft/AzureTRE/issues/3254))

* Fix notification panel not passing the workspace scope id to the API hence UI not updating ([#3353](https://github.com/microsoft/AzureTRE/issues/3353))

## 0.14.1 (September 1, 2023)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export const NotificationItem: React.FunctionComponent<NotificationItemProps> =

try {
if (op.resourcePath.indexOf(ApiEndpoint.Workspaces) !== -1) {
// we need the workspace to get auth details
const wsId = op.resourcePath.split('/')[2];
ws = (await apiCall(`${ApiEndpoint.Workspaces}/${wsId}`, HttpMethod.Get)).workspace;
let scopeId = (await apiCall(`${ApiEndpoint.Workspaces}/${wsId}/scopeid`, HttpMethod.Get)).workspaceAuth.scopeId;
ws = (await apiCall(`${ApiEndpoint.Workspaces}/${wsId}`, HttpMethod.Get, scopeId)).workspace;

if (op.resourcePath.split('/').length === 3) {
isWs = true;
Expand Down
4 changes: 2 additions & 2 deletions ui/app/src/components/workspaces/WorkspaceLeftNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const WorkspaceLeftNav: React.FunctionComponent<WorkspaceLeftNavProps> =
useEffect(() => {
const getWorkspaceServices = async () => {
// get the workspace services

if(workspaceCtx.workspace.id === undefined) return;
let serviceLinkArray: Array<any> = [];
props.workspaceServices.forEach((service: WorkspaceService) => {
serviceLinkArray.push(
Expand Down Expand Up @@ -74,7 +74,7 @@ export const WorkspaceLeftNav: React.FunctionComponent<WorkspaceLeftNavProps> =
];

// Only show airlock link if enabled for workspace
if (workspaceCtx.workspace.properties.enable_airlock) {
if (workspaceCtx.workspace.properties.enable_airlock !== undefined && workspaceCtx.workspace.properties.enable_airlock) {
serviceNavLinks[0].links.push({
name: 'Airlock',
key: ApiEndpoint.AirlockRequests,
Expand Down
2 changes: 2 additions & 0 deletions ui/app/src/components/workspaces/WorkspaceServiceItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export const WorkspaceServiceItem: React.FunctionComponent<WorkspaceServiceItemP

useEffect(() => {
const getData = async () => {
if(workspaceCtx.workspace.id === undefined) return;

setHasUserResourceTemplates(false);
try {
let svc = props.workspaceService || {} as WorkspaceService;
Expand Down

0 comments on commit 98c4610

Please sign in to comment.