Initial commit (source: raspap-insiders)

This commit is contained in:
billz
2025-07-14 02:22:42 -07:00
parent 51d528fd42
commit 5c979424f3
4 changed files with 374 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
<div role="tabpanel" class="tab-pane" id="diagnostic">
<h4 class="mt-3"><?php echo _("Speedtest") ?></h4>
<div class="row">
<div class="col-md-8">
<div id="loading" class="visible">
<p id="message"><span class="loadCircle"></span><?php echo _("Selecting a server"); ?>...</p>
</div>
<div id="testWrapper" class="hidden">
<button id="startStopBtn" type="button" class="btn btn-outline btn-primary" onclick="startStop()"></button>
<a class="privacy" href="#" onclick="I('privacyPolicy').style.display=''"><?php echo _("Privacy"); ?></a>
<div class="col-sm-4 centered">
<div id="serverArea">
<?php echo _("Server"); ?>: <select id="server" class="form-select" onchange="s.setSelectedServer(SPEEDTEST_SERVERS[this.value]);"></select>
</div>
</div>
<div id="test">
<div class="testGroup">
<div class="testArea2">
<div class="testName"><?php echo _("Ping"); ?></div>
<div id="pingText" class="meterText" style="color:#AA6060"></div>
<div class="unit"><?php echo _("ms"); ?></div>
</div>
<div class="testArea2">
<div class="testName"><?php echo _("Jitter"); ?></div>
<div id="jitText" class="meterText" style="color:#AA6060"></div>
<div class="unit"><?php echo _("ms"); ?></div>
</div>
</div>
<div class="testGroup">
<div class="testArea">
<div class="testName"><?php echo _("Download"); ?></div>
<canvas id="dlMeter" class="meter"></canvas>
<div id="dlText" class="meterText"></div>
<div class="unit"><?php echo _("Mbps"); ?></div>
</div>
<div class="testArea">
<div class="testName"><?php echo _("Upload"); ?></div>
<canvas id="ulMeter" class="meter"></canvas>
<div id="ulText" class="meterText"></div>
<div class="unit"><?php echo _("Mbps"); ?></div>
</div>
</div>
<div id="ipArea">
<span id="ip"></span>
</div>
</div>
</div><!-- /.testWrapper -->
<div id="privacyPolicy" style="display:none">
<h4>Speedtest Privacy Policy</h4>
<p>RaspAP's <a href="https://speedtest.raspap.com/">Speedtest server</a> is configured with telemetry enabled.</p>
<h5>Data we collect</h5>
<p>
At the end of the test, the following data is collected and stored:
<ul>
<li>Test ID</li>
<li>Time of testing</li>
<li>Test results (download and upload speed, ping and jitter)</li>
<li>IP address</li>
<li>ISP information</li>
<li>Approximate location (inferred from IP address, not GPS)</li>
<li>User agent and browser locale</li>
</ul>
</p>
<h5>How we use the data</h5>
<p>
Data collected through this service is used to:
<ul>
<li>Allow sharing of test results (sharable image for forums, etc.)</li>
<li>To improve the service offered to you (for instance, to detect problems on our side)</li>
</ul>
No personal information is disclosed to third parties.
</p>
<h5>Your consent</h5>
<p>
By starting the test, you consent to the terms of this privacy policy.
</p>
<h5>Data removal</h5>
<p>
If you wish to have your information deleted, simply provide us with your IP address. Without this information we won't be able to comply with your request. Contact <a href="mailto:&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#64;&#114;&#97;&#115;&#112;&#97;&#112;&#46;&#99;&#111;&#109;">&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#64;&#114;&#97;&#115;&#112;&#97;&#112;&#46;&#99;&#111;&#109;</a> for all deletion requests.
</p>
<br/>
<div class="closePrivacyPolicy">
<a class="privacy" href="#" onclick="I('privacyPolicy').style.display='none'">Close</a>
</div>
<br/>
</div><!-- /.privacyPolicy -->
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.tabpanel -->

View File

@@ -0,0 +1,92 @@
<div role="tabpanel" class="tab-pane active" id="summary">
<h4 class="mt-3"><?php echo _("Internet connection"); ?></h4>
<div class="row">
<div class="col-sm-12">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th><?php echo _("Interface"); ?></th>
<th><?php echo _("IP Address"); ?></th>
<th><?php echo _("Gateway"); ?></th>
<th colspan="2"><?php echo _("Internet Access"); ?></th>
</tr>
</thead>
<tbody>
<?php if (isset($routeInfo["error"]) || empty($routeInfo)): ?>
<tr><td colspan=5>No route to the internet found</td></tr>
<?php else: ?>
<?php foreach($routeInfo as $route): ?>
<tr>
<td><?php echo $route['interface'] ?></td>
<td><?php echo $route['ip-address'] ?></td>
<td><?php echo $route['gateway'] ?><br><?php $route['gw-name'] ?></td>
<?php if ($route['isAP']): ?>
<td>
<p class="m-0">Access point</p>
</td>
<?php else: ?>
<td>
<p class="m-0" data-bs-toggle="tooltip" data-bs-placement="left" title="<?php echo "ping ".RASPI_ACCESS_CHECK_IP ?>">
<i class="fas <?php echo $route["access-ip"] ? "fa-check" : "fa-times"; ?>" ></i> <?php echo "IP" ?>
</p>
<p class="m-0" data-bs-toggle="tooltip" data-bs-placement="left" title="<?php echo "ping ".RASPI_ACCESS_CHECK_DNS ?>">
<i class="fas <?php echo $route["access-dns"] ? "fa-check" : "fa-times"; ?>" ></i> <?php echo "DNS" ?>
</p>
<p class="m-0" data-bs-toggle="tooltip" data-bs-placement="left" title="<?php echo RASPI_ACCESS_CHECK_URL ?>">
<i class="fas <?php echo $route["access-url"] ? "fa-check" : "fa-times"; ?>" ></i> <?php echo "HTTP" ?>
</p>
</td>
<?php endif ?>
</tr>
<?php endforeach ?>
<?php endif ?>
</tbody>
</table>
</div>
</div>
</div>
<h4 class="mt-3"><?php echo _("Routing table"); ?></h4>
<div class="card h-100 w-100">
<div class="card-header"><?php echo _("raw output") ?></div>
<div class="card-body">
<div class="row">
<div class="col-sm-12">
<div class="table-responsive">
<table class="table">
<tbody>
<?php foreach($routeInfoRaw as $route): ?>
<tr>
<pre class="unstyled"><?php echo $route; ?></pre>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<h4 class="mt-3"><?php echo _("Current settings") ?></h4>
<div class="row">
<?php if (!$bridgedEnabled) : // No interface details when bridged ?>
<?php foreach ($interfaces as $interface): ?>
<?php $if_quoted = htmlspecialchars($interface, ENT_QUOTES) ?>
<div class="col-md mb-3">
<div class="card h-100 w-100">
<div class="card-header"><?php echo $if_quoted ?></div>
<div class="card-body">
<pre class="unstyled" id="<?php echo $if_quoted ?>-summary"></pre>
</div>
</div>
</div>
<?php endforeach ?>
<?php endif ?>
</div><!-- /.row -->
<button type="button" onClick="window.location.reload();" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</div><!-- /.tabpanel -->