Got modal with Draggable working
This commit is contained in:
@@ -6005,7 +6005,7 @@ const AngularWorkflow = (props) => {
|
|||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
}
|
}
|
||||||
|
|
||||||
alert.success("Copied "+to_be_copied)
|
//alert.success("Copied "+to_be_copied)
|
||||||
}
|
}
|
||||||
|
|
||||||
const executionModal =
|
const executionModal =
|
||||||
@@ -6134,8 +6134,6 @@ const AngularWorkflow = (props) => {
|
|||||||
if (executionData.results.length !== 1 && !showSkippedActions && (data.status === "SKIPPED" || data.status === "FAILURE")) {
|
if (executionData.results.length !== 1 && !showSkippedActions && (data.status === "SKIPPED" || data.status === "FAILURE")) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
|
|
||||||
// showResult = replaceAll(showResult, " None", " \"None\"")
|
// showResult = replaceAll(showResult, " None", " \"None\"")
|
||||||
// Super basic check.
|
// Super basic check.
|
||||||
@@ -6651,74 +6649,73 @@ const AngularWorkflow = (props) => {
|
|||||||
const validate = validateJson(selectedResult.result.trim())
|
const validate = validateJson(selectedResult.result.trim())
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Draggable>
|
<Draggable
|
||||||
<Dialog
|
position={{
|
||||||
open={codeModalOpen}
|
x: 0,
|
||||||
transition={Fade}
|
y: 0,
|
||||||
hasBackdrop={false}
|
}}
|
||||||
onClose={() => {
|
>
|
||||||
//setCodeModalOpen(false)
|
<Dialog
|
||||||
}}
|
disableEnforceFocus={true}
|
||||||
PaperComponent=<Draggable />
|
style={{pointerEvents: "none"}}
|
||||||
BackdropProps={{
|
hideBackdrop={true}
|
||||||
invisible: false,
|
open={codeModalOpen}
|
||||||
open: false,
|
onClose={() => {
|
||||||
style: {
|
//setCodeModalOpen(false)
|
||||||
height: 0,
|
}}
|
||||||
width: 0,
|
BackdropProps={{
|
||||||
padding: 0,
|
invisible: true,
|
||||||
margin: 0,
|
style: {
|
||||||
background: "none",
|
backgroundColor: "transparent",
|
||||||
boxShadow: "none",
|
pointerEvents: "none",
|
||||||
backgroundColor: "transparent",
|
}
|
||||||
}
|
}}
|
||||||
}}
|
PaperProps={{
|
||||||
PaperProps={{
|
style: {
|
||||||
style: {
|
pointerEvents: "auto",
|
||||||
backgroundColor: surfaceColor,
|
backgroundColor: inputColor,
|
||||||
color: "white",
|
color: "white",
|
||||||
minWidth: 750,
|
minWidth: 750,
|
||||||
padding: 30,
|
padding: 30,
|
||||||
maxHeight: 700,
|
maxHeight: 700,
|
||||||
overflow: "auto",
|
overflow: "auto",
|
||||||
//backgroundColor: "transparent",
|
//boxShadow: "none",
|
||||||
boxShadow: "none",
|
},
|
||||||
},
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<IconButton style={{zIndex: 5000, position: "absolute", top: 34, right: 34,}} onClick={() => {
|
||||||
<IconButton style={{zIndex: 5000, position: "absolute", top: 34, right: 34,}} onClick={() => {
|
setCodeModalOpen(false)
|
||||||
setCodeModalOpen(false)
|
}}>
|
||||||
}}>
|
<CloseIcon style={{color: "white"}}/>
|
||||||
<CloseIcon style={{color: "white"}}/>
|
</IconButton>
|
||||||
</IconButton>
|
<div style={{marginBottom: 40,}}>
|
||||||
<div style={{marginBottom: 40,}}>
|
<div style={{display: "flex", marginBottom: 15,}}>
|
||||||
<div style={{display: "flex", marginBottom: 15,}}>
|
{curapp === null ? null : <img alt={selectedResult.app_name} src={curapp === undefined ? "" : curapp.large_image} style={{marginRight: 20, width: imgsize, height: imgsize, border: `2px solid ${statusColor}`}} />}
|
||||||
{curapp === null ? null : <img alt={selectedResult.app_name} src={curapp === undefined ? "" : curapp.large_image} style={{marginRight: 20, width: imgsize, height: imgsize, border: `2px solid ${statusColor}`}} />}
|
|
||||||
<div>
|
|
||||||
<div style={{fontSize: 24, marginTop: "auto", marginBottom: "auto"}}><b>{selectedResult.action.label}</b></div>
|
|
||||||
<div style={{fontSize: 14}}>{selectedResult.action.name}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style={{marginBottom: 5}}><b>Status </b> {selectedResult.status}</div>
|
|
||||||
{validate.valid ? <ReactJson
|
|
||||||
src={validate.result}
|
|
||||||
theme="solarized"
|
|
||||||
collapsed={false}
|
|
||||||
displayDataTypes={false}
|
|
||||||
onSelect={(select) => {
|
|
||||||
HandleJsonCopy(JSON.stringify(validate.result), select, selectedResult.action.label)
|
|
||||||
}}
|
|
||||||
name={"Results for "+selectedResult.action.label}
|
|
||||||
/>
|
|
||||||
:
|
|
||||||
<div>
|
<div>
|
||||||
<b>Result</b>
|
<div style={{fontSize: 24, marginTop: "auto", marginBottom: "auto"}}><b>{selectedResult.action.label}</b></div>
|
||||||
{selectedResult.result}
|
<div style={{fontSize: 14}}>{selectedResult.action.name}</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
<div style={{marginBottom: 5}}><b>Status </b> {selectedResult.status}</div>
|
||||||
</Draggable>
|
{validate.valid ? <ReactJson
|
||||||
|
src={validate.result}
|
||||||
|
theme="solarized"
|
||||||
|
collapsed={false}
|
||||||
|
displayDataTypes={false}
|
||||||
|
onSelect={(select) => {
|
||||||
|
HandleJsonCopy(JSON.stringify(validate.result), select, selectedResult.action.label)
|
||||||
|
}}
|
||||||
|
name={"Results for "+selectedResult.action.label}
|
||||||
|
/>
|
||||||
|
:
|
||||||
|
<div>
|
||||||
|
<b>Result</b>
|
||||||
|
{selectedResult.result}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</Dialog>
|
||||||
|
</Draggable>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ export const validateJson = (showResult) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("VALID: ", jsonvalid)
|
|
||||||
return {
|
return {
|
||||||
"valid": jsonvalid,
|
"valid": jsonvalid,
|
||||||
"result": jsonvalid ? JSON.parse(showResult) : showResult,
|
"result": jsonvalid ? JSON.parse(showResult) : showResult,
|
||||||
|
|||||||
Reference in New Issue
Block a user