Browse Source

Merge branch 'candidate-6.0.6'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 years ago
parent
commit
4889ca58f4
2 changed files with 18 additions and 16 deletions
  1. 15 13
      esp/src/eclwatch/GraphWidget.js
  2. 3 3
      roxie/ccd/ccdprotocol.cpp

+ 15 - 13
esp/src/eclwatch/GraphWidget.js

@@ -737,6 +737,20 @@ define([
             },
 
             displayProperties: function (wu, globalID, place) {
+                var first = true;
+                var table = {};
+                var tr = {};
+                var context = this;
+                function ensureHeader() {
+                    if (first) {
+                        first = false;
+                        table = domConstruct.create("table", { border: 1, cellspacing: 0, width: "100%" }, place);
+                        tr = domConstruct.create("tr", null, table);
+                        domConstruct.create("th", { innerHTML: context.i18n.Property }, tr);
+                        domConstruct.create("th", { innerHTML: context.i18n.Value }, tr);
+                    }
+                }
+
                 if (this.hasPlugin()) {
                     var item = this.getItem(globalID);
                     if (item) {
@@ -799,10 +813,7 @@ define([
                             delete props.stopped;
                             domConstruct.create("br", null, place);
                         }
-                        var first = true;
-                        var table = {};
-                        var tr = {};
-                        var context = this;
+
                         for (var key in props) {
                             if (key[0] == "_")
                                 continue;
@@ -821,17 +832,8 @@ define([
                         }, this);
                         if (first === false) {
                             domConstruct.create("br", null, place);
-                        }
                     }
                 }
-
-                function ensureHeader() {
-                    if (first) {
-                        first = false;
-                        table = domConstruct.create("table", { border: 1, cellspacing: 0, width: "100%" }, place);
-                        tr = domConstruct.create("tr", null, table);
-                        domConstruct.create("th", { innerHTML: context.i18n.Property }, tr);
-                        domConstruct.create("th", { innerHTML: context.i18n.Value }, tr);
                     }
                 }
             },

+ 3 - 3
roxie/ccd/ccdprotocol.cpp

@@ -1143,8 +1143,8 @@ public:
                 name.append("Response");
             appendJSONName(responseHead, name.str()).append(" {");
             appendJSONValue(responseHead, "sequence", seqNo);
-            if (contentsMap.length() || results)
-                delimitJSON(responseHead);
+            appendJSONName(responseHead, "Results").append(" {");
+
             unsigned len = responseHead.length();
             client->write(responseHead.detach(), len, true);
         }
@@ -1154,7 +1154,7 @@ public:
             results->finalize(seqNo, ",", resultFilter.ordinality() ? resultFilter.item(0) : NULL);
         if (!resultFilter.ordinality() && !(protocolFlags & HPCC_PROTOCOL_CONTROL))
         {
-            responseTail.append("}");
+            responseTail.append("}}");
             unsigned len = responseTail.length();
             client->write(responseTail.detach(), len, true);
         }