diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/hexview.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/hexview.jsp index c6e7f382ff..f4e9fd29de 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/hexview.jsp +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/hexview.jsp @@ -29,4 +29,4 @@ -
Showing up to 1.5kb
\ No newline at end of file +
Showing up to 1.5 KB
\ No newline at end of file diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css index a66198de20..fe68b627f6 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/css/main.css @@ -87,7 +87,7 @@ padding: 2px; } -#trancation-message { +#truncation-message { position: absolute; left: 100px; bottom: 35px; diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js index b5f56b0490..7ffaa3f23f 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js @@ -1375,37 +1375,59 @@ var add = function () { var propertyName = $.trim(newPropertyNameField.val()); - // ensure the property name and value is specified + // ensure the property name is specified if (propertyName !== '') { - // load the descriptor and add the property - options.descriptorDeferred(propertyName).done(function(response) { - var descriptor = response.propertyDescriptor; - - // store the descriptor for use later - var descriptors = table.data('descriptors'); - if (!nf.Common.isUndefined(descriptors)) { - descriptors[descriptor.name] = descriptor; + var propertyGrid = table.data('gridInstance'); + var propertyData = propertyGrid.getData(); + + // ensure the property name is unique + var existingPropertyId = null; + $.each(propertyData.getItems(), function (_, item) { + if (propertyName === item.property) { + existingPropertyId = item.id; + return false; } + }); + + if (existingPropertyId === null) { + // load the descriptor and add the property + options.descriptorDeferred(propertyName).done(function(response) { + var descriptor = response.propertyDescriptor; - // add a row for the new property - var propertyGrid = table.data('gridInstance'); - var propertyData = propertyGrid.getData(); - var id = propertyData.getLength(); - propertyData.addItem({ - id: id, - hidden: false, - property: propertyName, - displayName: propertyName, - previousValue: null, - value: null, - type: 'userDefined' + // store the descriptor for use later + var descriptors = table.data('descriptors'); + if (!nf.Common.isUndefined(descriptors)) { + descriptors[descriptor.name] = descriptor; + } + + // add a row for the new property + var id = propertyData.getLength(); + propertyData.addItem({ + id: id, + hidden: false, + property: propertyName, + displayName: propertyName, + previousValue: null, + value: null, + type: 'userDefined' + }); + + // select the new properties row + var row = propertyData.getRowById(id); + propertyGrid.setSelectedRows([row]); + propertyGrid.scrollRowIntoView(row); }); - - // select the new properties row - var row = propertyData.getRowById(id); + } else { + nf.Dialog.showOkDialog({ + dialogContent: 'A property with this name already exists.', + overlayBackground: false + }); + + // select the existing properties row + var row = propertyData.getRowById(existingPropertyId); propertyGrid.setSelectedRows([row]); propertyGrid.scrollRowIntoView(row); - }); + } } else { nf.Dialog.showOkDialog({ dialogContent: 'Property name must be specified.', diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js index f1cb458fb1..4c6be57d44 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js @@ -311,8 +311,9 @@ nf.CanvasUtils = (function () { // if we've reached the last line, use single line ellipsis if (++i >= lineCount) { - // restore the current word - var remainder = [word].concat(words); + // get the remainder using the current word and + // reversing whats left + var remainder = [word].concat(words.reverse()); // apply ellipsis to the last line nf.CanvasUtils.ellipsis(tspan, remainder.join(' ')); @@ -322,7 +323,7 @@ nf.CanvasUtils = (function () { } else { tspan.text(word); - // other prep the line for the next iteration + // prep the line for the next iteration line = [word]; } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js index 6fda98481b..38894d8d2b 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js @@ -529,9 +529,11 @@ nf.Canvas = (function () { }; // listen for browser resize events to reset the graph size - $(window).on('resize', function () { - updateGraphSize(); - nf.Settings.resetTableSize(); + $(window).on('resize', function (e) { + if (e.target === window) { + updateGraphSize(); + nf.Settings.resetTableSize(); + } }).on('keydown', function (evt) { var isCtrl = evt.ctrlKey || evt.metaKey; diff --git a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js index eb7bdfbb40..80a3df88ed 100644 --- a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js +++ b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js @@ -14,6 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/* global Slick */ + $(document).ready(function () { ua.editable = $('#attribute-updater-editable').text() === 'true'; ua.init(); @@ -43,10 +46,12 @@ var ua = { var actionsGrid = ua.initActionsGrid(); // enable grid resizing - $(window).resize(function () { - conditionsGrid.resizeCanvas(); - actionsGrid.resizeCanvas(); - ua.resizeSelectedRuleNameField(); + $(window).resize(function (e) { + if (e.target === window) { + conditionsGrid.resizeCanvas(); + actionsGrid.resizeCanvas(); + ua.resizeSelectedRuleNameField(); + } }); // initialize the rule list