From 6318e32f42866943fa0e47298685662be26dd457 Mon Sep 17 00:00:00 2001 From: Hawk Date: Sat, 2 May 2020 17:27:29 +0200 Subject: [PATCH 1/3] updated deployment script to yarn --- update.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update.sh b/update.sh index 6618e17..f7cd18f 100755 --- a/update.sh +++ b/update.sh @@ -5,10 +5,10 @@ git pull cd backend rm -r ./frontend mkdir frontend -npm i +yarn install cd ../frontend -npm i -npm run build +yarn install +yarn run build mv ./build/* ../backend/frontend cd ../backend -npm start \ No newline at end of file +yarn start From 7c8914bc52b7f41e41a35b6ab2cb8a91a5c2e7df Mon Sep 17 00:00:00 2001 From: Hawk Date: Sat, 2 May 2020 18:01:44 +0200 Subject: [PATCH 2/3] made chart responsive #25 --- .../src/components/resourcechart/chart.js | 47 +++++++++++-------- .../components/resourcechart/resourcechart.js | 2 +- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/resourcechart/chart.js b/frontend/src/components/resourcechart/chart.js index 12016e1..8962982 100644 --- a/frontend/src/components/resourcechart/chart.js +++ b/frontend/src/components/resourcechart/chart.js @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; import { - LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, + LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'; import { makeStyles } from '@material-ui/core/styles'; import Grid from '@material-ui/core/Grid'; @@ -12,11 +12,15 @@ import Checkbox from '@material-ui/core/Checkbox'; const useStyles = makeStyles((theme) => ({ root: { - display: 'flex', + padding: 0, + margin: 0, }, formControl: { margin: theme.spacing(2), }, + chart: { + width: 0, + } })); export default function Chart(props) { @@ -62,23 +66,26 @@ export default function Chart(props) { const { q0, q1, q2, q3, q4, q5, q6, q7 } = state; return ( - - - - - - - - - {lines} - + + + + + + + + + + {lines} + + + + + @@ -119,7 +126,7 @@ export default function Chart(props) { - + ); } diff --git a/frontend/src/components/resourcechart/resourcechart.js b/frontend/src/components/resourcechart/resourcechart.js index 5b81528..83228f7 100644 --- a/frontend/src/components/resourcechart/resourcechart.js +++ b/frontend/src/components/resourcechart/resourcechart.js @@ -103,7 +103,7 @@ export default function ResourceChart(props) { - + {output(data)}