Skip to content

Commit

Permalink
HPCC-31122 Remove ZAP 'Log Access plug-in' warning for bare-metal
Browse files Browse the repository at this point in the history
When creating a ZAP report, if Remote Log Access plug-in is not
available, ECLWatch shows a warning: "Warning: may not be able to
include log file because Remote Log Access plug-in is not available!".
Before this PR, the warning shows for both cloud and bare-metal. In
this PR, the warning is removed for bare-metal since the Remote Log
Access interface is not used in bare-metal at the moment.

Revise based on review:
1. Revise the warning message.
2. If Containerized, skip the code to report thor processes.
3. Add comments about reporting thor processes for bare-metal.

Signed-off-by: wangkx <[email protected]>
  • Loading branch information
wangkx committed Jan 18, 2024
1 parent a786733 commit 8b62a8c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions esp/services/ws_workunits/ws_workunitsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4979,8 +4979,8 @@ bool CWsWorkunitsEx::onWUGetZAPInfo(IEspContext &context, IEspWUGetZAPInfoReques
ipaddr.getHostText(EspIP);
resp.setESPIPAddress(EspIP.str());
}
if ((version >= 1.96) && !queryRemoteLogAccessor())
resp.setMessage("Warning: may not be able to include log file because Remote Log Access plug-in is not available!");
if ((version >= 1.96) && isContainerized() & !queryRemoteLogAccessor())
resp.setMessage("Warning: the log file cannot be included because Remote Log Access plug-in is not available!");

//Get Archive
Owned<IConstWUQuery> query = cw->getQuery();
Expand All @@ -4992,8 +4992,18 @@ bool CWsWorkunitsEx::onWUGetZAPInfo(IEspContext &context, IEspWUGetZAPInfoReques
resp.setArchive(queryText.str());
}

if (isContainerized())
{
resp.setEmailTo(zapEmailTo.get());
resp.setEmailFrom(zapEmailFrom.get());
return true;
}

//The code below is for bare-metal only.
if (version >= 1.95)
{
//Using the getProcesses(), find out possible Thor processes used by the WU.
//The processes may be displayed inside the dialog box of creating ZAP report.
StringBuffer thorProcesses;
Owned<IStringIterator> thorInstances = cw->getProcesses("Thor");
ForEach (*thorInstances)
Expand All @@ -5014,7 +5024,7 @@ bool CWsWorkunitsEx::onWUGetZAPInfo(IEspContext &context, IEspWUGetZAPInfoReques
return true;
}

//Get Thor IP
//Get Thor IP which may be displayed inside the dialog box of creating ZAP report.
BoolHash uniqueProcesses;
Owned<IStringIterator> thorInstances = cw->getProcesses("Thor");
ForEach (*thorInstances)
Expand Down

0 comments on commit 8b62a8c

Please sign in to comment.