Skip to content

Commit

Permalink
Merge pull request #17779 from jeclrsg/hpcc-29244-playground-submit-q…
Browse files Browse the repository at this point in the history
…uery-name

HPCC-29244 ECL Watch v9 fix cannot set job name in playground

Reviewed-by: Gordon Smith <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Sep 19, 2023
2 parents 85aaa2e + a66eef6 commit d521d3f
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 d521d3f

Please sign in to comment.