Skip to content

Commit

Permalink
HPCC-29971 ECL Watch should not use FileSpray.FileList for component …
Browse files Browse the repository at this point in the history
…logs

Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Sep 15, 2023
1 parent 9c7ef25 commit c991787
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
20 changes: 9 additions & 11 deletions esp/src/eclwatch/TargetSelectClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions esp/src/src/WsTopology.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c991787

Please sign in to comment.