From 79922fbc0b523fd2168c8407d4e45644ff481e95 Mon Sep 17 00:00:00 2001 From: The-Coding-Kiddo Date: Wed, 2 Jul 2025 01:41:07 +0300 Subject: [PATCH] using the new testing endpoint --- README.md | 2 +- src/components/Migration/SummaryStats.tsx | 2 +- src/components/Migration/hooks.ts | 2 +- src/pages/Maintenance.tsx | 2 +- src/pages/Migration.tsx | 6 +++--- src/pages/MonitoringSystem.tsx | 2 +- src/pages/Temperature.tsx | 4 ++-- src/pages/Test.tsx | 2 +- src/services/monitoringService.ts | 2 +- src/services/stressService.ts | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b63287c..2cb7e81 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ npm run preview ## API Configuration -The application connects to an API server at `http://10.150.1.167:8003`. Make sure this endpoint is accessible from your network. +The application connects to an API server at `http://141.196.166.241:8003`. Make sure this endpoint is accessible from your network. ## Environment Variables diff --git a/src/components/Migration/SummaryStats.tsx b/src/components/Migration/SummaryStats.tsx index e0bbc4c..50eb523 100644 --- a/src/components/Migration/SummaryStats.tsx +++ b/src/components/Migration/SummaryStats.tsx @@ -21,7 +21,7 @@ interface VMPlacementData { }>; } -const ENDPOINT = 'http://10.150.1.167:8003/prom/get_chart_data/vm_placement'; +const ENDPOINT = 'http://141.196.166.241:8003/prom/get_chart_data/vm_placement'; const REFRESH_INTERVAL = 30000; // 30 seconds const SummaryStats: React.FC = () => { diff --git a/src/components/Migration/hooks.ts b/src/components/Migration/hooks.ts index ee23aad..180b2ba 100644 --- a/src/components/Migration/hooks.ts +++ b/src/components/Migration/hooks.ts @@ -1,7 +1,7 @@ import { useState, useEffect } from 'react'; import { VMDetails, GainBeforeData, MigrationAdviceData } from './types'; -const API_BASE_URL = 'http://10.150.1.167:8003'; +const API_BASE_URL = 'http://141.196.166.241:8003'; const REFRESH_INTERVAL = 30000; // 30 seconds interface GainAfterData { diff --git a/src/pages/Maintenance.tsx b/src/pages/Maintenance.tsx index 6f8f48c..948f84a 100644 --- a/src/pages/Maintenance.tsx +++ b/src/pages/Maintenance.tsx @@ -24,7 +24,7 @@ const Maintenance = () => { useEffect(() => { const fetchData = async () => { try { - const response = await fetch('http://10.150.1.167:8003/prom/get_chart_data/maintenance/20'); + const response = await fetch('http://141.196.166.241:8003/prom/get_chart_data/maintenance/20'); const result = await response.json(); if (result.data && result.data.length > 0) { diff --git a/src/pages/Migration.tsx b/src/pages/Migration.tsx index 9b6ee5e..e46ea8f 100644 --- a/src/pages/Migration.tsx +++ b/src/pages/Migration.tsx @@ -31,7 +31,7 @@ import VerifiedMigration from '../components/Migration/VerifiedMigration'; import { useMigrationData, useGainAfterData } from '../components/Migration/hooks'; // Constants -const API_BASE_URL = 'http://10.150.1.167:8003'; +const API_BASE_URL = 'http://141.196.166.241:8003'; const REFRESH_INTERVAL = 30000; // 30 seconds interface VMPlacementData { @@ -413,7 +413,7 @@ const Migration = () => { setHasProgress(true); // First, send the POST request for migration approval - const approvalResponse = await fetch('http://10.150.1.167:8003/prom/migration/decisions4?run_migration=true', { + const approvalResponse = await fetch('http://141.196.166.241:8003/prom/migration/decisions4?run_migration=true', { method: 'POST', headers: { 'accept': 'application/json' @@ -455,7 +455,7 @@ const Migration = () => { try { setIsProcessing(true); - const response = await fetch('http://10.150.1.167:8003/prom/migration/decisions4?run_migration=false', { + const response = await fetch('http://141.196.166.241:8003/prom/migration/decisions4?run_migration=false', { method: 'POST', headers: { 'accept': 'application/json' diff --git a/src/pages/MonitoringSystem.tsx b/src/pages/MonitoringSystem.tsx index 0273799..5173127 100644 --- a/src/pages/MonitoringSystem.tsx +++ b/src/pages/MonitoringSystem.tsx @@ -144,7 +144,7 @@ const MonitoringSystem: React.FC = ({ const fetchData = async () => { setLoading(true); try { - const response = await fetch('http://10.150.1.167:8003/prom/monitoring'); + const response = await fetch('http://141.196.166.241:8003/prom/monitoring'); const result: ApiResponse = await response.json(); // Create hierarchical structure diff --git a/src/pages/Temperature.tsx b/src/pages/Temperature.tsx index e890362..a04b04d 100644 --- a/src/pages/Temperature.tsx +++ b/src/pages/Temperature.tsx @@ -52,7 +52,7 @@ const Temperature = () => { setRefreshing(true); } - const response = await fetch('http://10.150.1.167:8003/prom/get_chart_data/temperature/20'); + const response = await fetch('http://141.196.166.241:8003/prom/get_chart_data/temperature/20'); const result = await response.json(); if (result.data && result.data.length > 0) { @@ -337,7 +337,7 @@ const Temperature = () => { const handleTemperatureDecision = async (approval: boolean) => { try { setDecisionLoading(true); - const response = await fetch('http://10.150.1.167:8003/prom/temperature/decisions?approval=' + approval, { + const response = await fetch('http://141.196.166.241:8003/prom/temperature/decisions?approval=' + approval, { method: 'POST', headers: { 'accept': 'application/json', diff --git a/src/pages/Test.tsx b/src/pages/Test.tsx index f656616..52cbfa2 100644 --- a/src/pages/Test.tsx +++ b/src/pages/Test.tsx @@ -112,7 +112,7 @@ const Test = () => { const fetchVMs = async () => { setIsLoadingVMs(true); try { - const response = await fetch('http://10.150.1.167:8003/prom/monitoring'); + const response = await fetch('http://141.196.166.241:8003/prom/monitoring'); const data: MonitoringResponse = await response.json(); // Extract VMs from the optimization space diff --git a/src/services/monitoringService.ts b/src/services/monitoringService.ts index a1e4de8..0f8582a 100644 --- a/src/services/monitoringService.ts +++ b/src/services/monitoringService.ts @@ -1,6 +1,6 @@ import axios from 'axios'; -const BASE_URL = 'http://10.150.1.167:8003'; +const BASE_URL = 'http://141.196.166.241:8003'; export interface MonitoringConfig { migration: { diff --git a/src/services/stressService.ts b/src/services/stressService.ts index e8b4409..233b2c3 100644 --- a/src/services/stressService.ts +++ b/src/services/stressService.ts @@ -1,6 +1,6 @@ import axios from 'axios'; -const BASE_URL = 'http://10.150.1.167:8003'; +const BASE_URL = 'http://141.196.166.241:8003'; export interface StressConfig { vms: string[];