forked from BLC/AyposWeb
changed ip for testing
This commit is contained in:
@@ -60,7 +60,7 @@ npm run preview
|
||||
|
||||
## API Configuration
|
||||
|
||||
The application connects to an API server at `http://141.196.83.136:8003`. Make sure this endpoint is accessible from your network.
|
||||
The application connects to an API server at `http://10.150.1.167:8003`. Make sure this endpoint is accessible from your network.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
|
||||
@@ -53,12 +53,15 @@ const StyledListItemButton = styled(ListItemButton)(({ theme }) => ({
|
||||
fontSize: '0.9rem',
|
||||
color: theme.palette.text.secondary,
|
||||
transition: 'all 0.2s ease',
|
||||
|
||||
'&.Mui-selected': {
|
||||
background: '#028a4a',
|
||||
color: '#ffffff',
|
||||
'& .MuiListItemIcon-root': {
|
||||
color: '#ffffff',
|
||||
},
|
||||
'& .MuiListItemIcon-root svg': {
|
||||
stroke: '#ffffff',
|
||||
color: '#ffffff',
|
||||
},
|
||||
'& .MuiListItemText-primary': {
|
||||
color: '#ffffff',
|
||||
@@ -67,8 +70,12 @@ const StyledListItemButton = styled(ListItemButton)(({ theme }) => ({
|
||||
'&:hover': {
|
||||
backgroundColor: '#f8f8f8',
|
||||
color: '#028a4a',
|
||||
'& .MuiListItemIcon-root': {
|
||||
color: '#028a4a',
|
||||
},
|
||||
'& .MuiListItemIcon-root svg': {
|
||||
stroke: '#028a4a',
|
||||
color: '#028a4a',
|
||||
},
|
||||
'& .MuiListItemText-primary': {
|
||||
color: '#028a4a',
|
||||
|
||||
@@ -21,7 +21,7 @@ interface VMPlacementData {
|
||||
}>;
|
||||
}
|
||||
|
||||
const ENDPOINT = 'http://141.196.83.136:8003/prom/get_chart_data/vm_placement';
|
||||
const ENDPOINT = 'http://10.150.1.167: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://141.196.83.136:8003';
|
||||
const API_BASE_URL = 'http://10.150.1.167:8003';
|
||||
const REFRESH_INTERVAL = 30000; // 30 seconds
|
||||
|
||||
interface GainAfterData {
|
||||
|
||||
@@ -46,19 +46,16 @@ import { monitoringService, MonitoringStatus } from '../services/monitoringServi
|
||||
import DebugConsole from '../components/DebugConsole';
|
||||
import MonitoringSystem from './MonitoringSystem';
|
||||
|
||||
// Professional, consistent card style (no animation)
|
||||
const StyledCard = styled(Paper)(({ theme }) => ({
|
||||
borderRadius: '0.357rem',
|
||||
borderRadius: '0.6rem',
|
||||
padding: theme.spacing(3),
|
||||
height: '100%',
|
||||
minHeight: 260,
|
||||
backgroundColor: theme.palette.background.paper,
|
||||
boxShadow: theme.shadows[2],
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
backgroundColor: theme.palette.background.paper,
|
||||
transition: 'transform 0.2s, box-shadow 0.2s',
|
||||
boxShadow: theme.shadows[3],
|
||||
'&:hover': {
|
||||
transform: 'translateY(-4px)',
|
||||
boxShadow: theme.shadows[8],
|
||||
},
|
||||
justifyContent: 'flex-start',
|
||||
}));
|
||||
|
||||
const StyledSelect = styled(Select)(({ theme }) => ({
|
||||
@@ -71,14 +68,16 @@ const StyledSelect = styled(Select)(({ theme }) => ({
|
||||
},
|
||||
}));
|
||||
|
||||
// Professional header style
|
||||
const SectionTitle = styled(Typography)(({ theme }) => ({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: theme.spacing(1),
|
||||
marginBottom: theme.spacing(3),
|
||||
color: theme.palette.text.secondary,
|
||||
color: theme.palette.text.primary,
|
||||
fontWeight: 700,
|
||||
fontFamily: theme.typography.fontFamily,
|
||||
fontFamily: 'Montserrat, Helvetica, Arial, serif',
|
||||
fontSize: theme.typography.h6.fontSize, // Use theme's h6 size (usually 1.125rem)
|
||||
}));
|
||||
|
||||
const IconWrapper = styled(Box)(({ theme }) => ({
|
||||
@@ -503,12 +502,12 @@ const Home = () => {
|
||||
View Optimization Selection
|
||||
</Button>
|
||||
|
||||
<Grid container spacing={3}>
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
{/* Environmental Temperature Section */}
|
||||
<Grid item xs={12} md={2.7}>
|
||||
<StyledCard elevation={3}>
|
||||
<SectionTitle variant="h6">
|
||||
<ThermostatIcon color="primary" fontSize="large" />
|
||||
<Grid item xs={12} md={3}>
|
||||
<StyledCard elevation={2}>
|
||||
<SectionTitle>
|
||||
<ThermostatIcon color="primary" fontSize="medium" />
|
||||
Environmental Temperature
|
||||
</SectionTitle>
|
||||
|
||||
@@ -569,9 +568,9 @@ const Home = () => {
|
||||
</Grid>
|
||||
|
||||
{/* Preventive Maintenance Section */}
|
||||
<Grid item xs={12} md={2.7}>
|
||||
<StyledCard elevation={3}>
|
||||
<SectionTitle variant="h6">
|
||||
<Grid item xs={12} md={3}>
|
||||
<StyledCard elevation={2}>
|
||||
<SectionTitle>
|
||||
<BuildIcon color="primary" fontSize="large" />
|
||||
Preventive Maintenance
|
||||
</SectionTitle>
|
||||
@@ -633,9 +632,9 @@ const Home = () => {
|
||||
</Grid>
|
||||
|
||||
{/* Migration Advice Section */}
|
||||
<Grid item xs={12} md={2.7}>
|
||||
<StyledCard elevation={3}>
|
||||
<SectionTitle variant="h6">
|
||||
<Grid item xs={12} md={3}>
|
||||
<StyledCard elevation={2}>
|
||||
<SectionTitle>
|
||||
<SwapHorizIcon color="primary" fontSize="large" />
|
||||
Migration Advice
|
||||
</SectionTitle>
|
||||
@@ -746,10 +745,10 @@ const Home = () => {
|
||||
</Grid>
|
||||
|
||||
{/* Weight Configuration Section */}
|
||||
<Grid item xs={12} md={3.9}>
|
||||
<StyledCard elevation={3}>
|
||||
<Grid item xs={12} md={3}>
|
||||
<StyledCard elevation={2}>
|
||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }}>
|
||||
<SectionTitle variant="h6" sx={{ mb: 0 }}>
|
||||
<SectionTitle sx={{ mb: 0 }}>
|
||||
<BalanceIcon color="primary" fontSize="large" />
|
||||
Weight Of Sustainability Criteria
|
||||
</SectionTitle>
|
||||
|
||||
@@ -24,7 +24,7 @@ const Maintenance = () => {
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const response = await fetch('http://141.196.83.136:8003/prom/get_chart_data/maintenance/20');
|
||||
const response = await fetch('http://10.150.1.167: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://141.196.83.136:8003';
|
||||
const API_BASE_URL = 'http://10.150.1.167: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://141.196.83.136:8003/prom/migration/decisions4?run_migration=true', {
|
||||
const approvalResponse = await fetch('http://10.150.1.167: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://141.196.83.136:8003/prom/migration/decisions4?run_migration=false', {
|
||||
const response = await fetch('http://10.150.1.167: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://141.196.83.136:8003/prom/monitoring');
|
||||
const response = await fetch('http://10.150.1.167: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://141.196.83.136:8003/prom/get_chart_data/temperature/20');
|
||||
const response = await fetch('http://10.150.1.167: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://141.196.83.136:8003/prom/temperature/decisions?approval=' + approval, {
|
||||
const response = await fetch('http://10.150.1.167: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://141.196.83.136:8003/prom/monitoring');
|
||||
const response = await fetch('http://10.150.1.167: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://141.196.83.136:8003';
|
||||
const BASE_URL = 'http://10.150.1.167:8003';
|
||||
|
||||
export interface MonitoringConfig {
|
||||
migration: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const BASE_URL = 'http://141.196.83.136:8003';
|
||||
const BASE_URL = 'http://10.150.1.167:8003';
|
||||
|
||||
export interface StressConfig {
|
||||
vms: string[];
|
||||
|
||||
Reference in New Issue
Block a user