You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2016/09/01 13:53:41 UTC

nifi git commit: [NIFI-2649] Update CS table upon creation of a CS from the RT or CS properties table

Repository: nifi
Updated Branches:
  refs/heads/master bc50329d5 -> 867c84f32


[NIFI-2649] Update CS table upon creation of a CS from the RT or CS properties table

- Ensuring the controller services table to correctly reloaded regardless if its the processor group or controller level controller services. This closes #968


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/867c84f3
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/867c84f3
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/867c84f3

Branch: refs/heads/master
Commit: 867c84f32c9cd07dbfda8e1c255707d7b92a6917
Parents: bc50329
Author: Scott Aslan <sc...@gmail.com>
Authored: Wed Aug 31 16:32:37 2016 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Thu Sep 1 09:53:12 2016 -0400

----------------------------------------------------------------------
 .../src/main/webapp/css/controller-service.css  |  5 -----
 .../src/main/webapp/css/reporting-task.css      |  2 --
 .../src/main/webapp/css/settings.css            |  4 ++--
 .../propertytable/jquery.propertytable.js       |  7 ++++++-
 .../js/nf/canvas/nf-controller-service.js       | 22 +++++++++++++++++++-
 .../js/nf/canvas/nf-controller-services.js      |  1 +
 .../webapp/js/nf/canvas/nf-reporting-task.js    | 14 ++++++++++++-
 7 files changed, 43 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/867c84f3/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service.css
----------------------------------------------------------------------
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 d8c3e0d..3fe8018 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
@@ -39,11 +39,6 @@
 
 /* controller-service settings */
 
-#controller-service-name {
-    width: 250px;
-    float: left;
-}
-
 /*
     Service references
 */

http://git-wip-us.apache.org/repos/asf/nifi/blob/867c84f3/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css
index a53a7b2..bb84f3f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/reporting-task.css
@@ -44,7 +44,6 @@
 /* reporting-task settings */
 
 #reporting-task-name {
-    font-size: 11px !important;
     width: 250px;
     float: left;
 }
@@ -63,7 +62,6 @@ div.reporting-task-enabled-container {
 }
 
 input.reporting-task-scheduling-period {
-    font-size: 11px !important;
     width: 150px;
 }
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/867c84f3/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css
index 7af87c7..459c006 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/settings.css
@@ -47,8 +47,8 @@ div.settings-container {
 #settings-refresh-container {
     position: absolute;
     bottom: 20px;
-    right: 20px;
-    left: 20px;
+    right: 0px;
+    left: 0px;
 }
 
 /* settings tabs */

http://git-wip-us.apache.org/repos/asf/nifi/blob/867c84f3/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
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 104bc89..d8636f9 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
@@ -1021,10 +1021,15 @@
                             data.updateItem(item.id, $.extend(item, {
                                 value: response.component.id
                             }));
-
+                            
                             // close the dialog
                             newControllerServiceDialog.modal('hide');
                         });
+
+                        // invoke callback if necessary
+                        if (typeof configurationOptions.controllerServiceCreatedDeferred === 'function') {
+                            configurationOptions.controllerServiceCreatedDeferred(response);
+                        }
                     }).fail(nf.Common.handleAjaxError);
                 };
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/867c84f3/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
----------------------------------------------------------------------
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 cccadcd..c972d12 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
@@ -23,7 +23,10 @@ nf.ControllerService = (function () {
         edit: 'edit',
         readOnly: 'read-only',
         serviceOnly: 'SERVICE_ONLY',
-        serviceAndReferencingComponents: 'SERVICE_AND_REFERENCING_COMPONENTS'
+        serviceAndReferencingComponents: 'SERVICE_AND_REFERENCING_COMPONENTS',
+        urls: {
+            api: '../nifi-api'
+        }
     };
 
     /**
@@ -1728,6 +1731,23 @@ nf.ControllerService = (function () {
                     readOnly: false,
                     dialogContainer: '#new-controller-service-property-container',
                     descriptorDeferred: getControllerServicePropertyDescriptor,
+                    controllerServiceCreatedDeferred: function(response) {
+                        var controllerServicesUri;
+                        var createdControllerServicesTable;
+
+                        // calculate the correct uri
+                        var createdControllerService = response.component;
+                        if (nf.Common.isDefinedAndNotNull(createdControllerService.parentGroupId)) {
+                            createdControllerServicesTable = $('#process-group-controller-services-table');
+                            controllerServicesUri = config.urls.api + '/flow/process-groups/' + encodeURIComponent(createdControllerService.parentGroupId) + '/controller-services';
+                        } else {
+                            createdControllerServicesTable = $('#controller-services-table');
+                            controllerServicesUri = config.urls.api + '/flow/controller/controller-services';
+                        }
+
+                        // load the controller services accordingly
+                        return nf.ControllerServices.loadControllerServices(controllerServicesUri, createdControllerServicesTable);
+                    },
                     goToServiceDeferred: function () {
                         return goToServiceFromProperty(serviceTable);
                     }

http://git-wip-us.apache.org/repos/asf/nifi/blob/867c84f3/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
index 918f7c8..2f24e45 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js
@@ -790,6 +790,7 @@ nf.ControllerServices = (function () {
             controllerServicesData.setItems(services);
             controllerServicesData.reSort();
             controllerServicesGrid.invalidate();
+            controllerServicesGrid.render();
         });
     };
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/867c84f3/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
----------------------------------------------------------------------
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 b3a8745..681019a 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
@@ -21,9 +21,15 @@ nf.ReportingTask = (function () {
 
     var config = {
         edit: 'edit',
-        readOnly: 'read-only'
+        readOnly: 'read-only',
+        urls: {
+            api: '../nifi-api'
+        }
     };
 
+    // load the controller services
+    var controllerServicesUri = config.urls.api + '/flow/controller/controller-services';
+
     /**
      * Gets the controller services table.
      *
@@ -359,6 +365,9 @@ nf.ReportingTask = (function () {
                 readOnly: false,
                 dialogContainer: '#new-reporting-task-property-container',
                 descriptorDeferred: getReportingTaskPropertyDescriptor,
+                controllerServiceCreatedDeferred: function(response){
+                    return nf.ControllerServices.loadControllerServices(controllerServicesUri, $('#controller-services-table'));
+                },
                 goToServiceDeferred: goToServiceFromProperty
             });
         },
@@ -380,6 +389,9 @@ nf.ReportingTask = (function () {
                     readOnly: false,
                     dialogContainer: '#new-reporting-task-property-container',
                     descriptorDeferred: getReportingTaskPropertyDescriptor,
+                    controllerServiceCreatedDeferred: function(response){
+                        return nf.ControllerServices.loadControllerServices(controllerServicesUri, $('#controller-services-table'));
+                    },
                     goToServiceDeferred: goToServiceFromProperty
                 });