Skip to content

Commit

Permalink
correction Sonarqb 1 nettoyage code
Browse files Browse the repository at this point in the history
  • Loading branch information
xlyric committed Apr 29, 2024
1 parent 67a1541 commit ca9cb89
Show file tree
Hide file tree
Showing 29 changed files with 67 additions and 333 deletions.
4 changes: 2 additions & 2 deletions data/config-ap.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<!DOCTYPE html>
<html lang="en">

<head>
Expand Down Expand Up @@ -367,7 +367,7 @@
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Configuration AP mode</h1>
<p class="mb-4">Page de configuration de votre pv routeur, pensez à sauvegarder votre configuration sur la flash après l'avoir appliquée.</p>
<p class="mb-4">page rapide d'aide : <a href="https://wiki.apper-solaire.org/" target="_blank"> ici </a></p>
<p class="mb-4">page rapide d'aide : <a href="https://wiki.apper-solaire.org/" target="_blank" rel="noopener"> ici </a></p>


<!-- Content Row -->
Expand Down
Binary file modified data/config-ap.html.gz
Binary file not shown.
21 changes: 3 additions & 18 deletions data/config-dimmer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<!DOCTYPE html>
<html lang="en">

<head>
Expand Down Expand Up @@ -41,7 +41,7 @@

<!-- Nav Item - Dashboard -->
<li class="nav-item active">
<a class="nav-link" href="/" target="_blank">
<a class="nav-link" href="/" target="_blank" rel="noopener">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Dashboard</span><br>
<span id="version">Version: </span><br>
Expand Down Expand Up @@ -130,13 +130,6 @@
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

<!-- Sidebar Toggle (Topbar) -->
<!-- <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">

Expand All @@ -150,12 +143,6 @@

</div>
</li>






<div class="topbar-divider d-none d-sm-block"></div>


Expand All @@ -171,7 +158,7 @@
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Configuration</h1>
<p class="mb-4">Page de configuration de votre pv routeur, pensez à sauvegarder votre configuration sur la flash après l'avoir appliquée.</p>
<p class="mb-4">page rapide d'aide : <a href="https://wiki.apper-solaire.org/" target="_blank"> ici </a></p>
<p class="mb-4">page rapide d'aide : <a href="https://wiki.apper-solaire.org/" target="_blank" rel="noopener"> ici </a></p>


<!-- Content Row -->
Expand Down Expand Up @@ -371,7 +358,6 @@ <h6 class="m-0 font-weight-bold text-primary">Pv Routeur</h6>
<div class="col-sm-4">
<div class="custom-control custom-checkbox small">
<button type="button" class="btn btn-primary btn-user btn-block" id="screen" onclick="sendservermode('screen');" >ON/OFF Oled</button>
<!-- <label class="custom-control-label" for="screen" onclick="sendservermode(this.innerHTML);" >screen</label>-->
</div>
</div>

Expand Down Expand Up @@ -568,7 +554,6 @@ <h6 class="m-0 font-weight-bold text-primary">Pv Routeur</h6>
<!-- Custom scripts for all pages-->
<script src="sb-admin-2.js"></script>

