Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AIEngine
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AIEngine
Commits
333a40d7
Commit
333a40d7
authored
May 26, 2021
by
wangdng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chartd3js_uti
parent
a70b293a
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
390 additions
and
241 deletions
+390
-241
.electron-vue/build.js
.electron-vue/build.js
+9
-9
.electron-vue/dev-runner.js
.electron-vue/dev-runner.js
+5
-5
package.json
package.json
+1
-1
src/front/src/components/LandingPage.vue
src/front/src/components/LandingPage.vue
+4
-4
src/front/src/components/SshPage/SshPage.vue
src/front/src/components/SshPage/SshPage.vue
+1
-1
src/front/src/components/sliceInfos/BaseStationInfo.vue
src/front/src/components/sliceInfos/BaseStationInfo.vue
+4
-4
src/front/src/components/sliceInfos/PRBInfo.vue
src/front/src/components/sliceInfos/PRBInfo.vue
+2
-2
src/front/src/components/sliceInfos/SliceInformation.vue
src/front/src/components/sliceInfos/SliceInformation.vue
+2
-2
src/front/src/components/sliceInfos/UeLists.vue
src/front/src/components/sliceInfos/UeLists.vue
+2
-2
src/front/src/store/getters.js
src/front/src/store/getters.js
+1
-1
src/front/utils/network_services.js
src/front/utils/network_services.js
+2
-2
src/main/index.dev.js
src/main/index.dev.js
+1
-1
src/main/index.js
src/main/index.js
+3
-3
src/renderer/components/LandingPage.vue
src/renderer/components/LandingPage.vue
+4
-4
src/renderer/components/ResultPages/CalPage.vue
src/renderer/components/ResultPages/CalPage.vue
+1
-1
src/renderer/components/ResultPages/D3Page.vue
src/renderer/components/ResultPages/D3Page.vue
+95
-4
src/renderer/components/ResultPages/MathPage.vue
src/renderer/components/ResultPages/MathPage.vue
+62
-5
src/renderer/components/SshPage/SshPage.vue
src/renderer/components/SshPage/SshPage.vue
+1
-1
src/renderer/components/sliceInfos/BaseStationInfo.vue
src/renderer/components/sliceInfos/BaseStationInfo.vue
+8
-8
src/renderer/components/sliceInfos/PRBInfo.vue
src/renderer/components/sliceInfos/PRBInfo.vue
+2
-2
src/renderer/components/sliceInfos/SliceInformation.vue
src/renderer/components/sliceInfos/SliceInformation.vue
+2
-2
src/renderer/components/sliceInfos/UeLists.vue
src/renderer/components/sliceInfos/UeLists.vue
+2
-2
src/renderer/store/getters.js
src/renderer/store/getters.js
+1
-1
src/utils/graph.js
src/utils/graph.js
+4
-4
src/utils/network_services.js
src/utils/network_services.js
+2
-2
src/utils/timechart.js
src/utils/timechart.js
+11
-8
yarn.lock
yarn.lock
+158
-160
No files found.
.electron-vue/build.js
View file @
333a40d7
...
...
@@ -25,7 +25,7 @@ else build()
function
clean
()
{
del
.
sync
([
'
build/*
'
,
'
!build/icons
'
,
'
!build/icons/icon.*
'
])
console
.
log
(
`\n
${
doneLog
}
\n`
)
//
console.log(`\n${doneLog}\n`)
process
.
exit
()
}
...
...
@@ -44,8 +44,8 @@ function build () {
m
.
on
(
'
success
'
,
()
=>
{
process
.
stdout
.
write
(
'
\
x1B[2J
\
x1B[0f
'
)
console
.
log
(
`\n\n
${
results
}
`
)
console
.
log
(
`
${
okayLog
}
take it away
${
chalk
.
yellow
(
'
`electron-builder`
'
)}
\n`
)
//
console.log(`\n\n${results}`)
//
console.log(`${okayLog}take it away ${chalk.yellow('`electron-builder`')}\n`)
process
.
exit
()
})
...
...
@@ -54,7 +54,7 @@ function build () {
m
.
success
(
'
main
'
)
}).
catch
(
err
=>
{
m
.
error
(
'
main
'
)
console
.
log
(
`\n
${
errorLog
}
failed to build main process`
)
//
console.log(`\n ${errorLog}failed to build main process`)
console
.
error
(
`\n
${
err
}
\n`
)
process
.
exit
(
1
)
})
...
...
@@ -64,7 +64,7 @@ function build () {
m
.
success
(
'
renderer
'
)
}).
catch
(
err
=>
{
m
.
error
(
'
renderer
'
)
console
.
log
(
`\n
${
errorLog
}
failed to build renderer process`
)
//
console.log(`\n ${errorLog}failed to build renderer process`)
console
.
error
(
`\n
${
err
}
\n`
)
process
.
exit
(
1
)
})
...
...
@@ -102,9 +102,9 @@ function web () {
del
.
sync
([
'
dist/web/*
'
,
'
!.gitkeep
'
])
webConfig
.
mode
=
'
production
'
webpack
(
webConfig
,
(
err
,
stats
)
=>
{
if
(
err
||
stats
.
hasErrors
())
console
.
log
(
err
)
if
(
err
||
stats
.
hasErrors
())
//
console.log(err)
console
.
log
(
stats
.
toString
({
//
console.log(stats.toString({
chunks
:
false
,
colors
:
true
}))
...
...
@@ -127,6 +127,6 @@ function greeting () {
font
:
'
simple3d
'
,
space
:
false
})
}
else
console
.
log
(
chalk
.
yellow
.
bold
(
'
\n
lets-build
'
))
console
.
log
()
}
else
//
console.log(chalk.yellow.bold('\n lets-build'))
//
console.log()
}
\ No newline at end of file
.electron-vue/dev-runner.js
View file @
333a40d7
...
...
@@ -35,7 +35,7 @@ function logStats (proc, data) {
log
+=
'
\n
'
+
chalk
.
yellow
.
bold
(
`┗
${
new
Array
(
28
+
1
).
join
(
'
-
'
)}
`
)
+
'
\n
'
console
.
log
(
log
)
//
console.log(log)
}
function
startRenderer
()
{
...
...
@@ -91,7 +91,7 @@ function startMain () {
compiler
.
watch
({},
(
err
,
stats
)
=>
{
if
(
err
)
{
console
.
log
(
err
)
//
console.log(err)
return
}
...
...
@@ -147,7 +147,7 @@ function electronLog (data, color) {
log
+=
`
${
line
}
\n`
})
if
(
/
[
0-9A-z
]
+/
.
test
(
log
))
{
console
.
log
(
//
console.log(
chalk
[
color
].
bold
(
'
┏ Electron -------------------
'
)
+
'
\n\n
'
+
log
+
...
...
@@ -171,8 +171,8 @@ function greeting () {
font
:
'
simple3d
'
,
space
:
false
})
}
else
console
.
log
(
chalk
.
yellow
.
bold
(
'
\n
electron-vue
'
))
console
.
log
(
chalk
.
blue
(
'
getting ready...
'
)
+
'
\n
'
)
}
else
//
console.log(chalk.yellow.bold('\n electron-vue'))
//
console.log(chalk.blue(' getting ready...') + '\n')
}
function
init
()
{
...
...
package.json
View file @
333a40d7
...
...
@@ -54,7 +54,7 @@
"
axios
"
:
"
^0.21.1
"
,
"
babel-plugin-transform-remove-strict-mode
"
:
"
^0.0.2
"
,
"
chartjs
"
:
"
^0.3.24
"
,
"
d3
"
:
"
4.1
0
.0
"
,
"
d3
"
:
"
4.1.0
"
,
"
echart
"
:
"
^0.1.3
"
,
"
echarts
"
:
"
^5.0.2
"
,
"
element-ui
"
:
"
^2.15.1
"
,
...
...
src/front/src/components/LandingPage.vue
View file @
333a40d7
...
...
@@ -42,13 +42,13 @@ export default {
let
returnCitySN
=
JSON
.
parse
(
res
.
split
(
"
=
"
)[
1
].
split
(
"
;
"
)[
0
]);
let
local
=
await
flexranAPI
.
DETECT_LOCAL
({},
returnCitySN
[
"
cip
"
]);
if
(
local
.
area
==
"
北京科技大学
"
)
{
console
.
log
(
"
在校园网内
"
);
//
console.log("在校园网内");
flexranAPI
.
SET_URL
({});
}
else
{
console
.
log
(
"
不在校园网
"
);
//
console.log("不在校园网");
}
}
catch
(
error
)
{
console
.
log
(
"
在校园网内
"
);
//
console.log("在校园网内");
flexranAPI
.
SET_URL
({});
}
...
...
@@ -69,7 +69,7 @@ export default {
this
.
$store
.
commit
(
"
updatePrbs
"
,
{
prb_info
:
dataList
,
});
// console.log(dataList)
//
//
console.log(dataList)
});
},
500
);
...
...
src/front/src/components/SshPage/SshPage.vue
View file @
333a40d7
...
...
@@ -47,7 +47,7 @@ export default {
getJS
(){
var
child
=
document
.
getElementById
(
"
show-iframe
"
).
contentWindow
;
let
a
=
child
.
document
.
getElementById
(
"
menu
"
);
console
.
log
(
a
)
//
console.log(a)
}
},
...
...
src/front/src/components/sliceInfos/BaseStationInfo.vue
View file @
333a40d7
...
...
@@ -90,7 +90,7 @@ export default {
watch
:
{
hover
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
hover
);
//
console.log(this.hover);
if
(
this
.
hover
!==
false
)
{
this
.
getping
(
this
.
hover
);
}
...
...
@@ -112,10 +112,10 @@ export default {
},
methods
:
{
handleCurrentChange
(
val
){
console
.
log
(
val
)
//
console.log(val)
this
.
currentPage
=
val
val
=
val
-
1
console
.
log
(
this
.
currentPage
)
//
console.log(this.currentPage)
this
.
littleDate
=
this
.
dataList
.
slice
(
val
*
4
,
val
*
4
+
4
)
},
async
getping
(
imsi
)
{
...
...
@@ -146,7 +146,7 @@ export default {
-
1
)
.
then
((
res
)
=>
{
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
status
==
"
Ok
"
)
{
this
.
$message
({
type
:
"
success
"
,
...
...
src/front/src/components/sliceInfos/PRBInfo.vue
View file @
333a40d7
...
...
@@ -41,7 +41,7 @@ export default {
},
mounted
()
{
console
.
log
(
this
.
$store
.
state
.
prb_info
)
//
console.log(this.$store.state.prb_info)
let
canvas
=
document
.
getElementById
(
"
mycanvas
"
);
let
ctx
=
canvas
.
getContext
(
"
2d
"
);
canvas
.
width
=
600
;
...
...
@@ -147,7 +147,7 @@ export default {
},
hover
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
hover
);
//
console.log(this.hover);
if
(
this
.
hover
!==
false
)
{
this
.
getping
(
this
.
hover
);
}
...
...
src/front/src/components/sliceInfos/SliceInformation.vue
View file @
333a40d7
...
...
@@ -76,7 +76,7 @@ export default {
},
watch
:{
// slice_info:{
// function(val, oldVal) {console.log(val,oldVal)},
// function(val, oldVal) {
//
console.log(val,oldVal)},
// deep: true
// }
}
...
...
@@ -170,7 +170,7 @@ export default {
// });
// });
// // flexranAPI.ADD_UE({ueid:this.$store.state.ue_nums});
// // console.log(arg)
// //
//
console.log(arg)
// // this.$store.commit("addUes", {});
// }
// });
...
...
src/front/src/components/sliceInfos/UeLists.vue
View file @
333a40d7
...
...
@@ -56,7 +56,7 @@ export default {
},
mounted
()
{
this
.
timeInterval
=
setInterval
(()
=>
{
console
.
log
(
result
.
eNB_config
[
0
].
eNB
.
cellConfig
[
0
].
sliceConfig
.
dl
)
//
console.log(result.eNB_config[0].eNB.cellConfig[0].sliceConfig.dl)
flexranAPI
.
GET_MAC_STATS
().
then
((
result
)
=>
{
this
.
slice_conf
=
...
...
@@ -84,7 +84,7 @@ export default {
watch
:
{
hover
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
hover
);
//
console.log(this.hover);
if
(
this
.
hover
!==
false
)
{
this
.
getping
(
this
.
hover
);
}
...
...
src/front/src/store/getters.js
View file @
333a40d7
const
getters
=
{
getterSlice
(
state
)
{
console
.
log
(
state
);
//
console.log(state);
return
state
.
slice_info
;
}
}
...
...
src/front/utils/network_services.js
View file @
333a40d7
...
...
@@ -7,7 +7,7 @@ function handleError (error) {
// 添加到日志
// 打印到控制台
// console.log(error)
//
//
console.log(error)
}
...
...
@@ -22,7 +22,7 @@ function handleError (error) {
config
=>
config
,
error
=>
{
// 发送失败
console
.
log
(
error
)
//
console.log(error)
return
Promise
.
reject
(
error
)
}
)
...
...
src/main/index.dev.js
View file @
333a40d7
...
...
@@ -16,7 +16,7 @@ require('electron').app.on('ready', () => {
installExtension
.
default
(
installExtension
.
VUEJS_DEVTOOLS
)
.
then
(()
=>
{})
.
catch
(
err
=>
{
console
.
log
(
'
Unable to install `vue-devtools`:
\n
'
,
err
)
//
console.log('Unable to install `vue-devtools`: \n', err)
})
})
...
...
src/main/index.js
View file @
333a40d7
...
...
@@ -225,7 +225,7 @@ Menu.setApplicationMenu( Menu.buildFromTemplate(template));
// webSecurity: false
// }
// })
// console.log(winURL)
//
//
console.log(winURL)
// child.loadURL(`http://${url}:8888`)
await
shell
.
openExternal
(
`http://
${
url
}
:8888/lab/tree/dqn_zoo`
)
...
...
@@ -255,11 +255,11 @@ app.on('activate', () => {
app
.
on
(
'
resize
'
,
(
e
,
cmd
)
=>
{
view
.
setBounds
({
x
:
screen
.
getPrimaryDisplay
().
workAreaSize
.
width
/
2
,
y
:
0
,
width
:
screen
.
getPrimaryDisplay
().
workAreaSize
.
width
/
2
,
height
:
screen
.
getPrimaryDisplay
().
workAreaSize
.
height
/
2
})
console
.
log
(
"
aaa
"
)
//
console.log("aaa")
})
ipcMain
.
on
(
'
change-url
'
,
function
(
event
,
arg
)
{
console
.
log
(
"
ssss
"
);
// prints "ping"
//
console.log("ssss"); // prints "ping"
url
=
arg
event
.
returnValue
=
'
pong
'
;
});
...
...
src/renderer/components/LandingPage.vue
View file @
333a40d7
...
...
@@ -56,14 +56,14 @@ export default {
let
returnCitySN
=
JSON
.
parse
(
res
.
split
(
"
=
"
)[
1
].
split
(
"
;
"
)[
0
]);
let
local
=
await
flexranAPI
.
DETECT_LOCAL
({},
returnCitySN
[
"
cip
"
]);
if
(
local
.
area
==
"
北京科技大学
"
)
{
console
.
log
(
"
在校园网内
"
);
//
console.log("在校园网内");
ipcRenderer
.
sendSync
(
"
change-url
"
,
"
code.ustb-oai.com
"
);
flexranAPI
.
SET_URL
({});
}
else
{
console
.
log
(
"
不在校园网
"
);
//
console.log("不在校园网");
}
}
catch
(
error
)
{
console
.
log
(
"
在校园网内
"
);
//
console.log("在校园网内");
ipcRenderer
.
sendSync
(
"
change-url
"
,
"
code.ustb-oai.com
"
);
flexranAPI
.
SET_URL
({});
}
...
...
@@ -96,7 +96,7 @@ export default {
this
.
$store
.
commit
(
"
updatePrbs
"
,
{
prb_info
:
dataList
,
});
// console.log(dataList)
//
//
console.log(dataList)
});
flexranAPI
.
GET_SLICE_RE
().
then
((
res
)
=>
{
...
...
src/renderer/components/ResultPages/CalPage.vue
View file @
333a40d7
...
...
@@ -96,7 +96,7 @@ export default {
},
watch
:{
// slice_info:{
// function(val, oldVal) {console.log(val,oldVal)},
// function(val, oldVal) {
//
console.log(val,oldVal)},
// deep: true
// }
}
...
...
src/renderer/components/ResultPages/D3Page.vue
View file @
333a40d7
...
...
@@ -7,9 +7,7 @@
<svg
id=
"d3js2"
width=
"620px"
height=
"200px"
></svg>
</div>
<div
id=
"right"
>
<svg
id=
"d3js3"
width=
"620px"
height=
"200px"
></svg>
<svg
id=
"d3js4"
width=
"620px"
height=
"200px"
></svg>
<svg
id=
"d3js5"
width=
"620px"
height=
"200px"
></svg>
</div>
<!--
<iframe
id=
"show-iframe"
style=
"height:500px;width:100%"
frameborder=
0
name=
"showHere"
scrolling=
auto
:src=
"src"
></iframe>
-->
</div>
...
...
@@ -162,13 +160,106 @@ export default {
this
.
timechart
.
push
(
this
.
create
(
"
rate
"
,
"
App切片速率/目标速率(Mps)
"
,
"
#d3js
"
));
this
.
timechart
.
push
(
this
.
create
(
"
rate
"
,
"
Audio切片速率/目标速率(Mps)
"
,
"
#d3js1
"
));
this
.
timechart
.
push
(
this
.
create
(
"
rate
"
,
"
Video切片速率/目标速率(Mps)
"
,
"
#d3js2
"
));
this
.
timechart
.
push
(
this
.
create
(
"
rate
"
,
"
BestEffort切片速率(Mps)
"
,
"
#d3js3
"
));
this
.
timechart
.
push
(
this
.
create
(
"
percent
"
,
"
资源利用提升值
"
,
"
#d3js4
"
));
this
.
timechart
.
push
(
this
.
create
(
"
percent
"
,
"
资源利用率提升比例
"
,
"
#d3js5
"
));
},
methods
:
{
create
(
mode
,
name
,
id
)
{
let
colors
=
[
'
#1f77b4
'
,
'
#ff7f0e
'
,
'
2ca02c
'
]
var
legend
=
d3
.
select
(
id
)
if
(
id
==
"
#d3js
"
||
id
==
"
#d3js1
"
||
id
==
"
#d3js2
"
){
legend
.
append
(
"
rect
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
535
+
"
,
"
+
70
+
"
)
"
)
// .attr("x", 400 - 25) //width是svg的宽度,x属性用来调整位置
// .attr("x", (width / 160) * 157)
//或者可以用width的分数来表示,更稳定一些,这是我试出来的,下面同
// .attr("y", 8)
.
attr
(
"
width
"
,
90
)
.
attr
(
"
height
"
,
1
)
//设低一些就是线,高一些就是面,很好理解
.
style
(
"
fill
"
,
function
(
d
){
return
"
#ff7f0e
"
});
legend
.
append
(
"
text
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
605
+
"
,
"
+
60
+
"
)
"
)
.
style
(
"
text-anchor
"
,
"
end
"
)
//样式对齐
.
text
(
function
(
d
)
{
return
"
速率要求
"
;
});
legend
.
append
(
"
rect
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
535
+
"
,
"
+
100
+
"
)
"
)
// .attr("x", 400 - 25) //width是svg的宽度,x属性用来调整位置
// .attr("x", (width / 160) * 157)
//或者可以用width的分数来表示,更稳定一些,这是我试出来的,下面同
// .attr("y", 8)
.
attr
(
"
width
"
,
90
)
.
attr
(
"
height
"
,
1
)
//设低一些就是线,高一些就是面,很好理解
.
style
(
"
fill
"
,
function
(
d
){
return
"
#1f77b4
"
});
legend
.
append
(
"
text
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
605
+
"
,
"
+
90
+
"
)
"
)
.
style
(
"
text-anchor
"
,
"
end
"
)
//样式对齐
.
text
(
function
(
d
)
{
return
"
切片速率
"
;
});
legend
.
append
(
"
rect
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
535
+
"
,
"
+
130
+
"
)
"
)
// .attr("x", 400 - 25) //width是svg的宽度,x属性用来调整位置
// .attr("x", (width / 160) * 157)
//或者可以用width的分数来表示,更稳定一些,这是我试出来的,下面同
// .attr("y", 8)
.
attr
(
"
width
"
,
90
)
.
attr
(
"
height
"
,
1
)
//设低一些就是线,高一些就是面,很好理解
.
style
(
"
fill
"
,
function
(
d
){
return
"
#2ca02c
"
});
legend
.
append
(
"
text
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
620
+
"
,
"
+
120
+
"
)
"
)
.
style
(
"
text-anchor
"
,
"
end
"
)
//样式对齐
.
text
(
function
(
d
)
{
return
"
普通UE速率
"
;
});
}
if
(
id
==
"
#d3js4
"
){
legend
.
append
(
"
rect
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
535
+
"
,
"
+
70
+
"
)
"
)
// .attr("x", 400 - 25) //width是svg的宽度,x属性用来调整位置
// .attr("x", (width / 160) * 157)
//或者可以用width的分数来表示,更稳定一些,这是我试出来的,下面同
// .attr("y", 8)
.
attr
(
"
width
"
,
90
)
.
attr
(
"
height
"
,
1
)
//设低一些就是线,高一些就是面,很好理解
.
style
(
"
fill
"
,
function
(
d
){
return
"
#ff7f0e
"
});
legend
.
append
(
"
text
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
605
+
"
,
"
+
60
+
"
)
"
)
.
style
(
"
text-anchor
"
,
"
end
"
)
//样式对齐
.
text
(
function
(
d
)
{
return
"
30%线
"
;
});
legend
.
append
(
"
rect
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
535
+
"
,
"
+
130
+
"
)
"
)
// .attr("x", 400 - 25) //width是svg的宽度,x属性用来调整位置
// .attr("x", (width / 160) * 157)
//或者可以用width的分数来表示,更稳定一些,这是我试出来的,下面同
// .attr("y", 8)
.
attr
(
"
width
"
,
90
)
.
attr
(
"
height
"
,
1
)
//设低一些就是线,高一些就是面,很好理解
.
style
(
"
fill
"
,
function
(
d
){
return
"
#1f77b4
"
});
legend
.
append
(
"
text
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
620
+
"
,
"
+
120
+
"
)
"
)
.
style
(
"
text-anchor
"
,
"
end
"
)
//样式对齐
.
text
(
function
(
d
)
{
return
"
利用率提升
"
;
});
}
let
test
=
d3
.
select
(
id
);
test
.
append
(
"
text
"
)
.
text
(
function
(
d
){
return
""
+
name
;}).
style
(
"
fill
"
,
"
red
"
).
attr
(
"
transform
"
,
"
translate(
"
+
40
+
"
,
"
+
30
+
"
)
"
)
...
...
src/renderer/components/ResultPages/MathPage.vue
View file @
333a40d7
...
...
@@ -12,12 +12,12 @@
实时资源利用率定义:
</br>
总资源数量为\(P_s\)个PRBs
</br>
\(n\)个UE在当前时刻\(t\)的速率目标值分别为\(R_t^1,R_t^2,R_t^3, \ldots ,R_t^n\)
</br>
\(n\)个UE在当前时刻\(t\)的速率目标值分别为\(R_t^1,R_t^2,R_t^3, \ldots ,R_t^n\)
<
span>
{{
getterRE
}}
</span><
/br>
采用传统下行资源调度算法时:
</br>
UE实际速率与速率目标值之间的差值为\(RT_t^1,RT_t^2,RT_t^3, \ldots ,RT_t^n\)
</br>
分配给UE的PRBs数量占总PRBs的比例为\(RT_t^1,RT_t^2,RT_t^3, \ldots ,RT_t^n\)
</br>
UE实际速率与速率目标值之间的差值为\(RT_t^1,RT_t^2,RT_t^3, \ldots ,RT_t^n\)
<
span>
{{
ai_d
}}
</span><
/br>
分配给UE的PRBs数量占总PRBs的比例为\(RT_t^1,RT_t^2,RT_t^3, \ldots ,RT_t^n\)
<
span>
{{
ai_u
}}
</span><
/br>
采用基于AI引擎的下行资源调度算法时:
</br>
UE实际速率与速率目标值之间的差值为 \(RA_t^1,RA_t^2,RA_t^3, \ldots ,RA_t^n\)
</br>
UE实际速率与速率目标值之间的差值为 \(RA_t^1,RA_t^2,RA_t^3, \ldots ,RA_t^n\)
<
span>
{{
normal_d
}}
</span><
/br>
分配给UE的PRBs数量占总PRBs的比例为 \(PA_t^1,PA_t^2,PA_t^3, \ldots ,PA_t^n\)
</br>
实时速率值与目标值之间的差异小,且UE占用的资源少,则实时资源利用率高,因此,实时资源利用率\(U\)可定义为
</br>
采用传统算法时: \(U_T = {1 \over \sum\limits_1^n {RT_t^n}\cdot {PT_t^n} }\)
</br>
...
...
@@ -77,13 +77,70 @@ export default {
}
,
up
()
{
return
this
.
$store
.
state
.
up
;
}
,
slice_info
()
{
return
this
.
$store
.
state
.
slice_info
;
}
,
total_prb
()
{
return
this
.
$store
.
state
.
slice_info
;
}
,
ai_u
()
{
let
slice_info
=
this
.
$store
.
state
.
slice_info
;
let
res
=
[];
for
(
let
j
=
0
;
j
<
slice_info
.
length
;
j
++
)
{
let
index
=
slice_info
[
j
].
id
;
if
(
j
<
3
)
{
res
.
push
(
Number
((
slice_info
[
j
].
ddqn
.
arb
)
/
25
).
toFixed
(
2
)
*
1
);
}
}
return
res
;
}
,
getterSlice
()
{
return
this
.
$store
.
getters
.
getterSlice
;
}
,
getterRE
()
{
return
this
.
$store
.
state
.
re
;
}
,
getterSliceRate
()
{
let
slice_info
=
this
.
$store
.
state
.
slice_info
let
rate
=
[]
slice_info
.
forEach
((
v
,
k
)
=>
{
if
(
k
<
3
)
rate
.
push
([
v
.
ddqn
.
thrpt1
,
this
.
$store
.
state
.
re
[
k
]])
}
)
return
rate
;
}
,
ai_d
()
{
let
res
=
[];
let
slice_info
=
this
.
$store
.
state
.
slice_info
;
let
re
=
this
.
$store
.
state
.
re
;
for
(
let
j
=
0
;
j
<
slice_info
.
length
;
j
++
)
{
let
index
=
slice_info
[
j
].
id
;
if
(
j
<
3
)
{
res
.
push
((
Math
.
abs
(
Number
(
re
[
j
]
-
slice_info
[
j
].
ddqn
.
thrpt1
).
toFixed
(
2
))));
}
}
return
res
;
}
,
normal_d
()
{
let
res
=
[];
let
re
=
this
.
$store
.
state
.
re
;
let
ue_list
=
this
.
$store
.
state
.
ue_list1
;
for
(
let
j
=
0
;
j
<
ue_list
.
length
;
j
++
)
{
let
index
=
ue_list
[
j
].
id
;
if
(
j
<
3
)
{
res
.
push
((
Math
.
abs
(
Number
(
re
[
j
]
-
ue_list
[
j
].
Mbs
).
toFixed
(
2
))));
}
}
return
res
;
}
,
}
,
components
:
{
"
cal-page
"
:
CalPage
,
"
d-3-page
"
:
D3Page
}
,
watch
:
{
hover
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
hover
);
//
console.log(this.hover);
this
.
$nextTick
(
function
()
{
if
(
globalVariable
.
isMathjaxConfig
)
{
globalVariable
.
initMathjaxConfig
();
...
...
src/renderer/components/SshPage/SshPage.vue
View file @
333a40d7
...
...
@@ -47,7 +47,7 @@ export default {
getJS
(){
var
child
=
document
.
getElementById
(
"
show-iframe
"
).
contentWindow
;
let
a
=
child
.
document
.
getElementById
(
"
menu
"
);
console
.
log
(
a
)
//
console.log(a)
}
},
...
...
src/renderer/components/sliceInfos/BaseStationInfo.vue
View file @
333a40d7
...
...
@@ -143,7 +143,7 @@ export default {
watch
:
{
hover
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
hover
);
//
console.log(this.hover);
if
(
this
.
hover
!==
false
)
{
this
.
getping
(
this
.
hover
);
}
...
...
@@ -155,7 +155,7 @@ export default {
},
dataList
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
flag
)
//
console.log(this.flag)
if
(
newValue
.
length
>=
4
&&
this
.
flag
){
flexranAPI
.
CHANGE_SLICE_ASSOC
(
...
...
@@ -178,7 +178,7 @@ export default {
},
this
.
$store
.
state
.
bs_id
).
then
((
res
)
=>
{
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
status
==
"
Ok
"
)
{
this
.
$store
.
commit
(
"
updateFlag
"
,
{
bool
:
false
});
this
.
$message
({
...
...
@@ -211,17 +211,17 @@ export default {
},
methods
:
{
handleCurrentChange
(
val
){
console
.
log
(
val
)
//
console.log(val)
this
.
currentPage
=
val
val
=
val
-
1
console
.
log
(
this
.
currentPage
)
//
console.log(this.currentPage)
this
.
littleDate
=
this
.
dataList
.
slice
(
val
*
4
,
val
*
4
+
4
)
},
handleCurrentChange1
(
val
){
console
.
log
(
val
)
//
console.log(val)
this
.
currentPage1
=
val
val
=
val
-
1
console
.
log
(
this
.
currentPage1
)
//
console.log(this.currentPage1)
this
.
littleDate1
=
this
.
dataList1
.
slice
(
val
*
4
,
val
*
4
+
4
)
},
async
getping
(
imsi
)
{
...
...
@@ -252,7 +252,7 @@ export default {
this
.
$store
.
state
.
bs_id
)
.
then
((
res
)
=>
{
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
status
==
"
Ok
"
)
{
this
.
$message
({
type
:
"
success
"
,
...
...
src/renderer/components/sliceInfos/PRBInfo.vue
View file @
333a40d7
...
...
@@ -41,7 +41,7 @@ export default {
},
mounted
()
{
console
.
log
(
this
.
$store
.
state
.
prb_info
)
//
console.log(this.$store.state.prb_info)
let
canvas
=
document
.
getElementById
(
"
mycanvas
"
);
let
ctx
=
canvas
.
getContext
(
"
2d
"
);
canvas
.
width
=
600
;
...
...
@@ -147,7 +147,7 @@ export default {
},
hover
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
hover
);
//
console.log(this.hover);
if
(
this
.
hover
!==
false
)
{
this
.
getping
(
this
.
hover
);
}
...
...
src/renderer/components/sliceInfos/SliceInformation.vue
View file @
333a40d7
...
...
@@ -83,7 +83,7 @@ export default {
},
watch
:
{
// slice_info:{
// function(val, oldVal) {console.log(val,oldVal)},
// function(val, oldVal) {
//
console.log(val,oldVal)},
// deep: true
// }
},
...
...
@@ -179,7 +179,7 @@ export default {
});
});
// flexranAPI.ADD_UE({ueid:this.$store.state.ue_nums});
// console.log(arg)
//
//
console.log(arg)
// this.$store.commit("addUes", {});
}
});
...
...
src/renderer/components/sliceInfos/UeLists.vue
View file @
333a40d7
...
...
@@ -56,7 +56,7 @@ export default {
},
mounted
()
{
this
.
timeInterval
=
setInterval
(()
=>
{
console
.
log
(
result
.
eNB_config
[
0
].
eNB
.
cellConfig
[
0
].
sliceConfig
.
dl
)
//
console.log(result.eNB_config[0].eNB.cellConfig[0].sliceConfig.dl)
flexranAPI
.
GET_MAC_STATS
().
then
((
result
)
=>
{
this
.
slice_conf
=
...
...
@@ -84,7 +84,7 @@ export default {
watch
:
{
hover
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
hover
);
//
console.log(this.hover);
if
(
this
.
hover
!==
false
)
{
this
.
getping
(
this
.
hover
);
}
...
...
src/renderer/store/getters.js
View file @
333a40d7
const
getters
=
{
getterSlice
(
state
)
{
console
.
log
(
state
);
//
console.log(state);
return
state
.
slice_info
;
}
}
...
...
src/utils/graph.js
View file @
333a40d7
...
...
@@ -86,7 +86,7 @@ export function graph(graph_selector, NAME_MAP, CALLBACKS) {
// var init = force.initialize;
// force.initialize = function () {
// var n = clusters;
// console.log("cluster size=", n.length);
//
//
console.log("cluster size=", n.length);
// init(n);
// };
// return force;
...
...
@@ -758,7 +758,7 @@ export function graph(graph_selector, NAME_MAP, CALLBACKS) {
function
tick
()
{
if
(
update_active
)
{
console
.
log
(
"
tick called while in do_update
"
);
//
console.log("tick called while in do_update");
return
;
}
...
...
@@ -792,10 +792,10 @@ export function graph(graph_selector, NAME_MAP, CALLBACKS) {
dy
=
d
.
y
;
}
var
radius
=
d
.
radius
;
if
(
!
d
.
node
.
ports
)
console
.
log
(
"
No ports!
"
,
d
.
node
,
d
);
if
(
!
d
.
node
.
ports
)
//
console.log("No ports!", d.node, d);
if
(
d
.
node
.
ports
.
length
>
8
)
{
var
limit
=
PORT
.
R
/
Math
.
sin
(
Math
.
PI
/
d
.
node
.
ports
.
length
);
// console.log("adjust " + radius + " -> " + limit);
//
//
console.log("adjust " + radius + " -> " + limit);
if
(
radius
<
limit
)
{
radius
=
limit
;
}
...
...
src/utils/network_services.js
View file @
333a40d7
...
...
@@ -7,7 +7,7 @@ function handleError (error) {
// 添加到日志
// 打印到控制台
// console.log(error)
//
//
console.log(error)
}
...
...
@@ -22,7 +22,7 @@ function handleError (error) {
config
=>
config
,
error
=>
{
// 发送失败
console
.
log
(
error
)
//
console.log(error)
return
Promise
.
reject
(
error
)
}
)
...
...
src/utils/timechart.js
View file @
333a40d7
...
...
@@ -32,7 +32,7 @@ export default function legend() {
drag
=
d3
.
behavior
.
drag
()
.
on
(
"
drag
"
,
function
(
d
,
i
)
{
console
.
log
(
this
);
//
console.log(this);
d
.
x
+=
d3
.
event
.
dx
;
d
.
y
+=
d3
.
event
.
dy
;
d3
.
select
(
this
).
attr
(
"
transform
"
,
function
(
d
,
i
){
...
...
@@ -243,7 +243,7 @@ export function timechart(g, width, height, duration, mode) {
.
range
([
0
,
width
])
.
domain
([
duration
,
0
])
// y = d3.scaleLinear().range([height, 0]),
console
.
log
(
mode
)
//
console.log(mode)
if
(
mode
==
"
rate
"
)
{
y
=
d3
.
scaleLinear
()
...
...
@@ -297,7 +297,7 @@ export function timechart(g, width, height, duration, mode) {
function
append
(
time
,
sample
)
{
while
(
y_values
.
length
<
sample
.
length
)
{
while
(
y_values
.
length
<
sample
.
length
)
{
var
data
=
{
values
:
d3
.
range
(
x_values
.
length
).
map
(
function
(
d
)
{
return
undefined
;
})
};
...
...
@@ -305,6 +305,9 @@ export function timechart(g, width, height, duration, mode) {
.
data
([
data
.
values
])
.
attr
(
'
fill
'
,
'
none
'
)
.
style
(
'
stroke
'
,
z
(
y_values
.
length
));
console
.
log
(
"
z(y_values.length)
"
)
console
.
log
(
z
(
y_values
.
length
))
//console.log( z)
y_values
.
push
(
data
);
data
.
path
.
call
(
hover
,
data
.
path
);
}
...
...
@@ -322,7 +325,7 @@ export function timechart(g, width, height, duration, mode) {
y_values
[
i
].
path
.
attr
(
'
d
'
,
line
);
}
// Smooth update (optional -- remove if gets heavy)
console
.
log
(
paths
)
//
console.log(paths)
// paths.attr('transform', null)
// .transition()
// .duration(1000*duration)
...
...
@@ -355,8 +358,8 @@ export function timechart(g, width, height, duration, mode) {
.
attr
(
"
y
"
,
-
8
);
function
moved
(
event
)
{
console
.
log
(
"
moved
"
)
console
.
log
(
event
)
//
console.log("moved ")
//
console.log(event)
// event.preventDefault();
// const pointer = d3.pointer(event, this);
...
...
@@ -370,13 +373,13 @@ export function timechart(g, width, height, duration, mode) {
}
function
entered
()
{
console
.
log
(
"
entered
"
)
//
console.log("entered")
path
.
style
(
"
mix-blend-mode
"
,
null
).
attr
(
"
stroke
"
,
"
#ddd
"
);
dot
.
attr
(
"
display
"
,
null
);
}
function
left
()
{
console
.
log
(
"
left
"
)
//
console.log("left ")
}
}
...
...
yarn.lock
View file @
333a40d7
This diff is collapsed.
Click to expand it.
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