Skip to content
Snippets Groups Projects
Commit 20f8e528 authored by Zoltan Runyo's avatar Zoltan Runyo
Browse files

ICSHWI-7645: Fix redeploy use case (Deploy IOC dialog)

parent fb4984ed
No related branches found
No related tags found
1 merge request!56ICSHWI-7645
...@@ -13,7 +13,7 @@ const useStyles = makeStyles((theme) => ({ ...@@ -13,7 +13,7 @@ const useStyles = makeStyles((theme) => ({
export function IOCDeployDialog({ open, setOpen, submitCallback, init = {}}) { export function IOCDeployDialog({ open, setOpen, submitCallback, init = {}}) {
const classes = useStyles(); const classes = useStyles();
const [hosts, getHosts] = useCSEntrySearch(); const [hosts, getHosts] = useCSEntrySearch();
const [host, setHost] = useState(init.host); const [host, setHost] = useState(null);
const [query, onHostKeyUp] = useTypingTimer({interval: 500}); const [query, onHostKeyUp] = useTypingTimer({interval: 500});
const handleClose = () => { const handleClose = () => {
...@@ -32,13 +32,14 @@ export function IOCDeployDialog({ open, setOpen, submitCallback, init = {}}) { ...@@ -32,13 +32,14 @@ export function IOCDeployDialog({ open, setOpen, submitCallback, init = {}}) {
const comment = commentText.value; const comment = commentText.value;
const git = gitText.value; const git = gitText.value;
const version = versionText.value; const version = versionText.value;
console.log(init);
console.log(host); console.log(host);
submitCallback({ submitCallback({
comment: comment, comment: comment,
sourceUrl: git, sourceUrl: git,
sourceVersion: version, sourceVersion: version,
hostCSEntryId: host ? parseInt(host.csEntryHost.id) : undefined}); hostCSEntryId: host ? parseInt(host.csEntryHost.id) : (init.csEntryHost ? init.csEntryHost.id : undefined)});
}; };
return ( return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment