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 19, 2023
1 parent 9c7ef25 commit 97a07f7
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 184 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
Loading

0 comments on commit 97a07f7

Please sign in to comment.