From 79300de7a9866993a2e401ac7580892b7ce1512c Mon Sep 17 00:00:00 2001 From: yuri1969 <1969yuri1969@gmail.com> Date: Sun, 13 Aug 2017 20:15:38 +0200 Subject: [PATCH] NIFI-3780 - Should be able to specify Service... ...name when I create a new Controller Service within a Processor/Service configuration dialog I'm not sure how to integrate/style the text box. Suggestions are welcome. --- .../src/main/webapp/css/controller-service.css | 2 +- .../js/jquery/propertytable/jquery.propertytable.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css index fb8e95eff6..88e6caaa12 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css @@ -228,7 +228,7 @@ div.disable-referencing-components, div.enable-referencing-components { New inline controller service dialog */ -div.new-inline-controller-service-requirement, div.new-inline-controller-service-combo, div.new-inline-controller-service-bundle, div.new-inline-controller-service-tags { +div.new-inline-controller-service-requirement, div.new-inline-controller-service-combo, div.new-inline-controller-service-bundle, div.new-inline-controller-service-tags, div.new-inline-controller-service-description { margin-bottom: 15px; } 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 7c27b3d03a..be9627154e 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 @@ -1014,6 +1014,12 @@ '
' + '' + '' + + '
' + + '
Controller Service Name
' + + '
' + + '' + + '
' + + '
' + '' + ''; @@ -1023,6 +1029,7 @@ var newControllerServiceBundle = newControllerServiceDialog.find('div.new-inline-controller-service-bundle'); var newControllerServiceTags = newControllerServiceDialog.find('div.new-inline-controller-service-tags'); var newControllerServiceDescription = newControllerServiceDialog.find('div.new-inline-controller-service-description'); + var newControllerServiceNameInput = newControllerServiceDialog.find('input.new-inline-controller-service-name'); // include the required service var formattedType = nfCommon.formatType({ @@ -1089,6 +1096,7 @@ var create = function () { var newControllerServiceKey = newControllerServiceCombo.combo('getSelectedOption').value; var newControllerServiceType = controllerServiceLookup.get(newControllerServiceKey); + var newControllerServiceName = newControllerServiceNameInput.val(); // build the controller service entity var controllerServiceEntity = { @@ -1103,6 +1111,11 @@ } }; + // set custom name when specified + if (newControllerServiceName.trim() !== '') { + controllerServiceEntity.component.name = newControllerServiceName.trim(); + } + // determine the appropriate uri for creating the controller service var uri = '../nifi-api/controller/controller-services'; if (nfCommon.isDefinedAndNotNull(groupId)) {