From 6f90ede310c94d2f9c4e81f92b49c078311619f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maja=20G=C3=B3recka-Wolniewicz?= Date: Mon, 17 Feb 2025 21:24:39 +0100 Subject: [PATCH] SP overview --- web/admin/overview_org.php | 93 +++++++++++++++++++++++++++++++------- 1 file changed, 76 insertions(+), 17 deletions(-) diff --git a/web/admin/overview_org.php b/web/admin/overview_org.php index 8634f916d..9e65cadbd 100644 --- a/web/admin/overview_org.php +++ b/web/admin/overview_org.php @@ -288,6 +288,7 @@ function displayDeploymentPropertyWidget(&$deploymentObject) { $radius_status[1] = $deploymentObject->radius_status_2; $cacert = file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.pem"); $retry = $deploymentObject->checkRADIUSHostandConfigDaemon(); + $isradiusready = radius_ready($deploymentObject); if (is_array($retry)) { foreach ($retry as $id => $stat) { if ($stat) { @@ -321,7 +322,10 @@ function displayDeploymentPropertyWidget(&$deploymentObject) { -
+ + + + host1_v4 !== NULL) { echo _("IPv4") . ": " . $deploymentObject->host1_v4; @@ -334,21 +338,33 @@ function displayDeploymentPropertyWidget(&$deploymentObject) { } ?> - ' . _("RADSEC over TLS port number:") . '
' . _("RADSEC TLS-PSK port number:"); ?> - port1 . '
2083
2084'; ?> + + + + + + + + port1; ?> + radius_status_1]['icon'] . - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "' class='cat-icon'>"; + if ($deploymentObject->status_1) { + echo "" . $radiusMessages[$deploymentObject->radius_status_1]["; + } ?> -
+ + + + host2_v4 !== NULL) { - echo _("IPv4") . ": " . $deploymentObject->host2_v4; + echo _("IPv4") . ": " . $deploymentObject->host1_v4; } if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { echo "
"; @@ -356,18 +372,40 @@ function displayDeploymentPropertyWidget(&$deploymentObject) { if ($deploymentObject->host2_v6 !== NULL) { echo _("IPv6") . ": " . $deploymentObject->host2_v6; } - ?> - - port2; ?> + ?> + + + + + + + + + port2; ?> + radius_status_2]['icon'] . - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "' class='cat-icon'>"; + if ($deploymentObject->status_2) { + echo "" . $radiusMessages[$deploymentObject->radius_status_2]["; + } ?> - + + + + + + + 2083
+ + 2084 + + + + secret; ?> @@ -400,8 +438,10 @@ function displayDeploymentPropertyWidget(&$deploymentObject) { ?> ' . - _('click on "Renew RADSEC over TLS credentials" button'); + if ($deploymentObject->radsec_cert != NULL) { + echo _('If your certificate is close to expiry or you need to create new RADSEC over TLS credentials') . '
' . + _('click on "Renew RADSEC over TLS credentials" button'); + } ?> +
@@ -543,6 +585,7 @@ function displayDeploymentPropertyWidget(&$deploymentObject) {
+ ' . _("Check later.");} ?>
@@ -600,6 +643,22 @@ function displayClassicHotspotPropertyWidget($deploymentObject) { } +/** + * checks if both RADIUS servers are ready to accept reconfiguration requests + * + * + */ +function radius_ready($dsp) { + foreach (array($dsp->host1_v4, $dsp->host2_v4) as $host) { + $connection = @fsockopen($host, \config\Master::MANAGEDSP['radiusconfigport']); + if (is_resource($connection)) { + fclose($connection); + } else { + return false; + } + } + return true; +} $deco = new \web\lib\admin\PageDecoration(); $validator = new \web\lib\common\InputValidation(); $uiElements = new web\lib\admin\UIElements();