From b0e2e8c637ac4a6b0d715315ba1af7f5862acde4 Mon Sep 17 00:00:00 2001 From: Huu Nghia NGUYEN Date: Mon, 14 Apr 2025 11:30:59 +0200 Subject: [PATCH 01/14] Add instruction to install MongoDB 4.4 [skip ci] --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e6470ba7..77c463bb4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,24 @@ Follow the instruction on nodejs.org: https://nodejs.org/en/download/package-man ### 2. Mongo DB v4.4 -Follow the procedure described on the following link to install the latest version of Mongodb: https://www.mongodb.com/docs/v4.4/tutorial/install-mongodb-on-ubuntu/ +Follow the procedure described on the following link to install the version 4.4 of Mongodb: https://www.mongodb.com/docs/v4.4/tutorial/install-mongodb-on-ubuntu/ + +For example, the following commands will install MongoDB 4.4 on Ubuntu server 22.04: + +```bash +# install libssl1.1 +echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list +sudo apt-get update +sudo apt-get install libssl1.1 +# install MongoDB 4.4 +sudo apt-get install gnupg curl +curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | \ + sudo gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg \ + --dearmor +echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list +sudo apt-get update +sudo apt-get install -y mongodb-org +``` ## Usage From 4499d12e6aa2974df9ae9e7f6eee137045d847e2 Mon Sep 17 00:00:00 2001 From: nhnghia Date: Thu, 24 Apr 2025 16:55:38 +0200 Subject: [PATCH 02/14] fixed error which blocks profile and change password pages --- www/routes/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/routes/index.js b/www/routes/index.js index 922223d4f..54dcb69f1 100644 --- a/www/routes/index.js +++ b/www/routes/index.js @@ -24,7 +24,7 @@ var connect_to_db = function( cb ){ var is_loggedin = function( req, res, redirect=null){ - auth.checkLogin( req, res, redirect ); + return auth.checkLogin( req, res, redirect ); }; router.all("/info/*", function( req, res, next ){ @@ -198,16 +198,16 @@ router.get("/profile", function (req, res, next) { msg = {}; } version = "MMT-Operator: " + config.version - + "\nMMT-Probe: " + msg[ dataAdaptor.LicenseColumnId.VERSION_PROBE] - + "\nMMT-SDK: " + msg[ dataAdaptor.LicenseColumnId.VERSION_SDK] + + "\nMMT-Probe: " + (msg[ dataAdaptor.LicenseColumnId.VERSION_PROBE] || "na") + + "\nMMT-SDK: " + (msg[ dataAdaptor.LicenseColumnId.VERSION_SDK] || "na") res.render('profile', { title : 'Profile', version : version, //version : " MMT-Operator 1.6.5-5dc7f4f,\n MMT-Probe 1.2.1-b5876c7,\n MMT-Security 1.1.4-8c20261,\n MMT-DPI 1.6.8.1-47e533f", - deviceID : msg[ dataAdaptor.LicenseColumnId.MAC_ADDRESSES ], - expiredOn : (new Date(msg[ dataAdaptor.LicenseColumnId.EXPIRY_DATE ])).toString(), + deviceID : (msg[ dataAdaptor.LicenseColumnId.MAC_ADDRESSES ] || "na"), + expiredOn : (new Date(msg[ dataAdaptor.LicenseColumnId.EXPIRY_DATE ] || 0)).toString(), }); } ); From f19c7e204cf60cafdeda190d8f32b75585596fb6 Mon Sep 17 00:00:00 2001 From: nhnghia Date: Fri, 25 Apr 2025 16:23:26 +0200 Subject: [PATCH 03/14] init dashboards for gNodeB --- .gitignore | 3 + www/config.json | 4 +- .../js/chart/gnodeb/topo-control-plane.js | 1089 +++++++++++++++ www/public/js/chart/gnodeb/topo-user-plane.js | 1071 +++++++++++++++ www/public/js/chart/gnodeb/traffic.js | 1209 +++++++++++++++++ www/reportReader/ProcessMessage.js | 2 +- www/routes/chart.js | 14 + www/version.json | 2 +- 8 files changed, 3391 insertions(+), 3 deletions(-) create mode 100644 www/public/js/chart/gnodeb/topo-control-plane.js create mode 100644 www/public/js/chart/gnodeb/topo-user-plane.js create mode 100644 www/public/js/chart/gnodeb/traffic.js diff --git a/.gitignore b/.gitignore index 84a17dabc..d3496e69a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ operator/node_modules .DS_Store /.project /.externalToolBuilders +.DS_Store +.swp +..project diff --git a/www/config.json b/www/config.json index 723f1ab3e..ffab514e2 100644 --- a/www/config.json +++ b/www/config.json @@ -100,6 +100,7 @@ "security", "behavior", "enodeb", + "gnodeb", "ndn", "video", "sla", @@ -110,7 +111,8 @@ "network", "dpi", "security", - "application" + "application", + "gnodeb" ], "modules_config": { "enodeb": { diff --git a/www/public/js/chart/gnodeb/topo-control-plane.js b/www/public/js/chart/gnodeb/topo-control-plane.js new file mode 100644 index 000000000..67527ccb2 --- /dev/null +++ b/www/public/js/chart/gnodeb/topo-control-plane.js @@ -0,0 +1,1089 @@ +/** + * LTE network topology constructed by using control plane + */ +const arr = [ + { + id: "topo", + title: "Control Plane Topology", + x: 6, + y: 0, + width: 12, + height: 7, + type: "danger", + userData: { + fn: "createTopoReport" + }, + } + ]; + +const availableReports = { +}; + + +function getHMTL( tag ){ + var html = tag[0]; + for( var i=1; i detail of 1 profile (list app) => one app +if( param.profile ){ + arr[1].title = param.profile + " ❯ "; + if( param.app ) + arr[1].title += param.app; + else + arr[1].title += "eNodeB/Network Topology"; +} + +const TYPE_ENODEB = "enodeb"; +const TYPE_UE = "ue"; +const TYPE_MME = "mme"; +const TYPE_GATEWAY = "gw"; + + +const NO_IP = "no-ip", MICRO_FLOW = "micro-flow", REMOTE = "remote", LOCAL = "_local", NULL="null"; + + +//limit number of rows of a table/number of pies per chart +const LIMIT_SIZE=500; +//create reports +var ReportFactory = { + createTopoReport: function (filter) { + fPeriod.hide(); + fAutoReload.interval = 1000; + + //support to create an input form to add new elements + const createInput = function( label, name, otherAttr ){ + const obj = { + type : "", + label: label, + attr : { + id : "enodeb-" + name, + name : "enodeb-" + name, + "data-name" : name, + class : "form-control enodeb-" + name, + } + }; + if( otherAttr !== null ) + obj.attr = MMTDrop.tools.mergeObjects( obj.attr, otherAttr ); + return obj; + }; + + // create configuration form + const $configForm = MMTDrop.tools.getModalWindow("enodeb-config"); + $configForm.children(".modal-dialog").width("60%"); // change width of dialog + + $configForm.$content.html( MMTDrop.tools.createForm({ + type : "
", + attr : { + class : "col-md-10 col-md-offset-1 form-horizontal" + }, + children:[ + //Form: eNodeB + { + type : "
", + attr : { + class : "", + style : "margin-top: 20px", + id : "add-enodeb-element-form" + }, + children: [ + //Form: eNodeB + { + type : "
", + attr : { + id : "form-content-" + TYPE_ENODEB, + class: "add-form-content" + }, + children : [ + createInput( "Name", "name", {maxlength: 15, required: true} ), + createInput( "IP", "ip", {required: true} ), + createInput( "Last Change", "timestamp", {} ), + ] + }, + //Form: MME + { + type : "
", + attr : { + id : "form-content-" + TYPE_MME, + class: "add-form-content" + }, + children : [ + createInput( "Name", "name", {maxlength: 15, required: true} ), + createInput( "IP", "ip", {required: true} ), + createInput( "Last Change", "timestamp", {} ), + ] + }, + //Form: User Equipment + { + type : "
", + attr : { + id : "form-content-" + TYPE_UE, + class: "add-form-content" + }, + children : [ + createInput( "IMSI", "imsi", {maxlength: 15, required: true} ), + createInput( "M_TMSI", "m_tmsi", {maxlength: 15, required: true} ), + createInput( "IP", "ip", {required: true} ), + createInput( "Last Change", "timestamp", {} ), + ] + }, + + //Buttons + { + type : "
", + children: [ + { + type : "", + attr : { + style: "margin-right: 50px; display: none", + class: "btn btn-primary pull-right btn-new btn-detail", + html : ' Detail Traffic' + } + }] + } + ] + } + ] + }, + true // horizontal + )); + + $("#form-content-enodeb").show(); + + // add a button to filter bar + const $bar = $("#topo-content"); + $bar.append( MMTDrop.tools.createDOM( { + type : "
", + attr : { + class: "pull-right", + style: "margin-right:30px" + }, + children:[{ + type : "
", + attr :{ + class : "btn-group", + role : "group", + style : "margin-right:30px" + }, + children: [{ + type : "