diff --git a/backend/go-app/main.go b/backend/go-app/main.go
index 273c3d8b..9cbd9ad0 100644
--- a/backend/go-app/main.go
+++ b/backend/go-app/main.go
@@ -18,7 +18,7 @@ import (
"net/http"
"os"
"os/exec"
- "regexp"
+ //"regexp"
"strconv"
"strings"
"time"
@@ -797,43 +797,44 @@ func parseLoginParameters(resp http.ResponseWriter, request *http.Request) (logi
}
// Can check against HIBP etc?
+// Removed for localhost
func checkPasswordStrength(password string) error {
// Check password strength here
- if len(password) < 10 {
- return errors.New("Minimum password length is 10.")
- }
+ //if len(password) < 10 {
+ // return errors.New("Minimum password length is 10.")
+ //}
- if len(password) > 128 {
- return errors.New("Maximum password length is 128.")
- }
+ //if len(password) > 128 {
+ // return errors.New("Maximum password length is 128.")
+ //}
- re := regexp.MustCompile("[0-9]+")
- if len(re.FindAllString(password, -1)) == 0 {
- return errors.New("Password must contain a number")
- }
+ //re := regexp.MustCompile("[0-9]+")
+ //if len(re.FindAllString(password, -1)) == 0 {
+ // return errors.New("Password must contain a number")
+ //}
- re = regexp.MustCompile("[a-z]+")
- if len(re.FindAllString(password, -1)) == 0 {
- return errors.New("Password must contain a lower case char")
- }
+ //re = regexp.MustCompile("[a-z]+")
+ //if len(re.FindAllString(password, -1)) == 0 {
+ // return errors.New("Password must contain a lower case char")
+ //}
- re = regexp.MustCompile("[A-Z]+")
- if len(re.FindAllString(password, -1)) == 0 {
- return errors.New("Password must contain an upper case char")
- }
+ //re = regexp.MustCompile("[A-Z]+")
+ //if len(re.FindAllString(password, -1)) == 0 {
+ // return errors.New("Password must contain an upper case char")
+ //}
return nil
}
-// Fuck emails
+// No more emails :)
func checkUsername(Username string) error {
// Stupid first check of email loool
- if !strings.Contains(Username, "@") || !strings.Contains(Username, ".") {
- return errors.New("Invalid Username")
- }
+ //if !strings.Contains(Username, "@") || !strings.Contains(Username, ".") {
+ // return errors.New("Invalid Username")
+ //}
if len(Username) < 4 {
- return errors.New("Minimum Username length is 2")
+ return errors.New("Minimum Username length is 4")
}
return nil
diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go
index b0c95b19..e49a6db7 100644
--- a/backend/go-app/walkoff.go
+++ b/backend/go-app/walkoff.go
@@ -777,16 +777,21 @@ func handleWorkflowQueue(resp http.ResponseWriter, request *http.Request) {
//log.Printf("Checking results %d vs %d", len(workflowExecution.Results), len(workflowExecution.Workflow.Actions)+extraInputs)
if len(workflowExecution.Results) == len(workflowExecution.Workflow.Actions)+extraInputs {
finished := true
+ lastResult := ""
for _, result := range workflowExecution.Results {
if result.Status != "SUCCESS" && result.Status != "FINISHED" {
finished = false
break
}
+
+ lastResult = result.Result
}
if finished {
log.Printf("Execution of %s finished.", workflowExecution.ExecutionId)
//log.Println("Might be finished based on length of results and everything being SUCCESS or FINISHED - VERIFY THIS. Setting status to finished.")
+
+ workflowExecution.Result = lastResult
workflowExecution.Status = "FINISHED"
workflowExecution.CompletedAt = int64(time.Now().Unix())
if workflowExecution.LastNode == "" {
diff --git a/frontend/src/AdminSetup.js b/frontend/src/AdminSetup.js
index ce17db46..11642974 100644
--- a/frontend/src/AdminSetup.js
+++ b/frontend/src/AdminSetup.js
@@ -49,7 +49,7 @@ const AdminAccount = props => {
const [loginInfo, setLoginInfo] = useState("");
const handleValidateForm = () => {
- return (username.length > 1 && password.length > 8);
+ return (username.length > 1 && password.length > 1);
}
if (isLoggedIn === true) {
diff --git a/frontend/src/AngularWorkflow.js b/frontend/src/AngularWorkflow.js
index 66d1b81f..46a4870b 100644
--- a/frontend/src/AngularWorkflow.js
+++ b/frontend/src/AngularWorkflow.js
@@ -155,27 +155,75 @@ const AngularWorkflow = (props) => {
const [AppsHoverColor, setAppsHoverColor] = useState(hoverOutColor);
const [VariablesHoverColor, setVariablesHoverColor] = useState(hoverOutColor);
const [HookHoverColor, setHookHoverColor] = useState(hoverOutColor);
+ const [appAdded, setAppAdded] = useState(false)
const [update, setUpdate] = useState("");
+ const [workflowExecutions, setWorkflowExecutions] = React.useState([]);
const [elements, setElements] = useState([])
const { start, stop } = useInterval({
duration: 5000,
startImmediate: false,
callback: () => {
- fetchUpdates()
+ fetchUpdates()
}
});
- const fetchUpdates = () => {
- fetch(globalUrl+"/api/v1/streams/results", {
- method: 'POST',
+ const getWorkflowExecution = (id) => {
+ fetch(globalUrl+"/api/v1/workflows/"+id+"/executions", {
+ method: 'GET',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
},
- body: JSON.stringify(executionRequest),
credentials: "include",
})
+ .then((response) => {
+ if (response.status !== 200) {
+ console.log("Status not 200 for WORKFLOW EXECUTION :O!")
+ }
+
+ return response.json()
+ })
+ .then((responseJson) => {
+ if (responseJson.length > 0) {
+ setWorkflowExecutions(responseJson)
+ }
+ //setWorkflowExecutions(responseJson)
+ })
+ .catch(error => {
+ alert.error(error.toString())
+ });
+ }
+
+ const debugView = workflowExecutions.length > 0 ?
+