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, { ...@@ -34,10 +34,6 @@ itasks.TaskForestTabPanel = Ext.extend( Ext.Panel, {
header:'Task Label', header:'Task Label',
dataIndex:'taskLabel', dataIndex:'taskLabel',
width: 200 width: 200
},{
header:'Trace Value',
dataIndex: 'traceValue',
width: 200
}], }],
loader: new Ext.tree.TreeLoader({ loader: new Ext.tree.TreeLoader({
......
...@@ -66,8 +66,6 @@ initTaskInfo ...@@ -66,8 +66,6 @@ initTaskInfo
= { TaskInfo = { TaskInfo
| taskId = "" | taskId = ""
, taskLabel = "" , taskLabel = ""
, traceValue = ""
, worker = AnyUser
, tags = [] , tags = []
, groupedBehaviour = GBFixed , groupedBehaviour = GBFixed
, groupActionsBehaviour = IncludeGroupActions , groupActionsBehaviour = IncludeGroupActions
...@@ -172,7 +170,6 @@ where ...@@ -172,7 +170,6 @@ where
# info = { initTaskInfo # info = { initTaskInfo
& taskId = taskId & taskId = taskId
, taskLabel = properties.managerProperties.subject , taskLabel = properties.managerProperties.subject
, worker = properties.managerProperties.ManagerProperties.worker
} }
= TTMainTask info properties Nothing mbParType (TTFinishedTask info [Text "Dummy"]) = TTMainTask info properties Nothing mbParType (TTFinishedTask info [Text "Dummy"])
...@@ -297,7 +294,6 @@ where ...@@ -297,7 +294,6 @@ where
# info = { initTaskInfo # info = { initTaskInfo
& taskId = taskId & taskId = taskId
, taskLabel = properties.managerProperties.subject , taskLabel = properties.managerProperties.subject
, worker = properties.managerProperties.ManagerProperties.worker
} }
# tree = TTMainTask info properties menus inptype (TTFinishedTask info [Text "Dummy"]) # tree = TTMainTask info properties menus inptype (TTFinishedTask info [Text "Dummy"])
= {TSt| tst & taskNr = taskNr, tree = tree, updates = updates, staticInfo = {tst.staticInfo & currentProcessId = taskId}} = {TSt| tst & taskNr = taskNr, tree = tree, updates = updates, staticInfo = {tst.staticInfo & currentProcessId = taskId}}
...@@ -515,7 +511,6 @@ calculateTaskTree taskId updates tst ...@@ -515,7 +511,6 @@ calculateTaskTree taskId updates tst
# info = { initTaskInfo # info = { initTaskInfo
& taskId = taskId & taskId = taskId
, taskLabel = "Deleted Process" , taskLabel = "Deleted Process"
, traceValue = "Deleted"
, taskDescription = "Task Result" , taskDescription = "Task Result"
} }
= (TTFinishedTask info [], tst) = (TTFinishedTask info [], tst)
...@@ -535,8 +530,6 @@ calculateTaskTree taskId updates tst ...@@ -535,8 +530,6 @@ calculateTaskTree taskId updates tst
# info = { initTaskInfo # info = { initTaskInfo
& taskId = taskId & taskId = taskId
, taskLabel = properties.managerProperties.subject , taskLabel = properties.managerProperties.subject
, traceValue = "Finished"
, worker = properties.managerProperties.ManagerProperties.worker
, taskDescription = "Task Result" , taskDescription = "Task Result"
} }
= (TTFinishedTask info result, {TSt | tst & iworld = {IWorld | iworld & store = store, world = world}}) = (TTFinishedTask info result, {TSt | tst & iworld = {IWorld | iworld & store = store, world = world}})
...@@ -726,8 +719,6 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas ...@@ -726,8 +719,6 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas
# (taskVal,store,world) = loadValue taskId store world # (taskVal,store,world) = loadValue taskId store world
# taskInfo = { taskId = taskNrToString taskNr # taskInfo = { taskId = taskNrToString taskNr
, taskLabel = initProperties.subject , taskLabel = initProperties.subject
, traceValue = ""
, worker = properties.managerProperties.ManagerProperties.worker
, tags = initProperties.ManagerProperties.tags , tags = initProperties.ManagerProperties.tags
, groupedBehaviour = groupedProperties.GroupedProperties.groupedBehaviour , groupedBehaviour = groupedProperties.GroupedProperties.groupedBehaviour
, groupActionsBehaviour = groupedProperties.GroupedProperties.groupActionsBehaviour , groupActionsBehaviour = groupedProperties.GroupedProperties.groupActionsBehaviour
...@@ -736,7 +727,7 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas ...@@ -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 }} # tst = {TSt|tst & taskInfo = taskInfo, newTask = isNothing taskVal, iworld = {IWorld| iworld & store = store, world = world }}
= case taskVal of = case taskVal of
(Just (TaskFinished a)) (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}) = (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 // 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 ...@@ -761,7 +752,7 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas
# store = if(gc) store (storeValue taskId result store) # 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 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) # 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}} {tst & taskNr = incTaskNr taskNr, tree = tree, iworld = {IWorld|iworld & store = store}}
= (TaskFinished a, tst) = (TaskFinished a, tst)
(TaskBusy) (TaskBusy)
...@@ -773,7 +764,7 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas ...@@ -773,7 +764,7 @@ applyTask (Task initProperties groupedProperties mbInitTaskNr taskfun) tst=:{tas
(TaskException e) (TaskException e)
// Store exception // Store exception
# store = storeValue taskId result store # 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}} {tst & taskNr = incTaskNr taskNr, tree = tree, iworld = {IWorld|iworld & store = store}}
= (TaskException e, tst) = (TaskException e, tst)
......
...@@ -34,12 +34,10 @@ from TUIDefinition import :: TUIDef, :: TUIUpdate ...@@ -34,12 +34,10 @@ from TUIDefinition import :: TUIDef, :: TUIUpdate
:: TaskInfo = { taskId :: TaskId //Task number in string format :: TaskInfo = { taskId :: TaskId //Task number in string format
, taskLabel :: String //Descriptive label of the task , taskLabel :: String //Descriptive label of the task
, traceValue :: String //String representation of value for tracing , taskDescription :: String
, worker :: User
, tags :: [String] , tags :: [String]
, groupedBehaviour :: GroupedBehaviour , groupedBehaviour :: GroupedBehaviour
, groupActionsBehaviour :: GroupActionsBehaviour , groupActionsBehaviour :: GroupActionsBehaviour
, taskDescription :: String
} }
:: TaskParallelInfo = :: TaskParallelInfo =
......
...@@ -17,7 +17,6 @@ import JSON ...@@ -17,7 +17,6 @@ import JSON
, iconCls :: String , iconCls :: String
, taskId :: String , taskId :: String
, taskLabel :: String , taskLabel :: String
, traceValue :: String
, taskClass :: String , taskClass :: String
, children :: [TraceTree] , children :: [TraceTree]
} }
......
...@@ -36,104 +36,96 @@ traceTaskTree tree = mkTree tree ...@@ -36,104 +36,96 @@ traceTaskTree tree = mkTree tree
where where
mkTree (TTInteractiveTask info _) mkTree (TTInteractiveTask info _)
= { cls = "master-task" = { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col" , uiProvider = "col"
, user = ""
, leaf = True , leaf = True
, iconCls = "task-int" , iconCls = "task-int"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "INT" , taskClass = "INT"
, children = [] , children = []
} }
mkTree (TTMonitorTask info _ ) mkTree (TTMonitorTask info _ )
= { cls = "master-task" = { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col" , uiProvider = "col"
, user = ""
, leaf = True , leaf = True
, iconCls = "task-mon" , iconCls = "task-mon"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "MON" , taskClass = "MON"
, children = [] , children = []
} }
mkTree (TTInstructionTask info _ _) mkTree (TTInstructionTask info _ _)
= { cls = "master-task" = { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col" , uiProvider = "col"
, user = ""
, leaf = True , leaf = True
, iconCls = "task-ins" , iconCls = "task-ins"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "INS" , taskClass = "INS"
, children = [] , children = []
} }
mkTree (TTRpcTask info _ ) mkTree (TTRpcTask info _ )
= { cls = "master-task" = { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col" , uiProvider = "col"
, user = ""
, leaf = True , leaf = True
, iconCls = "task-rpc" , iconCls = "task-rpc"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "RPC" , taskClass = "RPC"
, children = [] , children = []
} }
mkTree (TTExtProcessTask info _ ) mkTree (TTExtProcessTask info _ )
= { cls = "master-task" = { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col" , uiProvider = "col"
, user = ""
, leaf = True , leaf = True
, iconCls = "task-prc" , iconCls = "task-prc"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "RPC" , taskClass = "RPC"
, children = [] , children = []
} }
mkTree (TTSequenceTask info trees) mkTree (TTSequenceTask info trees)
= { cls = "master-task" = { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col" , uiProvider = "col"
, user = ""
, leaf = checkIfLeaf trees , leaf = checkIfLeaf trees
, iconCls = "task-seq" , iconCls = "task-seq"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "SEQ" , taskClass = "SEQ"
, children = [traceTaskTree tree \\ tree <- trees] , children = [traceTaskTree tree \\ tree <- trees]
} }
mkTree (TTParallelTask info tpi trees) mkTree (TTParallelTask info tpi trees)
= { cls = "master-task" = { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col" , uiProvider = "col"
, user = ""
, leaf = checkIfLeaf trees , leaf = checkIfLeaf trees
, iconCls = "task-par" , iconCls = "task-par"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = tpi.TaskParallelInfo.description
, taskClass = "PAR" , taskClass = "PAR"
, children = [traceTaskTree tree \\ tree <- trees] , children = [traceTaskTree tree \\ tree <- trees]
} }
mkTree (TTGroupedTask info trees _ _) mkTree (TTGroupedTask info trees _ _)
= { cls = "master-task" = { cls = "master-task"
, user = toString info.TaskInfo.worker
, uiProvider = "col" , uiProvider = "col"
, user = ""
, leaf = checkIfLeaf trees , leaf = checkIfLeaf trees
, iconCls = "task-grp" , iconCls = "task-grp"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "GRP" , taskClass = "GRP"
, children = [traceTaskTree tree \\ tree <- trees] , children = [traceTaskTree tree \\ tree <- trees]
} }
...@@ -146,20 +138,18 @@ where ...@@ -146,20 +138,18 @@ where
, iconCls = "task-mnt" , iconCls = "task-mnt"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = printToString inptype
, taskClass = "MNT" , taskClass = "MNT"
, children = [traceTaskTree tree] , children = [traceTaskTree tree]
} }
mkTree (TTFinishedTask info _) mkTree (TTFinishedTask info _)
= { cls = "master-task" = { cls = "master-task"
, user = toString info.TaskInfo.worker , user = ""
, uiProvider = "col" , uiProvider = "col"
, leaf = True , leaf = True
, iconCls = "task-fin" , iconCls = "task-fin"
, taskId = info.TaskInfo.taskId , taskId = info.TaskInfo.taskId
, taskLabel = toString (Text info.TaskInfo.taskLabel) , taskLabel = toString (Text info.TaskInfo.taskLabel)
, traceValue = info.TaskInfo.traceValue
, taskClass = "FIN" , taskClass = "FIN"
, children = [] , 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