Skip to content

Commit 7d20cd6

Browse files
committed
Squashed commit of the following:
commit 4f31caa Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Fri Apr 11 21:44:29 2025 -0400 Fix Backend Url commit 7f4bd01 Merge: e72037d a0dd635 Author: Peyton McKee <mckee.p@northeastern.edu> Date: Fri Apr 11 21:26:11 2025 -0400 Merge pull request #364 from Northeastern-Electric-Racing/Reversing-Cells Reversing heat-map, 3 digit precision for voltages on cell view commit a0dd635 Author: wyattb <bracy.w@northeastern.edu> Date: Fri Apr 11 13:11:43 2025 -0400 only beta reversed commit b73766d Author: wyattb <bracy.w@northeastern.edu> Date: Fri Apr 11 12:55:38 2025 -0400 Reversing heat-map, 3 digit precision for voltages on cell view commit e72037d Merge: ae08fab f2ffc6e Author: Peyton McKee <mckee.p@northeastern.edu> Date: Thu Apr 10 00:31:04 2025 -0400 Merge pull request #357 from Northeastern-Electric-Racing/Uploadable-Playbackable-Videos Uploadable playbackable videos commit f2ffc6e Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Thu Apr 10 00:26:29 2025 -0400 Format commit 74f8b89 Merge: e5d6024 ae08fab Author: Peyton McKee <mckee.p@northeastern.edu> Date: Wed Apr 9 23:49:40 2025 -0400 Merge branch 'develop' into Uploadable-Playbackable-Videos commit ae08fab Author: Peyton McKee <mckee.p@northeastern.edu> Date: Mon Apr 7 23:32:07 2025 -0400 Use Datetime for cloud data (#363) * Use Datetime for cloud data * cargo fmt * scylla- data is stored with microseconds epoch unix * fixed data_service test * fixed data service test * cargo fmt --------- Co-authored-by: wyattb <bracy.w@northeastern.edu> commit e5d6024 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Mon Apr 7 19:32:07 2025 -0400 Format commit c1b0990 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Apr 7 19:02:25 2025 -0400 Bump clap from 4.5.34 to 4.5.35 in /scylla-server (#361) Bumps [clap](https://github.com/clap-rs/clap) from 4.5.34 to 4.5.35. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](clap-rs/clap@clap_complete-v4.5.34...clap_complete-v4.5.35) --- updated-dependencies: - dependency-name: clap dependency-version: 4.5.35 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 97a8188 Author: Wyatt Bracy <138251570+bracyw@users.noreply.github.com> Date: Mon Apr 7 19:01:37 2025 -0400 Segment Views (#358) * #327 - initial setup * #327 - header touchup * #327 - fix prettier * #327 - abstracted segment logic into utils file * #327 - fixed broken routing * #328 - start on heat map * #328 - cleaning up bms utils * #328 - minor changes * Beginning of shift to dynamic routes / topics + bms utils * #328 - MVP for cell service and heatmap connection with selector view * #328 - added cellNumber support * #328 - no more 2 * for Volt and burning enums * #328 - MVP for cell and heatmap * #328 - fix chip diag logic * #328 - different sized top info bckgrnd right label * Squashed commit of the following: commit 7471f9b Merge: 4070b14 4bc2091 Author: Peyton McKee <mckee.p@northeastern.edu> Date: Wed Mar 26 15:39:42 2025 -0400 Merge pull request #348 from Northeastern-Electric-Racing/Fault-page Fault page commit 4bc2091 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Tue Mar 25 17:37:57 2025 -0400 Only Limit Range on Realtime commit 4070b14 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Mar 25 10:50:40 2025 -0400 Bump tokio from 1.43.0 to 1.44.1 in /scylla-server (#346) Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.43.0 to 1.44.1. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](tokio-rs/tokio@tokio-1.43.0...tokio-1.44.1) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 30cc0b7 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Mar 25 10:35:15 2025 -0400 Bump socketioxide from 0.16.1 to 0.16.2 in /scylla-server (#351) Bumps [socketioxide](https://github.com/totodore/socketioxide) from 0.16.1 to 0.16.2. - [Release notes](https://github.com/totodore/socketioxide/releases) - [Changelog](https://github.com/Totodore/socketioxide/blob/main/CHANGELOG.md) - [Commits](Totodore/socketioxide@v0.16.1...v0.16.2) --- updated-dependencies: - dependency-name: socketioxide dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 5f678f6 Merge: e42affd 36e4a18 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Mon Mar 24 18:50:14 2025 -0400 Merge branch 'develop' into Fault-page commit e42affd Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Mon Mar 24 16:33:37 2025 -0400 Combine Graph And Fault Page commit 08c0d74 Author: wyattb <bracy.w@northeastern.edu> Date: Fri Mar 21 21:49:43 2025 -0400 add working mat alert icon commit e6bf2f6 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 13:00:06 2025 -0400 Remove Unused Import commit c325cd6 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 11:37:59 2025 -0400 Remove Logs commit 5d5fb51 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 10:53:02 2025 -0400 Fmt commit 1a7ea42 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 10:49:37 2025 -0400 Two Data Functions commit 5ac148e Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 00:00:54 2025 -0400 Working Fault Page commit 387dcee Merge: da6c768 76e64e0 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Tue Mar 18 23:45:47 2025 -0400 Merge branch 'develop' into Fault-page commit da6c768 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Tue Mar 18 23:45:05 2025 -0400 Initial Fault Page * #328 - integrating fault page with appRoutes * Squashed commit of the following: commit 848cbc2 Author: wyattb <bracy.w@northeastern.edu> Date: Wed Apr 2 23:49:01 2025 -0400 commit 36af72b Author: emirdur <emirdurakovicofficial@gmail.com> Date: Wed Apr 2 21:13:48 2025 -0400 seg init * #330 - rough draft * #328 - add highlight to heatmap * changed fault graph header * #328 - remove scylla server typescript * #328 - minor fix to seg at a glance * Squashed commit of the following: commit 7471f9b Merge: 4070b14 4bc2091 Author: Peyton McKee <mckee.p@northeastern.edu> Date: Wed Mar 26 15:39:42 2025 -0400 Merge pull request #348 from Northeastern-Electric-Racing/Fault-page Fault page commit 4bc2091 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Tue Mar 25 17:37:57 2025 -0400 Only Limit Range on Realtime commit 4070b14 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Mar 25 10:50:40 2025 -0400 Bump tokio from 1.43.0 to 1.44.1 in /scylla-server (#346) Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.43.0 to 1.44.1. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](tokio-rs/tokio@tokio-1.43.0...tokio-1.44.1) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 30cc0b7 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Mar 25 10:35:15 2025 -0400 Bump socketioxide from 0.16.1 to 0.16.2 in /scylla-server (#351) Bumps [socketioxide](https://github.com/totodore/socketioxide) from 0.16.1 to 0.16.2. - [Release notes](https://github.com/totodore/socketioxide/releases) - [Changelog](https://github.com/Totodore/socketioxide/blob/main/CHANGELOG.md) - [Commits](Totodore/socketioxide@v0.16.1...v0.16.2) --- updated-dependencies: - dependency-name: socketioxide dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 5f678f6 Merge: e42affd 36e4a18 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Mon Mar 24 18:50:14 2025 -0400 Merge branch 'develop' into Fault-page commit e42affd Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Mon Mar 24 16:33:37 2025 -0400 Combine Graph And Fault Page commit 08c0d74 Author: wyattb <bracy.w@northeastern.edu> Date: Fri Mar 21 21:49:43 2025 -0400 add working mat alert icon commit e6bf2f6 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 13:00:06 2025 -0400 Remove Unused Import commit c325cd6 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 11:37:59 2025 -0400 Remove Logs commit 5d5fb51 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 10:53:02 2025 -0400 Fmt commit 1a7ea42 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 10:49:37 2025 -0400 Two Data Functions commit 5ac148e Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 00:00:54 2025 -0400 Working Fault Page commit 387dcee Merge: da6c768 76e64e0 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Tue Mar 18 23:45:47 2025 -0400 Merge branch 'develop' into Fault-page commit da6c768 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Tue Mar 18 23:45:05 2025 -0400 Initial Fault Page * #328 - fix prettier * #328 - added two precision, various bms debug fixes * #328 - convert some of info background to signals * removed console log * #328 - all comments addressed * #328 - heatmap style fixes commit 5072e37 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Apr 7 18:59:19 2025 -0400 Bump tokio from 1.44.1 to 1.44.2 in /scylla-server (#362) Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.44.1 to 1.44.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](tokio-rs/tokio@tokio-1.44.1...tokio-1.44.2) --- updated-dependencies: - dependency-name: tokio dependency-version: 1.44.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 2128389 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Apr 7 18:43:39 2025 -0400 Bump diesel from 2.2.8 to 2.2.9 in /scylla-server (#359) Bumps [diesel](https://github.com/diesel-rs/diesel) from 2.2.8 to 2.2.9. - [Release notes](https://github.com/diesel-rs/diesel/releases) - [Changelog](https://github.com/diesel-rs/diesel/blob/v2.2.9/CHANGELOG.md) - [Commits](diesel-rs/diesel@v2.2.8...v2.2.9) --- updated-dependencies: - dependency-name: diesel dependency-version: 2.2.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 579d6bd Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Mon Apr 7 15:49:41 2025 -0400 Format commit c4a99a9 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Sat Apr 5 15:26:56 2025 -0400 Address Comments commit f83a04b Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Fri Apr 4 20:28:27 2025 -0400 Undo Compose Changes commit 55c7901 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Fri Apr 4 18:38:55 2025 -0400 Optimize Streaming of playback videos commit d819a7d Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Thu Apr 3 21:53:59 2025 -0400 Formatting commit 01368cb Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Thu Apr 3 21:49:34 2025 -0400 Get Correct Name commit ccc07b3 Author: Jack Rubacha <rubacha.jack03@gmail.com> Date: Thu Apr 3 20:55:45 2025 -0400 fixup fault regex (#355) commit cafae15 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Thu Apr 3 20:40:12 2025 -0400 Conform to ServerData commit 1a0e60a Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Thu Apr 3 02:57:38 2025 -0400 Add Update Videos Button commit 2f897bf Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Thu Apr 3 02:23:44 2025 -0400 Uploadable Playbackable Videos commit c5b5a60 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Mar 31 13:42:15 2025 -0400 Bump clap from 4.5.32 to 4.5.34 in /scylla-server (#353) Bumps [clap](https://github.com/clap-rs/clap) from 4.5.32 to 4.5.34. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](clap-rs/clap@clap_complete-v4.5.32...clap_complete-v4.5.34) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 90feb5c Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Mar 31 13:42:05 2025 -0400 Bump axum from 0.8.1 to 0.8.3 in /scylla-server (#354) Bumps [axum](https://github.com/tokio-rs/axum) from 0.8.1 to 0.8.3. - [Release notes](https://github.com/tokio-rs/axum/releases) - [Changelog](https://github.com/tokio-rs/axum/blob/main/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/axum/commits/axum-v0.8.3) --- updated-dependencies: - dependency-name: axum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 211a69a Merge: 7471f9b b09db9d Author: Peyton McKee <mckee.p@northeastern.edu> Date: Wed Mar 26 20:48:00 2025 -0400 Merge pull request #352 from Northeastern-Electric-Racing/fix-charybdis Charybdis Fixes commit b09db9d Author: wyattb <bracy.w@northeastern.edu> Date: Wed Mar 26 19:14:05 2025 -0400 charybdis - unique btwn runid and time cloud + non-duplicated runs support commit 7471f9b Merge: 4070b14 4bc2091 Author: Peyton McKee <mckee.p@northeastern.edu> Date: Wed Mar 26 15:39:42 2025 -0400 Merge pull request #348 from Northeastern-Electric-Racing/Fault-page Fault page commit 4bc2091 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Tue Mar 25 17:37:57 2025 -0400 Only Limit Range on Realtime commit 5f678f6 Merge: e42affd 36e4a18 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Mon Mar 24 18:50:14 2025 -0400 Merge branch 'develop' into Fault-page commit e42affd Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Mon Mar 24 16:33:37 2025 -0400 Combine Graph And Fault Page commit 08c0d74 Author: wyattb <bracy.w@northeastern.edu> Date: Fri Mar 21 21:49:43 2025 -0400 add working mat alert icon commit e6bf2f6 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 13:00:06 2025 -0400 Remove Unused Import commit c325cd6 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 11:37:59 2025 -0400 Remove Logs commit 5d5fb51 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 10:53:02 2025 -0400 Fmt commit 1a7ea42 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 10:49:37 2025 -0400 Two Data Functions commit 5ac148e Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Wed Mar 19 00:00:54 2025 -0400 Working Fault Page commit 387dcee Merge: da6c768 76e64e0 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Tue Mar 18 23:45:47 2025 -0400 Merge branch 'develop' into Fault-page commit da6c768 Author: Peyton-McKee <mckee.p@northeastern.edu> Date: Tue Mar 18 23:45:05 2025 -0400 Initial Fault Page
1 parent 18b3331 commit 7d20cd6

