Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CI: Update RTD configuration file
[nonrtric.git]
/
test
/
simulator-group
/
sim-monitor.js
diff --git
a/test/simulator-group/sim-monitor.js
b/test/simulator-group/sim-monitor.js
index
5b85414
..
eb5d1c6
100644
(file)
--- a/
test/simulator-group/sim-monitor.js
+++ b/
test/simulator-group/sim-monitor.js
@@
-17,12
+17,12
@@
#
*/
#
*/
-// Sim mon server - query the a
gent
and the simulators for counters and other data
+// Sim mon server - query the a
1pms
and the simulators for counters and other data
// Presents a web page on localhost:9999/mon
var LOCALHOST="http://127.0.0.1:"
var MRSTUB_PORT="3905"
// Presents a web page on localhost:9999/mon
var LOCALHOST="http://127.0.0.1:"
var MRSTUB_PORT="3905"
-var A
GENT
_PORT="8081"
+var A
1PMS
_PORT="8081"
var CR_PORT="8090"
var ICS_PORT="8083"
var PRODSTUB_PORT="8092"
var CR_PORT="8090"
var ICS_PORT="8083"
var PRODSTUB_PORT="8092"
@@
-48,7
+48,7
@@
function getSimCtr(url, index, cb) {
try {
http.get(url, (resp) => {
try {
http.get(url, (resp) => {
- // A chunk of data has been rec
ie
ved.
+ // A chunk of data has been rec
ei
ved.
resp.on('data', (chunk) => {
data += chunk;
});
resp.on('data', (chunk) => {
data += chunk;
});
@@
-73,7
+73,7
@@
function getSimCtr(url, index, cb) {
}
}
-//Format a comma separated list of data to a html-safe string with fixed fieldsizes
+//Format a comma separated list of data to a html-safe string with fixed field
sizes
function formatDataRow(commaList) {
var str = "";
var tmp=commaList.split(',');
function formatDataRow(commaList) {
var str = "";
var tmp=commaList.split(',');
@@
-89,7
+89,7
@@
function formatDataRow(commaList) {
return str;
}
return str;
}
-//Format a comma separated list of ids to a html-safe string with fixed fieldsizes
+//Format a comma separated list of ids to a html-safe string with fixed field
sizes
function formatIdRow(commaList) {
var str = "";
var tmp=commaList.split(',');
function formatIdRow(commaList) {
var str = "";
var tmp=commaList.split(',');
@@
-161,7
+161,7
@@
function clearFlag(flag) {
//Status variables, for parameters values fetched from other simulators
var mr1="", mr2="", mr3="", mr4="", mr5="", mr6="";
//Status variables, for parameters values fetched from other simulators
var mr1="", mr2="", mr3="", mr4="", mr5="", mr6="";
-//Status variables for a
gent
+//Status variables for a
1pms
var ag1=""
var ag2=""
var ag3=""
var ag1=""
var ag2=""
var ag3=""
@@
-219,7
+219,7
@@
var ricbasename="ricsim"
var rc_services=""
var rc_services=""
-var pmsprefix=""
+var
a1
pmsprefix=""
function fetchAllMetrics_pol() {
function fetchAllMetrics_pol() {
@@
-354,15
+354,15
@@
function fetchAllMetrics_pol() {
clearFlag("cr3")
});
}
clearFlag("cr3")
});
}
- //A
gent - more get metrics from the agent
+ //A
1PMS - more get metrics from the a1pms
if (checkFunctionFlag("ag1")) {
if (checkFunctionFlag("ag1")) {
- getSimCtr(LOCALHOST+A
GENT
_PORT+"/status", 0, function(data, idx) {
+ getSimCtr(LOCALHOST+A
1PMS
_PORT+"/status", 0, function(data, idx) {
ag1 = data;
clearFlag("ag1")
});
}
if (checkFunctionFlag("ag2")) {
ag1 = data;
clearFlag("ag1")
});
}
if (checkFunctionFlag("ag2")) {
- getSimCtr(LOCALHOST+A
GENT
_PORT+"/services", 0, function(data, idx) {
+ getSimCtr(LOCALHOST+A
1PMS
_PORT+"/services", 0, function(data, idx) {
ag2="";
try {
var jd=JSON.parse(data);
ag2="";
try {
var jd=JSON.parse(data);
@@
-380,7
+380,7
@@
function fetchAllMetrics_pol() {
});
}
if (checkFunctionFlag("ag3")) {
});
}
if (checkFunctionFlag("ag3")) {
- getSimCtr(LOCALHOST+A
GENT
_PORT+"/policy_types", 0, function(data, idx) {
+ getSimCtr(LOCALHOST+A
1PMS
_PORT+"/policy_types", 0, function(data, idx) {
ag3="";
try {
var jd=JSON.parse(data);
ag3="";
try {
var jd=JSON.parse(data);
@@
-399,7
+399,7
@@
function fetchAllMetrics_pol() {
}
if (checkFunctionFlag("ag4")) {
}
if (checkFunctionFlag("ag4")) {
- getSimCtr(LOCALHOST+A
GENT
_PORT+"/policy_ids", 0, function(data, idx) {
+ getSimCtr(LOCALHOST+A
1PMS
_PORT+"/policy_ids", 0, function(data, idx) {
try {
var jd=JSON.parse(data);
ag4=""+jd.length
try {
var jd=JSON.parse(data);
ag4=""+jd.length
@@
-412,7
+412,7
@@
function fetchAllMetrics_pol() {
}
if (checkFunctionFlag("ag5")) {
}
if (checkFunctionFlag("ag5")) {
- getSimCtr(LOCALHOST+A
GENT
_PORT+"/rics", 0, function(data, idx) {
+ getSimCtr(LOCALHOST+A
1PMS
_PORT+"/rics", 0, function(data, idx) {
try {
var jd=JSON.parse(data);
ag5=""+jd.length
try {
var jd=JSON.parse(data);
ag5=""+jd.length
@@
-926,12
+926,12
@@
app.get("/mon",function(req, res){
refreshCount_rc=5
var bn=req.query.basename
refreshCount_rc=5
var bn=req.query.basename
-
pmsprefix=req.query.
pmsprefix
+
a1pmsprefix=req.query.a1
pmsprefix
- console.log("
PMS"+
pmsprefix)
- if ((bn == undefined) || (pmsprefix == undefined)) {
+ console.log("
A1PMS"+a1
pmsprefix)
+ if ((bn == undefined) || (
a1
pmsprefix == undefined)) {
getCtr=0
getCtr=0
- return res.redirect('/mon?basename=ricsim&pmsprefix=/a1-policy/v2');
+ return res.redirect('/mon?basename=ricsim&
a1
pmsprefix=/a1-policy/v2');
} else {
ricbasename=bn
}
} else {
ricbasename=bn
}
@@
-947,7
+947,7
@@
app.get("/mon",function(req, res){
"<body>" +
"<font size=\"-3\" face=\"monospace\">" +
"<p>Change basename in url if other ric sim prefix is used</p>" +
"<body>" +
"<font size=\"-3\" face=\"monospace\">" +
"<p>Change basename in url if other ric sim prefix is used</p>" +
- "<p>Change
pmsprefix in url if
pms with other prefix is used</p>" +
+ "<p>Change
a1pmsprefix in url if a1
pms with other prefix is used</p>" +
"</font>" +
"<h3>Policy Management Service</h3>" +
"<font face=\"monospace\">" +
"</font>" +
"<h3>Policy Management Service</h3>" +
"<font face=\"monospace\">" +