From c9917875c82164715f784c8b207d535dc344d14b Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Thu, 14 Sep 2023 17:01:54 -0400 Subject: [PATCH] HPCC-29971 ECL Watch should not use FileSpray.FileList for component logs Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/eclwatch/TargetSelectClass.js | 20 +++++++++----------- esp/src/src/WsTopology.ts | 3 +++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/esp/src/eclwatch/TargetSelectClass.js b/esp/src/eclwatch/TargetSelectClass.js index 6e33c0fecdd..362e35a8a7b 100644 --- a/esp/src/eclwatch/TargetSelectClass.js +++ b/esp/src/eclwatch/TargetSelectClass.js @@ -587,27 +587,25 @@ define([ loadLogs: function (params) { var context = this; this.set("options", []); - FileSpray.FileList({ + WsTopology.TpListLogFiles({ request: { - Mask: "*.log", - Netaddr: params.treeNode.newPreflight ? params.treeNode.NetAddress : params.treeNode.getNetaddress(), - OS: params.treeNode.newPreflight ? params.treeNode.OS : params.treeNode.getOS(), + NetworkAddress: params.treeNode.newPreflight ? params.treeNode.NetAddress : params.treeNode.getNetaddress(), Path: params.treeNode.newPreflight ? params.treeNode.LogDirectory : params.treeNode.getLogDirectory() } }).then(function (response) { - if (lang.exists("FileListResponse.files.PhysicalFileStruct", response)) { + if (lang.exists("TpListLogFilesResponse.Files.LogFileStruct", response)) { var options = []; - var targetData = response.FileListResponse.files.PhysicalFileStruct; + var targetData = response.TpListLogFilesResponse.Files.LogFileStruct; var shortestLabelLen = 9999; var shortestLabel = ""; for (var i = 0; i < targetData.length; ++i) { options.push({ - label: targetData[i].name, // + " " + targetData[i].filesize + " " + targetData[i].modifiedtime, - value: targetData[i].name + label: targetData[i].Name, // + " " + targetData[i].filesize + " " + targetData[i].modifiedtime, + value: targetData[i].Name }); - if (shortestLabelLen > targetData[i].name.length) { - shortestLabelLen = targetData[i].name.length; - shortestLabel = targetData[i].name; + if (shortestLabelLen > targetData[i].Name.length) { + shortestLabelLen = targetData[i].Name.length; + shortestLabel = targetData[i].Name; } } options.sort(function (l, r) { diff --git a/esp/src/src/WsTopology.ts b/esp/src/src/WsTopology.ts index d23e4bc97f3..d70e6f954af 100644 --- a/esp/src/src/WsTopology.ts +++ b/esp/src/src/WsTopology.ts @@ -233,6 +233,9 @@ export function TpGetComponentFile(params) { params.handleAs = "text"; return ESPRequest.send("WsTopology", "TpGetComponentFile", params); } +export function TpListLogFiles(params) { + return ESPRequest.send("WsTopology", "TpListLogFiles", params); +} export function TpLogFile(params) { return ESPRequest.send("WsTopology", "TpLogFile", params); }