Skip to content
Snippets Groups Projects
Commit a9d4f4c9 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

add 2 indactors in doc

parent cf6753b1
No related branches found
No related tags found
No related merge requests found
Pipeline #14228 failed
...@@ -28,16 +28,18 @@ During the use of the application we stored some events link to an user action. ...@@ -28,16 +28,18 @@ During the use of the application we stored some events link to an user action.
| Consumption | ConsumptionChangeTimeStepEvent | TimeStep | | Fluid | User changes timeStep of its consumption. | | Consumption | ConsumptionChangeTimeStepEvent | TimeStep | | Fluid | User changes timeStep of its consumption. |
| Consumption | ConsumptionInteracteEvent | | | Fluid / TimeStep | User selects a consumption on the chart. | | Consumption | ConsumptionInteracteEvent | | | Fluid / TimeStep | User selects a consumption on the chart. |
All events are stored with the *aggregated* flag to false to allow the identification of new events. All events are stored with the _aggregated_ flag to false to allow the identification of new events.
## Usage events aggregator service ## Usage events aggregator service
## Functionnalities ## Functionnalities
The service will retrieve all new events by filter on the *aggregated* flag to **false** and the event date before than today. The service will retrieve all new events by filter on the _aggregated_ flag to **false** and the event date before than today.
For each aggregator type we will defined the right calculation to apply to create the appropriate indicator: For each aggregator type we will defined the right calculation to apply to create the appropriate indicator:
- calculation of the session time indicator based on ConnectionEvent - calculation of the session time indicator based on ConnectionEvent
- calculation of the konnectors connected per day based on the fluidStatus
- calculates if a user launched a duel just after earned 15 stars
- calculation of the period between 2 different challenges based on the ChallengeLaunchEvent - calculation of the period between 2 different challenges based on the ChallengeLaunchEvent
- calculation of the period between the first connection and the first challenge based on ChallengeLaunchEvent and ConnectionEvent - calculation of the period between the first connection and the first challenge based on ChallengeLaunchEvent and ConnectionEvent
- calculation of an indicator based on a single event - calculation of an indicator based on a single event
...@@ -48,7 +50,7 @@ Once the indicators is calculated we will: ...@@ -48,7 +50,7 @@ Once the indicators is calculated we will:
1. post the indicator to the remote doctype 1. post the indicator to the remote doctype
2. push the event used to calculate the indicator to a array, which will be used to identify all events taken into account during the process. 2. push the event used to calculate the indicator to a array, which will be used to identify all events taken into account during the process.
At the end of the service, the service will change the *aggregated* flag to **true** for all events present in the array. At the end of the service, the service will change the _aggregated_ flag to **true** for all events present in the array.
More technical information are available [here](/ecolyo/services/aggregator_usage_events.md) More technical information are available [here](/ecolyo/services/aggregator_usage_events.md)
...@@ -56,6 +58,7 @@ More technical information are available [here](/ecolyo/services/aggregator_usag ...@@ -56,6 +58,7 @@ More technical information are available [here](/ecolyo/services/aggregator_usag
All indicator are post to a remote doctype, which will allow the application to read a defined external API. This doctype is created by Cozy itself. All indicator are post to a remote doctype, which will allow the application to read a defined external API. This doctype is created by Cozy itself.
Here are the actual structure of this remote doctype: Here are the actual structure of this remote doctype:
``` ```
{ {
source: string source: string
...@@ -66,6 +69,7 @@ Here are the actual structure of this remote doctype: ...@@ -66,6 +69,7 @@ Here are the actual structure of this remote doctype:
groups: { [key: string]: string } groups: { [key: string]: string }
} }
``` ```
with: with:
- source: contains "ecolyo" value. - source: contains "ecolyo" value.
...@@ -73,4 +77,3 @@ with: ...@@ -73,4 +77,3 @@ with:
- startDate and endDate: used to defined a period or if not relevant, it contains both the date of the events. - startDate and endDate: used to defined a period or if not relevant, it contains both the date of the events.
- value: contains aggreated value (example: number of page viewed on a day). - value: contains aggreated value (example: number of page viewed on a day).
- groups: contains all other attribute useful for the indicator (example: context, target, result) - groups: contains all other attribute useful for the indicator (example: context, target, result)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment