added nav link for scanner page

This commit is contained in:
Russel Yasol
2024-05-13 18:09:58 +08:00
parent 38b6b7ab00
commit 49af87089b
2 changed files with 24 additions and 110 deletions

View File

@@ -150,7 +150,7 @@
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">LTE and NSA Neighbourcell Scan</div>
<div class="card-header">LTE and NR5G Neighbourcell Scan</div>
<div class="card-body">
<table class="table">
<thead>
@@ -177,12 +177,12 @@
x-model="neighbourCellsScanMode"
>
<option selected>Select Scan Mode</option>
<option value="LTE and NSA">LTE and NSA</option>
<option value="LTE and NR5G">LTE and NR5G</option>
<option value="LTE">LTE</option>
<option value="NSA">NSA</option>
<option value="NR5G">NR5G</option>
</select>
<div id="neighbourCellSelectHelper" class="form-text">
Neighbourcell scan will only scan LTE or NSA cells from
Neighbourcell scan will only scan LTE or NR5G cells from
your network provider.
</div>
</div>
@@ -191,7 +191,7 @@
<button
class="btn btn-primary me-md-2"
type="button"
x-on:click="getNeighbourcellLTEandNSA()"
x-on:click="getNeighbourcellLTEandNR5G()"
:disabled="isLoading"
>
Start Neighbour Cell Scan
@@ -1801,7 +1801,7 @@
90131: "Orange S.A.",
90135: "Globecomm Network Services",
90136: "Azerfon",
90137: "Transatel",
90137: "TraNR5Gtel",
90138: "Multiregional TransitTelecom (MTT)",
90139: "MTX Connect Ltd",
90140: "Deutsche Telekom AG",
@@ -2027,7 +2027,7 @@
return this.networkNames[mccmnc] || `${mcc} ${mnc}`;
},
getNeighbourcellLTEandNSA() {
getNeighbourcellLTEandNR5G() {
// this.clearTableRowsBodyNeighbourCells();
// Reset the array before generating new rows
this.lte_neighbourCells = [];
@@ -2127,7 +2127,7 @@
const tableBody = document.getElementById("neighbourCellTableBody");
tableBody.innerHTML = "";
if (this.neighbourCellsScanMode === "LTE and NSA") {
if (this.neighbourCellsScanMode === "LTE and NR5G") {
// Generate rows for LTE neighbour cells
for (let i = 0; i < this.lte_neighbourCellsParsed.length; i++) {
const LTElines = this.lte_neighbourCellsParsed[i].split(",");
@@ -2166,7 +2166,7 @@
</tr>
`);
}
} else if (this.neighbourCellsScanMode === "NSA") {
} else if (this.neighbourCellsScanMode === "NR5G") {
// Generate rows for NR5G neighbour cells
for (let i = 0; i < this.nr5g_neighbourCellsParsed.length; i++) {

View File

@@ -52,7 +52,7 @@
<li class="nav-item">
<a class="nav-link" href="/sms.html">SMS</a>
</li>
<li class="nav-item">
<li class="nav-item">
<a class="nav-link" href="/console">Console</a>
</li>
<li class="nav-item">
@@ -82,7 +82,7 @@
class="form-control"
placeholder="ATI"
id="atOutputBox"
style="height: 220px"
style="height: 210px"
x-text="atCommandResponse"
readonly
>
@@ -237,32 +237,6 @@
</button>
</td>
</tr>
<tr>
<th scope="row">Scan Neighbour LTE</th>
<td>
<button
type="submit"
class="btn btn-primary"
@click="scanLTE()"
:disabled="isLoading"
>
Scan LTE
</button>
</td>
</tr>
<tr>
<th scope="row">Scan Neighbour NSA</th>
<td>
<button
type="submit"
class="btn btn-primary"
@click="scanNSA()"
:disabled="isLoading"
>
Scan NSA
</button>
</td>
</tr>
</tbody>
</table>
</div>
@@ -313,7 +287,7 @@
Set TTL Value to 0 to disable.
</div>
</div>
<div class="d-grid gap-2">
<div class="d-grid gap-1">
<button
class="btn btn-primary"
type="button"
@@ -324,30 +298,18 @@
</div>
</div>
<div class="card-text">
<!-- Select Input Scan Here -->
<div class="mb-3">
<label for="networkScan" class="form-label"
>Network Scan</label
>
<select
class="form-select"
id="networkScan"
x-model="fullScanModeType"
>
<option selected>Choose Scan Mode</option>
<option value="LTE">LTE</option>
<option value="NR5G">NR5G</option>
<option value="ALL">ALL</option>
</select>
</div>
<div class="d-grid gap-2">
<button
class="btn btn-primary"
type="button"
@click="fullScanMode()"
:disabled="isLoading"
x-text="scanStart ? 'Scanning... Please wait.' : 'Start Scan'"
></button>
<label class="form-label">Cell Scanner</label>
<div class="d-grid gap-1 w-full">
<!-- -->
<a
class="btn btn-warning"
type="button"
href="/scanner.html"
role="button"
>
Go to Cell Scanner
</a>
<!-- </a> -->
</div>
</div>
</div>
@@ -425,8 +387,6 @@
ethPassStatus: false,
DNSProxyStatus: true,
USBModeStatus: true,
fullScanModeType: "",
scanStart: false,
closeModal() {
this.confirmModal = false;
@@ -544,52 +504,6 @@
});
},
scanLTE() {
this.atcmd = 'AT+QENG="neighbourcell"';
this.sendATCommand().then(() => {
this.fetchCurrentSettings();
});
},
scanNSA() {
this.atcmd =
'AT+QNWCFG="nr5g_meas_info",1;+QNWCFG="nr5g_meas_info"';
this.sendATCommand().then(() => {
this.fetchCurrentSettings();
});
},
fullScanMode() {
switch (this.fullScanModeType) {
case "LTE":
this.atcmd = "AT+QSCAN=1,1";
this.scanStart = true;
this.atCommandResponse =
"Scanning all available LTE networks... This might take a while.";
this.sendATCommand();
this.scanStart = false;
break;
case "NR5G":
this.atcmd = "AT+QSCAN=2,1";
this.scanStart = true;
this.atCommandResponse =
"Scanning all available NR5G-SA networks... This might take a while.";
this.sendATCommand();
this.scanStart = false;
break;
case "ALL":
this.atcmd = "AT+QSCAN=3,1";
this.scanStart = true;
this.atCommandResponse =
"Scanning all available networks... This might take a while.";
this.sendATCommand();
this.scanStart = false;
break;
default:
alert("Select a Scan Mode First");
}
},
fetchCurrentSettings() {
this.fetchATCommand =
'AT+QMAP="MPDN_RULE";+QMAP="DHCPV4DNS";+QMAPWAC?';