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>
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 @@
         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);
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 @@
         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 @@
         $('#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'];