Skip to content

Commit cdadda8

Browse files
committed
build the web stuff in
1 parent e67a5b2 commit cdadda8

21 files changed

+15
-3
lines changed

occlusion-mapper/Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1+
FROM node:16.17.1-alpine3.16 as build
2+
COPY client /
3+
WORKDIR /client
4+
RUN ls
5+
RUN npm run build
6+
7+
18
FROM iqtlabs/edgetech-core:latest
9+
WORKDIR /app
10+
RUN mkdir static
11+
COPY --from=build /build/* /app/static
212
COPY pyproject.toml .
313
COPY poetry.lock .
414
RUN pip3 install poetry==1.5.1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

client/src/App.js occlusion-mapper/client/src/App.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import React, { useCallback, useState, useEffect } from 'react'
55
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts';
66
import { Container, Row, Col, Button } from 'react-bootstrap';
77

8+
9+
810
window.addEventListener('error', e => {
911
if (e.message === 'ResizeObserver loop limit exceeded' || e.message === 'ResizeObserver loop completed with undelivered notifications.') {
1012
const resizeObserverErrDiv = document.getElementById(
@@ -32,7 +34,7 @@ function App() {
3234
useEffect(() => {
3335
try {
3436

35-
fetch(`http://localhost:5000/camera-point?azimuth=${azimuth}&elevation=${elevation}&zoom=${zoom}`).then(response => response.json()).then(data => console.log(data));
37+
fetch(`/camera-point?azimuth=${azimuth}&elevation=${elevation}&zoom=${zoom}`).then(response => response.json()).then(data => console.log(data));
3638
} catch (err) {
3739
console.log(err.message)
3840
}
@@ -114,7 +116,7 @@ function App() {
114116
}
115117

116118
const saveMapping = () => {
117-
fetch('http://localhost:5000/save-mapping', {
119+
fetch(`/save-mapping`, {
118120
method: 'POST',
119121
headers: {
120122
'Accept': 'application/json',
File renamed without changes.

client/src/BasicStream.jsx occlusion-mapper/client/src/BasicStream.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const BasicStream = () => {
4040

4141
return (
4242
<BasicPlayer
43-
hostname="192.168.1.111"
43+
hostname="10.20.26.11"
4444
format="RTP_H264"
4545
autoPlay
4646
autoRetry
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)