Skip to content

Commit

Permalink
HPCC-29244 ECL Watch v9 fix cannot set job name in playground
Browse files Browse the repository at this point in the history
original change for 29244 didn't fix the issue, because the jobname needed to be submitted to WUUpdate

Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Sep 15, 2023
1 parent 85aaa2e commit a66eef6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions esp/src/src-react/components/ECLPlayground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ const playgroundStyles = mergeStyleSets({
borderLeft: borderStyle,
borderRight: borderStyle
}
},
".ms-Label": {
marginRight: "12px"
},
".ms-Label::after": {
paddingRight: 0
}
},
},
Expand Down Expand Up @@ -122,9 +128,6 @@ const playgroundStyles = mergeStyleSets({
display: "flex",
marginLeft: "18px"
},
".is-disabled .ms-Label": {
paddingRight: "12px"
},
".ms-TextField-errorMessage": {
display: "none"
}
Expand Down Expand Up @@ -231,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 @@ -246,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 Expand Up @@ -302,7 +305,6 @@ const ECLEditorToolbar: React.FunctionComponent<ECLEditorToolbarProps> = ({
<TextField
label={nlsHPCC.Name}
name="jobName"
disabled={showSubmitBtn}
componentRef={queryNameRef}
required={!showSubmitBtn}
errorMessage={queryNameErrorMsg}
Expand Down

0 comments on commit a66eef6

Please sign in to comment.