Modified Frontend for it to use new endpoints
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -7,7 +7,8 @@
|
|||||||
},
|
},
|
||||||
"appConfig": {
|
"appConfig": {
|
||||||
"endpoints": {
|
"endpoints": {
|
||||||
"BASE_URL": "http://localhost:3001/api/v1",
|
"DATA_URL": "http://localhost:8081/api/v1",
|
||||||
|
"LOGIC_URL": "http://localhost:8082/api/v1",
|
||||||
"GET_GROUPS": "/groups",
|
"GET_GROUPS": "/groups",
|
||||||
"GET_GROUP_BY_ID": "/groups/{0}",
|
"GET_GROUP_BY_ID": "/groups/{0}",
|
||||||
"GET_GROUP_DEVICES": "/groups/{0}/devices",
|
"GET_GROUP_DEVICES": "/groups/{0}/devices",
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta property="og:title" content="ContaminUS" />
|
<meta property="og:title" content="ContaminUS" />
|
||||||
<meta property="og:description" content="Midiendo la calidad del aire y las calles en Sevilla 🌿🚛" />
|
<meta property="og:description" content="Midiendo la calidad del aire y las calles en Sevilla 🌿🚛" />
|
||||||
<meta property="og:image" content="https://contaminus.miarma.net/logo.png" />
|
<meta property="og:image" content="https://contaminus.miarma.net/logo.png" />
|
||||||
<meta property="og:url" content="https://contaminus.miarma.net/" />
|
<meta property="og:url" content="https://contaminus.miarma.net/" />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:locale" content="es_ES" />
|
<meta property="og:locale" content="es_ES" />
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:title" content="ContaminUS" />
|
<meta name="twitter:title" content="ContaminUS" />
|
||||||
<meta name="twitter:description" content="Midiendo la calidad del aire y las calles en Sevilla 🌿🚛" />
|
<meta name="twitter:description" content="Midiendo la calidad del aire y las calles en Sevilla 🌿🚛" />
|
||||||
<meta name="twitter:image" content="https://contaminus.miarma.net/logo.png" />
|
<meta name="twitter:image" content="https://contaminus.miarma.net/logo.png" />
|
||||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon">
|
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon">
|
||||||
<title>ContaminUS</title>
|
<title>ContaminUS</title>
|
||||||
<script type="module" crossorigin src="/assets/index-75wHSipM.js"></script>
|
<script type="module" crossorigin src="/assets/index-De3h4CyK.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/assets/react-vendors-DbHEDQBy.js">
|
<link rel="modulepreload" crossorigin href="/assets/react-vendors-DbHEDQBy.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/leaflet-DYDK0jU3.js">
|
<link rel="modulepreload" crossorigin href="/assets/leaflet-DYDK0jU3.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/chartjs-C6LAl0aW.js">
|
<link rel="modulepreload" crossorigin href="/assets/chartjs-C6LAl0aW.js">
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-lEmLSKa6.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-lEmLSKa6.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
</body>
|
|
||||||
</html>
|
</body>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
},
|
},
|
||||||
"appConfig": {
|
"appConfig": {
|
||||||
"endpoints": {
|
"endpoints": {
|
||||||
"BASE_URL": "http://localhost:8081/api/v1",
|
"DATA_URL": "http://localhost:8081/api/v1",
|
||||||
|
"LOGIC_URL": "http://localhost:8082/api/v1",
|
||||||
"GET_GROUPS": "/groups",
|
"GET_GROUPS": "/groups",
|
||||||
"GET_GROUP_BY_ID": "/groups/{0}",
|
"GET_GROUP_BY_ID": "/groups/{0}",
|
||||||
"GET_GROUP_DEVICES": "/groups/{0}/devices",
|
"GET_GROUP_DEVICES": "/groups/{0}/devices",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const HistoryCharts = () => {
|
|||||||
if (configError) return <p>Error al cargar configuración: {configError}</p>;
|
if (configError) return <p>Error al cargar configuración: {configError}</p>;
|
||||||
if (!config) return <p>Configuración no disponible.</p>;
|
if (!config) return <p>Configuración no disponible.</p>;
|
||||||
|
|
||||||
const BASE = config.appConfig.endpoints.BASE_URL;
|
const BASE = config.appConfig.endpoints.LOGIC_URL;
|
||||||
const ENDPOINT = config.appConfig.endpoints.sensors;
|
const ENDPOINT = config.appConfig.endpoints.sensors;
|
||||||
|
|
||||||
const reqConfig = {
|
const reqConfig = {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ const PollutionMap = ({ deviceId }) => {
|
|||||||
if (configError) return <p>Error al cargar configuración: {configError}</p>;
|
if (configError) return <p>Error al cargar configuración: {configError}</p>;
|
||||||
if (!config) return <p>Configuración no disponible.</p>;
|
if (!config) return <p>Configuración no disponible.</p>;
|
||||||
|
|
||||||
const BASE = config.appConfig.endpoints.BASE_URL;
|
const BASE = config.appConfig.endpoints.LOGIC_URL;
|
||||||
const ENDPOINT = config.appConfig.endpoints.GET_DEVICE_POLLUTION_MAP;
|
const ENDPOINT = config.appConfig.endpoints.GET_DEVICE_POLLUTION_MAP;
|
||||||
let endp = ENDPOINT.replace('{0}', deviceId);
|
let endp = ENDPOINT.replace('{0}', deviceId);
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const SideMenu = ({ isOpen, onClose }) => {
|
|||||||
if (configError) return <p>Error al cargar configuración: {configError}</p>;
|
if (configError) return <p>Error al cargar configuración: {configError}</p>;
|
||||||
if (!config) return <p>Configuración no disponible.</p>;
|
if (!config) return <p>Configuración no disponible.</p>;
|
||||||
|
|
||||||
const BASE = config.appConfig.endpoints.BASE_URL;
|
const BASE = config.appConfig.endpoints.DATA_URL;
|
||||||
const ENDPOINT = config.appConfig.endpoints.GET_DEVICES;
|
const ENDPOINT = config.appConfig.endpoints.GET_DEVICES;
|
||||||
|
|
||||||
const reqConfig = {
|
const reqConfig = {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const SummaryCards = ({ deviceId }) => {
|
|||||||
if (configError) return <p>Error al cargar configuración: {configError}</p>;
|
if (configError) return <p>Error al cargar configuración: {configError}</p>;
|
||||||
if (!config) return <p>Configuración no disponible.</p>;
|
if (!config) return <p>Configuración no disponible.</p>;
|
||||||
|
|
||||||
const BASE = config.appConfig.endpoints.BASE_URL;
|
const BASE = config.appConfig.endpoints.LOGIC_URL;
|
||||||
const ENDPOINT = config.appConfig.endpoints.GET_DEVICE_LATEST_VALUES;
|
const ENDPOINT = config.appConfig.endpoints.GET_DEVICE_LATEST_VALUES;
|
||||||
const endp = ENDPOINT.replace('{0}', deviceId);
|
const endp = ENDPOINT.replace('{0}', deviceId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user