Skip to content

Commit

Permalink
Update UI to show both 'entered' and 'crossing'. Update results filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Caldwell committed Nov 3, 2020
1 parent 6f6c2cf commit 441b44c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,14 @@ export function getMovedEntities(
[]
)
// Do not track entries to or exits from 'other'
.filter((entityMovementDescriptor: EntityMovementDescriptor) =>
trackingEvent === 'entered'
? entityMovementDescriptor.currLocation.shapeId !== OTHER_CATEGORY
: entityMovementDescriptor.prevLocation.shapeId !== OTHER_CATEGORY
)
.filter((entityMovementDescriptor: EntityMovementDescriptor) => {
if (trackingEvent !== 'crossing') {
return trackingEvent === 'entered'
? entityMovementDescriptor.currLocation.shapeId !== OTHER_CATEGORY
: entityMovementDescriptor.prevLocation.shapeId !== OTHER_CATEGORY;
}
return true;
})
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export const GeoThresholdAlertTypeExpression: React.FunctionComponent<AlertTypeP
}
fullWidth
onChange={(e) => setAlertParams('trackingEvent', e.target.value)}
options={[conditionOptions[0]]} // TODO: Make all options avab. before merge
options={conditionOptions}
/>
</div>
</EuiFormRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
export enum TrackingEvent {
entered = 'entered',
exited = 'exited',
crossing = 'crossing',
}

export interface GeoThresholdAlertParams {
Expand Down

0 comments on commit 441b44c

Please sign in to comment.