Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23,091 changes: 23,091 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
"@types/node": "^12.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.2.0",
"react-d3-speedometer": "^1.1.0",
"react-dom": "^18.2.0",
"react-gauge-chart": "^0.4.1",
"react-google-charts": "^4.0.0",
"react-scripts": "4.0.3",
"react-thermometer-component": "^1.0.1",
"sass": "^1.43.4",
"typescript": "^4.1.2",
"web-vitals": "^1.0.1"
Expand Down Expand Up @@ -45,10 +49,8 @@
"start": "export NODE_OPTIONS='--openssl-legacy-provider' && yarn run frontend:dev && run-script-os",
"start:windows": ".\\venv-pywebview\\Scripts\\python src\\index.py",
"start:default": "./venv-pywebview/bin/python src/index.py",

"pylintcheck": "pylama -f pylint ./src/",
"pylint":"yapf --recursive -i ./src/"

"pylint": "yapf --recursive -i ./src/"
},
"eslintConfig": {
"extends": [
Expand Down
38 changes: 38 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
3 changes: 1 addition & 2 deletions src/App.test.tsx → src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
});
Binary file added src/assets/img/gauge-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 0 additions & 20 deletions src/components/Editor/Editor.sass

This file was deleted.

21 changes: 0 additions & 21 deletions src/components/Editor/Editor.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions src/components/Header/Header.sass

This file was deleted.

23 changes: 0 additions & 23 deletions src/components/Header/Header.tsx

This file was deleted.

Binary file removed src/components/Header/logo.png
Binary file not shown.
12 changes: 0 additions & 12 deletions src/components/Ticker/Ticker.sass

This file was deleted.

32 changes: 0 additions & 32 deletions src/components/Ticker/Ticker.tsx

This file was deleted.

47 changes: 47 additions & 0 deletions src/components/accelDial.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import GaugeChart from "react-gauge-chart";

// Styles for the AccelDial component
const styles = {
dial: {
display: "inline-block",
width: `300px`,
height: `auto`,
color: "#000",
border: "0.5px solid #fff",
padding: "2px"
},
title: {
fontSize: "1em",
color: "#000"
}
};

// AccelDial component
const AccelDial = ({ id, value, title }) => {
let percent = value / 100;
// value: "-50" -> percent: 0
// value: "0" ---> percent: .5
// value: "50" ---> percent: 1
// -25 ... .5 + (-25/100) = .25
// 25 ... .5 + (25/100) = .75
// -110 .. .5 + (-110/100) = -0.6

return (
<div style={styles.dial}>
<GaugeChart
id={id}
nrOfLevels={3}
arcsLength={[0.25, 0.5, 0.25]}
colors={["#2d74da", "#1f57a4", "#25467a"]}
arcPadding={0.02}
percent={percent}
textColor={"#000000"}
needleColor={"#5392ff"}
formatTextValue={(value) => value}
/>
<div style={styles.title}>{title}</div>
</div>
);
};

export default AccelDial;
44 changes: 44 additions & 0 deletions src/components/barometer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Chart } from "react-google-charts";

// Styles for the Barometer component
const styles = {
dial: {
width: `auto`,
height: `auto`,
color: "#000",
border: "0.5px solid #fff",
padding: "2px"
},
title: {
fontSize: "1em",
color: "#000"
}
};

// Barometer component
const Barometer = ({ id, value, title }) => {
return (
<div style={styles.dial}>
<Chart
height={120}
chartType="Gauge"
loader={<div></div>}
data={[
["Label", "Value"],
[title, Number(value)]
]}
options={{
redFrom: 90,
redTo: 200,
yellowFrom: 50,
yellowTo: 90,
minorTicks: 5,
min: -200,
max: 200
}}
/>
</div>
);
};

export default Barometer;
Loading