#470: Added better error messaging for later debugs
This commit is contained in:
@@ -1950,8 +1950,8 @@ func handleExecution(id string, workflow shuffle.Workflow, request *http.Request
|
|||||||
//Org []Org `json:"org,omitempty" datastore:"org"`
|
//Org []Org `json:"org,omitempty" datastore:"org"`
|
||||||
err = shuffle.SetWorkflowExecution(ctx, workflowExecution, true)
|
err = shuffle.SetWorkflowExecution(ctx, workflowExecution, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error saving workflow execution for updates %s: %s", topic, err)
|
log.Printf("[WARNING] Error saving workflow execution for updates %s: %s", topic, err)
|
||||||
return shuffle.WorkflowExecution{}, "Failed getting workflowexecution", err
|
return shuffle.WorkflowExecution{}, fmt.Sprintf("Failed setting workflowexecution: %s", err), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds queue for onprem execution
|
// Adds queue for onprem execution
|
||||||
|
|||||||
@@ -8138,6 +8138,7 @@ const AngularWorkflow = (props) => {
|
|||||||
// //cf80fa70-65cf-4963-b474-b459a6dead81
|
// //cf80fa70-65cf-4963-b474-b459a6dead81
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
console.log(selectedResult)
|
||||||
const codePopoutModal = !codeModalOpen ? null :
|
const codePopoutModal = !codeModalOpen ? null :
|
||||||
<Draggable
|
<Draggable
|
||||||
onDrag={(e) => {
|
onDrag={(e) => {
|
||||||
@@ -8295,6 +8296,35 @@ const AngularWorkflow = (props) => {
|
|||||||
}}>{selectedResult.result}</span>
|
}}>{selectedResult.result}</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
<div>
|
||||||
|
{selectedResult.action.parameters !== null && selectedResult.action.parameters !== undefined ?
|
||||||
|
<div>
|
||||||
|
<Divider style={{backgroundColor: theme.palette.surfaceColor, marginTop: 15, marginBottom: 15, }}/>
|
||||||
|
<Typography variant="h6" style={{marginBottom: 0, marginTop: 0}}>
|
||||||
|
Variables
|
||||||
|
</Typography>
|
||||||
|
{selectedResult.action.parameters.map((data, index) => {
|
||||||
|
if (data.value.length === 0) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.example !== undefined && data.example !== null && data.example.includes("***")) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div key={index} style={{}}>
|
||||||
|
<Typography variant="body1" style={{marginBottom: 0, marginTop: 5}}>
|
||||||
|
<b>{data.name}</b>: {data.value}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
:
|
||||||
|
null
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
|
|||||||
@@ -1097,9 +1097,16 @@ const AppCreator = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (item.queries.length > 0) {
|
if (item.queries.length > 0) {
|
||||||
|
var skipped = false
|
||||||
for (var querykey in item.queries) {
|
for (var querykey in item.queries) {
|
||||||
const queryitem = item.queries[querykey]
|
const queryitem = item.queries[querykey]
|
||||||
|
|
||||||
|
if (queryitem.name.toLowerCase() == "url") {
|
||||||
|
console.log(item.name+" uses a bad query: url")
|
||||||
|
skipped = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
var newitem = {
|
var newitem = {
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": queryitem.name,
|
"name": queryitem.name,
|
||||||
@@ -1117,12 +1124,27 @@ const AppCreator = (props) => {
|
|||||||
data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
||||||
//console.log(queryitem)
|
//console.log(queryitem)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bad code as it doesn't allow for "anything".
|
||||||
|
if (skipped) {
|
||||||
|
alert.info("Bad configuration of "+item.name+". Skipping because queries are invalid.")
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
//data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
||||||
|
|
||||||
if (item.paths.length > 0) {
|
if (item.paths.length > 0) {
|
||||||
for (querykey in item.paths) {
|
for (querykey in item.paths) {
|
||||||
const queryitem = item.paths[querykey]
|
const queryitem = item.paths[querykey]
|
||||||
|
|
||||||
|
if (queryitem.toLowerCase() == "url") {
|
||||||
|
queryitem = "action_url"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (queryitem.toLowerCase() == "apikey") {
|
||||||
|
queryitem = "action_apikey"
|
||||||
|
}
|
||||||
|
|
||||||
newitem = {
|
newitem = {
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"name": queryitem,
|
"name": queryitem,
|
||||||
@@ -1315,6 +1337,13 @@ const AppCreator = (props) => {
|
|||||||
if (setExtraAuth.length > 0) {
|
if (setExtraAuth.length > 0) {
|
||||||
for (var key in extraAuth) {
|
for (var key in extraAuth) {
|
||||||
const curauth = extraAuth[key]
|
const curauth = extraAuth[key]
|
||||||
|
|
||||||
|
if (curauth.name.toLowerCase() == "url") {
|
||||||
|
alert.error("Can't add extra auth with Name URL")
|
||||||
|
setAppBuilding(false)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
data.components.securitySchemes[curauth.name] = {
|
data.components.securitySchemes[curauth.name] = {
|
||||||
"type": "apiKey",
|
"type": "apiKey",
|
||||||
"in": curauth.type,
|
"in": curauth.type,
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ const Docs = (props) => {
|
|||||||
// );
|
// );
|
||||||
//}
|
//}
|
||||||
|
|
||||||
const postDataBrowser =
|
const postDataBrowser = list === undefined || list === null ? null :
|
||||||
<div style={Body}>
|
<div style={Body}>
|
||||||
<div style={SideBar}>
|
<div style={SideBar}>
|
||||||
<Paper style={SidebarPaperStyle}>
|
<Paper style={SidebarPaperStyle}>
|
||||||
@@ -278,7 +278,7 @@ const Docs = (props) => {
|
|||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
}
|
}
|
||||||
|
|
||||||
const postDataMobile =
|
const postDataMobile = list === undefined || list === null ? null :
|
||||||
<div style={mobileStyle}>
|
<div style={mobileStyle}>
|
||||||
<div>
|
<div>
|
||||||
<Button fullWidth aria-controls="simple-menu" aria-haspopup="true" variant="outlined" color="primary" onClick={handleClick}>
|
<Button fullWidth aria-controls="simple-menu" aria-haspopup="true" variant="outlined" color="primary" onClick={handleClick}>
|
||||||
|
|||||||
Reference in New Issue
Block a user