Commit 9c9a7fa9 by 孙香冬

no message

parent 8f7b0a9a
......@@ -3,7 +3,7 @@ import * as fs from "fs";
import { BizError } from "../util/bizError";
import { analysisXml } from "../util/myXML";
export let port = Number(process.env.PORT) || Number(process.argv[3]) || 30002; //如果xml里面没有配置 就会使用到这里的端口
export let port = Number(process.env.PORT) || Number(process.argv[3]) || 30001; //如果xml里面没有配置 就会使用到这里的端口
export let dbConfig;
......
......@@ -5,9 +5,9 @@ import { get } from "../../util/request";
export async function getHardware() {
let url = "http://10.51.50.140:8080/api/static/PrivateCloudUsageStatics";
let result:any = await get(url, {}, {});
// let result:any = await get(url, {}, {});
result = {
let 云资源result = {
"content":[
{
"id":1,
......@@ -47,22 +47,56 @@ export async function getHardware() {
"first":true,
"empty":false
};
console.log(result);
if (result.content && result.content[0]) {
let contentInfo = result.content[0];
if (云资源result.content && 云资源result.content[0]) {
let contentInfo = 云资源result.content[0];
let {id, cpu, mem, localDisk, cloudDisk, network, rack, security, server} = contentInfo;
let 计算云资源 = {
"cpu":"",
"内存":"",
"本地磁盘":"",
"云磁盘总量":""
"cpu":cpu,
"内存":mem,
"本地磁盘":localDisk,
"云磁盘总量":cloudDisk
};
let 物理资源 = {
"物理机":"",
"网络设备":"",
"安全设备":"",
"机柜":""
};
}
let 使用率result = {
"id":30,
"collectDate":"2022072710",
"ssdUsed":"24%",
"sataUsed":"74%",
"bosUsed":"73.83%",
"localDiskUsed":"30.00%",
"memoryUsed":"31.00%",
"vcpuUsed":"65.00%",
"hosts":"40",
"runningBcc":"251",
"errorDiskNum":"3"
}
if (使用率result) {
let 使用率 = {
"cpu":"",
"cpu":使用率result.vcpuUsed,
"内存":使用率result.memoryUsed,
"本地磁盘":使用率result.localDiskUsed,
"云磁盘cds ssd池":使用率result.ssdUsed,
"云磁盘cds sata池":使用率result.sataUsed,
"对象存储":使用率result.bosUsed
};
}
let 物理资源result = {}
console.log();
}
......@@ -5,7 +5,7 @@ let 月里程数据:any = [];//格式 [{key:"日期 格式是 2021.1", count:"
let 企业日里程数据 = {}; //格式 {"企业名称":{count:"测试里程", autoCount:"功能测试里程"} }
let lastMonths = "";
//数据库源数据接口
//月度测试数据库源数据接口
export async function getTestAnalysis() {
//在月里程数据集合中 从后往前拿20个月份的数据,动态的拿本月的数据 拼接好返回 不要改变源数据
let monthMileage = [];
......
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