NIFI-5186:

- Updating UI to support showing when a component is validating.
This commit is contained in:
Matt Gilman 2018-05-18 14:56:10 -04:00 committed by Scott Aslan
parent 6356d7b9ee
commit 568288dbcd
25 changed files with 273 additions and 145 deletions

View File

@ -481,7 +481,9 @@ public class ProcessGroupStatus implements Cloneable {
// and should not differ amongst nodes. however, whether a processor is invalid
// can be driven by environmental conditions. this check allows any of those to
// take precedence over the configured run status.
if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) {
if (RunStatus.Validating.equals(statusToMerge.getRunStatus())) {
merged.setRunStatus(RunStatus.Validating);
} else if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) {
merged.setRunStatus(RunStatus.Invalid);
}
}

View File

@ -23,6 +23,7 @@ public enum RunStatus {
Running,
Stopped,
Validating,
Invalid,
Disabled;
}

View File

@ -16,14 +16,14 @@
*/
package org.apache.nifi.cluster.manager;
import org.apache.nifi.cluster.protocol.NodeIdentifier;
import org.apache.nifi.web.api.dto.ProcessorDTO;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.apache.nifi.cluster.protocol.NodeIdentifier;
import org.apache.nifi.web.api.dto.ProcessorDTO;
public final class ErrorMerger {
private ErrorMerger() {}
@ -72,13 +72,6 @@ public final class ErrorMerger {
* @return {@link ProcessorDTO#INVALID} if any status is invalid, else {@link ProcessorDTO#VALIDATING} if any status is validating, else {@link ProcessorDTO#VALID}
*/
public static <T> String mergeValidationStatus(final Collection<String> validationStatuses) {
final boolean anyInvalid = validationStatuses.stream()
.anyMatch(status -> ProcessorDTO.INVALID.equalsIgnoreCase(status));
if (anyInvalid) {
return ProcessorDTO.INVALID;
}
final boolean anyValidating = validationStatuses.stream()
.anyMatch(status -> ProcessorDTO.VALIDATING.equalsIgnoreCase(status));
@ -86,6 +79,13 @@ public final class ErrorMerger {
return ProcessorDTO.VALIDATING;
}
final boolean anyInvalid = validationStatuses.stream()
.anyMatch(status -> ProcessorDTO.INVALID.equalsIgnoreCase(status));
if (anyInvalid) {
return ProcessorDTO.INVALID;
}
return ProcessorDTO.VALID;
}
}

View File

@ -415,13 +415,15 @@ public class StatusMerger {
target.setType(toMerge.getType());
}
// if the status to merge is invalid allow it to take precedence. whether the
// if the status to merge is validating/invalid allow it to take precedence. whether the
// processor run status is disabled/stopped/running is part of the flow configuration
// and should not differ amongst nodes. however, whether a processor is invalid
// and should not differ amongst nodes. however, whether a processor is validating/invalid
// can be driven by environmental conditions. this check allows any of those to
// take precedence over the configured run status.
if (RunStatus.Invalid.name().equals(toMerge.getRunStatus())) {
target.setRunStatus(RunStatus.Invalid.name());
if (RunStatus.Validating.toString().equals(toMerge.getRunStatus())) {
target.setRunStatus(RunStatus.Validating.toString());
} else if (RunStatus.Invalid.toString().equals(toMerge.getRunStatus())) {
target.setRunStatus(RunStatus.Invalid.toString());
}
target.setBytesRead(target.getBytesRead() + toMerge.getBytesRead());
@ -573,8 +575,8 @@ public class StatusMerger {
// should be unnecessary here since ports run status not should be affected by
// environmental conditions but doing so in case that changes
if (RunStatus.Invalid.name().equals(toMerge.getRunStatus())) {
target.setRunStatus(RunStatus.Invalid.name());
if (RunStatus.Invalid.toString().equals(toMerge.getRunStatus())) {
target.setRunStatus(RunStatus.Invalid.toString());
}
updatePrettyPrintedFields(target);

View File

@ -16,41 +16,6 @@
*/
package org.apache.nifi.controller;
import static java.util.Objects.requireNonNull;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.stream.Collectors;
import javax.net.ssl.SSLContext;
import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang3.StringUtils;
import org.apache.nifi.action.Action;
@ -269,6 +234,40 @@ import org.apache.zookeeper.server.quorum.QuorumPeerConfig.ConfigException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.net.ssl.SSLContext;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.stream.Collectors;
import static java.util.Objects.requireNonNull;
public class FlowController implements EventAccess, ControllerServiceProvider, ReportingTaskProvider,
QueueProvider, Authorizable, ProvenanceAuthorizableFactory, NodeTypeProvider, IdentifierLookup, ReloadComponent {
@ -3306,6 +3305,8 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
status.setRunStatus(RunStatus.Disabled);
} else if (ScheduledState.RUNNING.equals(procNode.getScheduledState())) {
status.setRunStatus(RunStatus.Running);
} else if (procNode.getValidationStatus() == ValidationStatus.VALIDATING) {
status.setRunStatus(RunStatus.Validating);
} else if (procNode.getValidationStatus() == ValidationStatus.INVALID) {
status.setRunStatus(RunStatus.Invalid);
} else {

View File

@ -141,6 +141,48 @@ path.component-comments {
stroke: #000;
}
text.spin {
-webkit-animation-name: rotate;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-moz-animation-name: rotate;
-moz-animation-duration: 2s;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
animation-name: rotate;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
@-moz-keyframes rotate {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(360deg);
}
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/*
Selection
*/
@ -210,7 +252,8 @@ text.is-primary {
}
text.run-status-icon {
font-size: 13px;
font-size: 14px;
transform-origin: 62px 18px 0;
}
/*

View File

@ -138,6 +138,26 @@ div.context-menu-provenance {
text-shadow: 0 0 4px rgba(255,255,255,1);
}
.validating {
float: left;
width: 12px;
height: 12px;
line-height: 12px !important;
margin-top: 5px !important;
color: #a8a8a8 !important;
fill: #a8a8a8 !important;
text-shadow: 0 0 4px rgba(255,255,255,1);
transform-origin: 6px 6px 0;
}
.validating:before {
font-family: FontAwesome;
font-size: 12px;
content: "\f1ce";
color: #a8a8a8;
text-shadow: 0 0 4px rgba(255,255,255,1);
}
.transmitting {
float: left;
color: #44a3cf !important;

View File

@ -72,21 +72,23 @@
.slick-viewport .fa {
color: #004849;
line-height: 22px;
margin-top: 0 !important;
margin-top: 0;
width: 12px;
height: 12px;
float: left;
margin-right: 3px !important;
margin-right: 5px;
text-align: center;
}
.slick-viewport .icon {
color: #004849;
line-height: 24px;
margin-top: 0 !important;
margin-top: 0;
width: 12px;
height: 12px;
float: left;
margin-right: 3px !important;
margin-right: 5px;
text-align: center;
}
.slick-header.ui-state-default, .slick-headerrow.ui-state-default {
@ -125,7 +127,7 @@
div.status-text {
padding-left: 4px;
line-height: normal;
line-height: 22px;
overflow: hidden;
text-overflow: ellipsis;
float: left;

View File

@ -1195,7 +1195,7 @@
// show the property description if applicable
if (nfCommon.isDefinedAndNotNull(propertyDescriptor)) {
if (!nfCommon.isBlank(propertyDescriptor.description) || !nfCommon.isBlank(propertyDescriptor.defaultValue) || !nfCommon.isBlank(propertyDescriptor.supportsEl)) {
$('<div class="fa fa-question-circle" alt="Info" style="float: right; margin-right: 6px; margin-top: 4px;"></div>').appendTo(cellContent);
$('<div class="fa fa-question-circle" alt="Info" style="float: right;"></div>').appendTo(cellContent);
$('<span class="hidden property-descriptor-name"></span>').text(dataContext.property).appendTo(cellContent);
nameWidthOffset = 46; // 10 + icon width (10) + icon margin (6) + padding (20)
}
@ -1299,7 +1299,7 @@
$.each(propertyDescriptor.allowableValues, function (_, allowableValueEntity) {
var allowableValue = allowableValueEntity.allowableValue;
if (allowableValue.value === dataContext.value) {
markup += '<div class="pointer go-to-service fa fa-long-arrow-right" title="Go To" style="margin-top: 2px" ></div>';
markup += '<div class="pointer go-to-service fa fa-long-arrow-right" title="Go To"></div>';
return false;
}
});
@ -1307,7 +1307,7 @@
// allow user defined properties to be removed
if (options.readOnly !== true && dataContext.type === 'userDefined') {
markup += '<div title="Delete" class="delete-property pointer fa fa-trash" style="margin-top: 2px" ></div>';
markup += '<div title="Delete" class="delete-property pointer fa fa-trash"></div>';
}
return markup;

View File

@ -1256,7 +1256,7 @@
// add the description if applicable
if (nfCommon.isDefinedAndNotNull(prioritizerType.description)) {
$('<div class="fa fa-question-circle" style="float: right; margin-right: 5px;""></div>').appendTo(prioritizer).qtip($.extend({
$('<div class="fa fa-question-circle"></div>').appendTo(prioritizer).qtip($.extend({
content: nfCommon.escapeHtml(prioritizerType.description)
}, nfCommon.config.tooltipConfig));
}

View File

@ -814,12 +814,20 @@
var bType = nfCommon.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? nfCommon.substringAfterLast(b.component[sortDetails.columnId], '.') : '';
return aType === bType ? 0 : aType > bType ? 1 : -1;
} else if (sortDetails.columnId === 'state') {
var aState = 'Invalid';
if (nfCommon.isEmpty(a.component.validationErrors)) {
var aState;
if (a.component.validationStatus === 'VALIDATING') {
aState = 'Validating';
} else if (a.component.validationStatus === 'INVALID') {
aState = 'Invalid';
} else {
aState = nfCommon.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? a.component[sortDetails.columnId] : '';
}
var bState = 'Invalid';
if (nfCommon.isEmpty(b.component.validationErrors)) {
var bState;
if (a.component.validationStatus === 'VALIDATING') {
bState = 'Validating';
} else if (a.component.validationStatus === 'INVALID') {
bState = 'Invalid';
} else {
bState = nfCommon.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? b.component[sortDetails.columnId] : '';
}
return aState === bState ? 0 : aState > bState ? 1 : -1;
@ -858,17 +866,17 @@
}
// always include a button to view the usage
var markup = '<div title="Usage" class="pointer controller-service-usage fa fa-book" style="margin-top: 5px; margin-right: 3px;" ></div>';
var markup = '<div title="Usage" class="pointer controller-service-usage fa fa-book"></div>';
var hasErrors = !nfCommon.isEmpty(dataContext.component.validationErrors);
var hasBulletins = !nfCommon.isEmpty(dataContext.bulletins);
if (hasErrors) {
markup += '<div class="pointer has-errors fa fa-warning" style="margin-top: 4px; margin-right: 3px; float: left;" ></div>';
markup += '<div class="pointer has-errors fa fa-warning"></div>';
}
if (hasBulletins) {
markup += '<div class="has-bulletins fa fa-sticky-note-o" style="margin-top: 5px; margin-right: 3px; float: left;"></div>';
markup += '<div class="has-bulletins fa fa-sticky-note-o"></div>';
}
if (hasErrors || hasBulletins) {
@ -885,7 +893,10 @@
// determine the appropriate label
var icon = '', label = '';
if (!nfCommon.isEmpty(dataContext.component.validationErrors)) {
if (dataContext.component.validationStatus === 'VALIDATING') {
icon = 'validating fa fa-spin fa-circle-notch';
label = 'Validating';
} else if (dataContext.component.validationStatus === 'INVALID') {
icon = 'invalid fa fa-warning';
label = 'Invalid';
} else {
@ -905,8 +916,8 @@
}
// format the markup
var formattedValue = '<div layout="row"><div class="' + icon + '" style="margin-top: 5px;"></div>';
return formattedValue + '<div class="status-text" style="margin-top: 4px;">' + label + '</div></div>';
var formattedValue = '<div layout="row"><div class="' + icon + '"></div>';
return formattedValue + '<div class="status-text">' + label + '</div></div>';
};
var controllerServiceActionFormatter = function (row, cell, value, columnDef, dataContext) {
@ -928,43 +939,43 @@
if (dataContext.permissions.canWrite) {
// write permission... allow actions based on the current state of the service
if (dataContext.component.state === 'ENABLED' || dataContext.component.state === 'ENABLING') {
markup += '<div class="pointer view-controller-service fa fa-gear" title="View Configuration" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div class="pointer disable-controller-service icon icon-enable-false" title="Disable" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div class="pointer view-controller-service fa fa-gear" title="View Configuration"></div>';
markup += '<div class="pointer disable-controller-service icon icon-enable-false" title="Disable"></div>';
} else if (dataContext.component.state === 'DISABLED') {
markup += '<div class="pointer edit-controller-service fa fa-gear" title="Configure" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div class="pointer edit-controller-service fa fa-gear" title="Configure"></div>';
// if there are no validation errors allow enabling
if (nfCommon.isEmpty(dataContext.component.validationErrors)) {
markup += '<div class="pointer enable-controller-service fa fa-flash" title="Enable" style="margin-top: 2px; margin-right: 3px;"></div>';
markup += '<div class="pointer enable-controller-service fa fa-flash" title="Enable"></div>';
}
if (dataContext.component.multipleVersionsAvailable === true) {
markup += '<div title="Change Version" class="pointer change-version-controller-service fa fa-exchange" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div title="Change Version" class="pointer change-version-controller-service fa fa-exchange"></div>';
}
if (canWriteControllerServiceParent(dataContext)) {
markup += '<div class="pointer delete-controller-service fa fa-trash" title="Remove" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div class="pointer delete-controller-service fa fa-trash" title="Remove"></div>';
}
}
if (dataContext.component.persistsState === true) {
markup += '<div title="View State" class="pointer view-state-controller-service fa fa-tasks" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div title="View State" class="pointer view-state-controller-service fa fa-tasks"></div>';
}
} else {
// no write permission... allow viewing configuration if in current group
if (definedByCurrentGroup === true) {
markup += '<div class="pointer view-controller-service fa fa-gear" title="View Configuration" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div class="pointer view-controller-service fa fa-gear" title="View Configuration"></div>';
}
}
} else {
// not defined in current group... show go to arrow
markup += '<div class="pointer go-to-controller-service fa fa-long-arrow-right" title="Go To" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div class="pointer go-to-controller-service fa fa-long-arrow-right" title="Go To"></div>';
}
}
// allow policy configuration conditionally
if (nfCanvasUtils.isManagedAuthorizer() && nfCommon.canAccessTenants()) {
markup += '<div title="Access Policies" class="pointer edit-access-policies fa fa-key" style="margin-top: 2px;"></div>';
markup += '<div title="Access Policies" class="pointer edit-access-policies fa fa-key"></div>';
}
return markup;

View File

@ -618,7 +618,7 @@
var markup = '';
if (dataContext.differenceType !== 'Component Removed' && nfCommon.isDefinedAndNotNull(dataContext.processGroupId)) {
markup += '<div class="pointer go-to-component fa fa-long-arrow-right" title="Go To" style="margin-top: 2px" ></div>';
markup += '<div class="pointer go-to-component fa fa-long-arrow-right" title="Go To"></div>';
}
return markup;

View File

@ -200,7 +200,7 @@
},
_renderGroup: function (ul, match) {
var groupLabel = $('<span></span>').text(match.component.identity);
var groupContent = $('<a></a>').append('<div class="fa fa-users" style="margin-right: 5px;"></div>').append(groupLabel);
var groupContent = $('<a></a>').append('<div class="fa fa-users"></div>').append(groupLabel);
return $('<li></li>').data('ui-autocomplete-item', match).append(groupContent).appendTo(ul);
}
});
@ -594,7 +594,7 @@
var identityFormatter = function (row, cell, value, columnDef, dataContext) {
var markup = '';
if (dataContext.type === 'group') {
markup += '<div class="fa fa-users" style="margin-right: 5px;"></div>';
markup += '<div class="fa fa-users"></div>';
}
markup += nfCommon.escapeHtml(dataContext.component.identity);

View File

@ -259,7 +259,9 @@
.attrs({
'class': 'run-status-icon',
'x': 55,
'y': 23
'y': 23,
'width': 14,
'height': 14
});
// processor type
@ -795,6 +797,35 @@
return nfClusterSummary.isClustered() && d.status.aggregateSnapshot.executionNode === 'PRIMARY' ? 'visible' : 'hidden';
};
/**
* Determines whether the specific component needs a tooltip.
*
* @param d
* @return if a tip is required
*/
var needsTip = function (d) {
return (d.permissions.canRead && !nfCommon.isEmpty(d.component.validationErrors)) || d.status.aggregateSnapshot.runStatus === 'Validating';
};
/**
* Gets the tooltip content.
*
* @param d
* @return the tip content
*/
var getTip = function (d) {
if (d.permissions.canRead && !nfCommon.isEmpty(d.component.validationErrors)) {
var list = nfCommon.formatUnorderedList(d.component.validationErrors);
if (list === null || list.length === 0) {
return '';
} else {
return list;
}
} else {
return 'Validating...';
}
};
/**
* Updates the stats for the processors in the specified selection.
*
@ -811,7 +842,9 @@
'fill': function (d) {
var fill = '#728e9b';
if (d.status.aggregateSnapshot.runStatus === 'Invalid') {
if (d.status.aggregateSnapshot.runStatus === 'Validating') {
fill = '#a8a8a8';
} else if (d.status.aggregateSnapshot.runStatus === 'Invalid') {
fill = '#cf9f5d';
} else if (d.status.aggregateSnapshot.runStatus === 'Running') {
fill = '#7dc7a0';
@ -829,10 +862,15 @@
return family;
}
})
.classed('fa-spin', function (d) {
return d.status.aggregateSnapshot.runStatus === 'Validating';
})
.text(function (d) {
var img = '';
if (d.status.aggregateSnapshot.runStatus === 'Disabled') {
img = '\ue802';
} else if (d.status.aggregateSnapshot.runStatus === 'Validating') {
img = '\uf1ce';
} else if (d.status.aggregateSnapshot.runStatus === 'Invalid') {
img = '\uf071';
} else if (d.status.aggregateSnapshot.runStatus === 'Running') {
@ -847,7 +885,7 @@
var tip = d3.select('#run-status-tip-' + d.id);
// if there are validation errors generate a tooltip
if (d.permissions.canRead && !nfCommon.isEmpty(d.component.validationErrors)) {
if (needsTip(d)) {
// create the tip if necessary
if (tip.empty()) {
tip = d3.select('#processor-tooltips').append('div')
@ -859,12 +897,7 @@
// update the tip
tip.html(function () {
var list = nfCommon.formatUnorderedList(d.component.validationErrors);
if (list === null || list.length === 0) {
return '';
} else {
return $('<div></div>').append(list).html();
}
return $('<div></div>').append(getTip(d)).html();
});
// add the tooltip

View File

@ -499,7 +499,7 @@
// define a custom formatter for showing more processor details
var moreDetailsFormatter = function (row, cell, value, columnDef, dataContext) {
return '<div class="pointer show-flowfile-details fa fa-info-circle" title="View Details" style="margin-top: 5px; float: left;"></div>';
return '<div class="pointer show-flowfile-details fa fa-info-circle" title="View Details" style="float: left;"></div>';
};
// function for formatting data sizes

View File

@ -264,12 +264,20 @@
var bType = nfCommon.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? nfCommon.substringAfterLast(b.component[sortDetails.columnId], '.') : '';
return aType === bType ? 0 : aType > bType ? 1 : -1;
} else if (sortDetails.columnId === 'state') {
var aState = 'Invalid';
if (nfCommon.isEmpty(a.component.validationErrors)) {
var aState;
if (a.component.validationStatus === 'VALIDATING') {
aState = 'Validating';
} else if (a.component.validationStatus === 'INVALID') {
aState = 'Invalid';
} else {
aState = nfCommon.isDefinedAndNotNull(a.component[sortDetails.columnId]) ? a.component[sortDetails.columnId] : '';
}
var bState = 'Invalid';
if (nfCommon.isEmpty(b.component.validationErrors)) {
var bState;
if (a.component.validationStatus === 'VALIDATING') {
bState = 'Validating';
} else if (a.component.validationStatus === 'INVALID') {
bState = 'Invalid';
} else {
bState = nfCommon.isDefinedAndNotNull(b.component[sortDetails.columnId]) ? b.component[sortDetails.columnId] : '';
}
return aState === bState ? 0 : aState > bState ? 1 : -1;
@ -997,9 +1005,12 @@
// determine the appropriate label
var icon = '', label = '';
if (!nfCommon.isEmpty(dataContext.component.validationErrors)) {
label = 'Invalid';
if (dataContext.component.validationStatus === 'VALIDATING') {
icon = 'validating fa fa-spin fa-circle-notch';
label = 'Validating';
} else if (dataContext.component.validationStatus === 'INVALID') {
icon = 'invalid fa fa-warning';
label = 'Invalid';
} else {
if (dataContext.component.state === 'STOPPED') {
label = 'Stopped';
@ -1020,8 +1031,8 @@
}
// format the markup
var formattedValue = '<div layout="row"><div class="' + icon + '" style="margin-top: 3px;"></div>';
return formattedValue + '<div class="status-text" style="margin-top: 4px;">' + nfCommon.escapeHtml(label) + '</div><div style="float: left; margin-left: 4px;">' + nfCommon.escapeHtml(activeThreadCount) + '</div></div>';
var formattedValue = '<div layout="row"><div class="' + icon + '"></div>';
return formattedValue + '<div class="status-text">' + nfCommon.escapeHtml(label) + '</div><div style="float: left; margin-left: 4px;">' + nfCommon.escapeHtml(activeThreadCount) + '</div></div>';
};
var reportingTaskActionFormatter = function (row, cell, value, columnDef, dataContext) {
@ -1029,32 +1040,32 @@
if (dataContext.permissions.canRead && dataContext.permissions.canWrite) {
if (dataContext.component.state === 'RUNNING') {
markup += '<div title="Stop" class="pointer stop-reporting-task fa fa-stop" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div title="Stop" class="pointer stop-reporting-task fa fa-stop"></div>';
} else if (dataContext.component.state === 'STOPPED' || dataContext.component.state === 'DISABLED') {
markup += '<div title="Edit" class="pointer edit-reporting-task fa fa-pencil" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div title="Edit" class="pointer edit-reporting-task fa fa-pencil"></div>';
// support starting when stopped and no validation errors
if (dataContext.component.state === 'STOPPED' && nfCommon.isEmpty(dataContext.component.validationErrors)) {
markup += '<div title="Start" class="pointer start-reporting-task fa fa-play" style="margin-top: 2px; margin-right: 3px;"></div>';
markup += '<div title="Start" class="pointer start-reporting-task fa fa-play"></div>';
}
if (dataContext.component.multipleVersionsAvailable === true) {
markup += '<div title="Change Version" class="pointer change-version-reporting-task fa fa-exchange" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div title="Change Version" class="pointer change-version-reporting-task fa fa-exchange"></div>';
}
if (nfCommon.canModifyController()) {
markup += '<div title="Remove" class="pointer delete-reporting-task fa fa-trash" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div title="Remove" class="pointer delete-reporting-task fa fa-trash"></div>';
}
}
if (dataContext.component.persistsState === true) {
markup += '<div title="View State" class="pointer view-state-reporting-task fa fa-tasks" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div title="View State" class="pointer view-state-reporting-task fa fa-tasks"></div>';
}
}
// allow policy configuration conditionally
if (nfCanvasUtils.isManagedAuthorizer() && nfCommon.canAccessTenants()) {
markup += '<div title="Access Policies" class="pointer edit-access-policies fa fa-key" style="margin-top: 2px;"></div>';
markup += '<div title="Access Policies" class="pointer edit-access-policies fa fa-key"></div>';
}
return markup;
@ -1283,10 +1294,10 @@
if (nfCommon.canModifyController()) {
// edit registry
markup += '<div title="Edit" class="pointer edit-registry fa fa-pencil" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div title="Edit" class="pointer edit-registry fa fa-pencil"></div>';
// remove registry
markup += '<div title="Remove" class="pointer remove-registry fa fa-trash" style="margin-top: 2px; margin-right: 3px;" ></div>';
markup += '<div title="Remove" class="pointer remove-registry fa fa-trash"></div>';
}
return markup;

View File

@ -398,12 +398,12 @@
var markup = '';
if (dataContext.isEditable === true) {
markup += '<div title="Delete" class="delete-variable pointer fa fa-trash" style="margin-top: 2px;" ></div>';
markup += '<div title="Delete" class="delete-variable pointer fa fa-trash"></div>';
} else {
var currentProcessGroupId = $('#variable-registry-process-group-id').text();
if (dataContext.processGroupId !== currentProcessGroupId) {
markup += '<div title="Go To" class="go-to-variable pointer fa fa-long-arrow-right" style="margin-top: 2px;" ></div>';
markup += '<div title="Go To" class="go-to-variable pointer fa fa-long-arrow-right"></div>';
}
}

View File

@ -543,7 +543,7 @@
*/
function createNodeTableColumnModel() {
var moreDetailsFormatter = function (row, cell, value, columnDef, dataContext) {
return '<div title="View Details" class="pointer show-node-details fa fa-info-circle" style="margin-top: 2px;"></div>';
return '<div title="View Details" class="pointer show-node-details fa fa-info-circle"></div>';
};
// define a custom formatter for the run status column
@ -640,9 +640,9 @@
// return the appropriate markup
if (canConnect) {
return '<div title="Connect" class="pointer prompt-for-connect fa fa-plug" style="margin-top: 2px;"></div><div title="Delete" class="pointer prompt-for-removal fa fa-trash" style="margin-top: 2px;"></div>';
return '<div title="Connect" class="pointer prompt-for-connect fa fa-plug"></div><div title="Delete" class="pointer prompt-for-removal fa fa-trash"></div>';
} else if (canDisconnect) {
return '<div title="Disconnect" class="pointer prompt-for-disconnect fa fa-power-off" style="margin-top: 2px;"></div>';
return '<div title="Disconnect" class="pointer prompt-for-disconnect fa fa-power-off"></div>';
} else {
return '<div style="width: 16px; height: 16px;">&nbsp;</div>';
}
@ -705,7 +705,7 @@
function createJvmTableColumnModel() {
var gcFormatter = function (row, cell, value, columnDef, dataContext) {
return '<div class="pointer show-jvm-gc fa fa-question-circle" style="margin-top: 2px;"></div><span class="hidden row-id">' + nfCommon.escapeHtml(dataContext.id) + '</span>';
return '<div class="pointer show-jvm-gc fa fa-question-circle"></div><span class="hidden row-id">' + nfCommon.escapeHtml(dataContext.id) + '</span>';
};
return [

View File

@ -214,7 +214,7 @@
if (nfCommon.canModifyCounters()) {
// function for formatting the actions column
var actionFormatter = function (row, cell, value, columnDef, dataContext) {
return '<div title="Reset Counter" class="pointer reset-counter fa fa-undo" style="margin-top: 2px;"></div>';
return '<div title="Reset Counter" class="pointer reset-counter fa fa-undo"></div>';
};
// add the action column

View File

@ -301,7 +301,7 @@
// define a custom formatter for the more details column
var moreDetailsFormatter = function (row, cell, value, columnDef, dataContext) {
if (dataContext.canRead === true) {
return '<div title="View Details" class="pointer show-action-details fa fa-info-circle" style="margin-top: 4px;"></div>';
return '<div title="View Details" class="pointer show-action-details fa fa-info-circle"></div>';
}
return "";
};

View File

@ -375,7 +375,7 @@
}
if (!nfCommon.isEmpty(dataContext.controllerServiceApis)) {
markup += '<div class="controller-service-apis fa fa-list" title="Compatible Controller Service" style="margin-top: 2px; margin-left: 4px;"></div><span class="hidden row-id">' + nfCommon.escapeHtml(dataContext.id) + '</span>';
markup += '<div class="controller-service-apis fa fa-list" title="Compatible Controller Service" style="margin-left: 4px;"></div><span class="hidden row-id">' + nfCommon.escapeHtml(dataContext.id) + '</span>';
}
markup += '<div class="clear"></div>';

View File

@ -635,7 +635,7 @@
// conditionally include the cluster node id
if (nfCommon.SUPPORTS_SVG) {
markup += '<div title="Show Lineage" class="pointer show-lineage icon icon-lineage" style="margin-right: 3px;"></div>';
markup += '<div title="Show Lineage" class="pointer show-lineage icon icon-lineage"></div>';
}
// conditionally support going to the component

View File

@ -266,7 +266,7 @@
// define a custom formatter for showing more processor details
var moreProcessorDetails = function (row, cell, value, columnDef, dataContext) {
var markup = '<div title="View Processor Details" class="pointer show-processor-details fa fa-info-circle" style="margin-right: 3px;"></div>';
var markup = '<div title="View Processor Details" class="pointer show-processor-details fa fa-info-circle"></div>';
// if there are bulletins, render them on the graph
if (!nfCommon.isEmpty(dataContext.bulletins)) {
@ -329,6 +329,9 @@
case 'disabled':
classes = 'icon icon-enable-false disabled';
break;
case 'validating':
classes = 'fa fa-spin fa-circle-notch validating';
break;
case 'invalid':
classes = 'fa fa-warning invalid';
break;
@ -336,11 +339,10 @@
classes = '';
}
var markup =
'<div layout="row">' +
'<div class="' + classes + '"></div>' +
'<div class="status-text" style="margin-top: 4px;">' +
'<div class="status-text">' +
nfCommon.escapeHtml(value) +
'</div>' +
'<div style="float: left; margin-left: 4px;" title="' + threadTip + '">' +
@ -456,11 +458,11 @@
var markup = '';
if (isInShell) {
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Processor in ' + nfCommon.escapeHtml(dataContext.processGroupNamePath) + '" style="margin-right: 3px;"></div>';
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Processor in ' + nfCommon.escapeHtml(dataContext.processGroupNamePath) + '"></div>';
}
if (nfCommon.SUPPORTS_SVG) {
markup += '<div class="pointer show-processor-status-history fa fa-area-chart" title="View Status History" style="margin-right: 3px;"></div>';
markup += '<div class="pointer show-processor-status-history fa fa-area-chart" title="View Status History"></div>';
}
if (isClustered) {
@ -703,7 +705,7 @@
// define a custom formatter for showing more processor details
var moreConnectionDetails = function (row, cell, value, columnDef, dataContext) {
return '<div class="pointer show-connection-details fa fa-info-circle" title="View Connection Details" style="margin-top: 5px;"></div>';
return '<div class="pointer show-connection-details fa fa-info-circle" title="View Connection Details"></div>';
};
var backpressureFormatter = function (row, cell, value, columnDef, dataContext) {
@ -788,11 +790,11 @@
var markup = '';
if (isInShell) {
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Connection" style="margin-right: 3px;"></div>';
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Connection"></div>';
}
if (nfCommon.SUPPORTS_SVG) {
markup += '<div class="pointer show-connection-status-history fa fa-area-chart" title="View Status History" style="margin-right: 3px;"></div>';
markup += '<div class="pointer show-connection-status-history fa fa-area-chart" title="View Status History"></div>';
}
if (isClustered) {
@ -1010,7 +1012,7 @@
// if there are bulletins, render them on the graph
if (!nfCommon.isEmpty(dataContext.bulletins)) {
markup += '<div class="has-bulletins fa fa-sticky-note-o" style="margin-top: 5px; margin-left: 5px; float: left;"></div><span class="hidden row-id">' + nfCommon.escapeHtml(dataContext.id) + '</span>';
markup += '<div class="has-bulletins fa fa-sticky-note-o" style="margin-left: 5px; float: left;"></div><span class="hidden row-id">' + nfCommon.escapeHtml(dataContext.id) + '</span>';
}
return markup;
@ -1086,7 +1088,7 @@
classes = '';
label = '';
}
return '<div layout="row"><div class="' + classes + '"></div><div class="status-text" style="margin-top: 4px;">' + label + '</div></div>';
return '<div layout="row"><div class="' + classes + '"></div><div class="status-text">' + label + '</div></div>';
};
// define the column model for the summary table
@ -1123,11 +1125,11 @@
var markup = '';
if (isInShell && dataContext.groupId !== null) {
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Process Group" style="margin-right: 3px;"></div>';
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Process Group"></div>';
}
if (nfCommon.SUPPORTS_SVG) {
markup += '<div class="pointer show-process-group-status-history fa fa-area-chart" title="View Status History" style="margin-right: 3px;"></div>';
markup += '<div class="pointer show-process-group-status-history fa fa-area-chart" title="View Status History"></div>';
}
if (isClustered) {
@ -1383,7 +1385,7 @@
var markup = '';
if (isInShell) {
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Input Port" style="margin-right: 3px;"></div>';
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Input Port"></div>';
}
if (isClustered) {
@ -1630,7 +1632,7 @@
var markup = '';
if (isInShell) {
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Output Port" style="margin-right: 3px;"></div>';
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Output Port"></div>';
}
if (isClustered) {
@ -1882,7 +1884,7 @@
// generate the mark up
var formattedValue = '<div layout="row"><div class="' + transmissionClass + '"></div>';
return formattedValue + '<div class="status-text" style="margin-top: 4px;">' + transmissionLabel + '</div><div style="float: left; margin-left: 4px;">' + nfCommon.escapeHtml(activeThreadCount) + '</div></div>';
return formattedValue + '<div class="status-text">' + transmissionLabel + '</div><div style="float: left; margin-left: 4px;">' + nfCommon.escapeHtml(activeThreadCount) + '</div></div>';
};
var transmissionStatusColumn = {
@ -1929,11 +1931,11 @@
var markup = '';
if (isInShell) {
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Process Group" style="margin-right: 3px;"></div>';
markup += '<div class="pointer go-to fa fa-long-arrow-right" title="Go To Process Group"></div>';
}
if (nfCommon.SUPPORTS_SVG) {
markup += '<div class="pointer show-remote-process-group-status-history fa fa-area-chart" title="View Status History" style="margin-right: 3px;"></div>';
markup += '<div class="pointer show-remote-process-group-status-history fa fa-area-chart" title="View Status History"></div>';
}
if (isClustered) {

View File

@ -283,18 +283,18 @@
var markup = '';
if (dataContext.permissions.canRead === true) {
markup += '<div title="Download" class="pointer export-template icon icon-template-save" style="margin-top: 2px; margin-right: 3px;"></div>';
markup += '<div title="Download" class="pointer export-template icon icon-template-save"></div>';
}
// all DFMs to remove templates
if (dataContext.permissions.canWrite === true) {
markup += '<div title="Remove Template" class="pointer prompt-to-delete-template fa fa-trash" style="margin-top: 2px; margin-right: 3px;"></div>';
markup += '<div title="Remove Template" class="pointer prompt-to-delete-template fa fa-trash"></div>';
}
// allow policy configuration conditionally if embedded in
if (top !== window && nfCommon.canAccessTenants()) {
if (nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.CanvasUtils) && parent.nf.CanvasUtils.isManagedAuthorizer()) {
markup += '<div title="Access Policies" class="pointer edit-access-policies fa fa-key" style="margin-top: 2px;"></div>';
markup += '<div title="Access Policies" class="pointer edit-access-policies fa fa-key"></div>';
}
}

View File

@ -783,7 +783,7 @@
var identityFormatter = function (row, cell, value, columnDef, dataContext) {
var markup = '';
if (dataContext.type === 'group') {
markup += '<div class="fa fa-users" style="margin-right: 5px;"></div>';
markup += '<div class="fa fa-users"></div>';
}
markup += nfCommon.escapeHtml(dataContext.component.identity);
@ -810,7 +810,7 @@
// ensure user can modify the user
if (configurableUsersAndGroups && dataContext.component.configurable === true && nfCommon.canModifyTenants()) {
markup += '<div title="Edit" class="pointer edit-user fa fa-pencil" style="margin-right: 3px;"></div>';
markup += '<div title="Edit" class="pointer edit-user fa fa-pencil"></div>';
markup += '<div title="Remove" class="pointer delete-user fa fa-trash"></div>';
}
@ -1127,7 +1127,7 @@
var groupId = $('<span class="group-id hidden"></span>').text(group.id);
// icon
var groupIcon = $('<div class="fa fa-users nf-checkbox-label" style="margin-top: 6px;"></div>');
var groupIcon = $('<div class="fa fa-users nf-checkbox-label"></div>');
// identity
var identity = $('<div class="available-identities nf-checkbox-label"></div>').text(group.component.identity);