asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: minor console changes
Date Wed, 31 Aug 2016 00:20:48 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 4256027f2 -> 85a2e39dd


minor console changes

- return long lists as JSON arrays
- render JSON array entries as separate lines

Change-Id: I5ec6b38e122f1c206f431d3902ad9039adce5078
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1120
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/85a2e39d
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/85a2e39d
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/85a2e39d

Branch: refs/heads/master
Commit: 85a2e39dd34afc33019152a3aa6133515bdb5683
Parents: 4256027
Author: Till Westmann <tillw@apache.org>
Authored: Mon Aug 29 20:09:36 2016 -0700
Committer: Till Westmann <tillw@apache.org>
Committed: Tue Aug 30 17:20:12 2016 -0700

----------------------------------------------------------------------
 .../hyracks/control/cc/NodeControllerState.java |  9 ++++---
 .../javascript/adminconsole/NodeDetailsPage.js  | 27 +++++++++++---------
 2 files changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/85a2e39d/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/NodeControllerState.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/NodeControllerState.java
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/NodeControllerState.java
index ff5832a..7fd027b 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/NodeControllerState.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/NodeControllerState.java
@@ -18,6 +18,9 @@
  */
 package org.apache.hyracks.control.cc;
 
+import java.io.File;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -290,9 +293,9 @@ public class NodeControllerState {
         o.put("vm-name", vmName);
         o.put("vm-version", vmVersion);
         o.put("vm-vendor", vmVendor);
-        o.put("classpath", classpath);
-        o.put("library-path", libraryPath);
-        o.put("boot-classpath", bootClasspath);
+        o.put("classpath", new JSONArray(Arrays.asList(classpath.split(File.pathSeparator))));
+        o.put("library-path", new JSONArray(Arrays.asList(libraryPath.split(File.pathSeparator))));
+        o.put("boot-classpath", new JSONArray(Arrays.asList(bootClasspath.split(File.pathSeparator))));
         o.put("input-arguments", new JSONArray(inputArguments));
         o.put("rrd-ptr", rrdPtr);
         o.put("heartbeat-times", hbTime);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/85a2e39d/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/NodeDetailsPage.js
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/NodeDetailsPage.js
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/NodeDetailsPage.js
index 75c03b4..10027f4 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/NodeDetailsPage.js
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/resources/static/javascript/adminconsole/NodeDetailsPage.js
@@ -37,6 +37,17 @@ $(function() {
         return (array[(rrdPtr + 1) % array.length] - array[rrdPtr]) / 10;
     }
 
+    function formatArray(array) {
+        var result = "";
+        for (var i = 0; i < array.length; ++i) {
+            if (result !== "") {
+                result += "<br/>";
+            }
+            result += "<span>" + array[i] + "</span>";
+        }
+        return result;
+    }
+
     function onDataReceived(data) {
         var result = data.result;
         $('#node-id')[0].innerHTML = result['node-id'];
@@ -47,18 +58,10 @@ $(function() {
         $('#vm-name')[0].innerHTML = result['vm-name'];
         $('#vm-version')[0].innerHTML = result['vm-version'];
         $('#vm-vendor')[0].innerHTML = result['vm-vendor'];
-        $('#classpath')[0].innerHTML = result['classpath'];
-        $('#library-path')[0].innerHTML = result['library-path'];
-        $('#boot-classpath')[0].innerHTML = result['boot-classpath'];
-        var argsHTML = "";
-        var args = result['input-arguments'];
-        for ( var i = 0; i < args.length; ++i) {
-            if (argsHTML != "") {
-                argsHTML += "<br/>";
-            }
-            argsHTML += "<span>" + args[i] + "</span>";
-        }
-        $('#input-arguments')[0].innerHTML = argsHTML;
+        $('#classpath')[0].innerHTML = formatArray(result['classpath']);
+        $('#library-path')[0].innerHTML = formatArray(result['library-path']);
+        $('#boot-classpath')[0].innerHTML = formatArray(result['boot-classpath']);
+        $('#input-arguments')[0].innerHTML = formatArray(result['input-arguments']);
         var sysLoad = result['system-load-averages'];
         var heapUsageInitSizes = result['heap-init-sizes'];
         var heapUsageUsedSizes = result['heap-used-sizes'];


Mime
View raw message