From 3b2f1b4fb28318ee91ce36e0eac0657b59ed85c8 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Thu, 28 May 2026 12:38:16 +0300 Subject: [PATCH 01/12] Optimized the drop-down list of found monitors. (onvifprobe.php) - In the drop-down list of found monitors, select those monitors that are already added to the system. - Sort the list of found monitors by hostname. --- web/skins/classic/views/onvifprobe.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/views/onvifprobe.php b/web/skins/classic/views/onvifprobe.php index b9311d575..6cdd413dd 100644 --- a/web/skins/classic/views/onvifprobe.php +++ b/web/skins/classic/views/onvifprobe.php @@ -169,7 +169,19 @@ if (!isset($_REQUEST['step']) || ($_REQUEST['step'] == '1')) { } } + $monitors = dbFetchAll('SELECT Path FROM Monitors WHERE Deleted=false'); + if ($monitors) { + $monitorHosts = []; + foreach ($monitors as $monitor) { + if (preg_match('/\/\/([\w\-.]+)[\/|:|\?]/', $monitor['Path'], $matches)) { + $monitorHosts[] = $matches[1]; + } + } + } + $monitorHosts = array_unique($monitorHosts); + $detcameras = probeCameras(''); + usort($detcameras, fn($a, $b) => $a['monitor']['Host'] <=> $b['monitor']['Host']); foreach ($detcameras as $camera) { if (preg_match('|([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|', $camera['monitor']['Host'], $matches)) { $ip = $matches[1]; @@ -177,7 +189,13 @@ if (!isset($_REQUEST['step']) || ($_REQUEST['step'] == '1')) { $host = $ip; $sourceDesc = base64_encode(json_encode($camera['monitor'])); $sourceString = $camera['model'].' @ '.$host.' using version '.$camera['monitor']['SOAP']; - $cameras[$sourceDesc] = $sourceString; + + $_host = (preg_match('/\/\/([\w\-.]+)[\/|:|\?]/', $camera['monitor']['Host'], $matches)) ? $matches[1] : ''; + if ($_host && in_array($_host, $monitorHosts, true)) { + $cameras[$sourceDesc] = ['Name'=> $sourceString, 'class'=> 'monitor-added']; + } else { + $cameras[$sourceDesc] = $sourceString; + } } if (count($cameras) <= 0) From 9eddec677ec6ed722ed18e09bb45450676ae3a15 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Thu, 28 May 2026 12:41:07 +0300 Subject: [PATCH 02/12] Added a style (onvifprobe.css) --- web/skins/classic/css/base/views/onvifprobe.css | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 web/skins/classic/css/base/views/onvifprobe.css diff --git a/web/skins/classic/css/base/views/onvifprobe.css b/web/skins/classic/css/base/views/onvifprobe.css new file mode 100644 index 000000000..40bc5a4dd --- /dev/null +++ b/web/skins/classic/css/base/views/onvifprobe.css @@ -0,0 +1,3 @@ +.monitor-added { + opacity: 0.4; +} From c2ebbc7ed5840564ff8a9ea6617c8b5775e2c58e Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Thu, 28 May 2026 12:44:59 +0300 Subject: [PATCH 03/12] Added the ability to specify a class for