Minor edits for blog posts 3

This commit is contained in:
frikky
2020-06-09 18:57:14 +02:00
parent 716443f3a5
commit 31df620d71
7 changed files with 93 additions and 89 deletions
+3 -10
View File
@@ -799,7 +799,6 @@ func handleConnect(swagger *openapi3.Swagger, api WorkflowApp, extraParameters [
} }
if param.Value.In == "path" { if param.Value.In == "path" {
//log.Printf("PATH!: %s", param.Value.Name)
parameters = append(parameters, param.Value.Name) parameters = append(parameters, param.Value.Name)
//baseUrl = fmt.Sprintf("%s%s", baseUrl) //baseUrl = fmt.Sprintf("%s%s", baseUrl)
} else if param.Value.In == "query" { } else if param.Value.In == "query" {
@@ -909,7 +908,6 @@ func handleGet(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wor
} }
if param.Value.In == "path" { if param.Value.In == "path" {
log.Printf("PATH!: %s", param.Value.Name)
parameters = append(parameters, param.Value.Name) parameters = append(parameters, param.Value.Name)
//baseUrl = fmt.Sprintf("%s%s", baseUrl) //baseUrl = fmt.Sprintf("%s%s", baseUrl)
} else if param.Value.In == "query" { } else if param.Value.In == "query" {
@@ -1016,7 +1014,6 @@ func handleHead(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wo
} }
if param.Value.In == "path" { if param.Value.In == "path" {
//log.Printf("PATH!: %s", param.Value.Name)
parameters = append(parameters, param.Value.Name) parameters = append(parameters, param.Value.Name)
//baseUrl = fmt.Sprintf("%s%s", baseUrl) //baseUrl = fmt.Sprintf("%s%s", baseUrl)
} else if param.Value.In == "query" { } else if param.Value.In == "query" {
@@ -1122,7 +1119,6 @@ func handleDelete(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []
} }
if param.Value.In == "path" { if param.Value.In == "path" {
//log.Printf("PATH!: %s", param.Value.Name)
parameters = append(parameters, param.Value.Name) parameters = append(parameters, param.Value.Name)
//baseUrl = fmt.Sprintf("%s%s", baseUrl) //baseUrl = fmt.Sprintf("%s%s", baseUrl)
} else if param.Value.In == "query" { } else if param.Value.In == "query" {
@@ -1178,9 +1174,9 @@ func handlePost(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wo
Parameters: extraParameters, Parameters: extraParameters,
} }
if path.Post.RequestBody != nil { //if path.Post.RequestBody != nil {
log.Printf("RequestBody: %#v", path.Post.RequestBody) // log.Printf("RequestBody: %#v", path.Post.RequestBody)
} //}
action.Returns.Schema.Type = "string" action.Returns.Schema.Type = "string"
baseUrl := fmt.Sprintf("%s%s", api.Link, actualPath) baseUrl := fmt.Sprintf("%s%s", api.Link, actualPath)
@@ -1233,7 +1229,6 @@ func handlePost(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wo
} }
if param.Value.In == "path" { if param.Value.In == "path" {
//log.Printf("PATH!: %s", param.Value.Name)
parameters = append(parameters, param.Value.Name) parameters = append(parameters, param.Value.Name)
//baseUrl = fmt.Sprintf("%s%s", baseUrl) //baseUrl = fmt.Sprintf("%s%s", baseUrl)
} else if param.Value.In == "query" { } else if param.Value.In == "query" {
@@ -1339,7 +1334,6 @@ func handlePatch(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []W
} }
if param.Value.In == "path" { if param.Value.In == "path" {
//log.Printf("PATH!: %s", param.Value.Name)
parameters = append(parameters, param.Value.Name) parameters = append(parameters, param.Value.Name)
//baseUrl = fmt.Sprintf("%s%s", baseUrl) //baseUrl = fmt.Sprintf("%s%s", baseUrl)
} else if param.Value.In == "query" { } else if param.Value.In == "query" {
@@ -1446,7 +1440,6 @@ func handlePut(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wor
} }
if param.Value.In == "path" { if param.Value.In == "path" {
//log.Printf("PATH!: %s", param.Value.Name)
parameters = append(parameters, param.Value.Name) parameters = append(parameters, param.Value.Name)
//baseUrl = fmt.Sprintf("%s%s", baseUrl) //baseUrl = fmt.Sprintf("%s%s", baseUrl)
} else if param.Value.In == "query" { } else if param.Value.In == "query" {
+3 -3
View File
@@ -4648,7 +4648,7 @@ func handleDeleteOutlookSub(resp http.ResponseWriter, request *http.Request) {
ctx := context.Background() ctx := context.Background()
workflow, err := getWorkflow(ctx, workflowId) workflow, err := getWorkflow(ctx, workflowId)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (delete outlook): %s", err)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`)) resp.Write([]byte(`{"success": false}`))
return return
@@ -4782,7 +4782,7 @@ func createOutlookSub(resp http.ResponseWriter, request *http.Request) {
ctx := context.Background() ctx := context.Background()
workflow, err := getWorkflow(ctx, workflowId) workflow, err := getWorkflow(ctx, workflowId)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (outlook sub): %s", err)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`)) resp.Write([]byte(`{"success": false}`))
return return
@@ -5765,7 +5765,7 @@ func runInit(ctx context.Context) {
_, _, err := handleExecution(schedule.WorkflowId, Workflow{}, request) _, _, err := handleExecution(schedule.WorkflowId, Workflow{}, request)
if err != nil { if err != nil {
log.Printf("Failed to execute: %s", err) log.Printf("Failed to execute %s: %s", schedule.WorkflowId, err)
} }
} }
+14 -14
View File
@@ -428,7 +428,7 @@ func createSchedule(ctx context.Context, scheduleId, workflowId, name, frequency
_, _, err := handleExecution(workflowId, Workflow{}, request) _, _, err := handleExecution(workflowId, Workflow{}, request)
if err != nil { if err != nil {
log.Printf("Failed to execute: %s", err) log.Printf("Failed to execute %s: %s", workflowId, err)
} }
} }
@@ -1058,7 +1058,7 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) {
ctx := context.Background() ctx := context.Background()
workflow, err := getWorkflow(ctx, fileId) workflow, err := getWorkflow(ctx, fileId)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (delete workflow): %s", err)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`)) resp.Write([]byte(`{"success": false}`))
return return
@@ -1128,7 +1128,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
return return
} }
log.Println("Start") //log.Println("Start")
user, userErr := handleApiAuthentication(resp, request) user, userErr := handleApiAuthentication(resp, request)
if userErr != nil { if userErr != nil {
log.Printf("Api authentication failed in edit workflow: %s", userErr) log.Printf("Api authentication failed in edit workflow: %s", userErr)
@@ -1137,7 +1137,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
return return
} }
log.Println("PostUser") //log.Println("PostUser")
location := strings.Split(request.URL.String(), "/") location := strings.Split(request.URL.String(), "/")
var fileId string var fileId string
@@ -1164,7 +1164,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
tmpworkflow, err := getWorkflow(ctx, fileId) tmpworkflow, err := getWorkflow(ctx, fileId)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (save workflow): %s", err)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`)) resp.Write([]byte(`{"success": false}`))
return return
@@ -1211,7 +1211,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
// FIXME - this shouldn't be necessary with proper API checks // FIXME - this shouldn't be necessary with proper API checks
newActions := []Action{} newActions := []Action{}
allNodes := []string{} allNodes := []string{}
log.Println("Pre") //log.Println("Pre")
for _, action := range workflow.Actions { for _, action := range workflow.Actions {
allNodes = append(allNodes, action.ID) allNodes = append(allNodes, action.ID)
@@ -1237,7 +1237,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
workflow.Actions = newActions workflow.Actions = newActions
for _, trigger := range workflow.Triggers { for _, trigger := range workflow.Triggers {
log.Println("TRIGGERS") //log.Println("TRIGGERS")
allNodes = append(allNodes, trigger.ID) allNodes = append(allNodes, trigger.ID)
} }
@@ -1260,7 +1260,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
foundNodes := []string{} foundNodes := []string{}
for _, node := range allNodes { for _, node := range allNodes {
for _, branch := range workflow.Branches { for _, branch := range workflow.Branches {
log.Println("branch") //log.Println("branch")
//log.Println(node) //log.Println(node)
//log.Println(branch.DestinationID) //log.Println(branch.DestinationID)
if node == branch.DestinationID || node == branch.SourceID { if node == branch.DestinationID || node == branch.SourceID {
@@ -1668,7 +1668,7 @@ func handleExecution(id string, workflow Workflow, request *http.Request) (Workf
if workflow.ID == "" || workflow.ID != id { if workflow.ID == "" || workflow.ID != id {
tmpworkflow, err := getWorkflow(ctx, id) tmpworkflow, err := getWorkflow(ctx, id)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (execution cleanup): %s", err)
return WorkflowExecution{}, "Failed getting workflow", err return WorkflowExecution{}, "Failed getting workflow", err
} }
@@ -1993,7 +1993,7 @@ func executeWorkflow(resp http.ResponseWriter, request *http.Request) {
ctx := context.Background() ctx := context.Background()
workflow, err := getWorkflow(ctx, fileId) workflow, err := getWorkflow(ctx, fileId)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (execute workflow): %s", err)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`)) resp.Write([]byte(`{"success": false}`))
return return
@@ -2064,7 +2064,7 @@ func stopSchedule(resp http.ResponseWriter, request *http.Request) {
ctx := context.Background() ctx := context.Background()
workflow, err := getWorkflow(ctx, fileId) workflow, err := getWorkflow(ctx, fileId)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (stop schedule): %s", err)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`)) resp.Write([]byte(`{"success": false}`))
return return
@@ -2153,7 +2153,7 @@ func stopScheduleGCP(resp http.ResponseWriter, request *http.Request) {
ctx := context.Background() ctx := context.Background()
workflow, err := getWorkflow(ctx, fileId) workflow, err := getWorkflow(ctx, fileId)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (stop schedule GCP): %s", err)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`)) resp.Write([]byte(`{"success": false}`))
return return
@@ -2275,7 +2275,7 @@ func scheduleWorkflow(resp http.ResponseWriter, request *http.Request) {
ctx := context.Background() ctx := context.Background()
workflow, err := getWorkflow(ctx, fileId) workflow, err := getWorkflow(ctx, fileId)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (schedule workflow): %s", err)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`)) resp.Write([]byte(`{"success": false}`))
return return
@@ -3773,7 +3773,7 @@ func getWorkflowExecutions(resp http.ResponseWriter, request *http.Request) {
ctx := context.Background() ctx := context.Background()
workflow, err := getWorkflow(ctx, fileId) workflow, err := getWorkflow(ctx, fileId)
if err != nil { if err != nil {
log.Printf("Failed getting the workflow locally: %s", err) log.Printf("Failed getting the workflow locally (get executions): %s", err)
resp.WriteHeader(401) resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`)) resp.Write([]byte(`{"success": false}`))
return return
+27 -24
View File
@@ -1560,6 +1560,7 @@ const AngularWorkflow = (props) => {
aria-controls="long-menu" aria-controls="long-menu"
aria-haspopup="true" aria-haspopup="true"
onClick={menuClick} onClick={menuClick}
style={{color: "white"}}
> >
<MoreVertIcon /> <MoreVertIcon />
</IconButton> </IconButton>
@@ -1965,7 +1966,7 @@ const AngularWorkflow = (props) => {
node.data.type = "ACTION" node.data.type = "ACTION"
node.isStartNode = action["id"] === workflow.start node.isStartNode = action["id"] === workflow.start
return node; return node
}) })
const tmpelements = [].concat(actions) const tmpelements = [].concat(actions)
@@ -2001,8 +2002,10 @@ const AngularWorkflow = (props) => {
} }
} }
const handleDragStop = (e) => { const handleDragStop = (e, app) => {
newNodeId = "" newNodeId = ""
console.log("STOP!: ", e)
console.log("APP!: ", app)
} }
const appScrollStyle = { const appScrollStyle = {
@@ -2063,7 +2066,7 @@ const AngularWorkflow = (props) => {
return( return(
<Draggable <Draggable
onDrag={(e) => {handleAppDrag(e, app)}} onDrag={(e) => {handleAppDrag(e, app)}}
onStop={(e) => {handleDragStop(e)}} onStop={(e) => {handleDragStop(e, app)}}
dragging={false} dragging={false}
position={{ position={{
x: 0, x: 0,
@@ -2703,11 +2706,11 @@ const AngularWorkflow = (props) => {
} }
const setTriggerFolderWrapperMulti = event => { const setTriggerFolderWrapperMulti = event => {
const { options } = event.target; const { options } = event.target
const value = []; const value = []
for (let i = 0, l = options.length; i < l; i += 1) { for (let i = 0, l = options.length; i < l; i += 1) {
if (options[i].selected) { if (options[i].selected) {
value.push(options[i].value); value.push(options[i].value)
} }
} }
@@ -2783,7 +2786,7 @@ const AngularWorkflow = (props) => {
if (splitItems.includes(value)) { if (splitItems.includes(value)) {
for( var i = 0; i < splitItems.length; i++){ for( var i = 0; i < splitItems.length; i++){
if (splitItems[i] === value) { if (splitItems[i] === value) {
splitItems.splice(i, 1); splitItems.splice(i, 1)
} }
} }
@@ -2793,7 +2796,7 @@ const AngularWorkflow = (props) => {
for( var i = 0; i < splitItems.length; i++){ for( var i = 0; i < splitItems.length; i++){
if (splitItems[i] === "") { if (splitItems[i] === "") {
splitItems.splice(i, 1); splitItems.splice(i, 1)
} }
} }
@@ -2824,7 +2827,7 @@ const AngularWorkflow = (props) => {
} }
const AppConditionHandler = (props) => { const AppConditionHandler = (props) => {
const { tmpdata, type } = props; const { tmpdata, type } = props
if (tmpdata === undefined) { if (tmpdata === undefined) {
return tmpdata return tmpdata
@@ -3192,8 +3195,8 @@ const AngularWorkflow = (props) => {
const EdgeSidebar = () => { const EdgeSidebar = () => {
const ConditionHandler = (condition, index) => { const ConditionHandler = (condition, index) => {
const [open, setOpen] = React.useState(false); const [open, setOpen] = React.useState(false)
const [anchorEl, setAnchorEl] = React.useState(null); const [anchorEl, setAnchorEl] = React.useState(null)
const deleteCondition = (conditionIndex) => { const deleteCondition = (conditionIndex) => {
console.log(selectedEdge) console.log(selectedEdge)
@@ -3223,7 +3226,7 @@ const AngularWorkflow = (props) => {
const menuClick = (event) => { const menuClick = (event) => {
console.log("MENU CLICK") console.log("MENU CLICK")
setOpen(!open) setOpen(!open)
setAnchorEl(event.currentTarget); setAnchorEl(event.currentTarget)
} }
return ( return (
@@ -3363,7 +3366,7 @@ const AngularWorkflow = (props) => {
}) })
.catch(error => { .catch(error => {
console.log(error.toString()) console.log(error.toString())
}); })
} }
const getTriggerAuth = () => { const getTriggerAuth = () => {
@@ -3384,7 +3387,7 @@ const AngularWorkflow = (props) => {
}) })
.catch(error => { .catch(error => {
console.log(error.toString()) console.log(error.toString())
}); })
} }
// Getting the triggers and the folders if they exist // Getting the triggers and the folders if they exist
@@ -3426,8 +3429,8 @@ const AngularWorkflow = (props) => {
}) })
.catch(error => { .catch(error => {
console.log(error.toString()) console.log(error.toString())
}); })
}, 2500); }, 2500)
console.log(data) console.log(data)
saveWorkflow(workflow) saveWorkflow(workflow)
@@ -3801,7 +3804,7 @@ const AngularWorkflow = (props) => {
}) })
.catch(error => { .catch(error => {
alert.error(error.toString()) alert.error(error.toString())
}); })
} }
const startMailSub = (trigger, triggerindex) => { const startMailSub = (trigger, triggerindex) => {
@@ -3857,7 +3860,7 @@ const AngularWorkflow = (props) => {
}) })
.catch(error => { .catch(error => {
alert.error(error.toString()) alert.error(error.toString())
}); })
} }
const newWebhook = (trigger) => { const newWebhook = (trigger) => {
@@ -3903,7 +3906,7 @@ const AngularWorkflow = (props) => {
}) })
.catch(error => { .catch(error => {
console.log(error.toString()) console.log(error.toString())
}); })
} }
const deleteWebhook = (trigger, triggerindex) => { const deleteWebhook = (trigger, triggerindex) => {
@@ -3942,7 +3945,7 @@ const AngularWorkflow = (props) => {
}) })
.catch(error => { .catch(error => {
alert.error(error.toString()) alert.error(error.toString())
}); })
} }
const UserinputSidebar = () => { const UserinputSidebar = () => {
@@ -4356,7 +4359,7 @@ const AngularWorkflow = (props) => {
} }
if (Object.getOwnPropertyNames(selectedAction).length > 0 && Object.getOwnPropertyNames(selectedApp).length > 0) { if (Object.getOwnPropertyNames(selectedAction).length > 0 && Object.getOwnPropertyNames(selectedApp).length > 0) {
//console.time('ACTIONSTART'); //console.time('ACTIONSTART')
return( return(
<div style={rightsidebarStyle}> <div style={rightsidebarStyle}>
{appApiView} {appApiView}
@@ -4545,7 +4548,7 @@ const AngularWorkflow = (props) => {
executionData.results.map(data => { executionData.results.map(data => {
var showResult = data.result.trim() var showResult = data.result.trim()
showResult.split(" None").join(" \"None\"") showResult.split(" None").join(" \"None\"")
//showResult = replaceAll(showResult, " None", " \"None\""); //showResult = replaceAll(showResult, " None", " \"None\"")
var jsonvalid = true var jsonvalid = true
try { try {
JSON.parse(showResult) JSON.parse(showResult)
@@ -4569,7 +4572,7 @@ const AngularWorkflow = (props) => {
{jsonvalid ? <ReactJson {jsonvalid ? <ReactJson
src={JSON.parse(showResult)} src={JSON.parse(showResult)}
theme="solarized" theme="solarized"
collapsed={false} collapsed={true}
displayDataTypes={false} displayDataTypes={false}
name={"Results for "+data.action.label} name={"Results for "+data.action.label}
/> />
@@ -4872,4 +4875,4 @@ const AngularWorkflow = (props) => {
) )
} }
export default AngularWorkflow; export default AngularWorkflow
+7 -7
View File
@@ -147,13 +147,13 @@ const App = (message, props) => {
// This is a mess hahahah // This is a mess hahahah
return ( return (
<MuiThemeProvider theme={theme}> <MuiThemeProvider theme={theme}>
<CookiesProvider> <CookiesProvider>
<BrowserRouter> <BrowserRouter>
<Provider template={AlertTemplate} {...options}> <Provider template={AlertTemplate} {...options}>
{includedData} {includedData}
</Provider> </Provider>
</BrowserRouter> </BrowserRouter>
</CookiesProvider> </CookiesProvider>
</MuiThemeProvider> </MuiThemeProvider>
); );
}; };
+34 -27
View File
@@ -372,30 +372,6 @@ const AppCreator = (props) => {
securitySchemes = data.components.securitySchemes securitySchemes = data.components.securitySchemes
} }
// FIXME: Have multiple authentication options?
if (securitySchemes !== undefined) {
for (const [key, value] of Object.entries(securitySchemes)) {
if (value.scheme === "bearer") {
setAuthenticationOption("Bearer auth")
break
} else if (value.type === "apiKey") {
setAuthenticationOption("API key")
value.in = value.in.charAt(0).toUpperCase() + value.in.slice(1);
setParameterLocation(value.in)
if (!apikeySelection.includes(value.in)) {
console.log("APIKEY SELECT: ", apikeySelection)
alert.error("Might be error in setting up API key authentication")
}
setParameterName(value.name)
break
} else if (value.scheme === "basic") {
setAuthenticationOption("Basic auth")
break
}
}
}
console.log(data) console.log(data)
@@ -451,9 +427,36 @@ const AppCreator = (props) => {
} }
} }
// FIXME: Have multiple authentication options?
if (securitySchemes !== undefined) {
for (const [key, value] of Object.entries(securitySchemes)) {
if (value.scheme === "bearer") {
setAuthenticationOption("Bearer auth")
break
} else if (value.type === "apiKey") {
setAuthenticationOption("API key")
value.in = value.in.charAt(0).toUpperCase() + value.in.slice(1);
setParameterLocation(value.in)
if (!apikeySelection.includes(value.in)) {
console.log("APIKEY SELECT: ", apikeySelection)
alert.error("Might be error in setting up API key authentication")
}
console.log("PARAM NAME: ", value.name)
setParameterName(value.name)
break
} else if (value.scheme === "basic") {
setAuthenticationOption("Basic auth")
break
}
}
}
setActions(newActions) setActions(newActions)
} }
// Saving the app that's been configured. // Saving the app that's been configured.
const submitApp = () => { const submitApp = () => {
alert.info("Uploading and building app " + name) alert.info("Uploading and building app " + name)
@@ -810,7 +813,7 @@ const AppCreator = (props) => {
id="standard-required" id="standard-required"
margin="normal" margin="normal"
variant="outlined" variant="outlined"
defaultValue={parameterName} value={parameterName}
helperText={<div style={{color:"white", marginBottom: "2px",}}>Can't be empty. Can't contain any of the following characters: !#$%&'^+-._~|]+$</div>} helperText={<div style={{color:"white", marginBottom: "2px",}}>Can't be empty. Can't contain any of the following characters: !#$%&'^+-._~|]+$</div>}
onChange={e => setParameterName(e.target.value)} onChange={e => setParameterName(e.target.value)}
InputProps={{ InputProps={{
@@ -926,11 +929,13 @@ const AppCreator = (props) => {
{data.method} - {url} - {data.name} {data.method} - {url} - {data.name}
</div> </div>
</Tooltip> </Tooltip>
{/*
<Tooltip title="Test action" placement="bottom"> <Tooltip title="Test action" placement="bottom">
<div style={{color: "#f85a3e", cursor: "pointer", marginRight: "10px", }} onClick={() => {testAction(index)}}> <div style={{color: "#f85a3e", cursor: "pointer", marginRight: "10px", }} onClick={() => {testAction(index)}}>
Test Test
</div> </div>
</Tooltip> </Tooltip>
*/}
<Tooltip title="Delete action" placement="bottom"> <Tooltip title="Delete action" placement="bottom">
<div style={{color: "#f85a3e", cursor: "pointer"}} onClick={() => {deleteAction(index)}}> <div style={{color: "#f85a3e", cursor: "pointer"}} onClick={() => {deleteAction(index)}}>
Delete Delete
@@ -1576,13 +1581,15 @@ const AppCreator = (props) => {
<div style={{marginTop: "25px"}}> <div style={{marginTop: "25px"}}>
{actionView} {actionView}
</div> </div>
{/*
<Divider style={{marginBottom: "10px", marginTop: "30px", height: "1px", width: "100%", backgroundColor: "grey"}}/> <Divider style={{marginBottom: "10px", marginTop: "30px", height: "1px", width: "100%", backgroundColor: "grey"}}/>
{testView} {testView}
*/}
<Button color="primary" variant="contained" style={{borderRadius: "0px", marginTop: "30px", height: "50px",}} onClick={() => { <Button color="primary" variant="contained" style={{borderRadius: "0px", marginTop: "30px", height: "50px",}} onClick={() => {
submitApp() submitApp()
}}> }}>
Save Save
</Button> </Button>
{errorCode.length > 0 ? `Error: ${errorCode}` : null} {errorCode.length > 0 ? `Error: ${errorCode}` : null}
</Paper> </Paper>
+5 -4
View File
@@ -462,7 +462,8 @@ const Apps = (props) => {
<div/> <div/>
Apps interact with eachother in workflows. They are created with the app creator, using OpenAPI specification or manually in python. Use the links above to find potential apps you're looking for using OpenAPI or make one from scratch. There's 1000+ available. Apps interact with eachother in workflows. They are created with the app creator, using OpenAPI specification or manually in python. Use the links above to find potential apps you're looking for using OpenAPI or make one from scratch. There's 1000+ available.
<div/> <div/>
<div style={{marginTop: 20}}> <Divider style={{height: 1, backgroundColor: dividerColor, marginTop: 20, marginBottom: 20}} />
<div style={{}}>
<Button <Button
variant="text" variant="text"
component="label" component="label"
@@ -546,7 +547,7 @@ const Apps = (props) => {
setSearchBackend(!searchBackend)} setSearchBackend(!searchBackend)}
} />} } />}
/> />
<Tooltip title={"Upload from Github"} style={{marginTop: "28px", width: "100%"}} aria-label={"Upload"}> <Tooltip title={"Download from Github"} style={{marginTop: "28px", width: "100%"}} aria-label={"Upload"}>
<Button <Button
variant="outlined" variant="outlined"
component="label" component="label"
@@ -579,10 +580,10 @@ const Apps = (props) => {
handleSearchChange(event.target.value) handleSearchChange(event.target.value)
}} }}
/> />
<div style={{marginTop: 15, height: "100%", paddingBottom: 150,}}> <div style={{marginTop: 15}}>
{apps.length > 0 ? {apps.length > 0 ?
filteredApps.length > 0 ? filteredApps.length > 0 ?
<div style={{maxHeight: "75vh", overflowY: "scroll"}}> <div style={{height: "75vh", overflowY: "scroll"}}>
{filteredApps.map(app => { {filteredApps.map(app => {
return ( return (
appPaper(app) appPaper(app)