mirror of https://github.com/apache/nifi.git
NIFI-2017: Fixed typo in nf-port.js that was referencing the wrong variable name to determine whether or not a port is transmitting
Fixed merging logic for root group status. Only consider a port transmitting when there is an active request, not when there is a 'queued' request This closes #1279
This commit is contained in:
parent
1f40f298c0
commit
02f02b245a
|
@ -307,6 +307,8 @@ public class StatusMerger {
|
|||
|
||||
merge(target.getAggregateSnapshot(), targetReadablePermission, toMerge.getAggregateSnapshot(), toMergeReadablePermission);
|
||||
|
||||
target.setTransmitting(Boolean.TRUE.equals(target.isTransmitting()) || Boolean.TRUE.equals(toMerge.isTransmitting()));
|
||||
|
||||
if (target.getNodeSnapshots() != null) {
|
||||
final NodePortStatusSnapshotDTO nodeSnapshot = new NodePortStatusSnapshotDTO();
|
||||
nodeSnapshot.setStatusSnapshot(toMerge.getAggregateSnapshot());
|
||||
|
|
|
@ -16,6 +16,24 @@
|
|||
*/
|
||||
package org.apache.nifi.remote;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import org.apache.nifi.authorization.AuthorizationResult;
|
||||
import org.apache.nifi.authorization.AuthorizationResult.Result;
|
||||
import org.apache.nifi.authorization.Authorizer;
|
||||
|
@ -55,24 +73,6 @@ import org.apache.nifi.util.NiFiProperties;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
public class StandardRootGroupPort extends AbstractPort implements RootGroupPort {
|
||||
|
||||
private static final String CATEGORY = "Site to Site";
|
||||
|
@ -81,10 +81,8 @@ public class StandardRootGroupPort extends AbstractPort implements RootGroupPort
|
|||
|
||||
private final AtomicReference<Set<String>> groupAccessControl = new AtomicReference<Set<String>>(new HashSet<String>());
|
||||
private final AtomicReference<Set<String>> userAccessControl = new AtomicReference<Set<String>>(new HashSet<String>());
|
||||
private final ProcessScheduler processScheduler;
|
||||
private final boolean secure;
|
||||
private final Authorizer authorizer;
|
||||
private final NiFiProperties nifiProperties;
|
||||
private final List<IdentityMapping> identityMappings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -105,11 +103,9 @@ public class StandardRootGroupPort extends AbstractPort implements RootGroupPort
|
|||
final NiFiProperties nifiProperties) {
|
||||
super(id, name, processGroup, type, scheduler);
|
||||
|
||||
this.processScheduler = scheduler;
|
||||
setScheduldingPeriod(MINIMUM_SCHEDULING_NANOS + " nanos");
|
||||
this.authorizer = authorizer;
|
||||
this.secure = secure;
|
||||
this.nifiProperties = nifiProperties;
|
||||
this.identityMappings = IdentityMappingUtil.getIdentityMappings(nifiProperties);
|
||||
this.bulletinRepository = bulletinRepository;
|
||||
this.scheduler = scheduler;
|
||||
|
@ -293,10 +289,6 @@ public class StandardRootGroupPort extends AbstractPort implements RootGroupPort
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!requestQueue.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
requestLock.lock();
|
||||
try {
|
||||
return !activeRequests.isEmpty();
|
||||
|
|
|
@ -410,7 +410,7 @@ nf.Port = (function () {
|
|||
updated.select('text.port-transmission-icon')
|
||||
.attr({
|
||||
'font-family': function (d) {
|
||||
if (d.status.aggregateSnapshot.transmitting === true) {
|
||||
if (d.status.transmitting === true) {
|
||||
return 'FontAwesome';
|
||||
} else {
|
||||
return 'flowfont';
|
||||
|
@ -418,21 +418,21 @@ nf.Port = (function () {
|
|||
}
|
||||
})
|
||||
.text(function (d) {
|
||||
if (d.status.aggregateSnapshot.transmitting === true) {
|
||||
if (d.status.transmitting === true) {
|
||||
return '\uf140';
|
||||
} else {
|
||||
return '\ue80a';
|
||||
}
|
||||
})
|
||||
.classed('transmitting', function (d) {
|
||||
if (d.status.aggregateSnapshot.transmitting === true) {
|
||||
if (d.status.transmitting === true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.classed('not-transmitting', function (d) {
|
||||
if (d.status.aggregateSnapshot.transmitting !== true) {
|
||||
if (d.status.transmitting !== true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue