Commit f598e85f authored by wangdong's avatar wangdong

ls

parent 3691ec4f
......@@ -26,5 +26,5 @@
]
}
},
"plugins": ["transform-runtime"]
"plugins": ["transform-runtime","transform-remove-strict-mode"]
}
'use strict'
process.env.NODE_ENV = 'production'
......
'use strict'
const chalk = require('chalk')
const electron = require('electron')
......
'use strict'
process.env.BABEL_ENV = 'main'
......
'use strict'
process.env.BABEL_ENV = 'renderer'
......
'use strict'
process.env.BABEL_ENV = 'web'
......
......@@ -5,6 +5,9 @@
<title>AI-Engine OpenXG® </title>
<% if (htmlWebpackPlugin.options.nodeModules) { %>
<!-- Add `node_modules/` to global paths so `require` works properly in development -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"> </script>
<script>
require('module').globalPaths.push('<%= htmlWebpackPlugin.options.nodeModules.replace(/\\/g, '\\\\') %>')
</script>
......
......@@ -13,6 +13,7 @@
<div class="right-side">
<base-station-info></base-station-info>
<math-page :latex="pingInfo"></math-page>
</div>
</main>
</div>
......@@ -27,6 +28,7 @@ import SshPage from "./SshPage/SshPage";
import UeLists from "./sliceInfos/UeLists";
import * as flexranAPI from "../../utils/flexranAPI";
import { ipcRenderer } from "electron";
import MathPage from './ResultPages/MathPage.vue';
export default {
name: "landing-page",
......@@ -36,6 +38,17 @@ export default {
"ue-lists": UeLists,
"base-station-info": BaseStationInfo,
"ssh-page": SshPage,
"math-page":MathPage,
},
data() {
return {
hover: false,
ue_list: [],
slice_conf: [],
num:31,
pingInfo: `\\[{{U_A -U_T \\over U_T}\\geqslant {30}\\rm{\\% } }\\]`,
visible:false
};
},
async mounted() {
let res = await flexranAPI.DETECT({});
......@@ -54,9 +67,13 @@ export default {
ipcRenderer.sendSync("change-url", "code.ustb-oai.com");
flexranAPI.SET_URL({});
}
let i=0
this.timeInterval1 = setInterval(() => {
flexranAPI.GET_MAC_STATS().then((result) => {
this.pingInfo= `\\[{{U_A -U_T \\over U_T}= ${i}\\rm{\\% } }\\]`
let dataList =
result.eNB_config[0].eNB.cellConfig[0].sliceConfig.dl.slices;
let ue_list = result.mac_stats[0].ue_list
......
<template>
<div>
<el-popover
placement="right"
width="600"
trigger="hover"
>
<div id='question-id' >
<h3>算法目标:以最小的资源占用率满足UE数据传输速率的动态变化需求</h3>
&nbsp;&nbsp;&nbsp;&nbsp;实时资源利用率定义:</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总资源数量为\(P_s\)个PRBs</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\(n\)个UE在当前时刻\(t\)的速率目标值分别为\(R_t^1,R_t^2,R_t^3, \ldots ,R_t^n\)</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;采用传统下行资源调度算法时:</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UE实际速率与速率目标值之间的差值为\(RT_t^1,RT_t^2,RT_t^3, \ldots ,RT_t^n\)</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;分配给UE的PRBs数量占总PRBs的比例为\(RT_t^1,RT_t^2,RT_t^3, \ldots ,RT_t^n\)</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;采用基于AI引擎的下行资源调度算法时:</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UE实际速率与速率目标值之间的差值为 \(RA_t^1,RA_t^2,RA_t^3, \ldots ,RA_t^n\)</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;分配给UE的PRBs数量占总PRBs的比例为 \(PA_t^1,PA_t^2,PA_t^3, \ldots ,PA_t^n\)</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 实时速率值与目标值之间的差异小,且UE占用的资源少,则实时资源利用率高,因此,实时资源利用率\(U\)可定义为</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;采用传统算法时: \(U_T = {1 \over \sum\limits_1^n {RT_t^n}\cdot {PT_t^n} }\)</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;采用AI算法时: \(U_A = {1 \over \sum\limits_1^n {RA_t^n}\cdot {PA_t^n} }\)</br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;资源利用率提升30%意味着: \({{U_A -U_T \over U_T}\geqslant 30\rm{\% } }\)</br>
</div>
<div
id = "result"
style="margin: 10px"
@mouseover="hover = true"
@mouseleave="hover = false"
slot="reference"
>
资源利用率 \(U_A = {1 \over \sum\limits_1^n {RA_t^n}\cdot {PA_t^n} }=\){{utilization_a}}\(\rm{\% }\)</div>
</el-popover>
<!-- <div id='question-id' v-html="newlatex">
</div> -->
</div>
</template>
<script>
import * as flexranAPI from "../../../utils/flexranAPI";
import globalVariable from '../../../utils/globalVariable'
export default {
props: {
latex:String
},
data() {
return {
hover: false,
utilization_a:2,
questionToOptions: '',
rawHtml: '',
pingInfo: "PING 172.16.0.x (172.16.0.x) 56(84) bytes of data.<br/>64 bytes from 172.16.0.6: icmp_seq=1 ttl=64 time=39.5 ms<br/>64 bytes from 172.16.0.6: icmp_seq=2 ttl=64 time=39.1 ms<br/>64 bytes from 172.16.0.6: icmp_seq=3 ttl=64 time=28.7 ms<br/>64 bytes from 172.16.0.6: icmp_seq=4 ttl=64 time=45.6 ms<br/><br/>--- 172.16.0.6 ping statistics ---<br/>4 packets transmitted, 4 received, 0% packet loss, time 242ms<br/>rtt min/avg/max/mdev = 28.799/38.307/45.687/6.068 ms<br/>",
visible:false,
};
},
computed: {
newlatex(){
return `${this.latex}`
}
},
watch: {
newlatex: {
handler(newValue, oldValue) {
console.log(newValue)
this.$nextTick(function () {
if(globalVariable.isMathjaxConfig){
globalVariable.initMathjaxConfig();
}
globalVariable.MathQueue("question-id");
})
},
deep: true,
},
hover: {
handler(newValue, oldValue) {
console.log(this.hover);
this.$nextTick(function () {
if(globalVariable.isMathjaxConfig){
globalVariable.initMathjaxConfig();
}
globalVariable.MathQueue("question-id");
})
},
deep: true,
},
},
mounted() {
},
methods: {
async getping(imsi) {
this.timer = setInterval(() => {
flexranAPI.SEND_PING({ imsi: imsi }).then((result) => {
this.pingInfo = result.output.split("\n").join("<br/>");
});
}, 1000);
},
},
};
</script>
<style scoped>
#result {
align-content: center;
text-align: center;
}
.title {
color: #888;
font-size: 18px;
font-weight: initial;
letter-spacing: 0.25px;
margin-top: 10px;
}
.items {
margin-top: 8px;
}
.item {
display: flex;
margin-bottom: 6px;
}
.item .name {
color: #6a6a6a;
margin-right: 6px;
}
.item .value {
color: #35495e;
font-weight: bold;
}
</style>
......@@ -22,6 +22,11 @@
<el-dropdown-item ><div v-if="item1.name=='OAI_ENB'" @click="handleCommand2(index1,5)"> 查看空口协议</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='OAI_ENB'" @click="handleCommand2(index1,6)"> 开始下载</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='OAI_ENB'" @click="handleCommand2(index1,7)"> 停止下载</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='OAI'" @click="handleCommand2(index1,0)"> 查看OAI基站LOG</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='OAI'" @click="handleCommand2(index1,3)"> 查看OAI UELOG</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='OAI'" @click="handleCommand2(index1,5)"> 查看空口协议</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='OAI'" @click="handleCommand2(index1,6)"> 开始下载</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='OAI'" @click="handleCommand2(index1,7)"> 停止下载</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='CoreNet'" @click="handleCommand2(index1,4)"> 查看GTP流量</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='FlexRan'" @click="refresh"> 刷新</div></el-dropdown-item>
<el-dropdown-item ><div v-if="item1.name=='AI-Engine'" @click="handleCommand2(index1,1)"> 启动DRL切片智能分配</div></el-dropdown-item>
......
......@@ -7,6 +7,7 @@ import App from './App'
import router from './router'
import {Table} from 'element-ui'
import store from './store/index';
if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
Vue.http = Vue.prototype.$http = axios
Vue.config.productionTip = false
......
let isMathjaxConfig = false;//用于标识是否配置
const initMathjaxConfig = () => {
if (!window.MathJax) {
return;
}
window.MathJax.Hub.Config({
showProcessingMessages: true, //关闭js加载过程信息
messageStyle: "none", //不显示信息
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [["$", "$"], ["\\(", "\\)"]], //行内公式选择符
displayMath: [["$$", "$$"], ["\\[", "\\]"]], //段内公式选择符
skipTags: ["script", "noscript", "style", "textarea", "pre", "code", "a"] //避开某些标签
},
"HTML-CSS": {
availableFonts: ["STIX", "TeX"], //可选字体
showMathMenu: false //关闭右击菜单显示
}
});
isMathjaxConfig = true; //配置完成,改为true
};
const MathQueue = function (elementId) {
if (!window.MathJax) {
return;
}
window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, document.getElementById(elementId)]);
};
export default {
isMathjaxConfig,
initMathjaxConfig,
MathQueue,
}
\ No newline at end of file
This diff is collapsed.
......@@ -1280,6 +1280,11 @@ babel-plugin-transform-remove-debugger@^6.9.0:
resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz#42b727631c97978e1eb2d199a7aec84a18339ef2"
integrity sha1-QrcnYxyXl44estGZp67IShgznvI=
babel-plugin-transform-remove-strict-mode@^0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-strict-mode/-/babel-plugin-transform-remove-strict-mode-0.0.2.tgz#913685aab95439f3a0ed88e588fbd5e997890579"
integrity sha1-kTaFqrlUOfOg7YjliPvV6ZeJBXk=
babel-plugin-transform-remove-undefined@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.3.0.tgz#03f5f0071867781e9beabbc7b77bf8095fd3f3ec"
......@@ -2287,6 +2292,11 @@ commander@2.9.x:
dependencies:
graceful-readlink ">= 1.0.0"
commander@>=7.0.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
......@@ -3316,6 +3326,11 @@ eslint-scope@^4.0.3:
esrecurse "^4.1.0"
estraverse "^4.1.1"
esm@^3.2.25:
version "3.2.25"
resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
esprima@^2.6.0:
version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
......@@ -5429,6 +5444,20 @@ math-expression-evaluator@^1.2.14:
resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.3.7.tgz#1b62225db86af06f7ea1fd9576a34af605a5b253"
integrity sha512-nrbaifCl42w37hYd6oRLvoymFK42tWB+WQTMFtksDGQMi5GvlJwnz/CsS30FFAISFLtX+A0csJ0xLiuuyyec7w==
mathjax-full@^3.1.4:
version "3.1.4"
resolved "https://registry.yarnpkg.com/mathjax-full/-/mathjax-full-3.1.4.tgz#ec9c51abf55b427e0fd54760ca9478d439406e59"
integrity sha512-80lZZci7vqQQV2wdLcnFUtI7z5Aru0RL03wPw8JM6kFPmX4CA/SYfnlQQ1WIIBU+0p0YoxJ6Z3gAUcVzvDArhw==
dependencies:
esm "^3.2.25"
mj-context-menu "^0.6.1"
speech-rule-engine "^3.2.0"
mathjax@2.7.5:
version "2.7.5"
resolved "https://registry.yarnpkg.com/mathjax/-/mathjax-2.7.5.tgz#c9c5947f86f9be31651f5f3667d3c9a8bb01efe4"
integrity sha512-OzsJNitEHAJB3y4IIlPCAvS0yoXwYjlo2Y4kmm9KQzyIBZt2d8yKRalby3uTRNN4fZQiGL2iMXjpdP1u2Rq2DQ==
md5.js@^1.3.4:
version "1.3.5"
resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f"
......@@ -5616,6 +5645,11 @@ mixin-deep@^1.2.0:
for-in "^1.0.2"
is-extendable "^1.0.1"
mj-context-menu@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/mj-context-menu/-/mj-context-menu-0.6.1.tgz#a043c5282bf7e1cf3821de07b13525ca6f85aa69"
integrity sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA==
mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@^0.5.5, mkdirp@~0.5.1:
version "0.5.5"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
......@@ -7575,6 +7609,15 @@ spdy@^4.0.2:
select-hose "^2.0.0"
spdy-transport "^3.0.0"
speech-rule-engine@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/speech-rule-engine/-/speech-rule-engine-3.2.0.tgz#6313ae0f8596519fa8dfc3ef01beae6b6cca312f"
integrity sha512-Vg1pNhl3cdVPk5XWn8su+bUNs+jaY1UmvKLeLui+iJ5/a0Kr7cOfO2gGuYOMd/3+0wLvzEqmou8rtz5REBd9xQ==
dependencies:
commander ">=7.0.0"
wicked-good-xpath "^1.3.0"
xmldom-sre "^0.1.31"
speedometer@~0.1.2:
version "0.1.4"
resolved "https://registry.yarnpkg.com/speedometer/-/speedometer-0.1.4.tgz#9876dbd2a169d3115402d48e6ea6329c8816a50d"
......@@ -8645,6 +8688,11 @@ which@^1.2.14, which@^1.2.9, which@^1.3.1:
dependencies:
isexe "^2.0.0"
wicked-good-xpath@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/wicked-good-xpath/-/wicked-good-xpath-1.3.0.tgz#81b0e95e8650e49c94b22298fff8686b5553cf6c"
integrity sha1-gbDpXoZQ5JyUsiKY//hoa1VTz2w=
widest-line@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc"
......@@ -8722,6 +8770,11 @@ xmlbuilder@^9.0.7:
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"
integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=
xmldom-sre@^0.1.31:
version "0.1.31"
resolved "https://registry.yarnpkg.com/xmldom-sre/-/xmldom-sre-0.1.31.tgz#10860d5bab2c603144597d04bf2c4980e98067f4"
integrity sha512-f9s+fUkX04BxQf+7mMWAp5zk61pciie+fFLC9hX9UVvCeJQfNHRHXpeo5MPcR0EUf57PYLdt+ZO4f3Ipk2oZUw==
xmldom@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.5.0.tgz#193cb96b84aa3486127ea6272c4596354cb4962e"
......
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