</script>
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
<script>
kofiWidgetOverlay.draw('clyric', {
Expand Down
Binary file modified data/config-dimmer.html.gz
Binary file not shown.
13 changes: 3 additions & 10 deletions data/config-light.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<!DOCTYPE html>
<html lang="en">

<head>
Expand Down Expand Up @@ -41,7 +41,7 @@

<!-- Nav Item - Dashboard -->
<li class="nav-item active">
<a class="nav-link" href="/" target="_blank">
<a class="nav-link" href="/" target="_blank" rel="noopener">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Dashboard</span><br>
<span id="version">Version: </span>
Expand Down Expand Up @@ -117,13 +117,6 @@
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

<!-- Sidebar Toggle (Topbar) -->
<!-- <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">

Expand Down Expand Up @@ -158,7 +151,7 @@
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Configuration</h1>
<p class="mb-4">Page de configuration de votre pv routeur, pensez à sauvegarder votre configuration sur la flash après l'avoir appliquée.</p>
<p class="mb-4">page rapide d'aide : <a href="https://wiki.apper-solaire.org/" target="_blank"> ici </a></p>
<p class="mb-4">page rapide d'aide : <a href="https://wiki.apper-solaire.org/" target="_blank" rel="noopener"> ici </a></p>


<!-- Content Row -->
Expand Down
Binary file modified data/config-light.html.gz
Binary file not shown.
15 changes: 4 additions & 11 deletions data/config.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<!DOCTYPE html>
<html lang="en">

<head>
Expand Down Expand Up @@ -41,7 +41,7 @@

<!-- Nav Item - Dashboard -->
<li class="nav-item active">
<a class="nav-link" href="/" target="_blank">
<a class="nav-link" href="/" target="_blank" rel="noopener">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Dashboard</span><br>
<span id="version">Version: </span><br>
Expand Down Expand Up @@ -130,12 +130,6 @@
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

<!-- Sidebar Toggle (Topbar) -->
<!-- <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>

<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
Expand Down Expand Up @@ -171,7 +165,7 @@
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Configuration</h1>
<p class="mb-4">Page de configuration de votre pv routeur, pensez à sauvegarder votre configuration sur la flash après l'avoir appliquée.</p>
<p class="mb-4">page rapide d'aide : <a href="https://wiki.apper-solaire.org/" target="_blank"> ici </a></p>
<p class="mb-4">page rapide d'aide : <a href="https://wiki.apper-solaire.org/" target="_blank" rel="noopener"> ici </a></p>


<!-- Content Row -->
Expand Down Expand Up @@ -403,7 +397,6 @@ <h6 class="m-0 font-weight-bold text-primary">Pv Routeur</h6>
<div class="col-sm-4">
<div class="custom-control custom-checkbox small">
<button type="button" class="btn btn-primary btn-user btn-block" id="screen" onclick="sendservermode('screen');" >ON/OFF Oled</button>
<!-- <label class="custom-control-label" for="screen" onclick="sendservermode(this.innerHTML);" >screen</label>-->
</div>
</div>

Expand Down Expand Up @@ -547,7 +540,7 @@ <h6 class="m-0 font-weight-bold text-primary">Pv Routeur</h6>
function generateLink(dimmerValue) {
if (dimmerValue !== 'none') {
var dimmerURL = "http://" + dimmerValue;
$('#dimmer-url').html('<a href="' + dimmerURL + '" target="_blank">' + dimmerURL + '</a>');
$('#dimmer-url').html('<a href="' + dimmerURL + '" target="_blank" rel="noopener">' + dimmerURL + '</a>');
}
}

Expand Down
Binary file modified data/config.html.gz
Binary file not shown.
25 changes: 3 additions & 22 deletions data/envoy.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<!DOCTYPE html>
<html lang="en">

<head>
Expand Down Expand Up @@ -98,13 +98,6 @@
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

<!-- Sidebar Toggle (Topbar) -->
<!-- <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">

Expand Down Expand Up @@ -153,20 +146,14 @@ <h6 class="m-0 font-weight-bold text-primary">Configuration</h6>
<form class="user" id="formulaire" method="post" action="" >

<div class="col-sm-3">
<!-- <div class="custom-control custom-checkbox small">
<input type="checkbox" class="custom-control-input" id="MQTT">
<label class="custom-control-label" for="envoy" onclick="sendservermode(this.innerHTML);" >Envoy</label>
</div>-->
</div>


<div class="form-group">
Serveur :<input type="text" class="form-control form-control-user" id="server" placeholder="N/A">
</div>

<!-- <div class="form-group">
Port :<input type="number" step="1" class="form-control form-control-user" id="port" placeholder="N/A">
</div> -->


<div class="form-group">
Modele :<input type="modele" class="form-control form-control-user" id="modele" placeholder="N/A">
Expand Down Expand Up @@ -253,15 +240,13 @@ <h6 class="m-0 font-weight-bold text-primary">Configuration</h6>
.then(response => response.json())
.then(data => {
// Récupérer les valeurs du fichier JSON
let server = data.IP_ENPHASE;
//let port = data.PORT_ENPHASE;
let server = data.IP_ENPHASE;
let modele = data.Type;
let version = data.version;
let token = data.token;

// Affecter les valeurs aux champs de formulaire
document.getElementById('server').value = server;
//document.getElementById('port').value = port;
document.getElementById('modele').value = modele;
document.getElementById('version').value = version;
document.getElementById('token').value = token;
Expand Down Expand Up @@ -304,10 +289,6 @@ <h6 class="m-0 font-weight-bold text-primary">Configuration</h6>

<!-- Bootstrap core JavaScript-->


<!-- Core plugin JavaScript-->
<!--<script src="http://pvrouter.poissonnier.net/vendor/jquery-easing/jquery.easing.min.js"></script>-->

<!-- Custom scripts for all pages-->
<script src="sb-admin-2.js"></script>
<script>
Expand Down
Binary file modified data/envoy.html.gz
Binary file not shown.
9 changes: 1 addition & 8 deletions data/index-ap.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<!DOCTYPE html>
<html lang="en">

<head>
Expand Down Expand Up @@ -316,13 +316,6 @@
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

<!-- Sidebar Toggle (Topbar) -->
<!-- <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">

Expand Down
Binary file modified data/index-ap.html.gz
Binary file not shown.
18 changes: 8 additions & 10 deletions data/index-light.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<!DOCTYPE html>
<html lang="en">

<head>
Expand Down Expand Up @@ -324,28 +324,28 @@ <h6 class="m-0 font-weight-bold text-primary">Temperature</h6>
}, 8000 ) ;


<!-- mise à jour de la jauge -->
// mise à jour de la jauge -->
var gaugePA = new google.visualization.Gauge(document.getElementById('curve_chart2'));
dataGaugePA = new google.visualization.DataTable();
var dataGaugePA = new google.visualization.DataTable();
dataGaugePA.addColumn('string', 'Reseau');
dataGaugePA.addColumn('number', 'Value');
dataGaugePA.addRows(1);


<!-- mise à jour de la jauge -->
// mise à jour de la jauge -->
var gaugePApower = new google.visualization.Gauge(document.getElementById('curve_power'));
dataGaugePApower = new google.visualization.DataTable();
var dataGaugePApower = new google.visualization.DataTable();
dataGaugePApower.addColumn('string', 'Power');
dataGaugePApower.addColumn('number', 'Value');
dataGaugePApower.addRows(1);

var gaugePAtemp = new google.visualization.Gauge(document.getElementById('curve_temp'));
dataGaugePAtemp = new google.visualization.DataTable();
var dataGaugePAtemp = new google.visualization.DataTable();
dataGaugePAtemp.addColumn('string', 'temp °C');
dataGaugePAtemp.addColumn('number', 'Value');
dataGaugePAtemp.addRows(1);

<!-- récupération valeur sigma et State -->
// récupération valeur sigma et State -->
setInterval(function ( ) {

$.getJSON('/state', function(data) {
Expand Down Expand Up @@ -446,7 +446,7 @@ <h6 class="m-0 font-weight-bold text-primary">Temperature</h6>
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>https://github.com/xlyric/ - 2019</span>
<span>https://github.com/xlyric/ - 2024</span>
</div>
</div>
</footer>
Expand All @@ -469,8 +469,6 @@ <h6 class="m-0 font-weight-bold text-primary">Temperature</h6>
<!-- Core plugin JavaScript-->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> -->

<!-- Custom scripts for all pages-->
<!-- <script src="http://pvrouter.poissonnier.net/vendor/jquery-easing/jquery.easing.min.js"></script>-->
<script>


Expand Down
Binary file modified data/index-light.html.gz
Binary file not shown.
Loading

0 comments on commit ca9cb89

Please sign in to comment.