133 files changed

Lines changed: 2862 additions & 573 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ updates:
33
- package-ecosystem: "cargo"
44
directory: "/scylla-server/"
55
schedule:
6-
interval: "weekly"
6+
interval: "monthly"
77
# Enable version updates for GitHub Actions
88
- package-ecosystem: "github-actions"
99
# Workflow files stored in the default location of `.github/workflows`
1010
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
1111
directory: "/"
1212
schedule:
13-
interval: "weekly"
13+
interval: "monthly"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
**/.env
66
scylla-server-typescript/src/prisma/mydatabase.db
77
scylla-server-typescript/src/prisma/mydatabase.db-journal
8+
scylla-server/files
89

910
# Xcode
1011
#

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ Only used when deploying to the router for testing or comp.
3333

3434
Please see [Compose Profiles](./compose/README.md) to for more info on docker deployment abstractions.
3535

36+
### Starting out
37+
38+
connect to the router and ssh in. (link to confluence?)
39+
40+
Run: `./argos.sh router -d up` to start all stuff up for data collection
41+
3642
### Codegen Protobuf Types (client only)
3743

3844
Server protobuf generation is automatic. See below for client protobuf generation.

angular-client/compose.client.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
context: .
88
args:
99
PROD: "true"
10-
BACKEND_URL: http://192.168.100.1:8000
10+
BACKEND_URL: http://192.168.100.11:8000
1111
MAP_ACCESS_TOKEN: pk.eyJ1IjoibWNrZWVwIiwiYSI6ImNscXBrcmU1ZTBscWIya284cDFyYjR3Nm8ifQ.6TQHlxhAJzptZyV-W28dnw
1212
target: production
1313
dockerfile: Dockerfile

angular-client/src/api/data.api.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
import { Timing } from 'src/utils/types.utils';
12
import { urls } from './urls';
23

34
export const getDataByDataTypeNameAndRunId = (dataTypeName: string, runId: number): Promise<Response> => {
45
return fetch(urls.getDataByDataTypeNameAndRunId(dataTypeName, runId));
56
};
7+
8+
export const getDataByDatatTypeNameAndTiming = (dataTypeName: string, timing: Timing): Promise<Response> => {
9+
return fetch(urls.getDataByDataTypeNameAndTiming(dataTypeName, timing));
10+
};

angular-client/src/api/urls.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { environment } from 'src/environment/environment';
2+
import { Timing } from 'src/utils/types.utils';
23

34
// eslint-disable-next-line @typescript-eslint/no-explicit-any
45
const baseURL = (environment as any).url || 'http://localhost:8000';
@@ -13,6 +14,9 @@ const getAllSystems = () => `${baseURL}/systems`;
1314
const getDataByDataTypeNameAndRunId = (dataTypeName: string, runId: number) =>
1415
`${baseURL}/data/${encodeURIComponent(dataTypeName)}/${runId}`;
1516

17+
const getDataByDataTypeNameAndTiming = (dataTypeName: string, timing: Timing) =>
18+
`${baseURL}/data/${encodeURIComponent(dataTypeName)}?time=${timing.time}&before=${timing.before}&after=${timing.after}`;
19+
1620
/* Runs */
1721
const getRunById = (id: number) => `${baseURL}/runs/${id}`;
1822
const getAllRuns = () => `${baseURL}/runs`;
@@ -21,17 +25,27 @@ const startNewRun = () => `${baseURL}/runs/new`;
2125
const startNewRunWithData = (driver: string, location: string, notes: string) => `${baseURL}/runs/new/${driver}/${location}/${notes}`;
2226
const updateRun = (id: number, driver: string, location: string, notes: string) => `${baseURL}/runs/update/${id}/${driver}/${location}/${notes}`;
2327

