Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.2.x' into candidate-…
Browse files Browse the repository at this point in the history
…9.4.x

Signed-off-by: Gordon Smith <[email protected]>

# Conflicts:
#	helm/hpcc/Chart.yaml
#	helm/hpcc/templates/_helpers.tpl
#	helm/hpcc/templates/dafilesrv.yaml
#	helm/hpcc/templates/dali.yaml
#	helm/hpcc/templates/dfuserver.yaml
#	helm/hpcc/templates/eclagent.yaml
#	helm/hpcc/templates/eclccserver.yaml
#	helm/hpcc/templates/eclscheduler.yaml
#	helm/hpcc/templates/esp.yaml
#	helm/hpcc/templates/localroxie.yaml
#	helm/hpcc/templates/roxie.yaml
#	helm/hpcc/templates/sasha.yaml
#	helm/hpcc/templates/thor.yaml
#	version.cmake
  • Loading branch information
GordonSmith committed Sep 21, 2023
2 parents 5f388e5 + 8f13dbf commit a39a463
Show file tree
Hide file tree
Showing 24 changed files with 223 additions and 80 deletions.
2 changes: 2 additions & 0 deletions common/wuwebview/wuwebview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class WuExpandedResultBuffer : implements IPTreeNotifyEvent, public CInterface
resultChildTags.setValue("Warning", true);
resultChildTags.setValue("Alert", true);
resultChildTags.setValue("Info", true);
resultChildTags.setValue("StatsWorkUnit", true);
resultChildTags.setValue("SummaryStats", true);
}

