Commit c74f979d by lixinming

no message

parent 120c000c
...@@ -3,4 +3,15 @@ ...@@ -3,4 +3,15 @@
<rightView> <rightView>
<ipPort>http://10.51.50.136:8090/sql/execute</ipPort> <ipPort>http://10.51.50.136:8090/sql/execute</ipPort>
</rightView> </rightView>
<leftView>
<cloudResource>
</cloudResource>
<cloudResourceUseRate>
</cloudResourceUseRate>
<physicalResource>
</physicalResource>
</leftView>
</config> </config>
\ No newline at end of file
...@@ -12,6 +12,8 @@ export let mongoServerConstVal; ...@@ -12,6 +12,8 @@ export let mongoServerConstVal;
export let systemLogPath; export let systemLogPath;
export let mySqlConfig; export let mySqlConfig;
export let leftRequestUrl = {physicalResource:""};
const ConfigName = "serverConfig.xml"; const ConfigName = "serverConfig.xml";
export async function initConfig() { export async function initConfig() {
try { try {
......
import { leftRequestUrl } from "../../config/serverConfig";
import { get } from "../../util/request"; import { get } from "../../util/request";
...@@ -5,7 +6,7 @@ import { get } from "../../util/request"; ...@@ -5,7 +6,7 @@ import { get } from "../../util/request";
export async function getHardware() { export async function getHardware() {
let url = "http://10.51.50.140:8080/api/static/PrivateCloudUsageStatics"; let url = "http://10.51.50.140:8080/api/static/PrivateCloudUsageStatics";
// let result:any = await get(url, {}, {}); let result:any = await get(leftRequestUrl.physicalResource, {}, {});
let 计算云资源; let 计算云资源;
let 物理资源; let 物理资源;
let 使用率; let 使用率;
...@@ -60,7 +61,6 @@ export async function getHardware() { ...@@ -60,7 +61,6 @@ export async function getHardware() {
"本地磁盘":localDisk, "本地磁盘":localDisk,
"云磁盘总量":cloudDisk "云磁盘总量":cloudDisk
}; };
物理资源 = { 物理资源 = {
"物理机":server, "物理机":server,
"网络设备":network, "网络设备":network,
......
...@@ -76,6 +76,7 @@ async function createSocket() { ...@@ -76,6 +76,7 @@ async function createSocket() {
ws.onmessage = (msg) => { ws.onmessage = (msg) => {
//接收数据 //接收数据
console.log(msg); console.log(msg);
stats(msg);
} }
ws.onerror = (error) => { ws.onerror = (error) => {
...@@ -95,12 +96,13 @@ export async function initWSData() { ...@@ -95,12 +96,13 @@ export async function initWSData() {
let vehicleQueue = {};//结构:{vehicleid:{auto:0, }} let vehicleQueue = {};
function stats(data) { function stats(data) {
//记录车辆
} }
/*
/* data 数据长这样
{ {
"accLat":0.08, "accLat":0.08,
"accLong":1.542, "accLong":1.542,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment