forked from BLC/AyposWeb
using the new testing endpoint
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -144,7 +144,7 @@ const MonitoringSystem: React.FC<MonitoringSystemProps> = ({
|
||||
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
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user