network info

This commit is contained in:
cv
2021-06-13 14:17:55 +02:00
parent f066e974e6
commit 17ddfb535f
7 changed files with 112 additions and 2 deletions
+1
View File
@@ -1,6 +1,7 @@
export const NODE_PORT = 4001;
export const EVENT_TABLE = 'event';
export const EVENTS_TABLE = 'events';
export const APP_TABLE = 'appinfo';
const calculateServer = () => {
return window.location.origin.replace(window.location.port, `${NODE_PORT}/`);
+9
View File
@@ -1,6 +1,15 @@
import axios from 'axios';
import { ontimeURL } from './apiConstants';
export const ontimePlaceholderInfo = {
networkInterfaces: [],
};
export const getInfo = async () => {
const res = await axios.get(ontimeURL + '/info');
return res.data;
};
export const downloadEvents = async () => {
await axios({
url: ontimeURL + '/db',