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 2015/03/16 12:45:14 UTC

incubator-nifi git commit: NIFI-250: - Using a utility function for populating fields. - Using a label for scheduling strategy rather than the enum value.

Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-250 92cbce496 -> 17b512ea8


NIFI-250:
- Using a utility function for populating fields.
- Using a label for scheduling strategy rather than the enum value.

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

Branch: refs/heads/NIFI-250
Commit: 17b512ea8e720115b6bce1c5f65797d256392781
Parents: 92cbce4
Author: Matt Gilman <ma...@gmail.com>
Authored: Mon Mar 16 07:45:05 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Mon Mar 16 07:45:05 2015 -0400

----------------------------------------------------------------------
 .../js/nf/canvas/nf-controller-service.js       | 12 +++++------
 .../webapp/js/nf/canvas/nf-reporting-task.js    | 22 +++++++++++++-------
 2 files changed, 20 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/17b512ea/nifi/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/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/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
index b790a00..e0a0855 100644
--- a/nifi/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/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
@@ -1255,8 +1255,8 @@ nf.ControllerService = (function () {
                 }
 
                 // populate the controller service settings
-                $('#controller-service-id').text(controllerService['id']);
-                $('#controller-service-type').text(nf.Common.substringAfterLast(controllerService['type'], '.'));
+                nf.Common.populateField('controller-service-id', controllerService['id']);
+                nf.Common.populateField('controller-service-type', nf.Common.substringAfterLast(controllerService['type'], '.'));
                 $('#controller-service-name').val(controllerService['name']);
                 $('#controller-service-enabled').removeClass('checkbox-checked checkbox-unchecked').addClass(controllerServiceEnableStyle);
                 $('#controller-service-comments').val(controllerService['comments']);
@@ -1443,10 +1443,10 @@ nf.ControllerService = (function () {
                 controllerServiceDialog.data('controllerServiceDetails', controllerService);
                 
                 // populate the controller service settings
-                $('#controller-service-id').text(controllerService['id']);
-                $('#controller-service-type').text(nf.Common.substringAfterLast(controllerService['type'], '.'));
-                $('#read-only-controller-service-name').text(controllerService['name']);
-                $('#read-only-controller-service-comments').text(controllerService['comments']);
+                nf.Common.populateField('controller-service-id', controllerService['id']);
+                nf.Common.populateField('controller-service-type', nf.Common.substringAfterLast(controllerService['type'], '.'));
+                nf.Common.populateField('read-only-controller-service-name', controllerService['name']);
+                nf.Common.populateField('read-only-controller-service-comments', controllerService['comments']);
 
                 // select the availability when appropriate
                 if (nf.Canvas.isClustered()) {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/17b512ea/nifi/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/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/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
index 699b695..ac715c4 100644
--- a/nifi/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/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
@@ -330,8 +330,8 @@ nf.ReportingTask = (function () {
                 }
                 
                 // populate the reporting task settings
-                $('#reporting-task-id').text(reportingTask['id']);
-                $('#reporting-task-type').text(nf.Common.substringAfterLast(reportingTask['type'], '.'));
+                nf.Common.populateField('reporting-task-id', reportingTask['id']);
+                nf.Common.populateField('reporting-task-type', nf.Common.substringAfterLast(reportingTask['type'], '.'));
                 $('#reporting-task-name').val(reportingTask['name']);
                 $('#reporting-task-enabled').removeClass('checkbox-unchecked checkbox-checked').addClass(reportingTaskEnableStyle);
 
@@ -543,9 +543,9 @@ nf.ReportingTask = (function () {
                 var reportingTaskHistory = historyResponse[0].componentHistory;
                 
                 // populate the reporting task settings
-                $('#reporting-task-id').text(reportingTask['id']);
-                $('#reporting-task-type').text(nf.Common.substringAfterLast(reportingTask['type'], '.'));
-                $('#read-only-reporting-task-name').text(reportingTask['name']);
+                nf.Common.populateField('reporting-task-id', reportingTask['id']);
+                nf.Common.populateField('reporting-task-type', nf.Common.substringAfterLast(reportingTask['type'], '.'));
+                nf.Common.populateField('read-only-reporting-task-name', reportingTask['name']);
 
                 // select the availability when appropriate
                 if (nf.Canvas.isClustered()) {
@@ -556,9 +556,15 @@ nf.ReportingTask = (function () {
                     }
                 }
                 
-                // scheduling
-                $('#read-only-reporting-task-scheduling-strategy').text(reportingTask['schedulingStrategy']);
-                $('#read-only-reporting-task-scheduling-period').text(reportingTask['schedulingPeriod']);
+                // make the scheduling strategy human readable
+                var schedulingStrategy = reportingTask['schedulingStrategy'];
+                if (schedulingStrategy === 'CRON_DRIVEN') {
+                    schedulingStrategy = 'CRON driven';
+                } else {
+                    schedulingStrategy = "Timer driven";
+                }
+                nf.Common.populateField('read-only-reporting-task-scheduling-strategy', schedulingStrategy);
+                nf.Common.populateField('read-only-reporting-task-scheduling-period', reportingTask['schedulingPeriod']);
                 
                 var buttons = [{
                         buttonText: 'Ok',