1st version which could be used on the device

This commit is contained in:
2024-03-20 21:15:06 +01:00
parent d79d2aefee
commit 3fe818e144
14 changed files with 996 additions and 43 deletions

View File

@@ -1,2 +0,0 @@
/favicon.ico
/index.html

View File

@@ -1 +0,0 @@
/index-a25c81c8.js

File diff suppressed because one or more lines are too long

BIN
vrpmdvfrontend/dist/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

42
vrpmdvfrontend/dist/index.html vendored Normal file
View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Markus Lehr | VR Predictive Maintenance Device."
/>
<meta
data-rh="true"
property="og:image"
content="https://refine.dev/img/refine_social.png"
/>
<meta
data-rh="true"
name="twitter:image"
content="https://refine.dev/img/refine_social.png"
/>
<title>
Markus Lehr | VR Predictive Maintenance Device.
</title>
<script type="module" crossorigin src="/assets/index-ebf4aa2f.js"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm dev` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

View File

@@ -43,10 +43,13 @@ import { Register } from "./pages/register";
import { MonitoringList } from "./pages/monitorings/list"; import { MonitoringList } from "./pages/monitorings/list";
import { MonitoringCreate } from "./pages/monitorings/create"; import { MonitoringCreate } from "./pages/monitorings/create";
import { MonitoringEdit } from "./pages/monitorings/edit"; import { MonitoringEdit } from "./pages/monitorings/edit";
import { MonitoringShow } from "./pages/monitorings/show"; import { VR_API_URL } from './env';
const API_URL = "https://api.fake-rest.refine.dev"; const API_URL = "https://api.fake-rest.refine.dev";
const MONITORINGS_API_URL = "http://127.0.0.1:5000//vrpmdvapi/1_0";
const MONITORINGS_API_URL = '/vrpmdvapi/1_0';
// .get(`${API_URL}/exams`)
function App() { function App() {
return ( return (
@@ -56,7 +59,6 @@ function App() {
<CssBaseline /> <CssBaseline />
<GlobalStyles styles={{ html: { WebkitFontSmoothing: "auto" } }} /> <GlobalStyles styles={{ html: { WebkitFontSmoothing: "auto" } }} />
<RefineSnackbarProvider> <RefineSnackbarProvider>
<DevtoolsProvider>
<Refine <Refine
dataProvider={{ dataProvider={{
default: dataProvider(API_URL), default: dataProvider(API_URL),
@@ -76,26 +78,6 @@ function App() {
dataProviderName: "monitorings" dataProviderName: "monitorings"
}, },
}, },
{
name: "blog_posts",
list: "/blog-posts",
create: "/blog-posts/create",
edit: "/blog-posts/edit/:id",
show: "/blog-posts/show/:id",
meta: {
canDelete: true,
},
},
{
name: "categories",
list: "/categories",
create: "/categories/create",
edit: "/categories/edit/:id",
show: "/categories/show/:id",
meta: {
canDelete: true,
},
},
]} ]}
options={{ options={{
syncWithLocation: true, syncWithLocation: true,
@@ -116,7 +98,7 @@ function App() {
Title={({ collapsed }) => ( Title={({ collapsed }) => (
<ThemedTitleV2 <ThemedTitleV2
collapsed={collapsed} collapsed={collapsed}
text="Refine Project" text="VR Predictive Maintenance Device"
icon={<AppIcon />} icon={<AppIcon />}
/> />
)} )}
@@ -135,18 +117,6 @@ function App() {
<Route path="create" element={<MonitoringCreate />} /> <Route path="create" element={<MonitoringCreate />} />
<Route path="edit/:id" element={<MonitoringEdit />} /> <Route path="edit/:id" element={<MonitoringEdit />} />
</Route> </Route>
<Route path="/blog-posts">
<Route index element={<BlogPostList />} />
<Route path="create" element={<BlogPostCreate />} />
<Route path="edit/:id" element={<BlogPostEdit />} />
<Route path="show/:id" element={<BlogPostShow />} />
</Route>
<Route path="/categories">
<Route index element={<CategoryList />} />
<Route path="create" element={<CategoryCreate />} />
<Route path="edit/:id" element={<CategoryEdit />} />
<Route path="show/:id" element={<CategoryShow />} />
</Route>
<Route path="*" element={<ErrorComponent />} /> <Route path="*" element={<ErrorComponent />} />
</Route> </Route>
<Route <Route
@@ -172,8 +142,6 @@ function App() {
<UnsavedChangesNotifier /> <UnsavedChangesNotifier />
<DocumentTitleHandler /> <DocumentTitleHandler />
</Refine> </Refine>
<DevtoolsPanel />
</DevtoolsProvider>
</RefineSnackbarProvider> </RefineSnackbarProvider>
</ColorModeContextProvider> </ColorModeContextProvider>
</RefineKbarProvider> </RefineKbarProvider>

View File

@@ -0,0 +1 @@
export const VR_API_URL : string = 'http://localhost';

View File

@@ -101,7 +101,7 @@ export const MonitoringList = () => {
renderCell: function render({ row }) { renderCell: function render({ row }) {
return ( return (
<NumberField <NumberField
value={row.sampleperiod} value={row.downtime}
options={{ options={{
minimumIntegerDigits: 1, minimumIntegerDigits: 1,
minimumFractionDigits:1, minimumFractionDigits:1,

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Markus Lehr | VR Predictive Maintenance Device."
/>
<meta
data-rh="true"
property="og:image"
content="https://refine.dev/img/refine_social.png"
/>
<meta
data-rh="true"
name="twitter:image"
content="https://refine.dev/img/refine_social.png"
/>
<title>
Markus Lehr | VR Predictive Maintenance Device.
</title>
<script type="module" crossorigin src="/assets/index-ebf4aa2f.js"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm dev` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

1
vrpmdvserver/mons.json Normal file
View File

@@ -0,0 +1 @@
[{"id": "a214da99-2a77-4229-905b-5137a0d8071c", "created_at": "03/20/2024, 08:12", "name": "Monitorings1", "samplerate": 3750, "sampleperiod": 10, "downtime": 40, "owner": "Markus Lehr"}]

View File

@@ -6,7 +6,7 @@ from flask_cors import CORS
from vrpmdvdata import VRPMDV_Data from vrpmdvdata import VRPMDV_Data
from vrpmdvmonreqschema import VRPMDV_MonReqSchema from vrpmdvmonreqschema import VRPMDV_MonReqSchema
app = Flask(__name__, static_url_path='', static_folder='../vrpmdv-frontend/build') app = Flask(__name__, static_url_path='', static_folder='./build')
CORS(app) #comment this on deployment CORS(app) #comment this on deployment
vrpmdvdata = VRPMDV_Data() vrpmdvdata = VRPMDV_Data()