Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-and-itasks
iTasks-SDK
Commits
a759534d
Commit
a759534d
authored
Jan 21, 2019
by
Steffen Michels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use 'SimpleSDSLens' synonym where applicable
parent
000d40a6
Pipeline
#17925
passed with stage
in 4 minutes and 29 seconds
Changes
62
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
62 changed files
with
183 additions
and
183 deletions
+183
-183
Examples/Applications/Incidone/Incidone/ActionManagementTasks.dcl
.../Applications/Incidone/Incidone/ActionManagementTasks.dcl
+7
-7
Examples/Applications/Incidone/Incidone/ActionManagementTasks.icl
.../Applications/Incidone/Incidone/ActionManagementTasks.icl
+7
-7
Examples/Applications/Incidone/Incidone/Configuration.dcl
Examples/Applications/Incidone/Incidone/Configuration.dcl
+7
-7
Examples/Applications/Incidone/Incidone/Configuration.icl
Examples/Applications/Incidone/Incidone/Configuration.icl
+7
-7
Examples/Applications/Incidone/Incidone/ContactPosition.dcl
Examples/Applications/Incidone/Incidone/ContactPosition.dcl
+2
-2
Examples/Applications/Incidone/Incidone/ContactPosition.icl
Examples/Applications/Incidone/Incidone/ContactPosition.icl
+2
-2
Examples/Applications/Incidone/Incidone/DeviceBased/VideoWall.dcl
.../Applications/Incidone/Incidone/DeviceBased/VideoWall.dcl
+1
-1
Examples/Applications/Incidone/Incidone/DeviceBased/VideoWall.icl
.../Applications/Incidone/Incidone/DeviceBased/VideoWall.icl
+1
-1
Examples/Applications/Incidone/Incidone/OP/ContactManagementTasks.icl
...lications/Incidone/Incidone/OP/ContactManagementTasks.icl
+1
-1
Examples/Applications/Incidone/Incidone/OP/SDSs.dcl
Examples/Applications/Incidone/Incidone/OP/SDSs.dcl
+2
-2
Examples/Applications/Incidone/Incidone/OP/SDSs.icl
Examples/Applications/Incidone/Incidone/OP/SDSs.icl
+2
-2
Examples/Applications/Incidone/Incidone/Util/Notification.icl
...ples/Applications/Incidone/Incidone/Util/Notification.icl
+1
-1
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Editor.dcl
...plications/ShipAdventure/C2/Apps/ShipAdventure/Editor.dcl
+1
-1
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Editor.icl
...plications/ShipAdventure/C2/Apps/ShipAdventure/Editor.icl
+3
-3
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Scripting.dcl
...cations/ShipAdventure/C2/Apps/ShipAdventure/Scripting.dcl
+3
-3
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Scripting.icl
...cations/ShipAdventure/C2/Apps/ShipAdventure/Scripting.icl
+3
-3
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Types.dcl
...pplications/ShipAdventure/C2/Apps/ShipAdventure/Types.dcl
+8
-8
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Types.icl
...pplications/ShipAdventure/C2/Apps/ShipAdventure/Types.icl
+8
-8
Examples/Applications/ShipAdventure/C2/Framework/Common.dcl
Examples/Applications/ShipAdventure/C2/Framework/Common.dcl
+3
-3
Examples/Applications/ShipAdventure/C2/Framework/Common.icl
Examples/Applications/ShipAdventure/C2/Framework/Common.icl
+3
-3
Examples/Applications/ShipAdventure/C2/Framework/Core.icl
Examples/Applications/ShipAdventure/C2/Framework/Core.icl
+1
-1
Examples/Applications/ShipAdventure/C2/Framework/Logging.dcl
Examples/Applications/ShipAdventure/C2/Framework/Logging.dcl
+1
-1
Examples/Applications/ShipAdventure/C2/Framework/Logging.icl
Examples/Applications/ShipAdventure/C2/Framework/Logging.icl
+1
-1
Examples/Applications/ShipAdventure/C2/Framework/MapEnvironment.dcl
...pplications/ShipAdventure/C2/Framework/MapEnvironment.dcl
+8
-8
Examples/Applications/ShipAdventure/C2/Framework/MapEnvironment.icl
...pplications/ShipAdventure/C2/Framework/MapEnvironment.icl
+3
-3
Examples/Applications/ShipAdventure/C2/Framework/Util.dcl
Examples/Applications/ShipAdventure/C2/Framework/Util.dcl
+2
-2
Examples/Applications/ShipAdventure/C2/Framework/Util.icl
Examples/Applications/ShipAdventure/C2/Framework/Util.icl
+2
-2
Examples/Applications/TheTaxMan/Cadastre/SDS.dcl
Examples/Applications/TheTaxMan/Cadastre/SDS.dcl
+1
-1
Examples/Applications/TheTaxMan/Cadastre/SDS.icl
Examples/Applications/TheTaxMan/Cadastre/SDS.icl
+1
-1
Examples/Applications/TheTaxMan/ChamberOfCommerce/SDS.dcl
Examples/Applications/TheTaxMan/ChamberOfCommerce/SDS.dcl
+2
-2
Examples/Applications/TheTaxMan/ChamberOfCommerce/SDS.icl
Examples/Applications/TheTaxMan/ChamberOfCommerce/SDS.icl
+2
-2
Examples/Applications/TheTaxMan/CivilAffairs/SDS.dcl
Examples/Applications/TheTaxMan/CivilAffairs/SDS.dcl
+1
-1
Examples/Applications/TheTaxMan/CivilAffairs/SDS.icl
Examples/Applications/TheTaxMan/CivilAffairs/SDS.icl
+1
-1
Examples/Applications/TheTaxMan/Compensation/SDS.dcl
Examples/Applications/TheTaxMan/Compensation/SDS.dcl
+11
-11
Examples/Applications/TheTaxMan/Compensation/SDS.icl
Examples/Applications/TheTaxMan/Compensation/SDS.icl
+12
-12
Examples/Distributed/examples.icl
Examples/Distributed/examples.icl
+1
-1
Libraries/iTasks/Extensions/Device/Features.dcl
Libraries/iTasks/Extensions/Device/Features.dcl
+2
-2
Libraries/iTasks/Extensions/Device/Features.icl
Libraries/iTasks/Extensions/Device/Features.icl
+1
-1
Libraries/iTasks/Extensions/Distributed/Authentication.icl
Libraries/iTasks/Extensions/Distributed/Authentication.icl
+1
-1
Libraries/iTasks/Extensions/Distributed/_Evaluation.dcl
Libraries/iTasks/Extensions/Distributed/_Evaluation.dcl
+1
-1
Libraries/iTasks/Extensions/Distributed/_Evaluation.icl
Libraries/iTasks/Extensions/Distributed/_Evaluation.icl
+1
-1
Libraries/iTasks/Extensions/Distributed/_Util.dcl
Libraries/iTasks/Extensions/Distributed/_Util.dcl
+1
-1
Libraries/iTasks/Extensions/Distributed/_Util.icl
Libraries/iTasks/Extensions/Distributed/_Util.icl
+1
-1
Libraries/iTasks/Extensions/User.dcl
Libraries/iTasks/Extensions/User.dcl
+1
-1
Libraries/iTasks/Extensions/User.icl
Libraries/iTasks/Extensions/User.icl
+1
-1
Libraries/iTasks/Internal/Distributed/Instance.icl
Libraries/iTasks/Internal/Distributed/Instance.icl
+2
-2
Libraries/iTasks/Internal/Distributed/Symbols.dcl
Libraries/iTasks/Internal/Distributed/Symbols.dcl
+2
-2
Libraries/iTasks/Internal/Distributed/Symbols.icl
Libraries/iTasks/Internal/Distributed/Symbols.icl
+2
-2
Libraries/iTasks/Internal/SDSService.icl
Libraries/iTasks/Internal/SDSService.icl
+1
-1
Libraries/iTasks/Internal/TaskServer.icl
Libraries/iTasks/Internal/TaskServer.icl
+1
-1
Libraries/iTasks/Internal/TaskStore.dcl
Libraries/iTasks/Internal/TaskStore.dcl
+5
-5
Libraries/iTasks/Internal/TaskStore.icl
Libraries/iTasks/Internal/TaskStore.icl
+5
-5
Libraries/iTasks/Internal/Tonic/Server.icl
Libraries/iTasks/Internal/Tonic/Server.icl
+6
-6
Libraries/iTasks/Internal/Tonic/Shares.dcl
Libraries/iTasks/Internal/Tonic/Shares.dcl
+8
-8
Libraries/iTasks/Internal/Tonic/Shares.icl
Libraries/iTasks/Internal/Tonic/Shares.icl
+8
-8
Libraries/iTasks/SDS/Combinators/Common.dcl
Libraries/iTasks/SDS/Combinators/Common.dcl
+2
-2
Libraries/iTasks/SDS/Combinators/Common.icl
Libraries/iTasks/SDS/Combinators/Common.icl
+1
-1
Libraries/iTasks/SDS/Sources/Store.dcl
Libraries/iTasks/SDS/Sources/Store.dcl
+2
-2
Libraries/iTasks/SDS/Sources/Store.icl
Libraries/iTasks/SDS/Sources/Store.icl
+2
-2
Libraries/iTasks/WF/Combinators/SDS.dcl
Libraries/iTasks/WF/Combinators/SDS.dcl
+1
-1
Libraries/iTasks/WF/Combinators/SDS.icl
Libraries/iTasks/WF/Combinators/SDS.icl
+1
-1
Libraries/iTasks/WF/Tasks/Interaction.icl
Libraries/iTasks/WF/Tasks/Interaction.icl
+2
-2
No files found.
Examples/Applications/Incidone/Incidone/ActionManagementTasks.dcl
View file @
a759534d
...
...
@@ -18,7 +18,7 @@ import Incidone.OP.Concepts
::
ActionDefinition
c
=
{
identity
::
String
,
meta
::
ItemMeta
,
task
::
c
(
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
()
,
task
::
c
(
S
impleSDSLen
s
ActionStatus
)
->
Task
()
}
//Wrapped action for storage in the action catalog
...
...
@@ -36,7 +36,7 @@ import Incidone.OP.Concepts
::
ActionTasks
=
E
.
c
sds
:
ActionTasks
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
//Configuration task
(
c
(
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
())
&
iTask
c
//An action item that needs to be configured before it can be deployed
(
c
(
S
impleSDSLen
s
ActionStatus
)
->
Task
())
&
iTask
c
//An action item that needs to be configured before it can be deployed
::
ActionProgress
=
ActionPlanned
...
...
@@ -158,7 +158,7 @@ addDefaultStatus :: (Task c) -> ([ContactNo] [IncidentNo] -> Task (c,
//Shared catalog of predefined action items
actionCatalog
::
SDSLens
()
[
CatalogAction
]
()
builtinActionCatalog
::
SDSSource
()
[
CatalogAction
]
()
userActionCatalog
::
SDSLens
()
[
UserCatalogAction
]
[
UserCatalogAction
]
userActionCatalog
::
S
impleS
DSLens
[
UserCatalogAction
]
//Shares providing filtered views on iTasks task instances.
//They select only those detached tasks that are tagged to be action items
...
...
@@ -175,12 +175,12 @@ numActionsByContact :: SDSLens ContactNo Int ()
todoItemTask
::
()
(
Shared
sds
ActionStatus
)
->
Task
()
|
RWShared
sds
blankTodoItem
::
CatalogAction
predefinedTodoItem
::
String
ItemMeta
->
CatalogAction
predefinedInstantItem
::
String
ItemMeta
ActionProgress
((
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
predefinedConfigurableItem
::
String
ItemMeta
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
c
(
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
iTask
c
predefinedInstantItem
::
String
ItemMeta
ActionProgress
((
S
impleSDSLen
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
predefinedConfigurableItem
::
String
ItemMeta
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
c
(
S
impleSDSLen
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
iTask
c
//Contact or incident
predefinedIncidentItem
::
String
ItemMeta
(
IncidentNo
(
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
predefinedContactItem
::
String
ItemMeta
(
Maybe
String
)
(
ContactNo
(
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
predefinedIncidentItem
::
String
ItemMeta
(
IncidentNo
(
S
impleSDSLen
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
predefinedContactItem
::
String
ItemMeta
(
Maybe
String
)
(
ContactNo
(
S
impleSDSLen
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
//Action lists items
listItemTask
::
(
String
,
ActionPlan
)
(
Shared
sds
ActionStatus
)
->
Task
()
|
RWShared
sds
...
...
Examples/Applications/Incidone/Incidone/ActionManagementTasks.icl
View file @
a759534d
...
...
@@ -100,7 +100,7 @@ fromSelfActionStatus status (_,items) = case [i \\ i=:{TaskListItem|taskId,self}
[{
TaskListItem
|
taskId
,
attributes
}:_]
=
Ok
(
Just
[(
taskId
,
fromActionStatus
status
attributes
)])
_
=
Error
(
exception
"Task id not found in self management share"
)
selfActionStatus
::
(
SharedTaskList
a
)
->
S
DSLens
()
ActionStatu
s
ActionStatus
|
iTask
a
selfActionStatus
::
(
SharedTaskList
a
)
->
S
impleSDSLen
s
ActionStatus
|
iTask
a
selfActionStatus
list
=
sdsFocus
taskListFilter
(
mapReadWriteError
(
toSelfActionStatus
,
fromSelfActionStatus
)
Nothing
list
)
where
taskListFilter
=
{
TaskListFilter
|
onlyIndex
=
Nothing
,
onlyTaskId
=
Nothing
,
onlySelf
=
False
...
...
@@ -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
((
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
predefinedInstantItem
::
String
ItemMeta
ActionProgress
((
S
impleSDSLen
s
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
(
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
&
iTask
c
predefinedConfigurableItem
::
String
ItemMeta
([
ContactNo
]
[
IncidentNo
]
->
Task
(
c
,
ActionStatus
))
(
c
(
S
impleSDSLen
s
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
(
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
predefinedIncidentItem
::
String
ItemMeta
(
IncidentNo
(
S
impleSDSLen
s
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
(
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
predefinedContactItem
::
String
ItemMeta
(
Maybe
String
)
(
ContactNo
(
S
impleSDSLen
s
ActionStatus
)
->
Task
a
)
->
CatalogAction
|
iTask
a
predefinedContactItem
identity
meta
mbGroup
contactTask
=
toContactAction
mbGroup
{
ActionDefinition
|
identity
=
identity
,
meta
=
meta
,
task
=
task
}
where
...
...
@@ -261,7 +261,7 @@ builtinActionCatalog = constShare
:
crewListActions
]
userActionCatalog
::
SDSLens
()
[
UserCatalogAction
]
[
UserCatalogAction
]
userActionCatalog
::
S
impleS
DSLens
[
UserCatalogAction
]
userActionCatalog
=
sharedStore
"UserActionCatalog"
[]
//Todo items
...
...
@@ -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
)
((
S
DSLens
()
ActionStatu
s
ActionStatus
)
->
Task
())
->
Task
TaskId
|
iTask
a
addAction
::
String
ActionStatus
(
SharedTaskList
a
)
((
S
impleSDSLen
s
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/Configuration.dcl
View file @
a759534d
...
...
@@ -34,15 +34,15 @@ from iTasks.Extensions.Web import :: URL
derive
class
iTask
DBConfig
,
AISConfig
,
AsteriskConfig
,
SMTPConfig
,
WebLinksConfig
,
WebLink
//Master configuration shares
databaseConfig
::
SDSLens
()
DBConfig
DBConfig
aisLinkConfig
::
SDSLens
()
AISConfig
AISConfig
asteriskLinkConfig
::
SDSLens
()
AsteriskConfig
AsteriskConfig
smtpConfig
::
SDSLens
()
SMTPConfig
SMTPConfig
webLinksConfig
::
SDSLens
()
WebLinksConfig
WebLinksConfig
adminPassword
::
SDSLens
()
Password
Password
databaseConfig
::
S
impleS
DSLens
DBConfig
aisLinkConfig
::
SimpleSDSLens
AISConfig
asteriskLinkConfig
::
SimpleSDSLens
AsteriskConfig
smtpConfig
::
SimpleSDSLens
SMTPConfig
webLinksConfig
::
SimpleSDSLens
WebLinksConfig
adminPassword
::
SimpleSDSLens
Password
//Derived configuration shares
databaseDef
::
SDSLens
()
SQLDatabaseDef
SQLDatabaseDef
databaseDef
::
S
impleS
DSLens
SQLDatabaseDef
//Conversion functions
toDatabaseDef
::
DBConfig
->
SQLDatabaseDef
...
...
Examples/Applications/Incidone/Incidone/Configuration.icl
View file @
a759534d
...
...
@@ -4,26 +4,26 @@ import iTasks, iTasks.Extensions.SQLDatabase, iTasks.Extensions.Web
derive
class
iTask
DBConfig
,
AISConfig
,
AsteriskConfig
,
SMTPConfig
,
WebLinksConfig
,
WebLink
//Shared stores
databaseConfig
::
SDSLens
()
DBConfig
DBConfig
databaseConfig
::
S
impleS
DSLens
DBConfig
databaseConfig
=
sharedStore
"databaseConfig"
InternalSQLiteDB
aisLinkConfig
::
SDSLens
()
AISConfig
AISConfig
aisLinkConfig
::
S
impleS
DSLens
AISConfig
aisLinkConfig
=
sharedStore
"aisLinkConfig"
{
AISConfig
|
host
=
"localhost"
,
port
=
2000
}
asteriskLinkConfig
::
SDSLens
()
AsteriskConfig
AsteriskConfig
asteriskLinkConfig
::
S
impleS
DSLens
AsteriskConfig
asteriskLinkConfig
=
sharedStore
"asteriskLinkConfig"
{
AsteriskConfig
|
host
=
"localhost"
,
port
=
5038
,
username
=
"admin"
,
password
=
"secret"
}
smtpConfig
::
SDSLens
()
SMTPConfig
SMTPConfig
smtpConfig
::
S
impleS
DSLens
SMTPConfig
smtpConfig
=
sharedStore
"smtpConfig"
{
SMTPConfig
|
host
=
"localhost"
,
port
=
25
}
webLinksConfig
::
SDSLens
()
WebLinksConfig
WebLinksConfig
webLinksConfig
::
S
impleS
DSLens
WebLinksConfig
webLinksConfig
=
sharedStore
"webLinksConfig"
{
WebLinksConfig
|
weatherWidgets
=
Nothing
,
vesselLinks
=[]}
adminPassword
::
SDSLens
()
Password
Password
adminPassword
::
S
impleS
DSLens
Password
adminPassword
=
sharedStore
"adminPassword"
(
Password
"admin"
)
//Derived configuration shares
databaseDef
::
SDSLens
()
SQLDatabaseDef
SQLDatabaseDef
databaseDef
::
S
impleS
DSLens
SQLDatabaseDef
databaseDef
=
mapReadWrite
(
toDatabaseDef
,\_
r
->
Nothing
)
Nothing
(
toReadOnly
databaseConfig
)
//Conversion functions
...
...
Examples/Applications/Incidone/Incidone/ContactPosition.dcl
View file @
a759534d
...
...
@@ -74,8 +74,8 @@ fromLeafletPerspective :: LeafletPerspective -> ContactMapPerspective
selectionFromLeafletMap
::
LeafletMap
->
[
LeafletObjectID
]
//Standard layers available to use in all map views
standardPerspective
::
SDSLens
()
ContactMapPerspective
ContactMapPerspective
standardMapLayers
::
SDSLens
()
[
ContactMapLayer
]
[
ContactMapLayer
]
standardPerspective
::
S
impleS
DSLens
ContactMapPerspective
standardMapLayers
::
S
impleS
DSLens
[
ContactMapLayer
]
derive
JSONEncode
ContactPosition
,
ContactMapPerspective
derive
JSONDecode
ContactPosition
,
ContactMapPerspective
...
...
Examples/Applications/Incidone/Incidone/ContactPosition.icl
View file @
a759534d
...
...
@@ -225,9 +225,9 @@ fromLeafletLatLng {LeafletLatLng|lat,lng} = (lat,lng)
fromLeafletBounds
::
!
LeafletBounds
->
(!(!
Real
,!
Real
),!(!
Real
,!
Real
))
fromLeafletBounds
{
LeafletBounds
|
southWest
,
northEast
}
=
(
fromLeafletLatLng
southWest
,
fromLeafletLatLng
northEast
)
standardPerspective
::
SDSLens
()
ContactMapPerspective
ContactMapPerspective
standardPerspective
::
S
impleS
DSLens
ContactMapPerspective
standardPerspective
=
sharedStore
"standardPerspective"
defaultValue
standardMapLayers
::
SDSLens
()
[
ContactMapLayer
]
[
ContactMapLayer
]
standardMapLayers
::
S
impleS
DSLens
[
ContactMapLayer
]
standardMapLayers
=
sharedStore
"standardMapLayers"
[{
ContactMapLayer
|
title
=
"Local OSM tiles"
,
def
=
CMTileLayer
"/tiles/{z}/{x}/{y}.png"
}]
Examples/Applications/Incidone/Incidone/DeviceBased/VideoWall.dcl
View file @
a759534d
...
...
@@ -14,7 +14,7 @@ import Incidone.OP.Concepts
derive
class
iTask
WallContent
//Current content of the video wall
wallContent
::
SDSLens
()
WallContent
WallContent
wallContent
::
S
impleS
DSLens
WallContent
//View content that was selected for viewing on the video wall
viewVideoWallContent
::
Task
WallContent
Examples/Applications/Incidone/Incidone/DeviceBased/VideoWall.icl
View file @
a759534d
...
...
@@ -7,7 +7,7 @@ import Text, Text.HTML, Data.List, iTasks.Internal.HtmlUtil
derive
class
iTask
WallContent
wallContent
::
SDSLens
()
WallContent
WallContent
wallContent
::
S
impleS
DSLens
WallContent
wallContent
=
sharedStore
"WallContent"
(
WallOverview
defaultValue
)
viewVideoWallContent
::
Task
WallContent
...
...
Examples/Applications/Incidone/Incidone/OP/ContactManagementTasks.icl
View file @
a759534d
...
...
@@ -44,7 +44,7 @@ where
fromOpenOption
[{
ContactShortWithIncidents
|
contactNo
}]
=
contactNo
selIds
::
(
Shared
sds
(
Maybe
(
Either
ContactNo
MMSI
)))
->
SDSLens
()
[
Int
]
[
Int
]
|
RWShared
sds
selIds
::
(
Shared
sds
(
Maybe
(
Either
ContactNo
MMSI
)))
->
S
impleS
DSLens
[
Int
]
|
RWShared
sds
selIds
sel
=
mapReadWrite
(
toPrj
,
fromPrj
)
(
Just
\
p
w
.
Ok
(
toPrj
w
))
sel
where
toPrj
Nothing
=
[]
...
...
Examples/Applications/Incidone/Incidone/OP/SDSs.dcl
View file @
a759534d
...
...
@@ -11,8 +11,8 @@ import Incidone.OP.Concepts
}
derive
class
iTask
ContactFilter
allContactPhotos
::
SDSLens
()
(
Map
ContactNo
[
ContactPhoto
])
(
Map
ContactNo
[
ContactPhoto
])
lastAISImport
::
SDSLens
()
(
Maybe
(
DateTime
,
String
,
Int
))
(
Maybe
(
DateTime
,
String
,
Int
))
allContactPhotos
::
S
impleS
DSLens
(
Map
ContactNo
[
ContactPhoto
])
lastAISImport
::
S
impleS
DSLens
(
Maybe
(
DateTime
,
String
,
Int
))
allCommunications
::
SDSLens
()
[
CommunicationDetails
]
()
allIncidents
::
SDSLens
()
[
Incident
]
()
...
...
Examples/Applications/Incidone/Incidone/OP/SDSs.icl
View file @
a759534d
...
...
@@ -21,10 +21,10 @@ dbLinkSDS notifyId table col1 col2 = databaseDef >++> sqlLinkSDS notifyId table
//ACCESS SDS
//TODO: Also store in database
allContactPhotos
::
SDSLens
()
(
Map
ContactNo
[
ContactPhoto
])
(
Map
ContactNo
[
ContactPhoto
])
allContactPhotos
::
Simple
SDSLens
(
Map
ContactNo
[
ContactPhoto
])
allContactPhotos
=
sharedStore
"ContactPhotos"
'
DM
'.
newMap
lastAISImport
::
SDSLens
()
(
Maybe
(
DateTime
,
String
,
Int
))
(
Maybe
(
DateTime
,
String
,
Int
))
lastAISImport
::
S
impleS
DSLens
(
Maybe
(
DateTime
,
String
,
Int
))
lastAISImport
=
sharedStore
"lastAISImport"
Nothing
allCommunications
::
SDSLens
()
[
CommunicationDetails
]
()
...
...
Examples/Applications/Incidone/Incidone/Util/Notification.icl
View file @
a759534d
...
...
@@ -5,7 +5,7 @@ import Text, System.Time
import
Incidone
.
Util
.
TaskPatterns
//Notifications are stored newest first
notifications
::
SDSLens
()
[(
DateTime
,
String
)]
[(
DateTime
,
String
)]
notifications
::
Simple
SDSLens
[(
DateTime
,
String
)]
notifications
=
sharedStore
"notifications"
[]
//Only show notifications added in the last 5 seconds
...
...
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Editor.dcl
View file @
a759534d
...
...
@@ -5,4 +5,4 @@ import C2.Framework.MapEnvironment
import
C2
.
Apps
.
ShipAdventure
.
Types
shipEditorTabs
::
Task
()
sharedMapAction
::
SDSLens
()
(
MapAction
SectionStatus
)
(
MapAction
SectionStatus
)
sharedMapAction
::
S
impleS
DSLens
(
MapAction
SectionStatus
)
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Editor.icl
View file @
a759534d
...
...
@@ -103,7 +103,7 @@ mapTitleFontSize =: 10.0
********************************************************************************************************************/
viewLayout
=
updateMapStatus
EditMode
@!
()
sharedMapAction
::
SDSLens
()
(
MapAction
SectionStatus
)
(
MapAction
SectionStatus
)
sharedMapAction
::
S
impleS
DSLens
(
MapAction
SectionStatus
)
sharedMapAction
=
sharedStore
"sharedMapAction"
(
FocusOnMap
0
)
// start at the top-level (all maps)
sharedEditShip
::
SDSParallel
()
(
Maps2D
,
MapAction
SectionStatus
)
(
Maps2D
,
MapAction
SectionStatus
)
...
...
@@ -172,7 +172,7 @@ derive class iTask EditDeviceType, EditDevice
manageCables
::
Task
()
manageCables
=
intMapCrudWith
"Cables"
[
ChooseFromGrid
id
]
[]
[]
[]
(\
cable
->
cable
.
Cable
.
cableId
)
myCables
@!
()
intMapCrud
::
!
String
!(
r
->
Int
)
!(
SDSLens
()
(
IntMap
r
)
(
IntMap
r
))
->
Task
r
|
iTask
r
intMapCrud
::
!
String
!(
r
->
Int
)
!(
S
impleS
DSLens
(
IntMap
r
))
->
Task
r
|
iTask
r
intMapCrud
descr
mkId
share
=
crud
descr
'
DIS
'.
elems
(
putItem
mkId
)
(
delItem
mkId
)
share
where
putItem
::
!(
r
->
Int
)
!
r
!(
IntMap
r
)
->
IntMap
r
...
...
@@ -180,7 +180,7 @@ intMapCrud descr mkId share = crud descr 'DIS'.elems (putItem mkId) (delItem mkI
delItem
::
!(
r
->
Int
)
!
r
!(
IntMap
r
)
->
IntMap
r
delItem
mkId
item
allItems
=
'
DIS
'.
del
(
mkId
item
)
allItems
intMapCrudWith
::
!
String
![
ChoiceOption
r
]
[
EnterOption
r
]
[
ViewOption
r
]
[
UpdateOption
r
r
]
!(
r
->
Int
)
!(
SDSLens
()
(
IntMap
r
)
(
IntMap
r
))
->
Task
r
|
iTask
r
intMapCrudWith
::
!
String
![
ChoiceOption
r
]
[
EnterOption
r
]
[
ViewOption
r
]
[
UpdateOption
r
r
]
!(
r
->
Int
)
!(
S
impleS
DSLens
(
IntMap
r
))
->
Task
r
|
iTask
r
intMapCrudWith
descr
cos
eos
vos
uos
mkId
share
=
crudWith
descr
cos
eos
vos
uos
'
DIS
'.
elems
(
putItem
mkId
)
(
delItem
mkId
)
share
where
putItem
::
!(
r
->
Int
)
!
r
!(
IntMap
r
)
->
IntMap
r
...
...
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Scripting.dcl
View file @
a759534d
...
...
@@ -25,9 +25,9 @@ import C2.Apps.ShipAdventure.Types
derive
class
iTask
Target
,
Script
,
Condition
handleFireScript
::
SDSLens
()
[
Script
]
[
Script
]
handleFloodScript
::
SDSLens
()
[
Script
]
[
Script
]
handleSmokeScript
::
SDSLens
()
[
Script
]
[
Script
]
handleFireScript
::
S
impleS
DSLens
[
Script
]
handleFloodScript
::
S
impleS
DSLens
[
Script
]
handleSmokeScript
::
S
impleS
DSLens
[
Script
]
changeFireScript
::
Task
()
changeFloodScript
::
Task
()
...
...
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Scripting.icl
View file @
a759534d
...
...
@@ -12,13 +12,13 @@ import qualified Data.Map as DM
derive
class
iTask
Target
,
Script
,
Condition
handleFireScript
::
SDSLens
()
[
Script
]
[
Script
]
handleFireScript
::
S
impleS
DSLens
[
Script
]
handleFireScript
=
sharedStore
"handleFireScript"
[]
handleFloodScript
::
SDSLens
()
[
Script
]
[
Script
]
handleFloodScript
::
S
impleS
DSLens
[
Script
]
handleFloodScript
=
sharedStore
"handleFloodScript"
[]
handleSmokeScript
::
SDSLens
()
[
Script
]
[
Script
]
handleSmokeScript
::
S
impleS
DSLens
[
Script
]
handleSmokeScript
=
sharedStore
"handleSmokeScript"
[]
changeFireScript
::
Task
()
...
...
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Types.dcl
View file @
a759534d
...
...
@@ -149,14 +149,14 @@ instance toString Device
// shared stores:
myUserActorMap
::
UserActorShare
ObjectType
ActorStatus
myStatusMap
::
SDSLens
()
MySectionStatusMap
MySectionStatusMap
myInventoryMap
::
SDSLens
()
MySectionInventoryMap
MySectionInventoryMap
myNetwork
::
SDSLens
()
Network
Network
myCables
::
SDSLens
()
(
IntMap
Cable
)
(
IntMap
Cable
)
myDevices
::
SDSLens
()
(
IntMap
Device
)
(
IntMap
Device
)
commandAims
::
SDSLens
()
[
CommandAim
]
[
CommandAim
]
capabilityMap
::
SDSLens
()
CapabilityToDeviceKindMap
CapabilityToDeviceKindMap
disabledSections
::
SDSLens
()
(
Set
Coord3D
)
(
Set
Coord3D
)
myStatusMap
::
S
impleS
DSLens
MySectionStatusMap
myInventoryMap
::
S
impleS
DSLens
MySectionInventoryMap
myNetwork
::
S
impleS
DSLens
Network
myCables
::
S
impleS
DSLens
(
IntMap
Cable
)
myDevices
::
S
impleS
DSLens
(
IntMap
Device
)
commandAims
::
S
impleS
DSLens
[
CommandAim
]
capabilityMap
::
S
impleS
DSLens
CapabilityToDeviceKindMap
disabledSections
::
S
impleS
DSLens
(
Set
Coord3D
)
deviceKindsForCapability
::
SDSLens
Capability
CapabilityExpr
CapabilityExpr
statusInSectionShare
::
SDSLens
Coord3D
SectionStatus
SectionStatus
...
...
Examples/Applications/ShipAdventure/C2/Apps/ShipAdventure/Types.icl
View file @
a759534d
...
...
@@ -92,7 +92,7 @@ instance == Capability where
myUserActorMap
::
UserActorShare
ObjectType
ActorStatus
myUserActorMap
=
sharedStore
"myUserActorMap"
'
DM
'.
newMap
myStatusMap
::
SDSLens
()
MySectionStatusMap
MySectionStatusMap
myStatusMap
::
S
impleS
DSLens
MySectionStatusMap
myStatusMap
=
sharedStore
"myStatusMap"
'
DM
'.
newMap
statusInSectionShare
::
SDSLens
Coord3D
SectionStatus
SectionStatus
...
...
@@ -102,7 +102,7 @@ deviceKindsForCapability :: SDSLens Capability CapabilityExpr CapabilityExpr
deviceKindsForCapability
=
mapLens
"deviceKindsForCapability"
capabilityMap
Nothing
myInventoryMap
::
SDSLens
()
MySectionInventoryMap
MySectionInventoryMap
myInventoryMap
::
S
impleS
DSLens
MySectionInventoryMap
myInventoryMap
=
sharedStore
"myInventoryMap"
'
DM
'.
newMap
viewDisabledDevices
::
Task
()
...
...
@@ -311,7 +311,7 @@ devicesInSectionShare
write2
::
Coord3D
!(
IntMap
Device
)
![
Device
]
->
MaybeError
TaskException
(
Maybe
(
IntMap
Device
))
write2
_
deviceMap
devices
=
Ok
(
Just
(
foldr
(\
device
deviceMap
->
'
DIS
'.
put
device
.
Device
.
deviceId
device
deviceMap
)
deviceMap
devices
))
myDevices
::
SDSLens
()
(
IntMap
Device
)
(
IntMap
Device
)
myDevices
::
S
impleS
DSLens
(
IntMap
Device
)
myDevices
=
sharedStore
"myDevices"
devices
where
devices
=
'
DIS
'.
fromList
[
f
dt
...
...
@@ -320,10 +320,10 @@ myDevices = sharedStore "myDevices" devices
f
::
!
Device
->
(!
DeviceId
,
!
Device
)
f
dev
=
(
dev
.
Device
.
deviceId
,
dev
)
commandAims
::
SDSLens
()
[
CommandAim
]
[
CommandAim
]
commandAims
::
S
impleS
DSLens
[
CommandAim
]
commandAims
=
sharedStore
"commandAims"
[]
capabilityMap
::
SDSLens
()
CapabilityToDeviceKindMap
CapabilityToDeviceKindMap
capabilityMap
::
S
impleS
DSLens
CapabilityToDeviceKindMap
capabilityMap
=
sharedStore
"capabilityMap"
('
DM
'.
fromList
defaultList
)
where
defaultList
...
...
@@ -343,7 +343,7 @@ instance * CapabilityExpr where
cap
::
DeviceKind
->
CapabilityExpr
cap
k
=
DeviceExpr
k
myNetwork
::
SDSLens
()
Network
Network
myNetwork
::
S
impleS
DSLens
Network
myNetwork
=
sharedStore
"myNetwork"
{
Network
|
devices
=
'
DM
'.
newMap
...
...
@@ -351,7 +351,7 @@ myNetwork = sharedStore "myNetwork"
,
cableMapping
=
'
DIS
'.
newMap
}
myCables
::
SDSLens
()
(
IntMap
Cable
)
(
IntMap
Cable
)
myCables
::
S
impleS
DSLens
(
IntMap
Cable
)
myCables
=
sdsProject
(
SDSLensRead
read
)
(
SDSLensWrite
write
)
Nothing
myNetwork
where
read
::
!
Network
->
MaybeError
TaskException
(
IntMap
Cable
)
...
...
@@ -440,7 +440,7 @@ where
,
updModel
=
\((((((((((
disSects
,
_),
exitLocks
),
hopLocks
),
inventoryMap
),
statusMap
),
sectionUsersMap
),
userActorMap
),
network
),
allDevices
),
_)
(
ms2d`
,
cl`
)
->
((((((((((
disSects
,
ms2d`
),
exitLocks
),
hopLocks
),
inventoryMap
),
statusMap
),
sectionUsersMap
),
userActorMap
),
network
),
allDevices
),
cl`
)
}
disabledSections
::
SDSLens
()
(
Set
Coord3D
)
(
Set
Coord3D
)
disabledSections
::
S
impleS
DSLens
(
Set
Coord3D
)
disabledSections
=
sharedStore
"disabledSections"
'
DS
'.
newSet
updateSectionStatus
::
!
Coord3D
->
Task
(
MapAction
SectionStatus
)
...
...
Examples/Applications/ShipAdventure/C2/Framework/Common.dcl
View file @
a759534d
...
...
@@ -16,9 +16,9 @@ from C2.Framework.ContactPosition import :: ContactMapPerspective
derive
class
iTask
MapState
mapState
::
SDSLens
()
MapState
MapState
mapState
::
S
impleS
DSLens
MapState
entityMap
::
SDSLens
()
EntityMap
EntityMap
entityMap
::
S
impleS
DSLens
EntityMap
registerEntity
::
(
Int
->
Entity
)
->
Task
Entity
...
...
@@ -34,4 +34,4 @@ periodicallyUpdateEntity :: !Int -> Task ()
mapView
::
(
sds
()
r
w
)
(
r
->
Bool
)
User
[
Entity
]
->
Task
()
|
iTask
r
&
iTask
w
&
RWShared
sds
userMapState
::
User
->
SDSLens
()
MapState
MapState
userMapState
::
User
->
Simple
SDSLens
MapState
Examples/Applications/ShipAdventure/C2/Framework/Common.icl
View file @
a759534d
...
...
@@ -23,7 +23,7 @@ defSettings =
,
selection
=
-1
}
mapState
::
SDSLens
()
MapState
MapState
mapState
::
S
impleS
DSLens
MapState
mapState
=
sharedStore
"mapState"
defSettings
selectedContactShare
::
SDSLens
()
(
Maybe
Entity
)
Entity
...
...
@@ -38,10 +38,10 @@ selectedContactShare = sdsLens "selectedContactShare" (const ()) (SDSRead read)
notify
::
()
MapState
Entity
->
SDSNotifyPred
()
notify
_
_
_
=
\_
_
->
False
userMapState
::
User
->
SDSLens
()
MapState
MapState
userMapState
::
User
->
S
impleS
DSLens
MapState
userMapState
u
=
sharedStore
(
"userMapState"
+++
toString
u
)
defSettings
entityMap
::
SDSLens
()
EntityMap
EntityMap
entityMap
::
S
impleS
DSLens
EntityMap
entityMap
=
sharedStore
"entityMap"
'
DIS
'.
newMap
registerEntity
::
(
Int
->
Entity
)
->
Task
Entity
...
...
Examples/Applications/ShipAdventure/C2/Framework/Core.icl
View file @
a759534d
...
...
@@ -132,7 +132,7 @@ makeWorkspaceTab :: String (Workspace -> Task a) Workspace -> Task () | iTask a
makeWorkspaceTab
title
t
ws
=
t
ws
<<@
(
Title
title
)
@!
()
//Notifications are stored newest first
notifications
::
SDSLens
()
[(
DateTime
,
String
)]
[(
DateTime
,
String
)]
notifications
::
S
impleS
DSLens
[(
DateTime
,
String
)]
notifications
=
sharedStore
"notifications"
[]
//Only show notifications added in the last 5 seconds
...
...
Examples/Applications/ShipAdventure/C2/Framework/Logging.dcl
View file @
a759534d
...
...
@@ -12,7 +12,7 @@ derive class iTask Log
// shared store for logging events
myLog
::
SDSLens
()
[
Log
]
[
Log
]
myLog
::
S
impleS
DSLens
[
Log
]
// tasks for logging:
...
...
Examples/Applications/ShipAdventure/C2/Framework/Logging.icl
View file @
a759534d
...
...
@@ -4,7 +4,7 @@ import iTasks
derive
class
iTask
Log
myLog
::
SDSLens
()
[
Log
]
[
Log
]
// logging events
myLog
::
S
impleS
DSLens
[
Log
]
// logging events
myLog
=
sharedStore
"myLog"
[]
addLog
::
!
a
!
b
!
c
->
Task
()
|
toString
a
&
toString
b
&
toString
c
...
...
Examples/Applications/ShipAdventure/C2/Framework/MapEnvironment.dcl
View file @
a759534d
...
...
@@ -80,7 +80,7 @@ instance == Border
}
::
UserActorMap
objType
actorStatus
:==
Map
User
(
Actor
objType
actorStatus
)
::
UserActorShare
objType
actorStatus
:==
SDSLens
()
(
UserActorMap
objType
actorStatus
)
(
UserActorMap
objType
actorStatus
)
::
UserActorShare
objType
actorStatus
:==
S
impleS
DSLens
(
UserActorMap
objType
actorStatus
)
::
FocusedUserActorShare
objType
actorStatus
:==
SDSLens
User
(
Maybe
(
Actor
objType
actorStatus
))
(
Actor
objType
actorStatus
)
::
SectionStatusMap
roomStatus
:==
Map
Coord3D
roomStatus
// [Coord3D |-> roomStatus]
...
...
@@ -90,19 +90,19 @@ instance == Border
::
SectionHopLockMap
:==
Map
Coord3D
[
Coord3D
]
::
SectionStatusShare
roomStatus
:==
SDSLens
()
(
SectionStatusMap
roomStatus
)
(
SectionStatusMap
roomStatus
)
// [Coord3D |-> roomStatus]
::
SectionInventoryShare
objType
:==
SDSLens
()
(
SectionInventoryMap
objType
)
(
SectionInventoryMap
objType
)
// [Coord3D |-> [ObjId |-> Object]]
::
SectionUsersShare
:==
SDSLens
()
SectionUsersMap
SectionUsersMap
::
SectionStatusShare
roomStatus
:==
S
impleS
DSLens
(
SectionStatusMap
roomStatus
)
// [Coord3D |-> roomStatus]
::
SectionInventoryShare
objType
:==
S
impleS
DSLens
(
SectionInventoryMap
objType
)
// [Coord3D |-> [ObjId |-> Object]]
::
SectionUsersShare
:==
S
impleS
DSLens
SectionUsersMap
::
FocusedSectionStatusShare
roomStatus
:==
SDSLens
Coord3D
roomStatus
roomStatus
// [Coord3D |-> roomStatus]
::
FocusedSectionInventoryShare
objType
:==
SDSLens
Coord3D
(
IntMap
(
Object
objType
))
(
IntMap
(
Object
objType
))
// [Coord3D |-> [ObjId |-> Object]]
::
FocusedSectionUsersShare
:==
SDSLens
Coord3D
[
User
]
[
User
]
::
DrawMapForActor
r
o
a
:==
User
(
SDSLens
()
(
SectionStatusMap
r
)
(
SectionStatusMap
r
))
(
UserActorShare
o
a
)
(
SDSLens
()
(
SectionInventoryMap
o
)
(
SectionInventoryMap
o
))
->
Task
()
::
DrawMapForActor
r
o
a
:==
User
(
S
impleS
DSLens
(
SectionStatusMap
r
))
(
UserActorShare
o
a
)
(
S
impleS
DSLens
(
SectionInventoryMap
o
))
->
Task
()
instance
==
(
Actor
o
a
)
instance
==
(
Object
obj
)
|
==
obj
maps2DShare
::
SDSLens
()
Maps2D
Maps2D
maps2DShare
::
S
impleS
DSLens
Maps2D
sharedGraph
::
SDSLens
()