Widget type - Latest observations, most active users and latest photo
AC
-
Widget type LatestObservations is implemented: -
This widget shows last 10 observations and contains following info (observations grouped by inspection): - transectId
- transectCode
- species
- developmentalStage
-
Values for this widget are calculated from the data subset to which the current user has permissions to see. -
dataSeries JSON format:
-
{"transectId": 123, "transectCode": "Transect A", "species": "Species X", "developmenalStage": "pupa"},
{"transectId": 567, "transectCode": "Transect B", "species": "Species Y", "developmenalStage": "egg"},
-
Widget type TopUsers is implemented: -
This widget shows 10 most active users (with most created inspections) and contains following info: - usernames of most active users since the beginning of the year (user with highest counts of created inspections)
- count inspections
-
Values for this widget are calculated from the data subset to which the current user has permissions to see. -
dataSeries JSON format:
-
{"username": "user 1", "inspections": 10},
{"username": "user 2", "inspections": 15},
-
Widget type LatestPhoto is implemented: -
This widget shows last uploaded image and contains following info (observations grouped by inspection): - imageRefId
- presigned url to access image in bucket
- observationId
-
Values for this widget are calculated from the data subset to which the current user has permissions to see. -
dataSeries JSON format:
-
{"imageRefId": 123, "url": "presigned url in bucket", "observationId": 567}
-
Validation - one user cannot create a widget of type that he already has, except for Diagram type, where multiple widgets are allowed -
Tests
Review
-
Widget type LatestObservations is implemented: -
This widget shows last 10 observations and contains following info (observations grouped by inspection): - transectId
- transectCode
- species
- developmentalStage
-
Values for this widget are calculated from the data subset to which the current user has permissions to see. -
dataSeries JSON format:
-
{"transectId": 123, "transectCode": "Transect A", "species": "Species X", "developmenalStage": "pupa"},
{"transectId": 567, "transectCode": "Transect B", "species": "Species Y", "developmenalStage": "egg"},
-
Widget type TopUsers is implemented: -
This widget shows 10 most active users (with most created inspections) and contains following info: - usernames of most active users since the beginning of the year (user with highest counts of created inspections)
- count inspections
-
Values for this widget are calculated from the data subset to which the current user has permissions to see. -
dataSeries JSON format:
-
{"username": "user 1", "inspections": 10},
{"username": "user 2", "inspections": 15},
-
Widget type LatestPhoto is implemented: -
This widget shows last uploaded image and contains following info (observations grouped by inspection): - imageRefId
- presigned url to access image in bucket
- observationId
-
Values for this widget are calculated from the data subset to which the current user has permissions to see. -
dataSeries JSON format:
-
{"imageRefId": 123, "url": "presigned url in bucket", "observationId": 567}
-
Validation - one user cannot create a widget of type that he already has, except for Diagram type, where multiple widgets are allowed -
Tests
Edited by Michael Voigt