Skip to content

Commit

Permalink
Correction bug création débit
Browse files Browse the repository at this point in the history
+ correction authentification
  • Loading branch information
JEALG committed Sep 29, 2024
1 parent ca99e6a commit 5ee2706
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 42 deletions.
2 changes: 1 addition & 1 deletion core/class/Free_CreateEq.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private static function createEq_connexion($logicalinfo, $templatecore_V4, $orde
$_bandwidth_value_up = '#value# / 1000000';
$_bandwidth_up_unit = 'Mb/s';
}
$Connexion = Freebox_OS::AddEqLogic($logicalinfo['connexionName'], $logicalinfo['connexionID'], 'default', false, null, null, '*/15 * * * *', null, null, null, 'system', true);
$Connexion = Freebox_OS::AddEqLogic($logicalinfo['connexionName'], $logicalinfo['connexionID'], 'default', false, null, null, '*/15 * * * *', null, null, null, null, 'system', true);
$Connexion->AddCommand('Débit descendant', 'rate_down', 'info', 'numeric', $templatecore_V4 . 'badge', 'Ko/s', null, 1, 'default', 'default', 0, $iconspeed, 0, 'default', 'default', $order++, '0', $updateicon, true, null, true, null, '#value# / 1024', '2');
$Connexion->AddCommand('Débit montant', 'rate_up', 'info', 'numeric', $templatecore_V4 . 'badge', 'Ko/s', null, 1, 'default', 'default', 0, $iconspeed, 0, 'default', 'default', $order++, '0', $updateicon, true, null, true, null, '#value# / 1024', '2', null, null, null, null, true);
$Connexion->AddCommand('Débit descendant (max)', 'bandwidth_down', 'info', 'numeric', $templatecore_V4 . 'badge', $_bandwidth_down_unit, null, 1, 'default', 'default', 0, $iconspeed, 0, 'default', 'default', $order++, '0', $updateicon, true, null, true, null, $_bandwidth_value_down, '2');
Expand Down
8 changes: 5 additions & 3 deletions core/class/Freebox_OS.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ public static function DisableEqLogic($EqLogic, $TILES = false)
public static function AddEqLogic($Name, $_logicalId, $category = null, $tiles = false, $eq_type = null, $eq_action = null, $logicalID_equip = null, $_autorefresh = null, $_Room = null, $Player = null, $type2 = null, $eq_group = 'system', $type_save = false, $Player_MAC = null)
{
$EqLogic = self::byLogicalId($_logicalId, 'Freebox_OS');
log::add('Freebox_OS', 'debug', ':fg-info:| Création équipement : :/fg:' . $Name . ' : Name : ' . $Name . ' -- LogicalID : ' . $_logicalId . ' -- catégorie : ' . $category . ' -- Equipement Type : ' . $eq_type . ' -- Logical ID Equip : ' . $logicalID_equip . ' -- Cron : ' . $_autorefresh . ' -- Objet : ' . $_Room);
//log::add('Freebox_OS', 'debug', ':fg-info:| ' . (__('Création équipement', __FILE__)) . ' : :/fg:' . $Name . ' -- LogicalID : ' . $_logicalId . ' -- catégorie : ' . $category . ' -- Equipement Type : ' . $eq_type . ' -- Logical ID Equip : ' . $logicalID_equip . ' -- Cron : ' . $_autorefresh . ' -- Objet : ' . $_Room);
log::add('Freebox_OS', 'debug', ':fg-info:/ ' . (__('Création équipement', __FILE__)) . ' : :/fg:' . $Name . ' ── LogicalID : ' . $_logicalId . ' ── ' . (__('catégorie', __FILE__)) . ' : ' . $category . ' ── ' . (__('Équipement Type', __FILE__)) . ' : ' . $eq_type . ' ── Logical ID Equip : ' . $logicalID_equip . ' ── Cron : ' . $_autorefresh . ' ── ' . (__('Objet', __FILE__)) . ' : ' . $_Room . ' ── ' . (__('Regroupement', __FILE__)) . ' : ' . $eq_group);

if (!is_object($EqLogic)) {
$EqLogic = new Freebox_OS();
$EqLogic->setLogicalId($_logicalId);
Expand Down Expand Up @@ -470,10 +472,10 @@ public static function templateWidget()
public function AddCommand($Name, $_logicalId, $Type = 'info', $SubType = 'binary', $Template = null, $unite = null, $generic_type = null, $IsVisible = 1, $link_I = 'default', $link_logicalId = 'default', $invertBinary_display = '0', $icon = null, $forceLineB = '0', $valuemin = 'default', $valuemax = 'default', $_order = null, $IsHistorized = '0', $forceIcone_widget = false, $repeatevent = 'never', $_logicalId_slider = null, $_iconname = null, $_home_config_eq = null, $_calculValueOffset = null, $_historizeRound = null, $_noiconname = null, $invertSlide = null, $request = null, $_eq_type_home = null, $forceLineA = null, $listValue = null, $updatenetwork = false, $name_connectivity_type = null, $listValue_Update = null, $_display_parameters = null, $invertBinary_config = null)
{
if ($listValue_Update == true) {
log::add('Freebox_OS', 'debug', ':fg-info:| Création de la commande : :/fg:' . $Name . ' -- LogicalID : ' . $_logicalId . ' -- Mise à jour de la liste de choix avec les valeurs : ' . $listValue . ':/fg:');
log::add('Freebox_OS', 'debug', ':fg-info:| ' . (__('Création Commande', __FILE__)) . ' : :/fg:' . $Name . ' ── LogicalID : ' . $_logicalId . ' ── ' . (__('Mise à jour de la liste de choix avec les valeurs', __FILE__)) . ' : ' . $listValue . ':/fg:');
} else if ($updatenetwork != false) {
} else {
log::add('Freebox_OS', 'debug', ':fg-info:| Création de la commande : :/fg:' . $Name . ' -- Type : ' . $Type . ' -- LogicalID : ' . $_logicalId . ' -- Template Widget / Ligne : ' . $Template . '/' . $forceLineB . '-- Type de générique : ' . $generic_type . ' -- Inverser Affichage : ' . $invertBinary_display . ' -- Inverser Valeur Binaire : ' . $invertBinary_config . ' -- Icône : ' . $icon . ' -- Min/Max : ' . $valuemin . '/' . $valuemax . ' -- Calcul/Arrondi : ' . $_calculValueOffset . '/' . $_historizeRound . ' -- Ordre : ' . $_order . ':/fg:');
log::add('Freebox_OS', 'debug', ':fg-info:| ' . (__('Création Commande', __FILE__)) . ' : :/fg:' . $Name . ' ── ' . (__("Type / SubType", __FILE__)) . ' : ' . $Type . '/' . $SubType . ' ── LogicalID : ' . $_logicalId . ' ── Template Widget / Ligne : ' . $Template . '/' . $forceLineB . ' ── ' . (__('Type de générique', __FILE__)) . ' : ' . $generic_type . ' ── ' . (__('Inverser Affichage', __FILE__)) . ' : ' . $invertBinary_display . ' ── ' . (__('Inverser Valeur Binaire', __FILE__)) . ' : ' . $invertBinary_config . ' ── ' . (__('Icône', __FILE__)) . ' : ' . $icon . ' ── ' . (__('Min/Max', __FILE__)) . ' : ' . $valuemin . '/' . $valuemax . ' ── Calcul/Arrondi : ' . $_calculValueOffset . '/' . $_historizeRound . ' ── ' . (__('Ordre', __FILE__)) . ' : ' . $_order);
}
$Cmd = $this->getCmd($Type, $_logicalId);
if (!is_object($Cmd)) {
Expand Down
46 changes: 23 additions & 23 deletions desktop/js/authentification.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ $('.bt_Freebox_Save_room').on('click', function () {


function updateMenu(objectclass) {
$('.li_FreeboxOS_Summary.active').removeClass('active');
$('.li_Freebox_Summary.active').removeClass('active');
$(objectclass).addClass('active');
$('.FreeboxOS_Display').hide();
$('.FreeboxOS_Display.' + $(objectclass).attr('data-href')).show();
$('.Freebox_Display').hide();
$('.Freebox_Display.' + $(objectclass).attr('data-href')).show();
}

function autorisationFreebox() {
Expand Down Expand Up @@ -233,13 +233,13 @@ function sendToBdd(jsonParser) {
}

function AskTrackAuthorization() {
if ($('.li_FreeboxOS_Summary.active').attr('data-href') == "authentification") {
if ($('.li_Freebox_Summary.active').attr('data-href') == "authentification") {

$('.textFreebox').hide();
$('.bt_Freebox_Next').hide();
$('.bt_Freebox_Previous').hide();
$('.FreeboxOS_OK').hide();
$('.FreeboxOS_OK_NEXT').hide();
$('.Freebox_OK').hide();
$('.Freebox_OK_NEXT').hide();

$.ajax({
type: "POST",
Expand Down Expand Up @@ -282,9 +282,9 @@ function AskTrackAuthorization() {
case "granted":
$('.textFreebox').text('{{Félicitation votre Freebox est maintenant reliée à Jeedom.}}');
logs('info', '(' + data.result.result.status + ') ' + "{{Félicitation votre Freebox est maintenant reliée à Jeedom}}");
$('.FreeboxOS_OK').show();
$('.FreeboxOS_OK_NEXT').show();
$('.FreeboxOS_Display.' + $(this).attr('rights')).show();
$('.Freebox_OK').show();
$('.Freebox_OK_NEXT').show();
$('.Freebox_Display.' + $(this).attr('rights')).show();
progress(45);
break;
case "denied":
Expand All @@ -306,15 +306,15 @@ function AskTrackAuthorization() {
$('.textFreebox').show();
$('.bt_Freebox_Next').show();
$('.bt_Freebox_Previous').show();
$('.FreeboxOS_OK').show();
$('.FreeboxOS_OK_NEXT').show();
$('.Freebox_OK').show();
$('.Freebox_OK_NEXT').show();
}
}

function Good() {
$('.bt_Freebox_Previous').hide();
$('.bt_Freebox_NEXT').hide();
$('.alert-info FreeboxOS_OK').text('{{Authentification réussi}}');
$('.alert-info Freebox_OK').text('{{Authentification réussi}}');
logs('info', "Authentification réussi");
}

Expand Down Expand Up @@ -381,7 +381,7 @@ function GetSetting() {
});
} else {
$('.textFreebox').text('');
$('.FreeboxOS_OK_NEXT').show();
$('.Freebox_OK_NEXT').show();
}
if (data.result.LogLevel == 100) {
var debugHides = document.getElementsByClassName('debugFreeOS');
Expand Down Expand Up @@ -474,7 +474,7 @@ function SetSettingTiles(CronTiles) {
},
success: function (data) {
GetSetting();
$('.FreeboxOS_OK_NEXT').show();
$('.Freebox_OK_NEXT').show();
}
});
}
Expand All @@ -501,8 +501,8 @@ function GetSessionData() {
$('.textFreebox').hide();
$('.bt_Freebox_Next').hide();
$('.bt_Freebox_Previous').hide();
$('.FreeboxOS_OK').hide();
$('.FreeboxOS_OK_NEXT').hide();
$('.Freebox_OK').hide();
$('.Freebox_OK_NEXT').hide();
$('.bt_Freebox_droitVerif').show();
$('.bt_Freebox').show();

Expand Down Expand Up @@ -547,8 +547,8 @@ function GetSessionData() {
$('.textFreebox').show();
$('.bt_Freebox_Next').show();
$('.bt_Freebox_Previous').show();
$('.FreeboxOS_OK').show();
$('.FreeboxOS_OK_NEXT').show();
$('.Freebox_OK').show();
$('.Freebox_OK_NEXT').show();
$('.bt_Freebox_droitVerif').hide();
$('.bt_Freebox').hide();

Expand Down Expand Up @@ -621,14 +621,14 @@ function SaveTitelRoom() {
}

function funNext() {
updateMenu($('.li_FreeboxOS_Summary.active').next());
updateMenu($('.li_Freebox_Summary.active').next());

$('.bt_Freebox_Next').show();
$('.bt_Freebox_Previous').show();

logs('info', "──────────▶︎ :fg-warning:{{Étape}} ::/fg: " + $('.li_FreeboxOS_Summary.active').attr('data-href'));
logs('info', "──────────▶︎ :fg-warning:{{Étape}} ::/fg: " + $('.li_Freebox_Summary.active').attr('data-href'));

switch ($('.li_FreeboxOS_Summary.active').attr('data-href')) {
switch ($('.li_Freebox_Summary.active').attr('data-href')) {
case 'home':
progress(0);
break;
Expand Down Expand Up @@ -658,12 +658,12 @@ function funNext() {
}

function funPrev() {
updateMenu($('.li_FreeboxOS_Summary.active').prev());
updateMenu($('.li_Freebox_Summary.active').prev());

$('.bt_Freebox_Next').show();
$('.bt_Freebox_Previous').show();

switch ($('.li_FreeboxOS_Summary.active').attr('data-href')) {
switch ($('.li_Freebox_Summary.active').attr('data-href')) {
case 'home':
progress(0);
break;
Expand Down
30 changes: 15 additions & 15 deletions desktop/modal/authentification.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
<div class="col-lg-2">
<div class="bs-sidebar">
<ul class="nav nav-list bs-sidenav hidden-xs">
<li class="cursor li_FreeboxOS_Summary active" data-href="home" title="{{Accueil}}"><a><i class="fab fa-ello"></i> <span class="hidden-xs"> {{Accueil}}</span></a></li>
<li class="cursor li_FreeboxOS_Summary" data-href="setting" title="{{Réglages}}"><a><i class="fas fa-cogs"></i><span class="hidden-xs"> {{Réglages}}</span></a></li>
<li class="cursor li_FreeboxOS_Summary" data-href="authentification" title="{{Authentification}}"><a><i class="fas fa-rss"></i><span class="hidden-xs"> {{Authentification}}</span></a> </li>
<li class="cursor li_FreeboxOS_Summary" data-href="rights" title="{{Droits}}"><a><i class="fas fa-balance-scale-right"></i><span class="hidden-xs"> {{Droits}}</span></a> </li>
<li class="cursor li_FreeboxOS_Summary" data-href="room" title="{{Objets}}"><a><i class="fas fa-bezier-curve"></i><span class="hidden-xs"> {{Freebox Delta}}</span></a> </li>
<li class="cursor li_FreeboxOS_Summary" data-href="scan" title="{{Scan des équipements}}"><a><i class="fas fa-search-plus"></i><span class="hidden-xs"> {{Scan des équipements}}</span></a> </li>
<li class="cursor li_FreeboxOS_Summary" data-href="end" title="{{C'est Fini !!}}"><a><i class="fas fa-check"></i><span class="hidden-xs"> {{Fin}}</span></a>
<li class="cursor li_Summary active" data-href="home" title="{{Accueil}}"><a><i class="fab fa-ello"></i> <span class="hidden-xs"> {{Accueil}}</span></a></li>
<li class="cursor li_Freebox_Summary" data-href="setting" title="{{Réglages}}"><a><i class="fas fa-cogs"></i><span class="hidden-xs"> {{Réglages}}</span></a></li>
<li class="cursor li_Freebox_Summary" data-href="authentification" title="{{Authentification}}"><a><i class="fas fa-rss"></i><span class="hidden-xs"> {{Authentification}}</span></a> </li>
<li class="cursor li_Freebox_Summary" data-href="rights" title="{{Droits}}"><a><i class="fas fa-balance-scale-right"></i><span class="hidden-xs"> {{Droits}}</span></a> </li>
<li class="cursor li_Freebox_Summary" data-href="room" title="{{Objets}}"><a><i class="fas fa-bezier-curve"></i><span class="hidden-xs"> {{Freebox Delta}}</span></a> </li>
<li class="cursor li_Freebox_Summary" data-href="scan" title="{{Scan des équipements}}"><a><i class="fas fa-search-plus"></i><span class="hidden-xs"> {{Scan des équipements}}</span></a> </li>
<li class="cursor li_Freebox_Summary" data-href="end" title="{{C'est Fini !!}}"><a><i class="fas fa-check"></i><span class="hidden-xs"> {{Fin}}</span></a>
</li>
</ul>
</div>
Expand All @@ -47,7 +47,7 @@
</div>
</div>
</div>
<div class="FreeboxOS_Display home">
<div class="Freebox_Display home">
<div class="input-group pull-right" style="display:inline-flex;">
<span class="input-group-btn">
<a class="btn btn-sm btn-primary bt_Freebox_doc roundedLeft" title="{{Documentation}}" target='_blank' href='http://mika-nt28.github.io/Documentations/Freebox_OS/fr_FR/'><i class="fas fa-book"></i><span class="hidden-xs"> {{Documentation}}</span>
Expand All @@ -66,7 +66,7 @@
<center>{{Cliquez sur suivant pour commencer}}</center>
</div>

<div class="FreeboxOS_Display setting" style="display:none;">
<div class="Freebox_Display setting" style="display:none;">
<div class="input-group pull-right" style="display:inline-flex;">
<span class="input-group-btn">
<a class="btn btn-sm btn-primary bt_Freebox_doc roundedLeft" title="{{Documentation}}" target='_blank' href='http://mika-nt28.github.io/Documentations/Freebox_OS/fr_FR/'><i class="fas fa-book"></i><span class="hidden-xs"> {{Documentation}}</span>
Expand Down Expand Up @@ -142,7 +142,7 @@
</center>
</div>

<div class="FreeboxOS_Display authentification" style="display:none;">
<div class="Freebox_Display authentification" style="display:none;">
<div class="input-group pull-right" style="display:inline-flex;">
<span class="input-group-btn">
<a class="btn btn-sm btn-primary bt_Freebox_doc roundedLeft" title="{{Documentation}}" target='_blank' href='http://mika-nt28.github.io/Documentations/Freebox_OS/fr_FR/'><i class="fas fa-book"></i><span class="hidden-xs"> {{Documentation}}</span>
Expand Down Expand Up @@ -173,7 +173,7 @@
</center>
</div>

<div class="FreeboxOS_Display rights" style="display:none;">
<div class="Freebox_Display rights" style="display:none;">
<div class="input-group pull-right" style="display:inline-flex;">
<span class="input-group-btn">
<a class="btn btn-sm btn-primary bt_Freebox_doc roundedLeft" title="{{Documentation}}" target='_blank' href='http://mika-nt28.github.io/Documentations/Freebox_OS/fr_FR/'><i class="fas fa-book"></i><span class="hidden-xs"> {{Documentation}}</span>
Expand Down Expand Up @@ -282,7 +282,7 @@
</center>
</div>

<div class="FreeboxOS_Display room" style="display:none;">
<div class="Freebox_Display room" style="display:none;">
<div class="input-group pull-right" style="display:inline-flex;">
<span class="input-group-btn">
<a class="btn btn-sm btn-primary bt_Freebox_doc roundedLeft" title="{{Documentation}}" target='_blank' href='http://mika-nt28.github.io/Documentations/Freebox_OS/fr_FR/'><i class="fas fa-book"></i><span class="hidden-xs"> {{Documentation}}</span>
Expand Down Expand Up @@ -338,7 +338,7 @@
</center>
</center>
</div>
<div class="FreeboxOS_Display scan" style="display:none;">
<div class="Freebox_Display scan" style="display:none;">
<div class="input-group pull-right" style="display:inline-flex;">
<span class="input-group-btn">
<a class="btn btn-sm btn-primary bt_Freebox_doc roundedLeft" title="{{Documentation}}" target='_blank' href='http://mika-nt28.github.io/Documentations/Freebox_OS/fr_FR/'><i class="fas fa-book"></i><span class="hidden-xs"> {{Documentation}}</span>
Expand Down Expand Up @@ -403,7 +403,7 @@
</center>
</div>

<div class="FreeboxOS_Display end" style="display:none;">
<div class="Freebox_Display end" style="display:none;">
<center><i class="fas fa-check" style="font-size: 8em;"></i></center>
<br />
<img class="img-responsive center-block" src="core/img/logo-jeedom-freebox-grand-nom-couleur.png" height="500" width="500" />
Expand All @@ -412,7 +412,7 @@
<div class="alert alert-success">{{Bravo}} !!!</div>
</center>
<center>
<div class="alert alert-info FreeboxOS_OK">{{Authentification réussie, Vous pouvez fermer cette fenêtre}}</div>
<div class="alert alert-info Freebox_OK">{{Authentification réussie, Vous pouvez fermer cette fenêtre}}</div>
</center>

</div>
Expand Down

0 comments on commit 5ee2706

Please sign in to comment.