Add unconfigured client state to dashboard.php

Add tun device as client_udev_prototypes.json
This commit is contained in:
Christian Zeitnitz
2021-03-27 17:43:15 +01:00
parent 43043d48e4
commit 5b9d4ca814
6 changed files with 23 additions and 9 deletions

View File

@@ -173,7 +173,8 @@ function DisplayDashboard(&$extraFooterScripts)
break;
default:
$client_title = "No information for client available";
$type_name = "No Client";
$type_name = "Not configured";
$ifaceStatus = "warn";
}
echo renderTemplate(

View File

@@ -198,9 +198,10 @@ function findCurrentClientIndex($clients)
$ncl=$clients["clients"];
if($ncl > 0) {
$ty=-1;
foreach($clients["device"] as $i => $dev) {
if(($id=array_search($dev["type"], $_SESSION["net-device-types"])) > $ty && !$dev["isAP"]) {
$ty=$id;
foreach($clients["device"] as $i => $dev) {
$id=array_search($dev["type"],$_SESSION["net-device-types"]);
if($id >=0 && $_SESSION["udevrules"]["network_devices"][$id]["clientid"] > $ty && !$dev["isAP"]) {
$ty=$id;
$devid=$i;
}
}