$eqL) { $eqBrokersName[$id] = $eqL->getName(); } sendVarToJS('eqBrokers', $eqBrokersName); $has_orphans = false; $node_images = scandir(__DIR__ . '/../../resources/images/'); ?> callInstallFunction('update', true); */ function displayActionCard($action_name, $fa_icon, $attr = '', $class = '') { echo '
'; echo '
'; echo '' . $action_name . ''; echo '
'; } /** * * @param jMQTT $eqL */ function displayEqLogicCard($eqL, $node_images) { $opacity = $eqL->getIsEnable() ? '' : 'disableCard'; echo '
'; if ($eqL->getConfiguration('auto_add_cmd', 1) == 1) { echo '
'; } if ($eqL->getType() == jMQTT::TYP_BRK) { $file = 'node_broker_' . $eqL->getDaemonState() . '.svg'; } else { $icon = 'node_' . $eqL->getConfiguration('icone'); $test = $icon . '.svg'; $file = 'node_.png'; if (in_array($test, $node_images)) { $file = $test; } else { $test = $icon . '.png'; if (in_array($test, $node_images)) { $file = $test; } } } echo ''; echo "
"; echo '' . $eqL->getHumanName(true, true) . ''; echo '
'; } ?>
{{Gestion plugin et brokers}}
{{Equipements connectés à}} ' . $eqB->getName() . ''; echo '
'; displayActionCard('{{Ajouter un équipement}}', 'fa-plus-circle', 'data-action="add_jmqtt" brkId="' . $eqB->getId() . '"', 'logoSecondary', true); displayActionCard('{{Mode inclusion}}', 'fa-sign-in-alt fa-rotate-90', 'data-action="changeIncludeMode" brkId="' . $eqB->getId() . '"', 'logoSecondary card', true); if (array_key_exists($eqB->getId(), $eqNonBrokers)) { foreach ($eqNonBrokers[$eqB->getId()] as $eqL) { displayEqLogicCard($eqL, $node_images); } } echo '
'; } if ($has_orphans) { echo ' {{Equipements}} {{orphelins}}'; echo '
'; foreach ($eqNonBrokers as $id => $nonBrokers) { if (! array_key_exists($id, $eqBrokers)) { foreach ($nonBrokers as $eqL) { displayEqLogicCard($eqL, $node_images); } } } echo '
'; } ?>