diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..041db02 Binary files /dev/null and b/.DS_Store differ diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..88fe90c --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,2 @@ +# PORT = 3002 +# Port to run the server on \ No newline at end of file diff --git a/backend/README.md b/backend/README.md index f596192..fc8c564 100644 --- a/backend/README.md +++ b/backend/README.md @@ -8,6 +8,7 @@ The services and their expected responses are contained in the `endpoints.jsoon` To run this server locally, follow these steps: * Clone the repository with `git clone https://github.com/shardeum/network-status.git` +* Change into the backend directory with `cd backend` * Install the dependencies with `npm install` * Run the local dev server with: `npm start` * This should start the server on port 3002 from where it will feed data to Prometheus. diff --git a/backend/endpoints.json b/backend/endpoints.json index 7d7d06a..c3e5d97 100644 --- a/backend/endpoints.json +++ b/backend/endpoints.json @@ -57,8 +57,7 @@ { "url": "https://explorer-sphinx.shardeum.orgdfsgs/", "name": "Explorer", - "help": "This is the Shardeum Explorer", - "expectedResponse": "The Shardeum Betanet Explorer" + "help": "This is the Shardeum Explorer" }, { diff --git a/backend/services/servicecheck.ts b/backend/services/servicecheck.ts index 362f492..90a39c9 100644 --- a/backend/services/servicecheck.ts +++ b/backend/services/servicecheck.ts @@ -39,6 +39,7 @@ class HealthChecker { this.startPeriodicChecks(); } flattenEndpoints(urls: any[]) { + // If an endpoint is part of a group, it is flattened so that each service can be checked individually. // If an endpoint is part of a group, it is flattened so that each service can be checked individually. return urls.flatMap(endpoint => 'servers' in endpoint ? endpoint.servers : [endpoint]); } diff --git a/frontend/.env.example b/frontend/.env.example new file mode 100644 index 0000000..8a60017 --- /dev/null +++ b/frontend/.env.example @@ -0,0 +1,3 @@ +# http://localhost:9090 this is where your local prometheus instance is running +# NEXT_PUBLIC_PROMETHEUS_URL_RANGE = "http://localhost:9090/api/v1/query_range" +# NEXT_PUBLIC_PROMETHEUS_URL = "http://localhost:9090/api/v1/query?query=Shardeum" \ No newline at end of file diff --git a/frontend/.gitignore b/frontend/.gitignore index 20133a7..f3e685b 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -27,7 +27,7 @@ yarn-debug.log* yarn-error.log* # local env files -.env*.local +.env.local # vercel .vercel diff --git a/frontend/src/app/latency/latencygraph.tsx b/frontend/src/app/latency/latencygraph.tsx index 6aea8c1..8975325 100644 --- a/frontend/src/app/latency/latencygraph.tsx +++ b/frontend/src/app/latency/latencygraph.tsx @@ -5,7 +5,6 @@ export default function LatencyGraph({ data, name }: Readonly<{ data: any, name: const details = { chart: { id: name, - type: "line", animations: { enabled: true, @@ -14,9 +13,6 @@ export default function LatencyGraph({ data, name }: Readonly<{ data: any, name: speed: 2000 } }, - toolbar: { - show: false - }, }, @@ -26,18 +22,10 @@ export default function LatencyGraph({ data, name }: Readonly<{ data: any, name: }, yaxis: [ { - axisTicks: { - show: true - }, axisBorder: { show: true, color: "#247BA0" }, - labels: { - style: { - colors: "#247BA0" - } - }, title: { text: "Response time (s)", style: { @@ -48,14 +36,11 @@ export default function LatencyGraph({ data, name }: Readonly<{ data: any, name: } } ], - dataLabels: { - enabled: false - }, + stroke: { curve: 'straight', }, title: { - // text: 'Latency Graph', text: name, align: 'left' },