Pārlūkot izejas kodu

Merge pull request #10197 from GordonSmith/HPCC-16991-HexPreview

HPCC-16991 Hex Preview Silently Fails

Reviewed-By: Miguel Vazquez <miguel.vazquez@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 gadi atpakaļ
vecāks
revīzija
373a2724cf
2 mainītis faili ar 23 papildinājumiem un 2 dzēšanām
  1. 1 2
      esp/src/eclwatch/FileSpray.js
  2. 22 0
      esp/src/eclwatch/HexViewWidget.js

+ 1 - 2
esp/src/eclwatch/FileSpray.js

@@ -81,8 +81,7 @@ define([
                     return retVal;
                 },
                 getLogicalFile: function () {
-                    //var filePath = this.DropZone.Path + "/" + 
-                    return "~file::" + this.DropZone.NetAddress + this.lfEncode(this.fullPath);
+                    return "~file::" + this.NetAddress + this.lfEncode(this.fullPath);
                 }
             };
             retVal[this.idProperty] = id;

+ 22 - 0
esp/src/eclwatch/HexViewWidget.js

@@ -124,6 +124,28 @@ define([
                     switch (name) {
                         case "hasCompleted": 
                             if (newValue === true) {
+                                this.wu.getInfo({
+                                    onGetWUExceptions: function (exceptions) {
+                                        if (exceptions.length) {
+                                            var msg = "";
+                                            arrayUtil.forEach(exceptions, function (exception) {
+                                                if (exception.Severity === "Error") {
+                                                    if (msg) {
+                                                        msg += "\n";
+                                                    }
+                                                    msg += exception.Message;
+                                                }
+                                            });
+                                            if (msg) {
+                                                dojo.publish("hpcc/brToaster", {
+                                                    Severity: "Error",
+                                                    Source: "HexViewWidget.remoteRead",
+                                                    Exceptions: [{ Source: context.wu.Wuid, Message: msg }]
+                                                });
+                                            }
+                                        }
+                                    }
+                                });
                                 context.wu.fetchResults(function (results) {
                                     context.cachedResponse = "";
                                     arrayUtil.forEach(results, function (result, idx) {