diff --git a/center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java b/center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java index 127336248..d4be2fe5e 100644 --- a/center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java +++ b/center/src/main/java/com/microsoft/hydralab/center/service/DeviceAgentManagementService.java @@ -720,8 +720,8 @@ private JSONObject runAnalysisTask(TestTaskSpec testTaskSpec) { for (AgentDeviceGroup tempAgentDeviceGroup : agentDeviceGroups.values()) { AgentFunctionAvailability function = tempAgentDeviceGroup.getFunctionAvailabilities().stream() - .filter(functionAvailability -> functionAvailability.getFunctionName().equals(testTaskSpec.runningType)).findFirst().get(); - if (function.isEnabled()) { + .filter(functionAvailability -> functionAvailability.getFunctionName().equals(testTaskSpec.runningType)).findFirst().orElse(null); + if (function != null && function.isEnabled()) { List requirements = function.getEnvCapabilityRequirements(); boolean isMatch = true; for (AnalysisTask.AnalysisConfig config : configs) { diff --git a/react/src/component/TasksView.jsx b/react/src/component/TasksView.jsx index c40cd802e..60732ad9d 100644 --- a/react/src/component/TasksView.jsx +++ b/react/src/component/TasksView.jsx @@ -564,7 +564,7 @@ class TasksView extends BaseView { {task.overallSuccessRate} - {task.totalTestCount ? '(' +(task.totalTestCount - task.totalFailCount) + '/' + task.totalTestCount+ ')' : task.status} + {task.analysisConfigs ? task.status : '(' +(task.totalTestCount - task.totalFailCount) + '/' + task.totalTestCount+ ')'}