Skip to content

Commit

Permalink
Merge pull request #26 from jeroentvb/dev
Browse files Browse the repository at this point in the history
Fix calculating average conditions
  • Loading branch information
jeroentvb authored Jul 24, 2020
2 parents e97fb24 + a70107d commit dec8ea1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/src/components/form/ThresholdForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:disabled="submitting">
<v-layout row>
<v-flex md11 px-4>
<p>Sessionss rated with a number below this threshold won't be shown in the chart data.</p>
<p>Sessions rated with a number below this threshold won't be shown in the chart data.</p>

<v-select
v-model.number="threshold"
Expand Down
8 changes: 4 additions & 4 deletions client/src/views/add-session/AddSession.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ export default Vue.extend({
if (i === conditions.length - 1) {
return {
windspeed: Math.round(c.windspeed / i),
windgust: Math.round(c.windgust / i),
winddirection: Math.round(c.winddirection / i),
temperature: Math.round(c.temperature / i)
windspeed: Math.round(c.windspeed / conditions.length),
windgust: Math.round(c.windgust / conditions.length),
winddirection: Math.round(c.winddirection / conditions.length),
temperature: Math.round(c.temperature / conditions.length)
}
}
Expand Down
3 changes: 1 addition & 2 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"description": "A web app to keep track of windsurf session statistics",
"main": "index.js",
"scripts": {
"setupdb": "node modules/setupDb.js",
"build-server": "tsc",
"build-shared-interfaces": "cd ../shared && tsc",
"copy-files": "cp .env ./dist && cp package.json ./dist && cp package-lock.json ./dist",
"build": "rm -r ./dist && npm run build-shared-interfaces && npm run build-server && npm run copy-files",
"build": "rm -rf ./dist && npm run build-shared-interfaces && npm run build-server && npm run copy-files",
"start": "node ./dist/index.js",
"lint": "tslint -p . -c tslint.json \"**/*.ts\"",
"watch": "ts-node-dev --respawn --transpile-only ./src/index.ts"
Expand Down

0 comments on commit dec8ea1

Please sign in to comment.