Bladeren bron

bugfix: Fixed crash when requesting execution status that could not be found (NPE) (#440)

James Read 1 jaar geleden
bovenliggende
commit
32b5fee108
2 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 2 1
      internal/grpcapi/grpcApi.go
  2. 1 1
      webui.dev/js/marshaller.js

+ 2 - 1
internal/grpcapi/grpcApi.go

@@ -213,12 +213,13 @@ func (api *oliveTinAPI) ExecutionStatus(ctx ctx.Context, req *pb.ExecutionStatus
 
 
 	if req.ExecutionTrackingId != "" {
 	if req.ExecutionTrackingId != "" {
 		ile = getExecutionStatusByTrackingID(api, req.ExecutionTrackingId)
 		ile = getExecutionStatusByTrackingID(api, req.ExecutionTrackingId)
+
 	} else {
 	} else {
 		ile = getMostRecentExecutionStatusById(api, req.ActionId)
 		ile = getMostRecentExecutionStatusById(api, req.ActionId)
 	}
 	}
 
 
 	if ile == nil {
 	if ile == nil {
-		return nil, status.Errorf(codes.NotFound, "Execution not found.")
+		return nil, status.Error(codes.NotFound, "Execution not found")
 	} else {
 	} else {
 		res.LogEntry = internalLogEntryToPb(ile)
 		res.LogEntry = internalLogEntryToPb(ile)
 	}
 	}

+ 1 - 1
webui.dev/js/marshaller.js

@@ -407,7 +407,7 @@ function marshalMreOutput (dashboardComponent, fieldset) {
   })
   })
 
 
   const updateMre = (pre, json) => {
   const updateMre = (pre, json) => {
-    pre.innerHTML = json.stdout
+    pre.innerHTML = json.output
   }
   }
 
 
   window.addEventListener('ExecutionFinished', (e) => {
   window.addEventListener('ExecutionFinished', (e) => {