diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py
index 29f32999..cd7fc992 100644
--- a/backend/app_sdk/app_base.py
+++ b/backend/app_sdk/app_base.py
@@ -173,7 +173,16 @@ class AppBase:
if "split" in thistype:
return data.split()
if "len" in thistype or "length" in thistype:
- return len(data)
+ tmp = ""
+ try:
+ tmp = json.loads(data)
+ except:
+ pass
+
+ if isinstance(tmp, list):
+ return str(len(tmp))
+
+ return str(len(data))
if "parse" in thistype:
splitvalues = []
default_error = """Error. Expected syntax: parse(["hello","test1"],0:1)"""
@@ -554,13 +563,21 @@ class AppBase:
if destinationvalue.lower() in sourcevalue.lower():
return True
elif check.lower() == "larger than":
- if sourcevalue.isdigit() and destinationvalue.isdigit():
- if int(sourcevalue) > int(destinationvalue):
- return True
+ try:
+ if sourcevalue.isdigit() and destinationvalue.isdigit():
+ if int(sourcevalue) > int(destinationvalue):
+ return True
+ except AttributeError as e:
+ self.logger.error("Condition larger than failed with values %s and %s: %s" % (sourcevalue, destinationvalue, e))
+ return False
elif check.lower() == "smaller than":
- if sourcevalue.isdigit() and destinationvalue.isdigit():
- if int(sourcevalue) < int(destinationvalue):
- return True
+ try:
+ if sourcevalue.isdigit() and destinationvalue.isdigit():
+ if int(sourcevalue) < int(destinationvalue):
+ return True
+ except AttributeError as e:
+ self.logger.error("Condition smaller than failed with values %s and %s: %s" % (sourcevalue, destinationvalue, e))
+ return False
else:
self.logger.info("Condition: can't handle %s yet. Setting to true" % check)
diff --git a/frontend/src/AngularWorkflow.js b/frontend/src/AngularWorkflow.js
index a6931465..b5d4a71e 100644
--- a/frontend/src/AngularWorkflow.js
+++ b/frontend/src/AngularWorkflow.js
@@ -219,7 +219,7 @@ const AngularWorkflow = (props) => {
{workflowExecutions.slice(0,15).map(data => {
return (
-
+
{new Date(data.started_at*1000).toISOString()}
, {data.status}
{data.result.length > 0 ? ", "+data.result : ", "}
@@ -768,12 +768,12 @@ const AngularWorkflow = (props) => {
//console.log("APP: ", selectedApp)
setSelectedAction({})
setSelectedApp({})
- //setSelectedTrigger({})
+ setSelectedTrigger({})
//setSelectedEdge({})
// setSelectedTriggerIndex(-1)
//setSelectedActionEnvironment({})
- //setSelectedEdge({})
+ setSelectedEdge({})
//setTriggerAuthentication({})
//setSelectedTriggerIndex(-1)
//setTriggerFolders([])
@@ -850,7 +850,7 @@ const AngularWorkflow = (props) => {
const onEdgeAdded = (event) => {
setLastSaved(false)
const edge = event.target.data()
- console.log(workflow.branches)
+ //console.log(workflow.branches)
// Check if:
// dest == source && source == dest
@@ -1517,14 +1517,14 @@ const AngularWorkflow = (props) => {
}}
>
-