forked from BLC/AyposWeb
using the new testing endpoint
This commit is contained in:
@@ -60,7 +60,7 @@ npm run preview
|
|||||||
|
|
||||||
## API Configuration
|
## 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
|
## 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 REFRESH_INTERVAL = 30000; // 30 seconds
|
||||||
|
|
||||||
const SummaryStats: React.FC = () => {
|
const SummaryStats: React.FC = () => {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import { VMDetails, GainBeforeData, MigrationAdviceData } from './types';
|
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
|
const REFRESH_INTERVAL = 30000; // 30 seconds
|
||||||
|
|
||||||
interface GainAfterData {
|
interface GainAfterData {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const Maintenance = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
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();
|
const result = await response.json();
|
||||||
|
|
||||||
if (result.data && result.data.length > 0) {
|
if (result.data && result.data.length > 0) {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import VerifiedMigration from '../components/Migration/VerifiedMigration';
|
|||||||
import { useMigrationData, useGainAfterData } from '../components/Migration/hooks';
|
import { useMigrationData, useGainAfterData } from '../components/Migration/hooks';
|
||||||
|
|
||||||
// Constants
|
// 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
|
const REFRESH_INTERVAL = 30000; // 30 seconds
|
||||||
|
|
||||||
interface VMPlacementData {
|
interface VMPlacementData {
|
||||||
@@ -413,7 +413,7 @@ const Migration = () => {
|
|||||||
setHasProgress(true);
|
setHasProgress(true);
|
||||||
|
|
||||||
// First, send the POST request for migration approval
|
// 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',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'accept': 'application/json'
|
'accept': 'application/json'
|
||||||
@@ -455,7 +455,7 @@ const Migration = () => {
|
|||||||
try {
|
try {
|
||||||
setIsProcessing(true);
|
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',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'accept': 'application/json'
|
'accept': 'application/json'
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ const MonitoringSystem: React.FC<MonitoringSystemProps> = ({
|
|||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
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();
|
const result: ApiResponse = await response.json();
|
||||||
|
|
||||||
// Create hierarchical structure
|
// Create hierarchical structure
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const Temperature = () => {
|
|||||||
setRefreshing(true);
|
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();
|
const result = await response.json();
|
||||||
|
|
||||||
if (result.data && result.data.length > 0) {
|
if (result.data && result.data.length > 0) {
|
||||||
@@ -337,7 +337,7 @@ const Temperature = () => {
|
|||||||
const handleTemperatureDecision = async (approval: boolean) => {
|
const handleTemperatureDecision = async (approval: boolean) => {
|
||||||
try {
|
try {
|
||||||
setDecisionLoading(true);
|
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',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'accept': 'application/json',
|
'accept': 'application/json',
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ const Test = () => {
|
|||||||
const fetchVMs = async () => {
|
const fetchVMs = async () => {
|
||||||
setIsLoadingVMs(true);
|
setIsLoadingVMs(true);
|
||||||
try {
|
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();
|
const data: MonitoringResponse = await response.json();
|
||||||
|
|
||||||
// Extract VMs from the optimization space
|
// Extract VMs from the optimization space
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import axios from 'axios';
|
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 {
|
export interface MonitoringConfig {
|
||||||
migration: {
|
migration: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import axios from 'axios';
|
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 {
|
export interface StressConfig {
|
||||||
vms: string[];
|
vms: string[];
|
||||||
|
|||||||
Reference in New Issue
Block a user