diff options
author | Priyadharshini <priyadharshini.b96@wipro.com> | 2020-03-16 05:55:43 +0000 |
---|---|---|
committer | Priyadharshini <priyadharshini.b96@wipro.com> | 2020-03-23 09:11:55 +0530 |
commit | cfb63b2c5c381434a6fdea794ad0c2e89a2be328 (patch) | |
tree | 586b997a0634198bf0b0ded5dbbde51ff7311b27 /ransim/ransimctrlr/RANSIM-GUI/src/main/webapp/controlpanel.html | |
parent | 44d8e15bda321936078b99f8222175a8ab016bc6 (diff) |
Initial code check-in RANSim Controller and RANSim GUI
Issue-ID: INT-1485
Signed-off-by: Priyadharshini <priyadharshini.b96@wipro.com>
Change-Id: I99fe693065072ff5c9b188f2177488a4cd93237d
Diffstat (limited to 'ransim/ransimctrlr/RANSIM-GUI/src/main/webapp/controlpanel.html')
-rw-r--r-- | ransim/ransimctrlr/RANSIM-GUI/src/main/webapp/controlpanel.html | 252 |
1 files changed, 252 insertions, 0 deletions
diff --git a/ransim/ransimctrlr/RANSIM-GUI/src/main/webapp/controlpanel.html b/ransim/ransimctrlr/RANSIM-GUI/src/main/webapp/controlpanel.html new file mode 100644 index 0000000..a2cfabe --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-GUI/src/main/webapp/controlpanel.html @@ -0,0 +1,252 @@ +<!-- + * ============LICENSE_START======================================================= + * Ran Simulator Controller + * ================================================================================ + * Copyright (C) 2020 Wipro Limited. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + --> + +<!DOCTYPE html> +<html ng-app="myApp" ng-controller="myCtrl"> + <head> + <script src="angular.min.js"></script> + <style> + .can { + padding-top:40px; + } + </style> + <script> + var app = angular.module('myApp', []); + app.controller('myCtrl', function($scope, $window) { + /*$scope.startSimulator = function() { + $window.open('SimulationTrigger.html', '','menubar=no, locationbar=no, toolbar=no, width=600px, height=250px'); + };*/ + $scope.startSimulatorFile = function() { + document.getElementById("stopSimulator").disabled = false; + document.getElementById("startSimulator").disabled = true; + $window.open('SimulationTriggerFile.html', '','menubar=no, locationbar=no, toolbar=no, width=600px, height=250px'); + }; + $scope.stopSimulator = function() { + document.getElementById("stopSimulator").disabled = true; + document.getElementById("startSimulator").disabled = false; + $window.open('SimulationStop.html', '','menubar=no, locationbar=no, toolbar=no, width=600px, height=250px'); + }; + + $scope.showOperationTable = function() { + $window.open('operationhistory.html', '','menubar=no, locationbar=no, toolbar=no, width=850px, height=450px'); + }; + $scope.showNetconfServerDetails = function() { + $window.open('AdditionalFeature.html', '','menubar=no, locationbar=no, toolbar=no, width=850px, height=450px'); + }; + $scope.startPm = function() { + + document.getElementById("stopPm").disabled = false; + document.getElementById("startPm").disabled = true; + $window.open('startsPm.html', '','menubar=no, locationbar=no, toolbar=no, width=600px, height=400px'); + /* + var status; + var xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + status = JSON.parse(this.responseText); + console.log(status); + console.log("status"); + } + }; + xmlhttp.open("GET", "/ransim/api/GetPmDataStatus", + true); + xmlhttp.send(); + + if(status == true){ + document.getElementById("stopPm").disabled = false; + document.getElementById("startPm").disabled = true; + }*/ + + }; + $scope.stopPm = function() { + document.getElementById("stopPm").disabled = true; + document.getElementById("startPm").disabled = false; + $window.open('stopPm.html', '','menubar=no, locationbar=no, toolbar=no, width=600px, height=250px'); + }; + + + + }); + </script> + </head> + <body> + <div id="controlpanel" class="absolute"> + RAN Simulation + <br> + <!-- button ng-click="startSimulator()">StartHoneycomb</button--> + <button id="startSimulator" ng-click="startSimulatorFile()">Start</button> + <button id="stopSimulator" ng-click="stopSimulator()" disabled>Stop</button><br> + <br> + <div id="operupdate" name="operuodate">Click view to check details of the updated cells</div> + <button ng-click="showOperationTable()">View</button> + <br> + <br> + <button ng-click="showNetconfServerDetails()">Netconf Details</button> + <br> + <br> + <div>PM data</div> + <button id="startPm" ng-click="startPm()">Start</button> + <button id="stopPm" ng-click="stopPm()" disabled>Stop</button> + <br> + <br> + + </div> + <p></p> + <canvas id="Canvas2" class="can" width="4000" height="10000"></canvas> + </body> +<script> +var canvas = document.getElementById('Canvas2'); +var ctx = canvas.getContext('2d'); + ctx.clearRect(0, 0, 300, 420); + ctx.fillStyle = "#FFFFDF"; + ctx.fillRect(0, 0, 300, 420); + + ctx.fillStyle = "black"; + ctx.font = "bold 12px Comic Sans MS"; + ctx.fillText("BASIC LAYOUT", 10, 24); + + ctx.fillStyle = "#BFBFBF"; + ctx.beginPath(); + ctx.arc(22, 50, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Cells with no issues", 44, 54); + + ctx.fillStyle = "Orange"; + ctx.beginPath(); + ctx.arc(22, 80, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Cells with Confusion", 44, 84); + + ctx.fillStyle = "Red"; + ctx.beginPath(); + ctx.arc(22, 110, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Cells with Collision", 44, 114); + + ctx.fillStyle = "Brown"; + ctx.beginPath(); + ctx.arc(22, 140, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Cells with Collision and Confusion", 44, 144); + + ctx.fillStyle = "purple"; + ctx.beginPath(); + ctx.arc(22, 170, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Search results", 44, 174); + + ctx.fillStyle = "black"; + ctx.font = "bold 12px Comic Sans MS"; + ctx.fillText("NEIGHBORS LAYOUT", 10, 214); + + ctx.fillStyle = "#2addda"; + ctx.beginPath(); + ctx.arc(22, 240, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Selected cell", 44, 244); + + ctx.fillStyle = "#008000"; + ctx.beginPath(); + ctx.arc(22, 270, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Neighbors with no issues", 44, 274); + + ctx.fillStyle = "Orange"; + ctx.beginPath(); + ctx.arc(22, 300, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Neighbors with Confusion", 44, 304); + + ctx.fillStyle = "Red"; + ctx.beginPath(); + ctx.arc(22, 330, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Neighbors with Collision", 44, 334); + + ctx.fillStyle = "Brown"; + ctx.beginPath(); + ctx.arc(22, 360, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Neighbors with Collision and Confusion", 44, 364); + + ctx.fillStyle = "#606060"; + ctx.beginPath(); + ctx.arc(22, 390, 11, 0, Math.PI * 2, true); + ctx.strokeStyle = "black"; + ctx.stroke(); + ctx.closePath(); + ctx.fill(); + ctx.fillStyle = "black"; + ctx.font = "bold 11px Comic Sans MS"; + ctx.fillText("Blacklisted Neighbors(dotted lines)", 44, 394); + +</script> +</html> |