Skip to content

Commit

Permalink
prettier check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
emirdur committed Oct 27, 2024
1 parent 13774e7 commit e0cd75f
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 128 deletions.
4 changes: 1 addition & 3 deletions angular-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The Angular Frontend for Argos.
Make sure you're in the `angular-client` directory.

Set environment/environment.ts to the following for local development:

```
export const environment = {
production: false,
Expand All @@ -27,13 +28,10 @@ To run the client in development mode run:

Navigate to `http://localhost:4200/` to ensure the website is running, and you're done! The application will automatically reload if you change any of the source files.


## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory.


2 changes: 1 addition & 1 deletion angular-client/compose.client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
build:
context: .
args:
PROD: "true"
PROD: 'true'
BACKEND_URL: http://192.168.100.1:8000
MAP_ACCESS_TOKEN: pk.eyJ1IjoibWNrZWVwIiwiYSI6ImNscXBrcmU1ZTBscWIya284cDFyYjR3Nm8ifQ.6TQHlxhAJzptZyV-W28dnw
target: production
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
style="margin-bottom: -30px; margin-top: -10px"
variant="large-header"
[content]="time | date: 'HH:mm:ss'"
/>
/>
<typography
style="margin-bottom: -30px; margin-top: -10px"
variant="large-header"
content="{{ time | date: 'MM/dd/yyyy' }} | {{ location }} "
/>
/>
<latency-display style="margin-bottom: -30px; margin-top: -10px" />
</div>
<vstack style="width: 100%">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<info-background title="Battery" svgIcon="battery_charging_full">
@if (isMobile) {
<battery-info-mobile
style="width: 100%"
[voltage]="voltage"
[chargeCurrentLimit]="chargeCurrentLimit"
[dischargeCurrentLimit]="dischargeCurrentLimit"
[packTemp]="packTemp"
[stateOfCharge]="stateOfCharge"
></battery-info-mobile>
<battery-info-mobile
style="width: 100%"
[voltage]="voltage"
[chargeCurrentLimit]="chargeCurrentLimit"
[dischargeCurrentLimit]="dischargeCurrentLimit"
[packTemp]="packTemp"
[stateOfCharge]="stateOfCharge"
></battery-info-mobile>
} @else {
<battery-info-desktop
style="width: 100%"
[voltage]="voltage"
[chargeCurrentLimit]="chargeCurrentLimit"
[dischargeCurrentLimit]="dischargeCurrentLimit"
[packTemp]="packTemp"
[stateOfCharge]="stateOfCharge"
></battery-info-desktop>
<battery-info-desktop
style="width: 100%"
[voltage]="voltage"
[chargeCurrentLimit]="chargeCurrentLimit"
[dischargeCurrentLimit]="dischargeCurrentLimit"
[packTemp]="packTemp"
[stateOfCharge]="stateOfCharge"
></battery-info-desktop>
}
</info-background>
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,5 @@
</info-background>
}
@if (!isDesktop) {
<cell-temp-mobile
[cellTempData]="cellTempData"
[avgTemp]="avgTemp"
[maxTemp]="maxTemp"
></cell-temp-mobile>
<cell-temp-mobile [cellTempData]="cellTempData" [avgTemp]="avgTemp" [maxTemp]="maxTemp"></cell-temp-mobile>
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
? 'background-color: #d4760b ; width: 100%; border-radius: 2px'
: 'background-color: #4d453c; width: 100%; border-radius: 2px'
"
>
>
<div style="display: flex; flex-direction: row; justify-content: space-between; height: 45px; padding: 10px">
<typography variant="info-subtitle" [content]="fault.type" style="align-self: center"></typography>
<typography
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,10 @@
<vstack style="width: 10%">
<hstack>
@if (isDesktop) {
<typography
variant="info-value"
[content]="delta.toFixed(3) + 'V'"
additionalStyles="fontSize:30px"
/>
<typography variant="info-value" [content]="delta.toFixed(3) + 'V'" additionalStyles="fontSize:30px" />
}
@if (!isDesktop) {
<typography
variant="info-value"
[content]="delta.toFixed(3) + 'V'"
additionalStyles="fontSize:20px"
/>
<typography variant="info-value" [content]="delta.toFixed(3) + 'V'" additionalStyles="fontSize:20px" />
}
</hstack>
<typography variant="info-subtitle" content="Delta" additionalStyles="fontSize:15px" />
Expand All @@ -24,18 +16,10 @@
<divider style="height: 100px"></divider>
<vstack style="width: 10%">
@if (isDesktop) {
<typography
variant="info-value"
[content]="lowCellVoltage.toFixed(3) + 'V'"
additionalStyles="fontSize:30px"
/>
<typography variant="info-value" [content]="lowCellVoltage.toFixed(3) + 'V'" additionalStyles="fontSize:30px" />
}
@if (!isDesktop) {
<typography
variant="info-value"
[content]="lowCellVoltage.toFixed(3) + 'V'"
additionalStyles="fontSize:20px"
/>
<typography variant="info-value" [content]="lowCellVoltage.toFixed(3) + 'V'" additionalStyles="fontSize:20px" />
}
<typography variant="info-subtitle" content="Low Cell" additionalStyles="fontSize:15px" />
</vstack>
Expand All @@ -44,18 +28,10 @@
<vstack style="width: 10%">
<hstack>
@if (isDesktop) {
<typography
variant="info-value"
[content]="highCellVoltage.toFixed(3) + 'V'"
additionalStyles="fontSize:30px"
/>
<typography variant="info-value" [content]="highCellVoltage.toFixed(3) + 'V'" additionalStyles="fontSize:30px" />
}
@if (!isDesktop) {
<typography
variant="info-value"
[content]="highCellVoltage.toFixed(3) + 'V'"
additionalStyles="fontSize:20px"
/>
<typography variant="info-value" [content]="highCellVoltage.toFixed(3) + 'V'" additionalStyles="fontSize:20px" />
}
</hstack>
<typography variant="info-subtitle" content="High Cell" additionalStyles="fontSize:15px" />
Expand All @@ -64,7 +40,7 @@
style="width: 75%; padding-bottom: 35px"
[highVoltsData]="highVoltsData"
[lowVoltsData]="lowVoltsData"
>
>
</high-low-cell-graph>
</hstack>
</info-background>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,10 @@
<vstack style="width: 10%">
<hstack>
@if (isDesktop) {
<typography
variant="info-value"
[content]="delta.toFixed(3) + 'V'"
additionalStyles="fontSize:30px"
/>
<typography variant="info-value" [content]="delta.toFixed(3) + 'V'" additionalStyles="fontSize:30px" />
}
@if (!isDesktop) {
<typography
variant="info-value"
[content]="delta.toFixed(3) + 'V'"
additionalStyles="fontSize:20px"
/>
<typography variant="info-value" [content]="delta.toFixed(3) + 'V'" additionalStyles="fontSize:20px" />
}
</hstack>
<typography variant="info-subtitle" content="Delta" additionalStyles="fontSize:15px" />
Expand All @@ -26,18 +18,10 @@

<vstack style="width: 10%">
@if (isDesktop) {
<typography
variant="info-value"
[content]="lowCellVoltage.toFixed(3) + 'V'"
additionalStyles="fontSize:30px"
/>
<typography variant="info-value" [content]="lowCellVoltage.toFixed(3) + 'V'" additionalStyles="fontSize:30px" />
}
@if (!isDesktop) {
<typography
variant="info-value"
[content]="lowCellVoltage.toFixed(3) + 'V'"
additionalStyles="fontSize:20px"
/>
<typography variant="info-value" [content]="lowCellVoltage.toFixed(3) + 'V'" additionalStyles="fontSize:20px" />
}
<typography variant="info-subtitle" content="Low Cell" additionalStyles="fontSize:15px" />
</vstack>
Expand All @@ -48,18 +32,10 @@
<vstack style="width: 10%">
<hstack>
@if (isDesktop) {
<typography
variant="info-value"
[content]="highCellVoltage.toFixed(3) + 'V'"
additionalStyles="fontSize:30px"
/>
<typography variant="info-value" [content]="highCellVoltage.toFixed(3) + 'V'" additionalStyles="fontSize:30px" />
}
@if (!isDesktop) {
<typography
variant="info-value"
[content]="highCellVoltage.toFixed(3) + 'V'"
additionalStyles="fontSize:20px"
/>
<typography variant="info-value" [content]="highCellVoltage.toFixed(3) + 'V'" additionalStyles="fontSize:20px" />
}
</hstack>
<typography variant="info-subtitle" content="High Cell" additionalStyles="fontSize:15px" />
Expand All @@ -70,7 +46,7 @@
style="width: 100%; padding-bottom: 35px"
[highVoltsData]="highVoltsData"
[lowVoltsData]="lowVoltsData"
>
>
</high-low-cell-graph>
}
</vstack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
variant="large-secondary-header"
[content]="value + ' ' + dataTypeUnit"
additionalStyles="margin: 6px 0px 0px 0px"
/>
/>
</div>
</div>
} @else {
Expand Down
4 changes: 2 additions & 2 deletions angular-client/src/pages/graph-page/graph-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
[onSetRealtime]="onSetRealtime"
[run]="run"
class="graph-caption"
/>
/>
</div>
<graph-sidebar
[nodes]="nodes!"
[onRunSelected]="onRunSelected"
[selectDataType]="setSelectedDataType"
class="mobile-sidebar"
/>
/>
</div>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@
(click)="toggleDataTypeVisibility(node)"
[dropDown]="true"
[open]="node.dataTypesAreVisible"
/>
/>
@if (node.dataTypesAreVisible) {
<div @toggleExpand>
@for (dataType of node.dataTypesObservable | async | dataTypeFilter: 'name' : searchFilter : node.name; track dataType) {
<div
style="display: flex; justify-content: center"
>
@for (
dataType of node.dataTypesObservable | async | dataTypeFilter: 'name' : searchFilter : node.name;
track dataType
) {
<div style="display: flex; justify-content: center">
<sidebar-card
style="width: 95%; margin-left: 30px"
[title]="dataType.name"
[dataValue]="dataValuesMap.get(dataType.name)"
(click)="selectDataType(dataType)"
/>
/>
</div>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
additionalStyles="margin: 0; margin-bottom: 5px; cursor: pointer;"
variant="subheader"
content="Select Data Type"
/>
/>
@if (showSelection) {
<div class="container" @toggleSidebar>
<run-selector style="text-align: center" [selectRun]="onRunSelected" />
Expand All @@ -14,7 +14,7 @@
onclick="event.stopPropagation()"
(click)="toggleDataTypeVisibility(node)"
[dropDown]="true"
/>
/>
@if (node.dataTypesAreVisible) {
<div class="subcontainer" @toggleCardExpand>
@for (dataType of node.dataTypes; track dataType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@
: 'marginLeft: 30px; fontSize: 18px'
"
[content]="title"
/>
/>
<typography variant="secondary-header" additionalStyles="marginRight: 5px;" [content]="dataValue" />
</div>
@if (dropDown) {
<mat-icon
[id]="iconId"
class="icon"
[ngStyle]="{ transform: open ? 'rotate(90deg)' : undefined }"
svgIcon="arrow_right"
<mat-icon [id]="iconId" class="icon" [ngStyle]="{ transform: open ? 'rotate(90deg)' : undefined }" svgIcon="arrow_right"
>arrow_right</mat-icon
>
}
</div>
>
}
</div>
2 changes: 1 addition & 1 deletion angular-client/src/pages/map/map.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<run-selector
style="position: absolute; margin-bottom: 16px; margin-right: 16px; bottom: 0; right: 0"
[selectRun]="onRunSelected"
/>
/>
</div>
}
}
8 changes: 2 additions & 6 deletions angular-client/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"outDir": "./out-tsc/app",
"types": ["node"]
},
"files": [
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
]
"files": ["src/main.ts"],
"include": ["src/**/*.d.ts"]
}
5 changes: 1 addition & 4 deletions angular-client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"lib": [
"ES2022",
"dom"
]
"lib": ["ES2022", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
9 changes: 2 additions & 7 deletions angular-client/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
"types": ["jasmine"]
},
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
}

0 comments on commit e0cd75f

Please sign in to comment.