diff --git a/web/ngonx-app/.gitignore b/web/.gitignore
similarity index 77%
rename from web/ngonx-app/.gitignore
rename to web/.gitignore
index 53f7466..fa1790c 100644
--- a/web/ngonx-app/.gitignore
+++ b/web/.gitignore
@@ -2,4 +2,5 @@ node_modules
.DS_Store
dist
dist-ssr
-*.local
\ No newline at end of file
+*.local
+pkg
\ No newline at end of file
diff --git a/web/ngonx-app/index.html b/web/index.html
similarity index 100%
rename from web/ngonx-app/index.html
rename to web/index.html
diff --git a/web/ngonx-app/package.json b/web/package.json
similarity index 100%
rename from web/ngonx-app/package.json
rename to web/package.json
diff --git a/web/ngonx-app/src/App.jsx b/web/src/App.jsx
similarity index 100%
rename from web/ngonx-app/src/App.jsx
rename to web/src/App.jsx
diff --git a/web/ngonx-app/src/components/EndpointCard.jsx b/web/src/components/EndpointCard.jsx
similarity index 100%
rename from web/ngonx-app/src/components/EndpointCard.jsx
rename to web/src/components/EndpointCard.jsx
diff --git a/web/ngonx-app/src/components/EndpointTable.jsx b/web/src/components/EndpointTable.jsx
similarity index 100%
rename from web/ngonx-app/src/components/EndpointTable.jsx
rename to web/src/components/EndpointTable.jsx
diff --git a/web/ngonx-app/src/components/Endpoints.jsx b/web/src/components/Endpoints.jsx
similarity index 81%
rename from web/ngonx-app/src/components/Endpoints.jsx
rename to web/src/components/Endpoints.jsx
index ef98611..18d1ed7 100644
--- a/web/ngonx-app/src/components/Endpoints.jsx
+++ b/web/src/components/Endpoints.jsx
@@ -1,41 +1,41 @@
import React, { Fragment, useEffect, useReducer, useState } from 'react'
import EndpointCard from './EndpointCard'
-import { Box, Container, Flex, Heading, Text } from "@chakra-ui/react"
+import { Box, Container, Flex, Heading, Text, Center } from "@chakra-ui/react"
import { getAllEndpoints, GetEndpointsReducer, initialStateGetAllEndpoints } from '../lib/getEndpointsReducer'
import { FaIdCard, FaTable } from 'react-icons/fa'
import EndpointTable from './EndpointTable'
import NoDataImage from './NoData'
const Endpoints = () => {
- // const [{ endpoints, loading, errorMessage }, dispatch] =
- // useReducer(GetEndpointsReducer, initialStateGetAllEndpoints)
+ const [{ endpoints, loading, errorMessage }, dispatch] =
+ useReducer(GetEndpointsReducer, initialStateGetAllEndpoints)
- // useEffect(() => {
- // async function fetchEndpoints() {
- // try {
- // let response = await getAllEndpoints(dispatch)
- // if (!response) return;
- // } catch (error) {
- // console.log(error);
- // }
- // }
+ useEffect(() => {
+ async function fetchEndpoints() {
+ try {
+ let response = await getAllEndpoints(dispatch)
+ if (!response) return;
+ } catch (error) {
+ console.log(error);
+ }
+ }
- // fetchEndpoints()
- // }, [])
+ fetchEndpoints()
+ }, [])
- const endpoints = [
- {
- id: "6c4fa765-f6bf-4f00-950f-3315f504cc50",
- path_url: "http://localhost:3000/api/v1/health/",
- status: "down"
- },
- {
- id: "4abbf98f-8a8c-46ca-a2c5-ae8eaefbef60",
- path_url: "http://localhost:3000/api/v1/version/",
- status: "down"
- }
- ]
+ // const endpoints = [
+ // {
+ // id: "6c4fa765-f6bf-4f00-950f-3315f504cc50",
+ // path_url: "http://localhost:3000/api/v1/health/",
+ // status: "down"
+ // },
+ // {
+ // id: "4abbf98f-8a8c-46ca-a2c5-ae8eaefbef60",
+ // path_url: "http://localhost:3000/api/v1/version/",
+ // status: "down"
+ // }
+ // ]
- const loading = false
+ // const loading = false
const [viewElement, setViewElement] = useState(false)
const handleViewElement = () => {
diff --git a/web/ngonx-app/src/components/Footer.jsx b/web/src/components/Footer.jsx
similarity index 100%
rename from web/ngonx-app/src/components/Footer.jsx
rename to web/src/components/Footer.jsx
diff --git a/web/ngonx-app/src/components/Header.jsx b/web/src/components/Header.jsx
similarity index 98%
rename from web/ngonx-app/src/components/Header.jsx
rename to web/src/components/Header.jsx
index 92c8e52..05ac5f3 100644
--- a/web/ngonx-app/src/components/Header.jsx
+++ b/web/src/components/Header.jsx
@@ -88,11 +88,11 @@ const MenuLinks = ({ isOpen, colorMode, toggleColorMode }) => {
direction={["column", "row", "row", "row"]}
pt={[4, 4, 0, 0]}
>
-
+ */}
{
}
};
-const ROOT_URL = 'http://localhost:10001';
+// const ROOT_URL = 'http://localhost:10001';
export async function getAllEndpoints(dispatch) {
const requestOptions = {
@@ -40,7 +40,7 @@ export async function getAllEndpoints(dispatch) {
try {
dispatch({ type: 'ENDPOINTS_REQUEST' });
- let response = await fetch(`${ROOT_URL}/api/v1/mngt`, requestOptions);
+ let response = await fetch(`/api/v1/mngt/`, requestOptions);
let data = await response.json();
if (data.length >= 0) {
diff --git a/web/ngonx-app/src/logo.svg b/web/src/logo.svg
similarity index 100%
rename from web/ngonx-app/src/logo.svg
rename to web/src/logo.svg
diff --git a/web/ngonx-app/src/main.jsx b/web/src/main.jsx
similarity index 100%
rename from web/ngonx-app/src/main.jsx
rename to web/src/main.jsx
diff --git a/web/ngonx-app/src/theme.js b/web/src/theme.js
similarity index 100%
rename from web/ngonx-app/src/theme.js
rename to web/src/theme.js
diff --git a/web/ngonx-app/vite.config.js b/web/vite.config.js
similarity index 100%
rename from web/ngonx-app/vite.config.js
rename to web/vite.config.js
diff --git a/web/ngonx-app/yarn.lock b/web/yarn.lock
similarity index 100%
rename from web/ngonx-app/yarn.lock
rename to web/yarn.lock