Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
motorCity
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
motorCity
Commits
c74f979d
Commit
c74f979d
authored
Aug 15, 2022
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
120c000c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
serverConfig.xml
serverConfig.xml
+12
-0
serverConfig.ts
src/config/serverConfig.ts
+2
-0
hardwareData.ts
src/data/interface/hardwareData.ts
+2
-2
wsData.ts
src/data/interface/wsData.ts
+5
-3
No files found.
serverConfig.xml
View file @
c74f979d
...
...
@@ -3,4 +3,15 @@
<rightView>
<ipPort>
http://10.51.50.136:8090/sql/execute
</ipPort>
</rightView>
<leftView>
<cloudResource>
</cloudResource>
<cloudResourceUseRate>
</cloudResourceUseRate>
<physicalResource>
</physicalResource>
</leftView>
</config>
\ No newline at end of file
src/config/serverConfig.ts
View file @
c74f979d
...
...
@@ -12,6 +12,8 @@ export let mongoServerConstVal;
export
let
systemLogPath
;
export
let
mySqlConfig
;
export
let
leftRequestUrl
=
{
physicalResource
:
""
};
const
ConfigName
=
"serverConfig.xml"
;
export
async
function
initConfig
()
{
try
{
...
...
src/data/interface/hardwareData.ts
View file @
c74f979d
import
{
leftRequestUrl
}
from
"../../config/serverConfig"
;
import
{
get
}
from
"../../util/request"
;
...
...
@@ -5,7 +6,7 @@ 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
(
leftRequestUrl
.
physicalResource
,
{},
{});
let
计算云资源
;
let
物理资源
;
let
使用率
;
...
...
@@ -60,7 +61,6 @@ export async function getHardware() {
"本地磁盘"
:
localDisk
,
"云磁盘总量"
:
cloudDisk
};
物理资源
=
{
"物理机"
:
server
,
"网络设备"
:
network
,
...
...
src/data/interface/wsData.ts
View file @
c74f979d
...
...
@@ -76,6 +76,7 @@ async function createSocket() {
ws
.
onmessage
=
(
msg
)
=>
{
//接收数据
console
.
log
(
msg
);
stats
(
msg
);
}
ws
.
onerror
=
(
error
)
=>
{
...
...
@@ -95,12 +96,13 @@ export async function initWSData() {
let
vehicleQueue
=
{};
//结构:{vehicleid:{auto:0, }}
let
vehicleQueue
=
{};
function
stats
(
data
)
{
//记录车辆
}
/*
/* data 数据长这样
{
"accLat":0.08,
"accLong":1.542,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment