Skip to content

Commit

Permalink
Merge pull request #239 from Northeastern-Electric-Racing/231-optimiz…
Browse files Browse the repository at this point in the history
…e-scylla-docker-size

Switch to diesel
  • Loading branch information
bracyw authored Nov 21, 2024
2 parents 5390463 + c2bbe5e commit f7ca9b4
Show file tree
Hide file tree
Showing 70 changed files with 1,080 additions and 4,322 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/scylla-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,27 @@ jobs:

steps:
- name: Setup Rust
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Generate prisma
run: cargo prisma generate
- name: Clippy
run: cargo clippy --all-targets
- name: Fmt
run: cargo fmt --check
- name: Start DB
working-directory: compose
run: docker compose up -d odyssey-timescale
- name: Build
run: cargo build --verbose
- name: Clippy
run: cargo clippy --verbose -- -D warnings
- name: Run # so we can migrate the database, run for a little than bail
env:
DATABASE_URL: postgresql://postgres:[email protected]:5432/postgres
run: |
cargo run & ID=$!; sleep 10s; kill $ID
- name: Test
env:
DATABASE_URL: postgresql://postgres:[email protected]:5432/postgres
run: cargo test -- --test-threads=1
- name: Cleanup
working-directory: compose
run: docker compose down
37 changes: 0 additions & 37 deletions .github/workflows/scylla-tests.yml

This file was deleted.

31 changes: 23 additions & 8 deletions angular-client/src/components/carousel/carousel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,39 @@
<div class="run-card">
<mat-grid-list cols="2" rowHeight="40px">
<mat-grid-tile>
<typography class="left" variant="subheader" [content]="'Run #' + run.id" />
<typography
class="left"
variant="subheader"
[content]="'Run #' + run.id"
/>
</mat-grid-tile>
<mat-grid-tile>
<typography class="right" variant="subheader" [content]="run.driverName" />
<typography
class="right"
variant="subheader"
[content]="run.driverName"
/>
</mat-grid-tile>
<mat-grid-tile>
<typography class="left" variant="subheader" [content]="datePipe(run.time)" />
</mat-grid-tile>
<mat-grid-tile>
<typography class="right" variant="subheader" [content]="run.systemName" />
<typography
class="left"
variant="subheader"
[content]="datePipe(run.time)"
/>
</mat-grid-tile>
<mat-grid-tile colspan="2">
<typography variant="subheader" class="right" [content]="run.locationName" />
<typography
variant="subheader"
class="right"
[content]="run.locationName"
/>
</mat-grid-tile>
</mat-grid-list>
</div>
<div class="select-button-container">
<p-button class="run-select-button" (onClick)="selectRun(run)">Select this Run</p-button>
<p-button class="run-select-button" (onClick)="selectRun(run)"
>Select this Run</p-button
>
</div>
</ng-template>
</p-carousel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
@if (dataTypeName) {
<div>
<div>
<typography variant="large-header" [content]="dataTypeName" additionalStyles="margin: 12px 0px" />
<typography
variant="large-header"
[content]="dataTypeName"
additionalStyles="margin: 12px 0px"
/>
<typography
variant="large-secondary-header"
[content]="value + ' ' + dataTypeUnit"
Expand All @@ -13,16 +17,25 @@
</div>
</div>
} @else {
<typography variant="large-header" content="No Data Selected" additionalStyles="margin: 12px 0px" />
<typography
variant="large-header"
content="No Data Selected"
additionalStyles="margin: 12px 0px"
/>
}
</div>
<div class="right-info">
<div class="driver-info">
<typography variant="header" [content]="run?.driverName ?? 'No Driver Selected'" />
<typography
variant="header"
[content]="run?.driverName ?? 'No Driver Selected'"
/>
</div>
<div class="system-info">
<typography variant="subheader" [content]="run?.systemName ?? 'No System Selected'" />
<typography variant="subheader" [content]="run?.locationName ?? 'No Location Selected'" />
<typography
variant="subheader"
[content]="run?.locationName ?? 'No Location Selected'"
/>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions angular-client/src/utils/types.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export interface NodeWithVisibilityToggle extends Node {
dataTypesAreVisible: boolean;
}

export interface NodeWithVisibilityToggleObservable extends NodeWithVisibilityToggle {
export interface NodeWithVisibilityToggleObservable
extends NodeWithVisibilityToggle {
dataTypesObservable: Observable<DataType[]>;
}

Expand All @@ -34,7 +35,6 @@ export type Run = {
id: number;
locationName: string;
driverName: string;
systemName: string;
time: Date;
};

Expand Down
1 change: 0 additions & 1 deletion compose/compose.client-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ services:
scylla-server:
environment:
- SCYLLA_SIREN_HOST_URL=siren:1883
- SCYLLA_PROD=true

siren:
extends:
Expand Down
20 changes: 9 additions & 11 deletions compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,15 @@ services:
depends_on:
- odyssey-timescale
environment:
- SOURCE_DATABASE_URL=postgresql://postgres:password@odyssey-timescale:5432/postgres
# - PROD_SIREN_HOST_URL=siren:1883
- SCYLLA_PROD=true
#- SCYLLA_SATURATE_BATCH=false
#-SCYLLA_DATA_UPLOAD_DISABLE=false
#-SCYLLA_SIREN_HOST_URL=localhost:1883
#-SCYLLA_BATCH_UPSERT_TIME=10
- SCYLLA_RATE_LIMIT_MODE=static
- SCYLLA_STATIC_RATE_LIMIT_VALUE=50
#-SCYLLA_SOCKET_DISCARD_PERCENT=0
- RUST_LOG=warn,scylla_server=debug
- DATABASE_URL=postgresql://postgres:password@odyssey-timescale:5432/postgres
# - PROD_SIREN_HOST_URL=siren:1883
#-SCYLLA_DATA_UPLOAD_DISABLE=false
#-SCYLLA_SIREN_HOST_URL=localhost:1883
#-SCYLLA_BATCH_UPSERT_TIME=10
- SCYLLA_RATE_LIMIT_MODE=static
- SCYLLA_STATIC_RATE_LIMIT_VALUE=50
#-SCYLLA_SOCKET_DISCARD_PERCENT=0
- RUST_LOG=warn,scylla_server=debug
cpu_shares: 1024
stop_grace_period: 2m
stop_signal: SIGINT
Expand Down
3 changes: 0 additions & 3 deletions scylla-server/.cargo/config.toml

This file was deleted.

Loading

0 comments on commit f7ca9b4

Please sign in to comment.