void appendResults(IConstWorkUnit *wu, const char *username, const char *pw)
Expand Down
27 changes: 16 additions & 11 deletions docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SOAPCALL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
form usernames and passwords, if required. If calling an ESP Web
service, you can append the ver_=n.nn parameter to specify the
version of the service. For example: <programlisting
language="ECL" role="notrunnable">SOAPCALL('http://127.0.0.1:8010/Wsdfu/?ver_=1.22',
language="ECL" role="notrunnable">SOAPCALL('https://eclwatch.example.com:8010/Wsdfu/?ver_=1.22',
'DFUSearchData',
instructure,DATASET(outsructure));</programlisting></entry>
</row>
Expand Down Expand Up @@ -444,10 +444,18 @@
STRING500 OutData{XPATH('OutData')};
UNSIGNED4 Latency{XPATH('_call_latency')};
END;
ip := 'http://127.0.0.1:8022/';
ips := 'https://127.0.0.1:8022/';
ipspw := 'https://username:[email protected]:8022/';
ip := 'http://service.example.com:8022/';
ips := 'https://service.example.com:8022/';
svc := 'MyModule.SomeService';
ips_secret := 'secret:myConnectSecret';
/* assumes a secret named http-connect-myConnectSecret exists &amp; contains:
/*
{
"url": "https://service.example.com:8022/",
"username": "username",
"password": "password"
}
*/

//1 rec in, 1 rec out
OneRec1 := SOAPCALL(ips,svc,{STRING500 InData := 'Some Input Data'},OutRec1);
Expand All @@ -460,7 +468,7 @@ OneRec2 := SOAPCALL(InputDataset,ip,svc,{STRING500 InData},OutRec1);

//recordset in, recordset out
ManyRec2 :=
SOAPCALL(InputDataset,ipspw,svc,{STRING500 InData := 'Some In Data'},DATASET(OutRec1));
SOAPCALL(InputDataset,ips_secret,svc,{STRING500 InData := 'Some In Data'},DATASET(OutRec1));

//TRANSFORM function usage example
namesRecord := RECORD
Expand Down Expand Up @@ -494,20 +502,17 @@ outRecord genDefault2(namesRecord l) := TRANSFORM
SELF.score := 0;
END;

ip := 'http://127.0.0.1:8022/';
svc:= 'MyModule.SomeService';
OUTPUT(SOAPCALL(ip, svc,{ STRING20 surname := 'Halligan',STRING20 forename := 'Kevin';},

DATASET(outRecord), ONFAIL(genDefault1())));

OUTPUT(SOAPCALL(ds, ip, svc, inRecord, t(LEFT),DATASET(outRecord), ONFAIL(genDefault2(LEFT))));

OUTPUT(SOAPCALL(ds, ip, svc, inRecord, t(LEFT),DATASET(outRecord), ONFAIL(SKIP)));

//Using HTTPHEADER to pass Authorization info
OUTPUT(SOAPCALL(ds, ip, svc, inRecord, t(LEFT),DATASET(outRecord), ONFAIL(SKIP),
HTTPHEADER('Authorization','Basic dXNlcm5hbWU6cGFzc3dvcmQ='),
HTTPHEADER('MyLiteral','FOO')));

</programlisting>
</sect2>

Expand All @@ -524,11 +529,11 @@ OUTPUT(SOAPCALL(ds, ip, svc, inRecord, t(LEFT),DATASET(outRecord), ONFAIL(SKIP),
<para>Example:</para>

<programlisting lang="ECL" role="notrunnable">//1 rec in, no result
SOAPCALL( 'https://127.0.0.1:8022/','MyModule.SomeService',
SOAPCALL( 'https://service.example.com:8022/','MyModule.SomeService',
{STRING500 InData := 'Some Input Data'});

//recordset in, no result
SOAPCALL( InputDataset,'https://127.0.0.1:8022/','MyModule.SomeService',{STRING500 InData});
SOAPCALL( InputDataset,'https://service.example.com:8022/','MyModule.SomeService',{STRING500 InData});
</programlisting>

<para>See Also: <link linkend="RECORD_Structure">RECORD Structure</link>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,18 @@
<sect3 id="Installing_CentOS-RedHat-Suse">
<title>CentOS/Red Hat</title>

<para>To install the Platform you should have the appropriate
permissions to install packages. If you have sudo rights, then you
can install the platform using yum.</para>
<para>To install the HPCC Systems Platform you should have the
appropriate rights and permissions to install packages on your
system.</para>

<para>One way to install the platform is using yum.</para>

<programlisting>sudo yum install &lt;hpccsystems platform rpm package&gt;</programlisting>
<programlisting lang="bash">sudo yum install -y epel-release
sudo yum install -y &lt;hpccsystems platform rpm package&gt;</programlisting>

<para>Optionally you can install the package with rpm (recommended
using the -Uvh options), however then you would have to negotiate
installing any additional dependencies.</para>
<para>Optionally you can install packages with rpm (recommended
using the -Uvh options), however you would then have to negotiate
installing any dependencies.</para>
</sect3>

<sect3 id="Installing_Ubuntu-Debian">
Expand Down
6 changes: 6 additions & 0 deletions esp/services/common/jsonhelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ namespace JsonHelpers
bool log = reqTree->getPropBool("@log", false); //not in schema
if (log)
appendJSONValue(out, "@log", true);
bool statsToWorkunit = reqTree->getPropBool("@statsToWorkunit", false); //not in schema
if (statsToWorkunit)
appendJSONValue(out, "@statsToWorkunit", true);
bool summaryStats = reqTree->getPropBool("@summaryStats", false); //not in schema
if (summaryStats)
appendJSONValue(out, "@summaryStats", true);
int tracelevel = reqTree->getPropInt("@traceLevel", -1);
if (tracelevel>=0)
appendJSONValue(out, "@traceLevel", tracelevel);
Expand Down
6 changes: 6 additions & 0 deletions esp/services/ws_ecl/ws_ecl_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,12 @@ static void buildReqXml(StringArray& parentTypes, IXmlType* type, StringBuffer&
bool log = reqTree->getPropBool("@log", false);
if (log)
appendXMLAttr(out, "log", "true", nullptr, true);
bool statsToWorkunit = reqTree->getPropBool("@statsToWorkunit", false);
if (statsToWorkunit)
appendXMLAttr(out, "statsToWorkunit", "true", nullptr, true);
bool summaryStats = reqTree->getPropBool("@summaryStats", false);
if (summaryStats)
appendXMLAttr(out, "summaryStats", "true", nullptr, true);
int tracelevel = reqTree->getPropInt("@traceLevel", -1);
if (tracelevel >= 0)
out.appendf(" traceLevel=\"%d\"", tracelevel);
Expand Down
2 changes: 1 addition & 1 deletion esp/src/eclwatch/LZBrowseWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ define([
label: this.i18n.Name,
sortable: false,
shouldExpand: function (row, level) {
if ((context.dzExpanded === "" || context.dzExpanded === row.data.DropZone.Name) && level <= 1) {
if ((context.dzExpanded === "" || context.dzExpanded === row.data.DropZone?.Name) && level <= 1) {
context.dzExpanded = row.data.DropZone.Name;
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions esp/src/src-react/components/ECLPlayground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ const ECLEditorToolbar: React.FunctionComponent<ECLEditorToolbarProps> = ({
const submitWU = React.useCallback(async () => {
const wu = await Workunit.create({ baseUrl: "" });

await wu.update({ QueryText: editor.ecl() });
await wu.update({ Jobname: queryName, QueryText: editor.ecl() });
await wu.submit(cluster);

wu.watchUntilComplete(changes => playgroundResults(wu));
}, [cluster, editor, playgroundResults]);
}, [cluster, editor, playgroundResults, queryName]);

const publishWU = React.useCallback(async () => {
if (queryName === "") {
Expand All @@ -249,7 +249,7 @@ const ECLEditorToolbar: React.FunctionComponent<ECLEditorToolbarProps> = ({

const wu = await Workunit.create({ baseUrl: "" });

await wu.update({ QueryText: editor.ecl() });
await wu.update({ Jobname: queryName, QueryText: editor.ecl() });
await wu.submit(cluster, WUUpdate.Action.Compile);

wu.watchUntilComplete(changes => playgroundResults(wu, "publish"));
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/Files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export const Files: React.FunctionComponent<FilesProps> = ({
},
Name: {
label: nlsHPCC.LogicalName,
width: 360,
formatter: (name, row) => {
const file = Get(row.NodeGroup, name, row);
if (row.__hpcc_isDir) {
Expand Down
4 changes: 2 additions & 2 deletions esp/src/src-react/components/LandingZone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const LandingZone: React.FunctionComponent<LandingZoneProps> = ({
filename: "landingZones",
getSelected: function () {
if (filter?.__dropZone) {
return this.inherited(arguments, [FileSpray.CreateLandingZonesFilterStore({})]);
return this.inherited(arguments, [FileSpray.CreateLandingZonesFilterStore({ dropZone: filter.__dropZone })]);
}
return this.inherited(arguments, [FileSpray.CreateFileListStore({})]);
},
Expand All @@ -139,7 +139,7 @@ export const LandingZone: React.FunctionComponent<LandingZoneProps> = ({
label: nlsHPCC.Name,
sortable: false,
shouldExpand: function (row, level) {
if ((dzExpanded === "" || dzExpanded === row.data.DropZone.Name) && level <= 1) {
if ((dzExpanded === "" || dzExpanded === row.data.DropZone?.Name) && level <= 1) {
dzExpanded = row.data.DropZone.Name;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion esp/src/src-react/components/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const DevTitle: React.FunctionComponent<DevTitleProps> = ({
method: "post"
}).then(() => {
setUserSession({ ...userSession, Status: "Locked" });
replaceUrl("/login", null, true);
replaceUrl("/login", true);
});
}
},
Expand Down
11 changes: 8 additions & 3 deletions esp/src/src-react/components/WorkunitDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as React from "react";
import { IPivotItemProps, Pivot, PivotItem } from "@fluentui/react";
import { scopedLogger } from "@hpcc-js/util";
import { SizeMe } from "react-sizeme";
import nlsHPCC from "src/nlsHPCC";
import { service, hasLogAccess } from "src/ESPLog";
import { useWorkunit } from "../hooks/workunit";
import { useUserTheme } from "../hooks/theme";
import { useDeepEffect } from "../hooks/deepHooks";
import { DojoAdapter } from "../layouts/DojoAdapter";
import { pivotItemStyle } from "../layouts/pivot";
import { pushUrl } from "../util/history";
Expand All @@ -22,6 +24,8 @@ import { WorkunitSummary } from "./WorkunitSummary";
import { Result } from "./Result";
import { Logs } from "./Logs";

const logger = scopedLogger("src-react/components/WorkunitDetails.tsx");

interface WorkunitDetailsProps {
wuid: string;
tab?: string;
Expand Down Expand Up @@ -54,20 +58,21 @@ export const WorkunitDetails: React.FunctionComponent<WorkunitDetailsProps> = ({

const [logCount, setLogCount] = React.useState<number | string>("*");
const [logsDisabled, setLogsDisabled] = React.useState(true);
React.useEffect(() => {

useDeepEffect(() => {
hasLogAccess().then(response => {
setLogsDisabled(!response);
return response;
}).then(hasLogAccess => {
if (hasLogAccess) {
service.GetLogsEx({ ...queryParams, jobId: wuid, LogLineStartFrom: 0, LogLineLimit: 10 }).then(response => { // HPCC-27711 - Requesting LogLineLimit=1 causes issues
setLogCount(response.total);
});
}).catch((err) => logger.error(err));
}
}).catch(() => {
setLogsDisabled(true);
});
}, [queryParams, wuid]);
}, [wuid], [queryParams]);

return <SizeMe monitorHeight>{({ size }) =>
<Pivot overflowBehavior="menu" style={{ height: "100%" }} selectedKey={tab} onLinkClick={evt => pushUrl(`/workunits/${wuid}/${evt.props.itemKey}`)}>
Expand Down
34 changes: 23 additions & 11 deletions esp/src/src-react/components/controls/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import nlsHPCC from "src/nlsHPCC";
import { createCopyDownloadSelection } from "../Common";
import { updatePage, updateSort } from "../../util/history";
import { useDeepCallback, useDeepEffect, useDeepMemo } from "../../hooks/deepHooks";
import { useUserStore } from "../../hooks/store";
import { useUserStore, useNonReactiveEphemeralPageStore } from "../../hooks/store";
import { useUserTheme } from "../../hooks/theme";

/* --- Debugging dependency changes ---
Expand Down Expand Up @@ -43,16 +43,16 @@ interface IColumn extends _IColumn {

function tooltipItemRenderer(item: any, index: number, column: IColumn) {
const id = `${column.key}-${index}`;
const value = item[column.fieldName || column.key] ?? "";
const value = item[column.fieldName || column.key];
const className = column.data.className ? column.data.className(value, item) : "";
const style: React.CSSProperties = {
display: "flex",
justifyContent: column.data.justify === "right" ? "flex-end" : "flex-start"
};
return <TooltipHost id={id} content={value} overflowMode={TooltipOverflowMode.Parent}>
return <TooltipHost id={id} content={value ?? ""} overflowMode={TooltipOverflowMode.Parent}>
{column.data.formatter ?
<span style={style} className={className} aria-describedby={id}>{column.data.formatter(value, item)}</span> :
<span style={style} className={className} aria-describedby={id}>{value}</span>
<span style={style} className={className} aria-describedby={id}>{column.data.formatter(value, item) ?? ""}</span> :
<span style={style} className={className} aria-describedby={id}>{value ?? ""}</span>
}
</TooltipHost>;
}
Expand All @@ -65,24 +65,30 @@ function updateColumnSorted(columns: IColumn[], attr: any, desc: boolean) {
}
}

function columnsAdapter(columns: FluentColumns): IColumn[] {
function columnsAdapter(columns: FluentColumns, columnWidths: Map<string, any>): IColumn[] {
const retVal: IColumn[] = [];
for (const key in columns) {
const column = columns[key];
const width = columnWidths.get(key) ?? column.width;
if (column?.selectorType === undefined && column?.hidden !== true) {
retVal.push({
key,
name: column.label ?? key,
fieldName: column.field ?? key,
minWidth: column.width ?? 70,
maxWidth: column.width,
minWidth: width ?? 70,
maxWidth: width,
isResizable: true,
isSorted: false,
isSortedDescending: false,
iconName: column.headerIcon,
isIconOnly: !!column.headerIcon,
data: column,
onRender: tooltipItemRenderer
styles: { root: { width } },
onRender: (item: any, index: number, col: IColumn) => {
col.minWidth = column.width ?? 70;
col.maxWidth = column.width;
return tooltipItemRenderer(item, index, col);
}
} as IColumn);
}
}
Expand Down Expand Up @@ -187,6 +193,7 @@ const FluentStoreGrid: React.FunctionComponent<FluentStoreGridProps> = ({
const memoizedColumns = useDeepMemo(() => columns, [], [columns]);
const [sorted, setSorted] = React.useState<QuerySortItem>(sort);
const [items, setItems] = React.useState<any[]>([]);
const [columnWidths] = useNonReactiveEphemeralPageStore("columnWidths");

const selectionHandler = useConst(new Selection({
onSelectionChanged: () => {
Expand Down Expand Up @@ -220,8 +227,8 @@ const FluentStoreGrid: React.FunctionComponent<FluentStoreGridProps> = ({
}, [], [sort]);

const fluentColumns: IColumn[] = React.useMemo(() => {
return columnsAdapter(memoizedColumns);
}, [memoizedColumns]);
return columnsAdapter(memoizedColumns, columnWidths);
}, [columnWidths, memoizedColumns]);

React.useEffect(() => {
updateColumnSorted(fluentColumns, sorted?.attribute as string, sorted?.descending);
Expand Down Expand Up @@ -258,6 +265,10 @@ const FluentStoreGrid: React.FunctionComponent<FluentStoreGridProps> = ({
});
}, []);

const columnResize = React.useCallback((column: IColumn, newWidth: number, columnIndex?: number) => {
columnWidths.set(column.key, newWidth);
}, [columnWidths]);

return <DetailsList
compact={true}
items={items}
Expand All @@ -269,6 +280,7 @@ const FluentStoreGrid: React.FunctionComponent<FluentStoreGridProps> = ({
selectionPreservedOnEmptyClick={true}
onColumnHeaderClick={onColumnClick}
onRenderDetailsHeader={renderDetailsHeader}
onColumnResize={columnResize}
styles={gridStyles(height)}
/>;
};
Expand Down
2 changes: 1 addition & 1 deletion esp/src/src-react/components/forms/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const Login: React.FunctionComponent<LoginProps> = ({
} else {
createUserSession(cookies).then(() => {
setErrorMessage("");
replaceUrl("/", null, true);
replaceUrl("/", true);
}).catch(err => logger.error("Unable to create user session."));
}
}
Expand Down
Loading

0 comments on commit a39a463

Please sign in to comment.