28+
/* Videos */
29+
const getAllVideos = () => `${baseURL}/videos`;
30+
const getVideo = (fileName: string) => `${getAllVideos()}/${encodeURIComponent(fileName)}`;
31+
const updateVideos = () => `${getAllVideos()}/update`;
32+
2433
export const urls = {
2534
getAllDatatypes,
2635

2736
getAllSystems,
2837

2938
getDataByDataTypeNameAndRunId,
39+
getDataByDataTypeNameAndTiming,
3040

3141
getAllRuns,
3242
getLatestRun,
3343
getRunById,
3444
startNewRun,
3545
startNewRunWithData,
36-
updateRun,
46+
updateRun,,
47+
48+
getAllVideos,
49+
getVideo,
50+
updateVideos
3751
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { urls } from './urls';
2+
3+
/**
4+
* Fetches all videos from the server
5+
* @returns A promise containing the response from the server
6+
*/
7+
export const getAllVideos = (): Promise<Response> => {
8+
return fetch(urls.getAllVideos());
9+
};
10+
11+
/**
12+
* Requests Scylla to update its videos
13+
* @returns A promise containing the response from scylla
14+
*/
15+
export const updateVideos = (): Promise<Response> => {
16+
return fetch(urls.updateVideos(), { method: 'POST' });
17+
};

angular-client/src/app/app-nav-bar/app-nav-bar.component.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { startNewRun } from 'src/api/run.api';
77
import { RunFormComponent } from 'src/components/run-form/run-form.component';
88
import APIService from 'src/services/api.service';
99
import SidebarService from 'src/services/sidebar.service';
10-
import Storage from 'src/services/storage.service';
10+
import { appRoutes } from '../app-routing.module';
1111

1212
interface NavItem {
1313
label: string;
@@ -21,7 +21,6 @@ interface NavItem {
2121
styleUrls: ['./app-nav-bar.component.css']
2222
})
2323
export class AppNavBarComponent implements OnInit {
24-
private storage = inject(Storage);
2524
private serverService = inject(APIService);
2625
private messageService = inject(MessageService);
2726
private router = inject(Router);
@@ -69,12 +68,14 @@ export class AppNavBarComponent implements OnInit {
6968
};
7069

7170
navItems: NavItem[] = [
72-
{ label: 'Home', route: '/landing', icon: 'home' },
73-
{ label: 'Charging', route: '/charging', icon: 'ev_station' },
74-
{ label: 'Graph', route: '/graph', icon: 'bar_chart' },
75-
{ label: 'Map', route: '/map', icon: 'map' },
76-
{ label: 'BMS', route: '/bms', icon: 'action_key' },
77-
{ label: 'Camera', route: '/camera', icon: 'linked_camera' }
71+
{ label: 'Home', route: appRoutes.landingRoute(), icon: 'home' },
72+
{ label: 'Charging', route: appRoutes.chargingRoute(), icon: 'ev_station' },
73+
{ label: 'Graph', route: appRoutes.graphRoute(), icon: 'bar_chart' },
74+
// TODO: fix map
75+
// { label: 'Map', route: appRoutes.mapRoute(), icon: 'map' },
76+
{ label: 'BMS', route: appRoutes.bmsRoute(), icon: 'action_key' },
77+
{ label: 'Faults', route: appRoutes.faultsRoute(), icon: 'error' },
78+
{ label: 'Camera', route: appRoutes.cameraRoute(), icon: 'linked_camera' }
7879
];
7980

8081
navigateTo(route: string): void {

angular-client/src/app/app-routing.module.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,49 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule, Routes } from '@angular/router';
33
import { BmsDebugPageComponent } from 'src/pages/bms-debug-page/bms-debug-page.component';
4+
import { BmsSegmentViewComponent } from 'src/pages/bms-debug-page/bms-segment-view/bms-segment-view.component';
45
import { CameraPageComponent } from 'src/pages/camera-page/camera-page.component';
56
import ChargingPageComponent from 'src/pages/charging-page/charging-page.component';
7+
import FaultPageComponent from 'src/pages/fault-page/fault-page.component';
68
import GraphPageComponent from 'src/pages/graph-page/graph-page.component';
79
import LandingPageComponent from 'src/pages/landing-page/landing-page.component';
810
import MapComponent from 'src/pages/map/map.component';
11+
import { Segment } from 'src/utils/bms.utils';
912

13+
const landingRoute = () => `/landing`;
14+
const graphRoute = () => `/graph`;
15+
const mapRoute = () => `/map`;
16+
const chargingRoute = () => `/charging`;
17+
const bmsRoute = () => `/bms`;
18+
const bmsSegmentViewRoute = (id: Segment) => `/bms/segment/${id + 1}`;
19+
const cameraRoute = () => `/camera`;
20+
const faultsRoute = () => `/faults`;
21+
const faultsGraphRoute = () => `/faults/fault-graph`;
22+
23+
export const appRoutes = {
24+
landingRoute,
25+
graphRoute,
26+
mapRoute,
27+
chargingRoute,
28+
bmsRoute,
29+
bmsSegmentViewRoute,
30+
cameraRoute,
31+
faultsRoute,
32+
faultsGraphRoute
33+
};
34+
35+
// Routes should be defined carefully in accordance with the appRoutes
1036
const routes: Routes = [
1137
{ path: 'landing', component: LandingPageComponent },
1238
{ path: 'graph', component: GraphPageComponent },
13-
{ path: '', redirectTo: '/landing', pathMatch: 'full' },
39+
{ path: '', redirectTo: appRoutes.landingRoute(), pathMatch: 'full' },
1440
{ path: 'map', component: MapComponent },
1541
{ path: 'charging', component: ChargingPageComponent },
1642
{ path: 'bms', component: BmsDebugPageComponent },
43+
// NOTE: paramaterized routes should be even more carefully defined in accordance with the appRoutes
44+
{ path: 'bms/segment/:id', component: BmsSegmentViewComponent },
45+
{ path: 'faults', component: FaultPageComponent },
46+
{ path: 'faults/fault-graph', component: GraphPageComponent },
1747
{ path: 'camera', component: CameraPageComponent }
1848
];
1949

angular-client/src/app/app.module.ts

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,25 @@ import { SelectModule } from 'primeng/select';
124124
import { providePrimeNG } from 'primeng/config';
125125
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
126126
import Lara from '@primeng/themes/aura';
127+
import FaultPageComponent from 'src/pages/fault-page/fault-page.component';
128+
import { AccordionModule } from 'primeng/accordion';
129+
import { TableModule } from 'primeng/table';
127130
import { TreeModule } from 'primeng/tree';
128131
import { BmsHeaderComponent } from 'src/pages/bms-debug-page/components/bms-header/bms-header.component';
129132
import { ConnectionDotWithMessageComponent } from 'src/components/connection-dot-with-message/connection-dot-with-message.component';
133+
import { GeneralButtonsComponent } from 'src/pages/graph-page/graph-caption/general-buttons/general-buttons.component';
134+
import { FaultDisplayInfoComponent } from 'src/pages/graph-page/graph-caption/fault-display-info/fault-display-info.component';
135+
import { FaultButtonsComponent } from 'src/pages/graph-page/graph-caption/fault-buttons/fault-buttons.component';
136+
import { GeneralDisplayInfoComponent } from 'src/pages/graph-page/graph-caption/general-display-info/general-display-info.component';
130137
import { CameraPageComponent } from 'src/pages/camera-page/camera-page.component';
138+
import { BmsSegmentViewComponent } from 'src/pages/bms-debug-page/bms-segment-view/bms-segment-view.component';
139+
import { SegmentAtAGlanceComponent } from 'src/pages/bms-debug-page/components/segment-at-a-glance/segment-at-a-glance.component';
140+
import { CellByCellHeatMapComponent } from 'src/pages/bms-debug-page/components/cell-by-cell-heat-map/cell-by-cell-heat-map.component';
141+
import { CellViewComponent } from 'src/pages/bms-debug-page/components/cell-view/cell-view.component';
142+
import { ChipDiagnosticsComponent } from 'src/pages/bms-debug-page/components/chip-diagnostics/chip-diagnostics.component';
143+
import { ChipFaultsComponent } from 'src/pages/bms-debug-page/components/chip-faults/chip-faults.component';
144+
import { CellTileComponent } from 'src/pages/bms-debug-page/components/cell-by-cell-heat-map/cell-tile/cell-tile.component';
145+
import { ChipFaultPipe } from 'src/utils/pipes/chip-fault.pipe';
131146
import { FormTemplateComponent } from 'src/components/form-template/form-template.component';
132147
import { RunFormComponent } from 'src/components/run-form/run-form.component';
133148

@@ -188,6 +203,7 @@ import { RunFormComponent } from 'src/components/run-form/run-form.component';
188203
BatteryInfoDesktopComponent,
189204
BatteryInfoMobileComponent,
190205
NodeFilterPipe,
206+
ChipFaultPipe,
191207
CombinedStatusDisplayComponent,
192208
StateOfChargeDisplayComponent,
193209
PackTempComponent,
@@ -231,11 +247,21 @@ import { RunFormComponent } from 'src/components/run-form/run-form.component';
231247
BmsOverflowComponent,
232248
InfoValueDisplayComponent,
233249
SelectDropdownComponent,
250+
FaultPageComponent,
234251
BmsHeaderComponent,
235252
ConnectionDotWithMessageComponent,
253+
GeneralButtonsComponent,
254+
FaultButtonsComponent,
255+
GeneralDisplayInfoComponent,
256+
FaultDisplayInfoComponent,
236257
CameraPageComponent,
237-
FormTemplateComponent,
238-
RunFormComponent,
258+
BmsSegmentViewComponent,
259+
SegmentAtAGlanceComponent,
260+
CellViewComponent,
261+
CellByCellHeatMapComponent,
262+
ChipDiagnosticsComponent,
263+
ChipFaultsComponent,
264+
CellTileComponent
239265
],
240266
bootstrap: [AppContextComponent],
241267
imports: [
@@ -264,11 +290,14 @@ import { RunFormComponent } from 'src/components/run-form/run-form.component';
264290
MatFormFieldModule,
265291
FormsModule,
266292
SelectModule,
293+
AccordionModule,
294+
TableModule,
267295
TreeModule
268296
],
269297
providers: [
270298
DialogService,
271299
MessageService,
300+
ChipFaultPipe,
272301
provideHttpClient(withInterceptorsFromDi()),
273302
provideClientHydration(),
274303
provideAnimationsAsync(),
@@ -335,6 +364,7 @@ export class AppModule {
335364
'battery_charging_2',
336365
this.domSanitizer.bypassSecurityTrustResourceUrl('../assets/icons/battery_charging_2.svg')
337366
)
367+
.addSvgIcon('error', this.domSanitizer.bypassSecurityTrustResourceUrl('../assets/icons/alert-triangle.svg'))
338368
.addSvgIcon('linked_camera', this.domSanitizer.bypassSecurityTrustResourceUrl('../assets/icons/linked_camera.svg'));
339369
}
340370
}

0 commit comments

Comments
 (0)