-
\ No newline at end of file
+
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
index 9f0494d756..19ca51eb11 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
@@ -218,6 +218,10 @@
+
+
Verification Results
+
+
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/referenced-attributes-configuration.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/referenced-attributes-configuration.jsp
new file mode 100644
index 0000000000..510f500a92
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/referenced-attributes-configuration.jsp
@@ -0,0 +1,47 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
+
-
\ No newline at end of file
+
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/verification-request-status-dialog.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/verification-request-status-dialog.jsp
new file mode 100644
index 0000000000..76340a1cd4
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/verification-request-status-dialog.jsp
@@ -0,0 +1,29 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/dialog.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/dialog.css
index 3fa010797a..e28d68088e 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/dialog.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/dialog.css
@@ -284,6 +284,98 @@ div.local-changes-message {
font-size: 13px;
}
+/*
+ Referenced Attributes
+ */
+
+#referenced-attributes-table {
+ position: relative;
+ height: 240px;
+}
+
+#add-referenced-attribute {
+ float: right;
+ margin-bottom: 4px;
+ font-size: 16px;
+ text-transform: uppercase;
+}
+
+#referenced-attributes-title {
+ font-size: 12px;
+ float: left;
+ height: 28px;
+ line-height: 28px;
+ margin-left: 6px;
+}
+
+#verification-request-percent-complete {
+ margin-top: 10px;
+ border-radius: 0;
+}
+
+div.verification-results {
+ display: none;
+ position: absolute;
+ top: calc(60% - -10px);
+ right: 0;
+ left: 0;
+ bottom: 0;
+}
+
+div.verification-results-header {
+ color: #728e9b;
+ font-size: 16px;
+ font-family: 'Roboto Slab';
+ font-style: normal;
+ font-weight: bold;
+}
+
+div.verification-results-listing {
+ border: 0 solid #CCCCCC;
+ overflow: auto;
+ position: absolute;
+ top: 20px;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ padding: 10px;
+}
+
+div.verification-result {
+ margin-bottom: 8px;
+}
+
+div.verification-result-outcome {
+ float: left;
+ font-size: 14px;
+ width: 14px;
+ margin-right: 10px;
+}
+
+div.verification-result-outcome.fa-check {
+ color: #4fa885;
+}
+
+div.verification-result-outcome.fa-times {
+ color: #e21a1a;
+}
+
+div.verification-result-outcome.fa-exclamation {
+ color: #eB8f11;
+}
+
+div.verification-result-step-name {
+ float: left;
+ font-size: 14px;
+ font-weight: 500;
+}
+
+div.verification-result-explanation {
+ font-size: 12px;
+ margin-left: 24px;
+ margin-top: 2px;
+}
+
/*
Variable Registry
*/
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/processor-configuration.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/processor-configuration.css
index 6a78ef8c16..81481f53d3 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/processor-configuration.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/processor-configuration.css
@@ -191,4 +191,4 @@ div.processor-relationship-container {
/* status bar button icon */
#processor-configuration div.dialog-status-bar div.button-icon.fa-hourglass-end {
font-size : 11px !important;
-}
\ No newline at end of file
+}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
index bf0d1fb0da..38ceef1992 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
@@ -28,28 +28,20 @@ div.required-property-note {
margin-left: 6px;
}
-div.add-property {
+div.add-property, div.verify-properties {
float: right;
margin-bottom: 4px;
+ margin-left: 4px;
font-size: 16px;
text-transform: uppercase;
}
-div.add-property-text {
- float: left;
- margin-left: 5px;
- height: 19px;
- line-height: 19px;
- color: #262626;
-}
-
div.property-table {
position: absolute;
top: 42px;
bottom: 0px;
left: 0px;
right: 0px;
- min-height: 150px;
}
.property-table .fa {
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index b3078829cf..148bb7814b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -105,6 +105,7 @@
_) {
var groupId = null;
+ var propertyVerificationCallback = null;
var COMBO_MIN_WIDTH = 212;
var EDITOR_MIN_WIDTH = 212;
var EDITOR_MIN_HEIGHT = 100;
@@ -1784,6 +1785,22 @@
}
};
+ var marshalProperties = function (table) {
+ var properties = {};
+ var propertyGrid = table.data('gridInstance');
+ var propertyData = propertyGrid.getData();
+ $.each(propertyData.getItems(), function () {
+ if (this.hidden === true && !(this.dependent === true)) {
+ // hidden properties were removed by the user, clear the value
+ properties[this.property] = null;
+ } else if (this.value !== this.previousValue) {
+ // the value has changed
+ properties[this.property] = this.value;
+ }
+ });
+ return properties;
+ };
+
/**
* Performs the filtering.
*
@@ -1954,7 +1971,8 @@
* return $.Deferred(function (deferred) {
* deferred.resolve();
* }).promise;
- * }
+ * },
+ * propertyVerificationCallback: function () {}
* }
*
* @argument {object} options The options for the tag cloud
@@ -2125,7 +2143,7 @@
newPropertyDialog.on('click', 'div.new-property-ok', add).on('click', 'div.new-property-cancel', cancel);
// build the control to open the new property dialog
- var addProperty = $('').appendTo(header);
+ var addProperty = $('').appendTo(header);
$('').on('click', function () {
// close all fields currently being edited
saveRow(table);
@@ -2139,6 +2157,21 @@
// set the initial focus
newPropertyNameField.focus();
}).appendTo(addProperty);
+
+ // build the control to trigger verification
+ var verifyProperties = $('').appendTo(header);
+ $('').on('click', function () {
+ // close all fields currently being edited
+ saveRow(table);
+
+ // invoke the verification callback with the current properties
+ propertyVerificationCallback(marshalProperties(table));
+ }).appendTo(verifyProperties);
+
+ // if there is a verification callback registered show the verify button
+ propertyVerificationCallback = options.propertyVerificationCallback;
+ var supportsVerification = typeof propertyVerificationCallback === 'function';
+ verifyProperties.toggleClass('hidden', !supportsVerification);
}
$('').appendTo(header);
@@ -2265,18 +2298,7 @@
this.each(function () {
// get the property grid data
var table = $(this).find('div.property-table');
- var propertyGrid = table.data('gridInstance');
- var propertyData = propertyGrid.getData();
- $.each(propertyData.getItems(), function () {
- if (this.hidden === true && !(this.dependent === true)) {
- // hidden properties were removed by the user, clear the value
- properties[this.property] = null;
- } else if (this.value !== this.previousValue) {
- // the value has changed
- properties[this.property] = this.value;
- }
- });
-
+ properties = marshalProperties(table);
return false;
});
@@ -2291,6 +2313,18 @@
return this.each(function () {
groupId = currentGroupId;
});
+ },
+
+ /**
+ * Sets the property verification callback.
+ */
+ setPropertyVerificationCallback: function (currentPropertyVerificationCallback) {
+ return this.each(function () {
+ propertyVerificationCallback = currentPropertyVerificationCallback;
+
+ var supportsVerification = typeof currentPropertyVerificationCallback === 'function';
+ $(this).find('div.verify-properties').toggleClass('hidden', !supportsVerification);
+ });
}
};
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
index 485d290ba2..e51f3634a7 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
@@ -37,6 +37,7 @@
'nf.Snippet',
'nf.Actions',
'nf.QueueListing',
+ 'nf.Verify',
'nf.VariableRegistry',
'nf.ComponentState',
'nf.FlowVersion',
@@ -83,8 +84,8 @@
'nf.ng.Canvas.OperateCtrl',
'nf.ng.BreadcrumbsDirective',
'nf.ng.DraggableDirective'],
- function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
- return factory($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective);
+ function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVerify, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
+ return factory($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVerify, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective);
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = factory(require('jquery'),
@@ -105,6 +106,7 @@
require('nf.Actions'),
require('nf.Snippet'),
require('nf.QueueListing'),
+ require('nf.Verify'),
require('nf.VariableRegistry'),
require('nf.ComponentState'),
require('nf.FlowVersion'),
@@ -170,6 +172,7 @@
root.nf.Actions,
root.nf.Snippet,
root.nf.QueueListing,
+ root.nf.Verify,
root.nf.VariableRegistry,
root.nf.ComponentState,
root.nf.FlowVersion,
@@ -217,7 +220,7 @@
root.nf.ng.BreadcrumbsDirective,
root.nf.ng.DraggableDirective);
}
-}(this, function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
+}(this, function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVerify, nfVariableRegistry, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
var config = {
urls: {
@@ -349,6 +352,7 @@
nfParameterContexts.init();
nfActions.init();
nfQueueListing.init();
+ nfVerify.init();
nfVariableRegistry.init();
nfComponentState.init();
nfFlowVersion.init(configDetails.timeOffset);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
index 5aa2365fd2..186c0ea317 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
@@ -29,10 +29,11 @@
'nf.Settings',
'nf.UniversalCapture',
'nf.CustomUi',
+ 'nf.Verify',
'nf.CanvasUtils',
'nf.Processor'],
- function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) {
- return (nf.ControllerService = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor));
+ function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfVerify, nfCanvasUtils, nfProcessor) {
+ return (nf.ControllerService = factory($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfVerify, nfCustomUi, nfCanvasUtils, nfProcessor));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ControllerService =
@@ -46,6 +47,7 @@
require('nf.Settings'),
require('nf.UniversalCapture'),
require('nf.CustomUi'),
+ require('nf.Verify'),
require('nf.CanvasUtils'),
require('nf.Processor')));
} else {
@@ -59,10 +61,11 @@
root.nf.Settings,
root.nf.UniversalCapture,
root.nf.CustomUi,
+ root.nf.Verify,
root.nf.CanvasUtils,
root.nf.Processor);
}
-}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfCanvasUtils, nfProcessor) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfSettings, nfUniversalCapture, nfCustomUi, nfVerify, nfCanvasUtils, nfProcessor) {
'use strict';
var nfControllerServices, nfReportingTask;
@@ -77,6 +80,9 @@
}
};
+ // the last submitted referenced attributes
+ var referencedAttributes = null;
+
/**
* Determines whether the user has made any changes to the controller service configuration
* that needs to be saved.
@@ -1696,6 +1702,29 @@
return referencedServices;
};
+ /**
+ * Handles verification results.
+ */
+ var handleVerificationResults = function (verificationResults, referencedAttributeMap) {
+ // record the most recently submitted referenced attributes
+ referencedAttributes = referencedAttributeMap;
+
+ var verificationResultsContainer = $('#controller-service-properties-verification-results');
+
+ // expand the dialog to make room for the verification result
+ if (verificationResultsContainer.is(':visible') === false) {
+ // show the verification results
+ $('#controller-service-properties').css('bottom', '40%').propertytable('resetTableSize')
+ verificationResultsContainer.show();
+ }
+
+ // show borders if appropriate
+ var verificationResultsListing = $('#controller-service-properties-verification-results-listing');
+ if (verificationResultsListing.get(0).scrollHeight > Math.round(verificationResultsListing.innerHeight())) {
+ verificationResultsListing.css('border-width', '1px');
+ }
+ };
+
/**
* Track the current table
*/
@@ -1768,6 +1797,14 @@
// removed the cached controller service details
$('#controller-service-configuration').removeData('controllerServiceDetails');
+
+ // clean up an shown verification errors
+ $('#controller-service-properties-verification-results').hide();
+ $('#controller-service-properties-verification-results-listing').css('border-width', '0').empty();
+ $('#controller-service-properties').css('bottom', '0');
+
+ // clear most recently submitted referenced attributes
+ referencedAttributes = null;
},
open: function () {
nfCommon.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
@@ -2061,7 +2098,10 @@
// load the property table
$('#controller-service-properties')
.propertytable('setGroupId', controllerService.parentGroupId)
- .propertytable('loadProperties', controllerService.properties, controllerService.descriptors, controllerServiceHistory.propertyHistory);
+ .propertytable('loadProperties', controllerService.properties, controllerService.descriptors, controllerServiceHistory.propertyHistory)
+ .propertytable('setPropertyVerificationCallback', function (proposedProperties) {
+ nfVerify.verify(controllerService['id'], controllerServiceEntity['uri'], proposedProperties, referencedAttributes, handleVerificationResults, $('#controller-service-properties-verification-results-listing'));
+ });
// show the details
controllerServiceDialog.modal('show');
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
index 089f5a722d..d923b3cbcc 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
@@ -30,10 +30,11 @@
'nf.Processor',
'nf.ClusterSummary',
'nf.CustomUi',
+ 'nf.Verify',
'nf.UniversalCapture',
'nf.Connection'],
- function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) {
- return (nf.ProcessorConfiguration = factory($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection));
+ function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfVerify, nfUniversalCapture, nfConnection) {
+ return (nf.ProcessorConfiguration = factory($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfVerify, nfUniversalCapture, nfConnection));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ProcessorConfiguration =
@@ -48,6 +49,7 @@
require('nf.Processor'),
require('nf.ClusterSummary'),
require('nf.CustomUi'),
+ require('nf.Verify'),
require('nf.UniversalCapture'),
require('nf.Connection')));
} else {
@@ -62,10 +64,11 @@
root.nf.Processor,
root.nf.ClusterSummary,
root.nf.CustomUi,
+ root.nf.Verify,
root.nf.UniversalCapture,
root.nf.Connection);
}
-}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfUniversalCapture, nfConnection) {
+}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, nfNgBridge, nfProcessor, nfClusterSummary, nfCustomUi, nfVerify, nfUniversalCapture, nfConnection) {
'use strict';
/**
@@ -81,6 +84,9 @@
RUN_STATUS_KEY = 'status.aggregateSnapshot.runStatus',
BULLETINS_KEY = 'bulletins';
+ // the last submitted referenced attributes
+ var referencedAttributes = null;
+
/**
* Gets the available scheduling strategies based on the specified processor.
*
@@ -499,6 +505,29 @@
}
};
+ /**
+ * Handles verification results.
+ */
+ var handleVerificationResults = function (verificationResults, referencedAttributeMap) {
+ // record the most recently submitted referenced attributes
+ referencedAttributes = referencedAttributeMap;
+
+ var verificationResultsContainer = $('#processor-properties-verification-results');
+
+ // expand the dialog to make room for the verification result
+ if (verificationResultsContainer.is(':visible') === false) {
+ // show the verification results
+ $('#processor-properties').css('bottom', '40%').propertytable('resetTableSize')
+ verificationResultsContainer.show();
+ }
+
+ // show borders if appropriate
+ var verificationResultsListing = $('#processor-properties-verification-results-listing');
+ if (verificationResultsListing.get(0).scrollHeight > Math.round(verificationResultsListing.innerHeight())) {
+ verificationResultsListing.css('border-width', '1px');
+ }
+ };
+
return {
/**
* Initializes the processor properties tab.
@@ -562,8 +591,16 @@
// removed the cached processor details
$('#processor-configuration').removeData('processorDetails');
+ // clean up an shown verification errors
+ $('#processor-properties-verification-results').hide();
+ $('#processor-properties-verification-results-listing').css('border-width', '0').empty();
+ $('#processor-properties').css('bottom', '0');
+
+ // clear most recently submitted referenced attributes
+ referencedAttributes = null;
+
//stop any synchronization
- if(config.supportsStatusBar){
+ if (config.supportsStatusBar){
$('#processor-configuration-status-bar').statusbar('disconnect');
}
},
@@ -982,7 +1019,10 @@
// load the property table
$('#processor-properties')
.propertytable('setGroupId', processor.parentGroupId)
- .propertytable('loadProperties', processor.config.properties, processor.config.descriptors, processorHistory.propertyHistory);
+ .propertytable('loadProperties', processor.config.properties, processor.config.descriptors, processorHistory.propertyHistory)
+ .propertytable('setPropertyVerificationCallback', function (proposedProperties) {
+ nfVerify.verify(processor['id'], processorResponse['uri'], proposedProperties, referencedAttributes, handleVerificationResults, $('#processor-properties-verification-results-listing'));
+ });
// show the details
$('#processor-configuration').modal('show');
@@ -997,13 +1037,12 @@
}
// Ensure the properties table has rendered correctly if initially selected
- if ($('#processor-configuration-tabs').find('.selected-tab').text() === 'Properties' &&
- $('#processor-properties').find('.slick-viewport').height() == 0) {
+ if ($('#processor-configuration-tabs').find('.selected-tab').text() === 'Properties') {
$('#processor-properties').propertytable('resetTableSize');
}
- //execute the callback if one was provided
- if(typeof cb == 'function'){
+ // execute the callback if one was provided
+ if (typeof cb == 'function'){
cb();
}
}).fail(nfErrorHandler.handleAjaxError);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
index 6ffd8e9147..7b5c21b98a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
@@ -28,9 +28,10 @@
'nf.ControllerService',
'nf.ControllerServices',
'nf.UniversalCapture',
- 'nf.CustomUi'],
- function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) {
- return (nf.ReportingTask = factory($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi));
+ 'nf.CustomUi',
+ 'nf.Verify'],
+ function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi, nfVerify) {
+ return (nf.ReportingTask = factory($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi, nfVerify));
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = (nf.ReportingTask =
@@ -43,7 +44,8 @@
require('nf.ControllerService'),
require('nf.ControllerServices'),
require('nf.UniversalCapture'),
- require('nf.CustomUi')));
+ require('nf.CustomUi'),
+ require('nf.Verify')));
} else {
nf.ReportingTask = factory(root.$,
root.nf.ErrorHandler,
@@ -54,9 +56,10 @@
root.nf.ControllerService,
root.nf.ControllerServices,
root.nf.UniversalCapture,
- root.nf.CustomUi);
+ root.nf.CustomUi,
+ root.nf.Verify);
}
-}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi) {
+}(this, function ($, nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfControllerService, nfControllerServices, nfUniversalCapture, nfCustomUi, nfVerify) {
'use strict';
var nfSettings;
@@ -69,6 +72,9 @@
}
};
+ // the last submitted referenced attributes
+ var referencedAttributes = null;
+
// load the controller services
var controllerServicesUri = config.urls.api + '/flow/controller/controller-services';
@@ -320,6 +326,30 @@
}).fail(nfErrorHandler.handleAjaxError);
};
+ /**
+ * Handles verification results.
+ */
+ var handleVerificationResults = function (verificationResults, referencedAttributeMap) {
+ // record the most recently submitted referenced attributes
+ referencedAttributes = referencedAttributeMap;
+
+ var verificationResultsContainer = $('#reporting-task-properties-verification-results');
+
+ // expand the dialog to make room for the verification result
+ if (verificationResultsContainer.is(':visible') === false) {
+ // show the verification results
+ $('#reporting-task-properties').css('bottom', '40%').propertytable('resetTableSize')
+ verificationResultsContainer.show();
+ }
+
+ // show borders if appropriate
+ var verificationResultsListing = $('#reporting-task-properties-verification-results-listing');
+ if (verificationResultsListing.get(0).scrollHeight > Math.round(verificationResultsListing.innerHeight())) {
+ verificationResultsListing.css('border-width', '1px');
+ }
+ };
+
+
var nfReportingTask = {
/**
* Initializes the reporting task configuration dialog.
@@ -375,6 +405,14 @@
// removed the cached reporting task details
$('#reporting-task-configuration').removeData('reportingTaskDetails');
+
+ // clean up an shown verification errors
+ $('#reporting-task-properties-verification-results').hide();
+ $('#reporting-task-properties-verification-results-listing').css('border-width', '0').empty();
+ $('#reporting-task-properties').css('bottom', '0');
+
+ // clear most recently submitted referenced attributes
+ referencedAttributes = null;
},
open: function () {
nfCommon.toggleScrollable($('#' + this.find('.tab-container').attr('id') + '-content').get(0));
@@ -605,7 +643,10 @@
// load the property table
$('#reporting-task-properties')
.propertytable('setGroupId', null)
- .propertytable('loadProperties', reportingTask.properties, reportingTask.descriptors, reportingTaskHistory.propertyHistory);
+ .propertytable('loadProperties', reportingTask.properties, reportingTask.descriptors, reportingTaskHistory.propertyHistory)
+ .propertytable('setPropertyVerificationCallback', function (proposedProperties) {
+ nfVerify.verify(reportingTask['id'], reportingTaskEntity['uri'], proposedProperties, referencedAttributes, handleVerificationResults, $('#reporting-task-properties-verification-results-listing'));
+ });
// show the details
$('#reporting-task-configuration').modal('show');
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-verify.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-verify.js
new file mode 100644
index 0000000000..0e50c83401
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-verify.js
@@ -0,0 +1,847 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* global define, module, require, exports */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ define(['jquery',
+ 'nf.Common',
+ 'nf.Dialog',
+ 'nf.ng.Bridge',
+ 'nf.ErrorHandler'],
+ function ($, nfCommon, nfDialog, nfNgBridge, nfErrorHandler) {
+ return (nf.Verify = factory($, nfCommon, nfDialog, nfNgBridge, nfErrorHandler));
+ });
+ } else if (typeof exports === 'object' && typeof module === 'object') {
+ module.exports = (nf.Verify =
+ factory(require('jquery'),
+ require('nf.Common'),
+ require('nf.Dialog'),
+ require('nf.ng.Bridge'),
+ require('nf.ErrorHandler')));
+ } else {
+ nf.Verify = factory(root.$,
+ root.nf.Common,
+ root.nf.Dialog,
+ root.nf.ng.Bridge,
+ root.nf.ErrorHandler);
+ }
+}(this, function ($, nfCommon, nfDialog, nfNgBridge, nfErrorHandler) {
+ 'use strict';
+
+ var gridOptions = {
+ autosizeColsMode: Slick.GridAutosizeColsMode.LegacyForceFit,
+ enableTextSelectionOnCells: true,
+ enableCellNavigation: true,
+ enableColumnReorder: false,
+ editable: true,
+ enableAddRow: false,
+ autoEdit: false,
+ multiSelect: false,
+ rowHeight: 24
+ };
+
+ // text editor
+ var textEditor = function (args) {
+ var scope = this;
+ var initialValue = '';
+ var previousValue;
+ var wrapper;
+ var isEmpty;
+ var input;
+
+ this.init = function () {
+ var container = $('body');
+
+ // record the previous value
+ previousValue = args.item[args.column.field];
+
+ // create the wrapper
+ wrapper = $('').addClass('slickgrid-editor').css({
+ 'z-index': 100000,
+ 'position': 'absolute',
+ 'border-radius': '2px',
+ 'box-shadow': 'rgba(0, 0, 0, 0.247059) 0px 2px 5px',
+ 'background-color': 'rgb(255, 255, 255)',
+ 'overflow': 'hidden',
+ 'padding': '10px 20px',
+ 'cursor': 'move',
+ 'transform': 'translate3d(0px, 0px, 0px)'
+ }).appendTo(container);
+
+ // create the input field
+ input = $('').css({
+ 'height': '80px',
+ 'width': args.position.width + 'px',
+ 'min-width': '212px',
+ 'margin-bottom': '5px',
+ 'margin-top': '10px',
+ 'white-space': 'pre'
+ }).tab().on('keydown', scope.handleKeyDown).appendTo(wrapper);
+
+ wrapper.draggable({
+ cancel: '.button, textarea, .nf-checkbox',
+ containment: 'parent'
+ });
+
+ // create the button panel
+ var stringCheckPanel = $('');
+ stringCheckPanel.appendTo(wrapper);
+
+ // build the custom checkbox
+ isEmpty = $('')
+ .on('change', function (event, args) {
+ // if we are setting as an empty string, disable the editor
+ if (args.isChecked) {
+ input.prop('disabled', true).val('');
+ } else {
+ input.prop('disabled', false).val(previousValue);
+ }
+ }).appendTo(stringCheckPanel);
+ $(' Set empty string').appendTo(stringCheckPanel);
+
+ var ok = $('