Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iTasks-SDK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
82
Issues
82
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
iTasks-SDK
Commits
421ea9fb
Commit
421ea9fb
authored
Sep 10, 2018
by
Haye Böhm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compiling Incidone
parent
ecbb3179
Pipeline
#13844
failed with stage
in 2 minutes and 6 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
54 deletions
+55
-54
Examples/Applications/Incidone/Incidone/ActionManagementTasks.dcl
.../Applications/Incidone/Incidone/ActionManagementTasks.dcl
+15
-14
Examples/Applications/Incidone/Incidone/ActionManagementTasks.icl
.../Applications/Incidone/Incidone/ActionManagementTasks.icl
+19
-19
Examples/Applications/Incidone/Incidone/DeviceBased/Tablet.icl
...les/Applications/Incidone/Incidone/DeviceBased/Tablet.icl
+3
-3
Examples/Applications/Incidone/Incidone/DeviceBased/VideoWall.icl
.../Applications/Incidone/Incidone/DeviceBased/VideoWall.icl
+2
-2
Examples/Applications/Incidone/Incidone/Extensions/CrewLists.dcl
...s/Applications/Incidone/Incidone/Extensions/CrewLists.dcl
+2
-2
Examples/Applications/Incidone/Incidone/Extensions/CrewLists.icl
...s/Applications/Incidone/Incidone/Extensions/CrewLists.icl
+2
-2
Examples/Applications/Incidone/Incidone/OP/CommunicationManagementTasks.icl
...ons/Incidone/Incidone/OP/CommunicationManagementTasks.icl
+9
-9
Examples/Applications/Incidone/Incidone/RoleBased/AdministratorTasks.icl
...ations/Incidone/Incidone/RoleBased/AdministratorTasks.icl
+1
-1
Examples/Applications/Incidone/Incidone/Util/Notification.icl
...ples/Applications/Incidone/Incidone/Util/Notification.icl
+2
-2
No files found.
Examples/Applications/Incidone/Incidone/ActionManagementTasks.dcl
View file @
421ea9fb
...
...
@@ -15,11 +15,12 @@ import Incidone.OP.Concepts
// are limited by what can be constructed with the user catalog editor.
//Wrapped action for usage in action plans
::
ActionDefinition
c
sds
::
ActionDefinition
c
=
{
identity
::
String
,
meta
::
ItemMeta
,
task
::
c
(
sd
s
()
ActionStatus
ActionStatus
)
->
Task
()
,
task
::
c
(
SDSLen
s
()
ActionStatus
ActionStatus
)
->
Task
()
}
//Wrapped action for storage in the action catalog
::
CatalogAction
=
{
identity
::
String
//Identifying string, such that you can track which actions have been done
...
...
@@ -35,7 +36,7 @@ import Incidone.OP.Concepts
::
ActionTasks
=
E
.
c
sds
:
ActionTasks
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
//Configuration task
(
c
(
sds
()
ActionStatus
ActionStatus
)
->
Task
())
&
iTask
c
&
RWShared
sds
//An action item that needs to be configured before it can be deployed
(
c
(
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
())
&
iTask
c
//An action item that needs to be configured before it can be deployed
::
ActionProgress
=
ActionPlanned
...
...
@@ -144,19 +145,19 @@ derive gDefault CatalogAction
derive
gText
CatalogAction
derive
gEditor
CatalogAction
toInstantAction
::
c
ActionProgress
[
ContactNo
]
[
IncidentNo
]
(
ActionDefinition
c
sds
)
->
CatalogAction
|
iTask
c
&
RWShared
sds
toConfigurableAction
::
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
ActionDefinition
c
sds
)
->
CatalogAction
|
iTask
c
&
RWShared
sds
toContactAction
::
(
Maybe
String
)
(
ActionDefinition
ContactNo
sds
)
->
CatalogAction
|
RWShared
sds
toIncidentAction
::
(
ActionDefinition
IncidentNo
sds
)
->
CatalogAction
|
RWShared
sds
toContactForIncidentAction
::
(
Maybe
String
)
(
ActionDefinition
(
ContactNo
,
IncidentNo
)
sds
)
->
CatalogAction
|
RWShared
sds
toInstantAction
::
c
ActionProgress
[
ContactNo
]
[
IncidentNo
]
(
ActionDefinition
c
)
->
CatalogAction
|
iTask
c
toConfigurableAction
::
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
ActionDefinition
c
)
->
CatalogAction
|
iTask
c
toContactAction
::
(
Maybe
String
)
(
ActionDefinition
ContactNo
)
->
CatalogAction
toIncidentAction
::
(
ActionDefinition
IncidentNo
)
->
CatalogAction
toContactForIncidentAction
::
(
Maybe
String
)
(
ActionDefinition
(
ContactNo
,
IncidentNo
)
)
->
CatalogAction
forIncident
::
IncidentNo
(
ActionDefinition
(
ContactNo
,
IncidentNo
)
sds
)
->
ActionDefinition
ContactNo
sds
|
RWShared
sds
forIncident
::
IncidentNo
(
ActionDefinition
(
ContactNo
,
IncidentNo
)
)
->
ActionDefinition
ContactNo
addDefaultStatus
::
(
Task
c
)
->
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
|
iTask
c
//Shared catalog of predefined action items
actionCatalog
::
SDSLens
()
[
CatalogAction
]
()
builtinActionCatalog
::
SDS
Lens
()
[
CatalogAction
]
()
builtinActionCatalog
::
SDS
Source
()
[
CatalogAction
]
()
userActionCatalog
::
SDSLens
()
[
UserCatalogAction
]
[
UserCatalogAction
]
//Shares providing filtered views on iTasks task instances.
...
...
@@ -174,12 +175,12 @@ numActionsByContact :: SDSLens ContactNo Int ()
todoItemTask
::
()
(
sds
()
ActionStatus
ActionStatus
)
->
Task
()
|
RWShared
sds
blankTodoItem
::
CatalogAction
predefinedTodoItem
::
String
ItemMeta
->
CatalogAction
predefinedInstantItem
::
String
ItemMeta
ActionProgress
((
sds
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
RWShared
sds
predefinedConfigurableItem
::
String
ItemMeta
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
c
(
sds
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
iTask
c
&
RWShared
sds
predefinedInstantItem
::
String
ItemMeta
ActionProgress
((
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
predefinedConfigurableItem
::
String
ItemMeta
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
c
(
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
iTask
c
//Contact or incident
predefinedIncidentItem
::
String
ItemMeta
(
IncidentNo
(
sds
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
RWShared
sds
predefinedContactItem
::
String
ItemMeta
(
Maybe
String
)
(
ContactNo
(
sds
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
RWShared
sds
predefinedIncidentItem
::
String
ItemMeta
(
IncidentNo
(
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
predefinedContactItem
::
String
ItemMeta
(
Maybe
String
)
(
ContactNo
(
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
//Action lists items
listItemTask
::
(
String
,
ActionPlan
)
(
sds
()
ActionStatus
ActionStatus
)
->
Task
()
|
RWShared
sds
...
...
Examples/Applications/Incidone/Incidone/ActionManagementTasks.icl
View file @
421ea9fb
...
...
@@ -29,14 +29,14 @@ actionStatuses :: SDSLens () [(InstanceNo,InstanceNo,ActionStatus)] ()
actionStatuses
=
mapRead
(
map
toActionStatus
)
detachedTaskInstances
actionStatusesByIncident
::
SDSLens
IncidentNo
[(
InstanceNo
,
InstanceNo
,
ActionStatus
)]
()
actionStatusesByIncident
=
sdsSplit
"actionStatusesByIncident"
(\
p
->
((),
p
))
read
write
actionStatuses
actionStatusesByIncident
=
sdsSplit
"actionStatusesByIncident"
(\
p
->
((),
p
))
read
write
(
Just
\
p
w
.
Ok
w
)
actionStatuses
where
read
instanceNo
is
=
filter
(
filterFun
instanceNo
)
is
write
_
_
_
=
((),
const
(
const
False
))
filterFun
instanceNo
(_,_,{
ActionStatus
|
incidents
})
=
isMember
instanceNo
incidents
actionStatusesByContact
::
SDSLens
ContactNo
[(
InstanceNo
,
InstanceNo
,
ActionStatus
)]
()
actionStatusesByContact
=
sdsSplit
"actionStatusesByContact"
(\
p
->
((),
p
))
read
write
actionStatuses
actionStatusesByContact
=
sdsSplit
"actionStatusesByContact"
(\
p
->
((),
p
))
read
write
(
Just
\
p
w
.
Ok
w
)
actionStatuses
where
read
contactNo
is
=
filter
(
filterFun
contactNo
)
is
write
_
_
_
=
((),
const
(
const
False
))
...
...
@@ -49,7 +49,7 @@ where
writer
=
SDSWriteConst
(\_
_
->
Ok
Nothing
)
actionStatusByNo
::
SDSLens
InstanceNo
ActionStatus
ActionStatus
actionStatusByNo
=
sdsProject
(
SDSLensRead
read
)
(
SDSLensWrite
write
)
taskInstanceByNo
actionStatusByNo
=
sdsProject
(
SDSLensRead
read
)
(
SDSLensWrite
write
)
Nothing
taskInstanceByNo
where
read
item
=
Ok
(
thd3
(
toActionStatus
item
))
write
{
TaskInstance
|
attributes
}
status
=
Ok
(
Just
(
fromActionStatus
status
attributes
))
...
...
@@ -101,7 +101,7 @@ fromSelfActionStatus status (_,items) = case [i \\ i=:{TaskListItem|taskId,self}
_
=
Error
(
exception
"Task id not found in self management share"
)
selfActionStatus
::
(
SharedTaskList
a
)
->
SDSLens
()
ActionStatus
ActionStatus
|
iTask
a
selfActionStatus
list
=
sdsFocus
taskListFilter
(
mapReadWriteError
(
toSelfActionStatus
,
fromSelfActionStatus
)
list
)
selfActionStatus
list
=
sdsFocus
taskListFilter
(
mapReadWriteError
(
toSelfActionStatus
,
fromSelfActionStatus
)
Nothing
list
)
where
taskListFilter
=
{
TaskListFilter
|
onlyIndex
=
Nothing
,
onlyTaskId
=
Nothing
,
onlySelf
=
False
,
includeValue
=
False
,
includeAttributes
=
True
,
includeProgress
=
False
}
...
...
@@ -118,18 +118,18 @@ where
ActionCanceled
=
{
numPlanned
=
pl
,
numActive
=
ac
,
numCompleted
=
co
,
numFailed
=
fa
,
numCanceled
=
ca
+1
}
_
=
{
numPlanned
=
pl
,
numActive
=
ac
,
numCompleted
=
co
,
numFailed
=
fa
,
numCanceled
=
ca
}
toInstantAction
::
c
ActionProgress
[
ContactNo
]
[
IncidentNo
]
(
ActionDefinition
c
sds
)
->
CatalogAction
|
iTask
c
&
RWShared
sds
toInstantAction
::
c
ActionProgress
[
ContactNo
]
[
IncidentNo
]
(
ActionDefinition
c
)
->
CatalogAction
|
iTask
c
toInstantAction
config
progress
contacts
incidents
{
ActionDefinition
|
identity
,
meta
=
meta
=:{
ItemMeta
|
title
,
description
},
task
}
=
{
CatalogAction
|
identity
=
identity
,
meta
=
meta
,
tasks
=
ActionTasks
configer
task
}
where
configer
initContacts
initIncidents
=
return
(
config
,{
ActionStatus
|
title
=
title
,
description
=
description
,
progress
=
progress
,
contacts
=
contacts
++
initContacts
,
incidents
=
incidents
++
initIncidents
})
toConfigurableAction
::
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
ActionDefinition
c
sds
)
->
CatalogAction
|
iTask
c
&
RWShared
sds
toConfigurableAction
::
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
ActionDefinition
c
)
->
CatalogAction
|
iTask
c
toConfigurableAction
configer
{
ActionDefinition
|
identity
,
meta
,
task
}
=
{
CatalogAction
|
identity
=
identity
,
meta
=
meta
,
tasks
=
ActionTasks
configer
task
}
toContactAction
::
(
Maybe
String
)
(
ActionDefinition
ContactNo
sds
)
->
CatalogAction
|
RWShared
sds
toContactAction
::
(
Maybe
String
)
(
ActionDefinition
ContactNo
)
->
CatalogAction
toContactAction
mbGroup
item
=:{
ActionDefinition
|
meta
={
ItemMeta
|
title
,
description
}}
=
toConfigurableAction
configer
item
where
configer
initContacts
initIncidents
...
...
@@ -138,7 +138,7 @@ where
@
\
contactNo
->
(
contactNo
,{
ActionStatus
|
title
=
title
,
description
=
description
,
progress
=
ActionActive
,
contacts
=[
contactNo
:
initContacts
],
incidents
=
initIncidents
})
toIncidentAction
::
(
ActionDefinition
IncidentNo
sds
)
->
CatalogAction
|
RWShared
sds
toIncidentAction
::
(
ActionDefinition
IncidentNo
)
->
CatalogAction
toIncidentAction
item
=:{
ActionDefinition
|
meta
={
ItemMeta
|
title
,
description
}}
=
toConfigurableAction
configer
item
where
...
...
@@ -148,7 +148,7 @@ where
@
\
incidentNo
->
(
incidentNo
,{
ActionStatus
|
title
=
title
,
description
=
description
,
progress
=
ActionActive
,
contacts
=
initContacts
,
incidents
=[
incidentNo
:
initIncidents
]})
toContactForIncidentAction
::
(
Maybe
String
)
(
ActionDefinition
(
ContactNo
,
IncidentNo
)
sds
)
->
CatalogAction
|
RWShared
sds
toContactForIncidentAction
::
(
Maybe
String
)
(
ActionDefinition
(
ContactNo
,
IncidentNo
)
)
->
CatalogAction
toContactForIncidentAction
mbGroup
item
=:{
ActionDefinition
|
meta
={
ItemMeta
|
title
,
description
}}
=
toConfigurableAction
configer
item
where
...
...
@@ -163,7 +163,7 @@ where
contactOptions
Nothing
=
allContactsShort
contactOptions
(
Just
group
)
=
sdsFocus
group
contactsWithGroupShort
forIncident
::
IncidentNo
(
ActionDefinition
(
ContactNo
,
IncidentNo
)
sds
)
->
ActionDefinition
ContactNo
sds
|
RWShared
sds
forIncident
::
IncidentNo
(
ActionDefinition
(
ContactNo
,
IncidentNo
)
)
->
ActionDefinition
ContactNo
forIncident
incidentNo
item
=:{
ActionDefinition
|
task
}
=
{
ActionDefinition
|
item
&
task
=
task`
}
where
task`
contactNo
status
=
task
(
contactNo
,
incidentNo
)
status
...
...
@@ -171,24 +171,24 @@ where
addDefaultStatus
::
(
Task
c
)
->
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
|
iTask
c
addDefaultStatus
task
=
\
initContacts
initIncidents
->
task
@
\
c
->
(
c
,{
ActionStatus
|
defaultValue
&
contacts
=
initContacts
,
incidents
=
initIncidents
})
predefinedInstantItem
::
String
ItemMeta
ActionProgress
((
sds
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
RWShared
sds
predefinedInstantItem
::
String
ItemMeta
ActionProgress
((
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
predefinedInstantItem
identity
meta
=:{
ItemMeta
|
title
,
description
}
progress
task
=
{
CatalogAction
|
identity
=
identity
,
meta
=
meta
,
tasks
=
ActionTasks
configer
itemtask
}
where
configer
initContacts
initIncidents
=
return
((),{
ActionStatus
|
title
=
title
,
description
=
description
,
progress
=
progress
,
contacts
=
initContacts
,
incidents
=
initIncidents
})
itemtask
_
status
=
task
status
@?
const
NoValue
predefinedConfigurableItem
::
String
ItemMeta
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
c
(
sds
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
iTask
c
&
RWShared
sds
predefinedConfigurableItem
::
String
ItemMeta
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
c
(
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
iTask
c
predefinedConfigurableItem
identity
meta
configer
task
=
{
CatalogAction
|
identity
=
identity
,
meta
=
meta
,
tasks
=
ActionTasks
configer
(\
c
s
->
task
c
s
@?
const
NoValue
)}
predefinedIncidentItem
::
String
ItemMeta
(
IncidentNo
(
sds
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
RWShared
sds
predefinedIncidentItem
::
String
ItemMeta
(
IncidentNo
(
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
predefinedIncidentItem
identity
meta
incidentTask
=
toIncidentAction
{
ActionDefinition
|
identity
=
identity
,
meta
=
meta
,
task
=
task
}
where
task
status
incidentNo
=
incidentTask
status
incidentNo
@?
const
NoValue
predefinedContactItem
::
String
ItemMeta
(
Maybe
String
)
(
ContactNo
(
sds
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
RWShared
sds
predefinedContactItem
::
String
ItemMeta
(
Maybe
String
)
(
ContactNo
(
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
predefinedContactItem
identity
meta
mbGroup
contactTask
=
toContactAction
mbGroup
{
ActionDefinition
|
identity
=
identity
,
meta
=
meta
,
task
=
task
}
where
...
...
@@ -251,7 +251,7 @@ where
actionCatalog
::
SDSLens
()
[
CatalogAction
]
()
actionCatalog
=
mapRead
(\(
b
,
u
)
->
b
++
map
toCatalogAction
u
)
(
builtinActionCatalog
|*|
userActionCatalog
)
builtinActionCatalog
::
SDS
Lens
()
[
CatalogAction
]
()
builtinActionCatalog
::
SDS
Source
()
[
CatalogAction
]
()
builtinActionCatalog
=
constShare
[
blankTodoItem
,
blankAlertItem
...
...
@@ -571,7 +571,7 @@ workOnActionItem instanceNo
where
workOnTask
taskId
=
workOn
taskId
>>*
[
OnValue
(
ifValue
(
(===)
ASExcepted
)
(\_
->
viewInformation
(
Title
"Error"
)
[]
"An exception occurred in this action"
@!
()))
>>*
[
OnValue
(
ifValue
(
\
v
.
case
v
of
ASExcepted
_
=
True
;
_
=
False
;
)
(\_
->
viewInformation
(
Title
"Error"
)
[]
"An exception occurred in this action"
@!
()))
,
OnValue
(
ifValue
((===)
ASIncompatible
)
(\_
->
restartIncompatibleTask
taskId
))
]
...
...
@@ -673,9 +673,9 @@ where
fromPrj
status
{
ItemMeta
|
title
,
description
}
=
{
ActionStatus
|
status
&
title
=
title
,
description
=
description
}
contacts
status
=
mapReadWrite
(\{
ActionStatus
|
contacts
}->
contacts
,
\
contacts
status
->
Just
{
ActionStatus
|
status
&
contacts
=
contacts
})
status
=
mapReadWrite
(\{
ActionStatus
|
contacts
}->
contacts
,
\
contacts
status
->
Just
{
ActionStatus
|
status
&
contacts
=
contacts
})
Nothing
status
incidents
status
=
mapReadWrite
(\{
ActionStatus
|
incidents
}->
incidents
,
\
incidents
status
->
Just
{
ActionStatus
|
status
&
incidents
=
incidents
})
status
=
mapReadWrite
(\{
ActionStatus
|
incidents
}->
incidents
,
\
incidents
status
->
Just
{
ActionStatus
|
status
&
incidents
=
incidents
})
Nothing
status
manageSubActions
::
ActionPlan
(
sds
()
ActionStatus
ActionStatus
)
(
SharedTaskList
())
->
Task
()
|
RWShared
sds
manageSubActions
plan
status
list
...
...
@@ -740,7 +740,7 @@ where
=
configer
initContacts
initIncidents
<<@
Title
"Configure"
/* <<@ AfterLayout (uiDefSetHeight FlexSize) */
>>?
\(
config
,
initStatus
)
->
addAction
identity
initStatus
list
(\
l
->
task
config
l
)
addAction
::
String
ActionStatus
(
SharedTaskList
a
)
((
sds
()
ActionStatus
ActionStatus
)
->
Task
())
->
Task
TaskId
|
iTask
a
&
RWShared
sds
addAction
::
String
ActionStatus
(
SharedTaskList
a
)
((
SDSLens
()
ActionStatus
ActionStatus
)
->
Task
())
->
Task
TaskId
|
iTask
a
addAction
identity
initStatus
list
task
=
logActionAdded
initStatus
>>|
appendTask
(
Detached
attributes
True
)
(\
l
->
(
task
(
selfActionStatus
l
)
@?
const
NoValue
))
list
...
...
Examples/Applications/Incidone/Incidone/DeviceBased/Tablet.icl
View file @
421ea9fb
...
...
@@ -13,7 +13,7 @@ where
header
=
viewInformation
()
[]
(
"REMOTE CONTROL"
)
//<<@ (AfterLayout (uiDefSetHalign AlignRight o uiDefSetBaseCls "wall-header")) //FIXME
mapContacts
=
mapRead
(\(
x
,
y
)
->
x
++
y
)
(
contactsOfOpenIncidentsGeo
|
+
|
contactsProvidingHelpGeo
)
mapContacts
=
mapRead
(\(
x
,
y
)
->
x
++
y
)
(
contactsOfOpenIncidentsGeo
|
*
|
contactsProvidingHelpGeo
)
selectContent
=
(
switchContent
>&>
withSelection
viewNoSelection
configureContent
)
<<@
(
ArrangeWithSideBar
0
LeftSide
300
False
)
...
...
@@ -27,10 +27,10 @@ where
where
title
=
"Configure Content"
configure
"Overview"
=
get
(
standardMapLayers
|
+
|
standardPerspective
)
=
get
(
standardMapLayers
|
*
|
standardPerspective
)
>>-
\(
baseLayers
,
perspective
)
->
withShared
perspective
\
p
->
updateSharedInformation
(
Title
title
)
[
UpdateAs
(
toMap
baseLayers
)
fromMap
]
(
p
>
+
|
mapContacts
)
@
fst
\
p
->
updateSharedInformation
(
Title
title
)
[
UpdateAs
(
toMap
baseLayers
)
fromMap
]
(
p
>
*
|
mapContacts
)
@
fst
//<<@ AfterLayout (tweakUI fill) //FIXME
@
WallOverview
where
...
...
Examples/Applications/Incidone/Incidone/DeviceBased/VideoWall.icl
View file @
421ea9fb
...
...
@@ -15,7 +15,7 @@ viewVideoWallContent
=
(
header
||-
content
)
<<@
(
ArrangeWithSideBar
0
TopSide
30
False
)
//<<@ AfterLayout plainLayoutFinal //FIXME
where
header
=
viewSharedInformation
()
[
ViewAs
view
]
(
currentTime
|
+
|
currentUTCTime
)
//<<@ (AfterLayout (uiDefSetHalign AlignRight o uiDefSetBaseCls "wall-header")) //FIXME
=
viewSharedInformation
()
[
ViewAs
view
]
(
currentTime
|
*
|
currentUTCTime
)
//<<@ (AfterLayout (uiDefSetHalign AlignRight o uiDefSetBaseCls "wall-header")) //FIXME
where
view
(
local
,
utc
)
=
"LOCAL: "
+
lpad
(
toString
local
.
Time
.
hour
)
2
'0'
+
":"
+
lpad
(
toString
local
.
Time
.
min
)
2
'0'
+
" "
+
"UTC: "
+
lpad
(
toString
utc
.
Time
.
hour
)
2
'0'
+
":"
+
lpad
(
toString
utc
.
Time
.
min
)
2
'0'
...
...
@@ -31,7 +31,7 @@ where
formatTime
time
=
DivTag
[
StyleAttr
"font-size: 80pt; text-align: center; padding-top: 200px;"
]
[
Text
(
toString
time
)]
formatDateTime
time
=
DivTag
[
StyleAttr
"font-size: 80pt; text-align: center; padding-top: 200px;"
]
[
Text
(
toString
time
)]
mapContacts
=
mapRead
(\(
x
,
y
)
->
x
++
y
)
(
contactsOfOpenIncidentsGeo
|
+
|
contactsProvidingHelpGeo
)
mapContacts
=
mapRead
(\(
x
,
y
)
->
x
++
y
)
(
contactsOfOpenIncidentsGeo
|
*
|
contactsProvidingHelpGeo
)
viewWallOverview
perspective
=
((
viewSharedInformation
(
Title
"Open Incidents"
)
[
ViewAs
formatIncidents
]
openIncidentsDetails
)
...
...
Examples/Applications/Incidone/Incidone/Extensions/CrewLists.dcl
View file @
421ea9fb
...
...
@@ -5,7 +5,7 @@ import Incidone.OP.Concepts, Incidone.ActionManagementTasks
crewListActions
::
[
CatalogAction
]
manageContactCrew
::
ContactNo
->
Task
()
manageContactCrewAction
::
ActionDefinition
ContactNo
sds
manageContactCrewAction
::
ActionDefinition
ContactNo
manageCrewAliasList
::
ContactNo
->
Task
()
manageCrewAliasListAction
::
ActionDefinition
ContactNo
sds
manageCrewAliasListAction
::
ActionDefinition
ContactNo
Examples/Applications/Incidone/Incidone/Extensions/CrewLists.icl
View file @
421ea9fb
...
...
@@ -10,10 +10,10 @@ import qualified Data.Map as DM
//This module provides an add-on that keeps track of the deployed crew of a rescue vessel
//Data storage
crewListsStore
::
RWShared
ContactNo
[
ContactNo
]
[
ContactNo
]
crewListsStore
::
SDSLens
ContactNo
[
ContactNo
]
[
ContactNo
]
crewListsStore
=
indexedStore
"crewLists"
[]
crewAliasListsStore
::
RWShared
ContactNo
[(
Int
,
ContactNo
)]
[(
Int
,
ContactNo
)]
crewAliasListsStore
::
SDSLens
ContactNo
[(
Int
,
ContactNo
)]
[(
Int
,
ContactNo
)]
crewAliasListsStore
=
indexedStore
"crewAliasLists"
[]
//Manage the crew information for a specific contact
...
...
Examples/Applications/Incidone/Incidone/OP/CommunicationManagementTasks.icl
View file @
421ea9fb
...
...
@@ -133,7 +133,7 @@ relateMessageToIncidents communicationNo
=
manageSharedListWithDetails
details
add
aboutIncidents
where
aboutIncidents
=
sdsFocus
communicationNo
communicationAboutIncidents
communicationAboutIncidents
=
mapReadWrite
(
toPrj
,
fromPrj
)
communicationByNo
communicationAboutIncidents
=
mapReadWrite
(
toPrj
,
fromPrj
)
Nothing
communicationByNo
where
toPrj
{
Communication
|
aboutIncidents
}
=
aboutIncidents
fromPrj
aboutIncidents
c
=
Just
{
Communication
|
c
&
aboutIncidents
=
aboutIncidents
}
...
...
@@ -195,27 +195,27 @@ updateMessageMeta communicationNo
)
<<@
ArrangeSplit
Horizontal
False
@
\(_,(
status
,_))
->
status
phoneCallExternalNo
=
mapReadWrite
(
toExternalNo
,
fromExternalNo
)
phoneCallByNo
phoneCallExternalNo
=
mapReadWrite
(
toExternalNo
,
fromExternalNo
)
Nothing
phoneCallByNo
where
toExternalNo
{
PhoneCall
|
externalNo
}
=
externalNo
fromExternalNo
nexternalNo
c
=:{
PhoneCall
|
externalNo
}
=
if
(
nexternalNo
=!=
externalNo
)
(
Just
{
PhoneCall
|
c
&
externalNo
=
nexternalNo
})
Nothing
radioCallChannel
=
mapReadWrite
(
toChannel
,
fromChannel
)
radioCallByNo
radioCallChannel
=
mapReadWrite
(
toChannel
,
fromChannel
)
Nothing
radioCallByNo
where
toChannel
{
RadioCall
|
channel
}
=
channel
fromChannel
nchannel
c
=:{
RadioCall
|
channel
}
=
if
(
nchannel
=!=
channel
)
(
Just
{
RadioCall
|
c
&
channel
=
nchannel
})
Nothing
communicationTime
=
mapReadWrite
(
toTime
,
fromTime
)
communicationByNo
communicationTime
=
mapReadWrite
(
toTime
,
fromTime
)
Nothing
communicationByNo
where
toTime
{
Communication
|
time
}
=
time
fromTime
ntime
c
=:{
Communication
|
time
}
=
if
(
ntime
=!=
time
)
(
Just
{
Communication
|
c
&
time
=
ntime
})
Nothing
communicationStatus
=
mapReadWrite
(
toStatus
,
fromStatus
)
communicationByNo
communicationStatus
=
mapReadWrite
(
toStatus
,
fromStatus
)
Nothing
communicationByNo
where
toStatus
{
Communication
|
status
}
=
status
fromStatus
nstatus
c
=:{
Communication
|
status
}
=
if
(
nstatus
=!=
status
)
(
Just
{
Communication
|
c
&
status
=
nstatus
})
Nothing
communicationHandledBy
=
mapReadWrite
(
toHandledBy
,
fromHandledBy
)
communicationByNo
communicationHandledBy
=
mapReadWrite
(
toHandledBy
,
fromHandledBy
)
Nothing
communicationByNo
where
toHandledBy
{
Communication
|
handledBy
}
=
handledBy
fromHandledBy
nhandledBy
c
=:{
Communication
|
handledBy
}
=
if
(
nhandledBy
=!=
handledBy
)
(
Just
{
Communication
|
c
&
handledBy
=
nhandledBy
})
Nothing
...
...
@@ -296,12 +296,12 @@ where
=
updateSharedInformation
(
Title
"Notes"
)
[]
(
callNotes
type
)
//<<@ FillNotes //FIXME
@!
()
callNotes
PhoneCall
=
sdsFocus
communicationNo
(
mapReadWrite
(
toPrj
,
fromPrj
)
phoneCallByNo
)
callNotes
PhoneCall
=
sdsFocus
communicationNo
(
mapReadWrite
(
toPrj
,
fromPrj
)
Nothing
phoneCallByNo
)
where
toPrj
{
PhoneCall
|
callNotes
}
=
callNotes
fromPrj
callNotes
c
=
Just
{
PhoneCall
|
c
&
callNotes
=
callNotes
}
callNotes
RadioCall
=
sdsFocus
communicationNo
(
mapReadWrite
(
toPrj
,
fromPrj
)
radioCallByNo
)
callNotes
RadioCall
=
sdsFocus
communicationNo
(
mapReadWrite
(
toPrj
,
fromPrj
)
Nothing
radioCallByNo
)
where
toPrj
{
RadioCall
|
callNotes
}
=
callNotes
fromPrj
callNotes
c
=
Just
{
RadioCall
|
c
&
callNotes
=
callNotes
}
...
...
@@ -327,7 +327,7 @@ createP2000Message direction = createCommunication P2000Message direction Nothin
createCommunication
::
CommunicationType
CommunicationDirection
(
Maybe
ContactNo
)->
Task
CommunicationNo
createCommunication
type
direction
mbWithContact
=
get
(
currentDateTime
|
+
|
databaseDef
)
=
get
(
currentDateTime
|
*
|
databaseDef
)
>>-
\(
datetime
,
db
)
->
sqlExecute
db
[
"allCommunications"
]
(
execInsert
"INSERT INTO Communication (time,type,direction,withContact) VALUES (?,?,?,?)"
(
flatten
[
toSQL
datetime
,
toSQL
type
,
toSQL
direction
,
mbToSQL
mbWithContact
]))
>>-
\
communicationNo
->
case
type
of
...
...
Examples/Applications/Incidone/Incidone/RoleBased/AdministratorTasks.icl
View file @
421ea9fb
...
...
@@ -238,7 +238,7 @@ configureWebLinks
where
exportConfig
=
doOrClose
(
get
(
webLinksConfig
|
+
|
currentDateTime
)
get
(
webLinksConfig
|
*
|
currentDateTime
)
>>-
\(
config
,
now
)
->
createJSONFile
(
"Incidone-weblinks-"
+++
paddedDateTimeString
now
+++
".json"
)
config
>>-
viewInformation
"An export file has been created"
[]
@!
()
...
...
Examples/Applications/Incidone/Incidone/Util/Notification.icl
View file @
421ea9fb
...
...
@@ -5,11 +5,11 @@ import Text, System.Time
import
Incidone
.
Util
.
TaskPatterns
//Notifications are stored newest first
notifications
::
S
hared
[(
DateTime
,
String
)]
notifications
::
S
DSLens
()
[(
DateTime
,
String
)]
[(
DateTime
,
String
)]
notifications
=
sharedStore
"notifications"
[]
//Only show notifications added in the last 5 seconds
currentNotifications
::
ReadOnlyShared
[
String
]
currentNotifications
::
SDSLens
()
[
String
]
()
currentNotifications
=
mapRead
prj
(
currentDateTime
|*|
notifications
)
where
prj
(
now
,
notifications
)
=
[
toString
dt
+++
msg
\\
(
dt
,
msg
)
<-
notifications
|
limit
now
dt
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment