Skip to content

Commit

Permalink
Merge pull request #17597 from wangkx/h29086
Browse files Browse the repository at this point in the history
HPCC-29086 Support LZ ECLWatchVisible in helm config
  • Loading branch information
GordonSmith authored Jul 18, 2023
2 parents 6b696a3 + 7607c30 commit 96dcac7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
8 changes: 2 additions & 6 deletions esp/services/ws_fs/ws_fsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3196,15 +3196,13 @@ bool CFileSprayEx::onDropZoneFileSearch(IEspContext &context, IEspDropZoneFileSe
bool isIPAddressReq = isIPAddress(dropZoneServerReq);
IArrayOf<IConstTpDropZone> allTpDropZones;
CTpWrapper tpWrapper;
tpWrapper.getTpDropZones(9999, nullptr, false, allTpDropZones); //version 9999: get the latest information about dropzone
tpWrapper.getTpDropZones(9999, nullptr, req.getECLWatchVisibleOnly(), allTpDropZones); //version 9999: get the latest information about dropzone
ForEachItemIn(i, allTpDropZones)
{
IConstTpDropZone& dropZone = allTpDropZones.item(i);
const char* name = dropZone.getName();
if (!streq(dropZoneName, name))
continue;
if (req.getECLWatchVisibleOnly() && !dropZone.getECLWatchVisible())
continue;

IArrayOf<IConstTpMachine>& tpMachines = dropZone.getTpMachines();
ForEachItemIn(ii, tpMachines)
Expand Down Expand Up @@ -3397,12 +3395,10 @@ bool CFileSprayEx::onDropZoneFiles(IEspContext &context, IEspDropZoneFilesReques
bool isIPAddressReq = isIPAddress(netAddress);
IArrayOf<IConstTpDropZone> allTpDropZones;
CTpWrapper tpWrapper;
tpWrapper.getTpDropZones(9999, nullptr, false, allTpDropZones); //version 9999: get the latest information about dropzone
tpWrapper.getTpDropZones(9999, nullptr, ECLWatchVisibleOnly, allTpDropZones); //version 9999: get the latest information about dropzone
ForEachItemIn(i, allTpDropZones)
{
IConstTpDropZone& dropZone = allTpDropZones.item(i);
if (ECLWatchVisibleOnly && !dropZone.getECLWatchVisible())
continue;

const char* dropZoneName = dropZone.getName();
const char* prefix = dropZone.getPath();
Expand Down
5 changes: 4 additions & 1 deletion esp/smc/SMCLib/TpContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,17 @@ void CTpWrapper::getTpDropZones(double clientVersion, const char* name, bool ECL
ForEach(*planes)
{
IPropertyTree & plane = planes->query();
bool eclwatchVisible = plane.getPropBool("@eclwatchVisible", true);
if (ECLWatchVisibleOnly && !eclwatchVisible)
continue;
const char * dropzonename = plane.queryProp("@name");
const char * path = plane.queryProp("@prefix");
Owned<IEspTpDropZone> dropZone = createTpDropZone();
dropZone->setName(dropzonename);
dropZone->setDescription("");
dropZone->setPath(path);
dropZone->setBuild("");
dropZone->setECLWatchVisible(true);
dropZone->setECLWatchVisible(eclwatchVisible);
IArrayOf<IEspTpMachine> tpMachines;
gatherDropZoneMachines(tpMachines, plane);
dropZone->setTpMachines(tpMachines);
Expand Down
3 changes: 3 additions & 0 deletions helm/hpcc/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,9 @@
"type": "integer",
"default": 0
},
"eclwatchVisible": {
"type": "boolean"
},
"components": {},
"prefix": {},
"subPath": {},
Expand Down
1 change: 1 addition & 0 deletions helm/hpcc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ storage:
# numDevices: 1 # number of devices that are part of the plane
# secret: <secret-id> # what secret is required to access the files. This could optionally become a list if required (or add secrets:).
# defaultSprayParts: 4 # The number of partitions created when spraying (default: 1)
# eclwatchVisible: true # Can the lz plane be visible from ECLWatch (default: true)
# cost: # The storage cost
# storageAtRest: 0.0135 # Storage at rest cost: cost per GiB/month
# storageapi: # Optional information to allow access to storage api
Expand Down

0 comments on commit 96dcac7

Please sign in to comment.