Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hammer/generic alerts #948

Merged
merged 42 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4d75109
First iteration of generic alerts
aaronchongth May 23, 2024
d2a7d58
Route for unresponded alerts
aaronchongth May 23, 2024
907f739
Merge branch 'deploy/hammer' into hammer/generic-alerts
aaronchongth May 23, 2024
a18d89b
Basic location complete post route for task
aaronchongth May 23, 2024
3e4a4ef
Tests for alert routes
aaronchongth May 24, 2024
93467ca
Test for location complete route
aaronchongth May 24, 2024
c4a76d8
Lint and tests
aaronchongth May 27, 2024
f48bc5c
Basic implementation
aaronchongth May 28, 2024
6e2d54e
Basic task based alerts working as expected
aaronchongth May 28, 2024
e45452d
Only display and list alerts that have display true
aaronchongth May 28, 2024
deca732
Add doc to location_complete route about instability
aaronchongth May 28, 2024
b7c04a5
Refactored alert db interactions to repository, with lru cache for lo…
aaronchongth May 29, 2024
99855f8
Regenerated docs and return early on gateway last location checking
aaronchongth May 30, 2024
78f5e0b
Lint and better typing with static methods
aaronchongth May 30, 2024
cb1b563
Hammer/generic alerts without location (#951)
aaronchongth Jun 20, 2024
105628b
Hammer/demo tasks (#925)
aaronchongth Jun 26, 2024
4e93451
Merge branch 'deploy/hammer' into hammer/generic-alerts
aaronchongth Jun 26, 2024
37201c9
Update ros2 pydantic messages, fix tests
aaronchongth Jun 26, 2024
95ffb2c
Revert update of pnpm lock file
aaronchongth Jun 26, 2024
b413658
Lint
aaronchongth Jun 26, 2024
c5dc60b
Use specific exceptions and more clean up
aaronchongth Jul 1, 2024
5237e72
Merge branch 'deploy/hammer-humble' into hammer/generic-alerts
aaronchongth Jul 4, 2024
1fd22ee
Port CI fixes from #955 but targeting ubuntu 22 and ROS 2 Humble
aaronchongth Jul 4, 2024
01d68fe
Revert "Port CI fixes from #955 but targeting ubuntu 22 and ROS 2 Hum…
aaronchongth Jul 4, 2024
2b4c763
Update pnpm version
aaronchongth Jul 4, 2024
1771015
Setup pnpm and node manually
aaronchongth Jul 4, 2024
d51ef77
Using HOME env var of runner
aaronchongth Jul 4, 2024
0e8d7c4
workflow
aaronchongth Jul 4, 2024
18a075d
workflow
aaronchongth Jul 4, 2024
2b58f8e
Workflow
aaronchongth Jul 4, 2024
2bfd484
Address feedback on frontend
aaronchongth Jul 4, 2024
9434771
Address comments that don't break behavior
aaronchongth Jul 5, 2024
cc9a268
Started generic exceptions
aaronchongth Jul 5, 2024
06e5475
Proper db schema for alert request and response
aaronchongth Jul 5, 2024
ce5d761
Updated alerts model, frontend tweaks for subscription, using paginat…
aaronchongth Jul 5, 2024
a152639
Attempt to setup minimal RMF during bootstrap step
aaronchongth Jul 5, 2024
822a6b5
Fix mistake on ci path
aaronchongth Jul 5, 2024
7e94210
Fix workflow
aaronchongth Jul 5, 2024
2738146
Revert CI changes
aaronchongth Jul 5, 2024
ebca221
Merge branch 'deploy/hammer-humble' into hammer/generic-alerts
aaronchongth Jul 5, 2024
2e78fde
Merge branch 'deploy/hammer-humble' into hammer/generic-alerts
aaronchongth Jul 5, 2024
6494c01
Updated API, renamed event to pushAlert, filter before
aaronchongth Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions packages/api-client/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Debug from 'debug';
import { io, Socket } from 'socket.io-client';
import {
ApiServerModelsTortoiseModelsAlertsAlertLeaf,
AlertRequest,
AlertResponse,
ApiServerModelsTortoiseModelsBeaconsBeaconStateLeaf as BeaconState,
BuildingMap,
DeliveryAlert,
Expand All @@ -19,8 +20,6 @@ import {
TaskState,
} from './openapi';

type Alert = ApiServerModelsTortoiseModelsAlertsAlertLeaf;

const debug = Debug('rmf-client');

// https://stackoverflow.com/questions/52667959/what-is-the-purpose-of-bivariancehack-in-typescript-types
Expand Down Expand Up @@ -102,8 +101,12 @@ export class SioClient {
return this.subscribe<TaskEventLog>(`/tasks/${taskId}/log`, listener);
}

subscribeAlerts(listener: Listener<Alert>): Subscription {
return this.subscribe<Alert>(`/alerts`, listener);
subscribeAlertRequests(listener: Listener<AlertRequest>): Subscription {
return this.subscribe<AlertRequest>(`/alerts/requests`, listener);
}

subscribeAlertResponses(listener: Listener<AlertResponse>): Subscription {
return this.subscribe<AlertResponse>(`/alerts/responses`, listener);
}

subscribeDeliveryAlerts(listener: Listener<DeliveryAlert>): Subscription {
Expand Down
Loading
Loading