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 2014/12/23 22:13:06 UTC

[1/2] incubator-nifi git commit: NIFI-58: - Addressed issues submitting replays while clustered.

Repository: incubator-nifi
Updated Branches:
  refs/heads/develop 7f0eb2e35 -> d997fd1b5


NIFI-58:
- Addressed issues submitting replays while clustered.

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

Branch: refs/heads/develop
Commit: 79803c1c67f4dabbdea4611ed910d366dfea010a
Parents: b569a9d
Author: Matt Gilman <ma...@gmail.com>
Authored: Tue Dec 23 15:58:46 2014 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Tue Dec 23 15:58:46 2014 -0500

----------------------------------------------------------------------
 .../nifi-web-ui/src/main/webapp/css/cluster.css |  4 +++
 .../webapp/js/nf/cluster/nf-cluster-table.js    | 35 +++++++++++++++++---
 .../src/main/webapp/js/nf/nf-common.js          |  2 +-
 3 files changed, 36 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/79803c1c/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/cluster.css
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/cluster.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/cluster.css
index c3b547a..8bb50bf 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/cluster.css
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/cluster.css
@@ -133,6 +133,10 @@ input.cluster-filter-list {
     overflow: hidden;
 }
 
+span.sorted {
+    text-decoration: underline;
+}
+
 /* user details dialog */
 
 #node-details-dialog {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/79803c1c/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
index addd4be..13b0e5f 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
@@ -30,6 +30,8 @@ nf.ClusterTable = (function () {
         }
     };
 
+    var prevColumn, count;
+
     /**
      * Sorts the specified data using the specified sort details.
      * 
@@ -44,9 +46,20 @@ nf.ClusterTable = (function () {
                 var bDate = nf.Common.parseDateTime(b[sortDetails.columnId]);
                 return aDate.getTime() - bDate.getTime();
             } else if (sortDetails.columnId === 'queued') {
-                var aCount = nf.Common.parseCount(a[sortDetails.columnId]);
-                var bCount = nf.Common.parseCount(b[sortDetails.columnId]);
-                return aCount - bCount;
+                var aSplit = a[sortDetails.columnId].split(/ \/ /);
+                var bSplit = b[sortDetails.columnId].split(/ \/ /);
+                var mod = count %4;
+                if (mod < 2) {
+                    $('#cluster-table span.queued-title').addClass('sorted');
+                    var aCount = nf.Common.parseCount(aSplit[0]);
+                    var bCount = nf.Common.parseCount(bSplit[0]);
+                    return aCount - bCount;
+                } else {
+                    $('#cluster-table span.queued-size-title').addClass('sorted');
+                    var aSize = nf.Common.parseSize(aSplit[1]);
+                    var bSize = nf.Common.parseSize(bSplit[1]);
+                    return aSize - bSize;
+                }                
             } else if (sortDetails.columnId === 'status') {
                 var aString = nf.Common.isDefinedAndNotNull(a[sortDetails.columnId]) ? a[sortDetails.columnId] : '';
                 if (a.primary === true) {
@@ -68,8 +81,22 @@ nf.ClusterTable = (function () {
             }
         };
 
+        // remove previous sort indicators
+        $('#cluster-table span.queued-title').removeClass('sorted');
+        $('#cluster-table span.queued-size-title').removeClass('sorted');
+
+        // update/reset the count as appropriate
+        if (prevColumn !== sortDetails.columnId) {
+            count = 0;
+        } else {
+            count++;
+        }
+
         // perform the sort
         data.sort(comparer, sortDetails.sortAsc);
+
+        // record the previous table and sorted column
+        prevColumn = sortDetails.columnId;
     };
 
     /**
@@ -291,7 +318,7 @@ nf.ClusterTable = (function () {
                 {id: 'moreDetails', name: '&nbsp;', sortable: false, resizable: false, formatter: moreDetailsFormatter, width: 50, maxWidth: 50},
                 {id: 'node', field: 'node', name: 'Node Address', formatter: nodeFormatter, resizable: true, sortable: true},
                 {id: 'activeThreadCount', field: 'activeThreadCount', name: 'Active Thread Count', resizable: true, sortable: true},
-                {id: 'queued', field: 'queued', name: 'Queued <span style="font-weight: normal; overflow: hidden;">(count / size)</span>', resizable: true, sortable: true},
+                {id: 'queued', field: 'queued', name: '<span class="queued-title">Queue</span>&nbsp;/&nbsp;<span class="queued-size-title">Size</span>', resizable: true, sortable: true},
                 {id: 'status', field: 'status', name: 'Status', formatter: statusFormatter, resizable: true, sortable: true},
                 {id: 'uptime', field: 'nodeStartTime', name: 'Uptime', formatter: valueFormatter, resizable: true, sortable: true},
                 {id: 'heartbeat', field: 'heartbeat', name: 'Last Heartbeat', formatter: valueFormatter, resizable: true, sortable: true}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/79803c1c/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
index cdc3ea7..6bf7e08 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
@@ -728,7 +728,7 @@ nf.Common = {
      */
     parseSize: function (rawSize) {
         var tokens = rawSize.split(/ /);
-        var size = parseFloat(tokens[0]);
+        var size = parseFloat(tokens[0].replace(/,/g, ''));
         var units = tokens[1];
 
         if (units === 'KB') {


[2/2] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

Posted by mc...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop


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

Branch: refs/heads/develop
Commit: d997fd1b58ffa44a370c235d4ed5b39b0832d68e
Parents: 79803c1 7f0eb2e
Author: Matt Gilman <ma...@gmail.com>
Authored: Tue Dec 23 16:12:38 2014 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Tue Dec 23 16:12:38 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/nifi/util/NiFiProperties.java     | 14 ++++++--------
 .../flow/impl/DataFlowManagementServiceImplTest.java  |  6 ++++--
 .../org/apache/nifi/controller/FlowController.java    |  7 ++++---
 3 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------