Commit 3540d3e5 authored by Bas Lijnse's avatar Bas Lijnse

Some cleanup in the TaskInfo structure

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@1106 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 3eaf7d68
......@@ -34,10 +34,6 @@ itasks.TaskForestTabPanel = Ext.extend( Ext.Panel, {
header:'Task Label',
dataIndex:'taskLabel',
width: 200
},{
header:'Trace Value',
dataIndex: 'traceValue',
width: 200
}],
loader: new Ext.tree.TreeLoader({
......
......@@ -66,8 +66,6 @@ initTaskInfo
= { TaskInfo
| taskId = ""
, taskLabel = ""
, traceValue = ""
, worker = AnyUser
, tags = []
, groupedBehaviour = GBFixed
, groupActionsBehaviour = IncludeGroupActions
......@@ -172,7 +170,6 @@ where
# info = { initTaskInfo
& taskId = taskId
, taskLabel = properties.managerProperties.subject
, worker = properties.managerProperties.ManagerProperties.worker
}
= TTMainTask info properties Nothing mbParType (TTFinishedTask info [Text "Dummy"])
......@@ -297,7 +294,6 @@ where
# info = { initTaskInfo
& taskId = taskId
, taskLabel = properties.managerProperties.subject
, worker = properties.managerProperties.ManagerProperties.worker
}
# tree = TTMainTask info properties menus inptype (TTFinishedTask info [Text "Dummy"])
= {TSt| tst & taskNr = taskNr, tree = tree, updates = updates, staticInfo = {tst.staticInfo & currentProcessId = taskId}}
......@@ -515,7 +511,6 @@ calculateTaskTree taskId updates tst
# info = { initTaskInfo
& taskId = taskId
, taskLabel = "Deleted Process"
, traceValue = "Deleted"
, taskDescription = "Task Result"
}
= (TTFinishedTask info [], tst)
......@@ -535,8 +530,6 @@ calculateTaskTree taskId updates tst
# info = { initTaskInfo
& taskId = taskId
, taskLabel = properties.managerProperties.subject
, traceValue = "Finished"
, worker = properties.managerProperties.ManagerProperties.worker
, taskDescription = "Task Result"
}
= (TTFinishedTask info result, {TSt | tst & iworld = {IWorld | iworld & store = store, world = world}})
......@@ -726,8 +719,6 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas
# (taskVal,store,world) = loadValue taskId store world
# taskInfo = { taskId = taskNrToString taskNr
, taskLabel = initProperties.subject
, traceValue = ""
, worker = properties.managerProperties.ManagerProperties.worker
, tags = initProperties.ManagerProperties.tags
, groupedBehaviour = groupedProperties.GroupedProperties.groupedBehaviour
, groupActionsBehaviour = groupedProperties.GroupedProperties.groupActionsBehaviour
......@@ -736,7 +727,7 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas
# tst = {TSt|tst & taskInfo = taskInfo, newTask = isNothing taskVal, iworld = {IWorld| iworld & store = store, world = world }}
= case taskVal of
(Just (TaskFinished a))
# tst = addTaskNode (TTFinishedTask {taskInfo & traceValue = printToString a} (visualizeAsHtmlDisplay a)) tst
# tst = addTaskNode (TTFinishedTask taskInfo (visualizeAsHtmlDisplay a)) tst
= (TaskFinished a, {tst & taskNr = incTaskNr taskNr})
_
// If the task is new, but has run in a different context, initialize the states of the task and its subtasks
......@@ -761,7 +752,7 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas
# store = if(gc) store (storeValue taskId result store)
// Store the final value and it's type as a dynamic value, so it can be visualized by the task-result service later.
# store = if(gc) store (storeValueAs SFDynamic (taskId+++"-container") (dynamic (Container a) :: Container a^ a^) store)
# tst = addTaskNode (TTFinishedTask {taskInfo & traceValue = printToString a} (visualizeAsHtmlDisplay a))
# tst = addTaskNode (TTFinishedTask taskInfo (visualizeAsHtmlDisplay a))
{tst & taskNr = incTaskNr taskNr, tree = tree, iworld = {IWorld|iworld & store = store}}
= (TaskFinished a, tst)
(TaskBusy)
......@@ -773,7 +764,7 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas
(TaskException e)
// Store exception
# store = storeValue taskId result store
# tst = addTaskNode (TTFinishedTask {taskInfo & traceValue = "Exception"} [Text "Uncaught exception"])
# tst = addTaskNode (TTFinishedTask taskInfo [Text "Uncaught exception"])
{tst & taskNr = incTaskNr taskNr, tree = tree, iworld = {IWorld|iworld & store = store}}
= (TaskException e, tst)
......
......@@ -34,12 +34,10 @@ from TUIDefinition import :: TUIDef, :: TUIUpdate
:: TaskInfo = { taskId :: TaskId //Task number in string format
, taskLabel :: String //Descriptive label of the task
, traceValue :: String //String representation of value for tracing
, worker :: User
, taskDescription :: String
, tags :: [String]
, groupedBehaviour :: GroupedBehaviour
, groupActionsBehaviour :: GroupActionsBehaviour
, taskDescription :: String
}
:: TaskParallelInfo =
......
......@@ -17,7 +17,6 @@ import JSON
, iconCls :: String
, taskId :: String
, taskLabel :: String
, traceValue :: String
, taskClass :: String
, children :: [TraceTree]
}
......
......@@ -36,104 +36,96 @@ traceTaskTree tree = mkTree tree
where
mkTree (TTInteractiveTask info _)
= { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col"
, user = ""
, leaf = True
, iconCls = "task-int"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "INT"
, children = []
}
mkTree (TTMonitorTask info _ )
= { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col"
, user = ""
, leaf = True
, iconCls = "task-mon"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "MON"
, children = []
}
mkTree (TTInstructionTask info _ _)
= { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col"
, user = ""
, leaf = True
, iconCls = "task-ins"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "INS"
, children = []
}
mkTree (TTRpcTask info _ )
= { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col"
, user = ""
, leaf = True
, iconCls = "task-rpc"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "RPC"
, children = []
}
mkTree (TTExtProcessTask info _ )
= { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col"
, user = ""
, leaf = True
, iconCls = "task-prc"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "RPC"
, children = []
}
mkTree (TTSequenceTask info trees)
= { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col"
, user = ""
, leaf = checkIfLeaf trees
, iconCls = "task-seq"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "SEQ"
, children = [traceTaskTree tree \\ tree <- trees]
}
mkTree (TTParallelTask info tpi trees)
= { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col"
, user = ""
, leaf = checkIfLeaf trees
, iconCls = "task-par"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = tpi.TaskParallelInfo.description
, taskClass = "PAR"
, children = [traceTaskTree tree \\ tree <- trees]
}
mkTree (TTGroupedTask info trees _ _)
= { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col"
, user = ""
, leaf = checkIfLeaf trees
, iconCls = "task-grp"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "GRP"
, children = [traceTaskTree tree \\ tree <- trees]
}
......@@ -146,20 +138,18 @@ where
, iconCls = "task-mnt"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = printToString inptype
, taskClass = "MNT"
, children = [traceTaskTree tree]
}
mkTree (TTFinishedTask info _)
= { cls = "master-task"
, user = toString info.TaskInfo.worker
, user = ""
, uiProvider = "col"
, leaf = True
, iconCls = "task-fin"
, taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "FIN"
, children = []
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment