From c89d79336435ee754c0f297a9fa78f059c321a59 Mon Sep 17 00:00:00 2001 From: sbouchex Date: Fri, 17 Nov 2017 14:25:16 +0100 Subject: [PATCH] NIFI-4615 - processor status is set to the ProcessorStatusDTO object - This closes #2276 --- .../main/java/org/apache/nifi/cluster/manager/StatusMerger.java | 2 ++ .../src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java | 1 + 2 files changed, 3 insertions(+) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/StatusMerger.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/StatusMerger.java index 962ab2cfc7..f6b3b3e17a 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/StatusMerger.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/manager/StatusMerger.java @@ -361,6 +361,8 @@ public class StatusMerger { } merge(target.getAggregateSnapshot(), targetReadablePermission, toMerge.getAggregateSnapshot(), toMergeReadablePermission); + + target.setRunStatus(target.getAggregateSnapshot().getRunStatus()); if (target.getNodeSnapshots() != null) { final NodeProcessorStatusSnapshotDTO nodeSnapshot = new NodeProcessorStatusSnapshotDTO(); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java index 37e146c215..b0f2296bd4 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java @@ -1083,6 +1083,7 @@ public final class DtoFactory { dto.setGroupId(procStatus.getGroupId()); dto.setName(procStatus.getName()); dto.setStatsLastRefreshed(new Date()); + dto.setRunStatus(procStatus.getRunStatus().toString()); final ProcessorStatusSnapshotDTO snapshot = new ProcessorStatusSnapshotDTO(); dto.setAggregateSnapshot(snapshot);