From 6fd4f92711c78ffbd92035e939c16d61c58e862f Mon Sep 17 00:00:00 2001 From: chris9951 Date: Mon, 26 Oct 2026 11:15:53 +0100 Subject: [PATCH 001/204] Add missing Smokeping validation group title (#21043) * Add missing Smokeping validation group title The validate page builds each group's title from validation.validations.groups.{group}, but the smokeping group had no entry, so the raw translation key was shown as its heading. Co-Authored-By: Claude Opus 5.5 * Correct spelling of 'Smokeping' to 'SmokePing' --------- Co-authored-by: Claude Opus 5.5 Co-authored-by: Jellyfrog --- lang/en/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/en/validation.php b/lang/en/validation.php index 2214a2b0212..63bd0146941 100644 --- a/lang/en/validation.php +++ b/lang/en/validation.php @@ -78,6 +78,7 @@ 'python' => 'Python', 'rrd' => 'RRD', 'scheduler' => 'Scheduler', + 'smokeping' => 'SmokePing', 'snmp' => 'SNMP', 'system' => 'System', 'updates' => 'Updates', From 691dd4310d905a5495180fbe0157d1c1a248e0e1 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 26 Oct 2026 11:11:52 -0500 Subject: [PATCH 002/204] APC use numbers for division (#21046) not strings --- .../discovery/sensors/current/apc.inc.php | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/includes/discovery/sensors/current/apc.inc.php b/includes/discovery/sensors/current/apc.inc.php index b0a928c1dc6..7d1934e3cb9 100644 --- a/includes/discovery/sensors/current/apc.inc.php +++ b/includes/discovery/sensors/current/apc.inc.php @@ -11,7 +11,7 @@ echo 'APC PowerNet-MIB Phase '; } $type = 'apc'; - $precision = '10'; + $divisor = 10; foreach (explode("\n", $oids) as $data) { $data = trim($data); if ($data) { @@ -29,19 +29,19 @@ $warnlimit_oid = '.1.3.6.1.4.1.318.1.1.12.2.2.1.1.3.' . $index; // rPDULoadPhaseConfigNearOverloadThreshold $phase = SnmpQuery::get($phase_oid)->value(); - $current = (SnmpQuery::get($current_oid)->value() / $precision); + $current = (SnmpQuery::get($current_oid)->value() / $divisor); $limit = SnmpQuery::get($limit_oid)->value(); - // No / $precision here! Nice, APC! + // No / $divisor here! Nice, APC! $lowlimit = SnmpQuery::get($lowlimit_oid)->value(); - // No / $precision here! Nice, APC! + // No / $divisor here! Nice, APC! $warnlimit = SnmpQuery::get($warnlimit_oid)->value(); - // No / $precision here! Nice, APC! + // No / $divisor here! Nice, APC! if (count(explode("\n", $oids)) != 1) { $descr = "Phase $phase"; } else { $descr = 'Output'; } - discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, null, $warnlimit, $limit, $current); + discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, $divisor, 1, $lowlimit, null, $warnlimit, $limit, $current); } } } @@ -54,7 +54,7 @@ echo 'APC PowerNet-MIB Phase '; } $type = 'apc'; - $precision = '10'; + $divisor = 10; foreach (explode("\n", $oids) as $data) { $data = trim($data); if ($data) { @@ -76,19 +76,19 @@ $warnlimit_oid = '.1.3.6.1.4.1.318.1.1.12.2.2.1.1.3.' . $phasenum; // rPDULoadPhaseConfigNearOverloadThreshold $phase = SnmpQuery::get($phase_oid)->value(); - $current = (SnmpQuery::get($current_oid)->value() / $precision); + $current = (SnmpQuery::get($current_oid)->value() / $divisor); $limit = SnmpQuery::get($limit_oid)->value(); - // No / $precision here! Nice, APC! + // No / $divisor here! Nice, APC! $lowlimit = SnmpQuery::get($lowlimit_oid)->value(); - // No / $precision here! Nice, APC! + // No / $divisor here! Nice, APC! $warnlimit = SnmpQuery::get($warnlimit_oid)->value(); - // No / $precision here! Nice, APC! + // No / $divisor here! Nice, APC! if (count(explode("\n", $oids)) != 1) { $descr = "Phase $phase"; } else { $descr = 'Output'; } - discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, null, $warnlimit, $limit, $current); + discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, $divisor, 1, $lowlimit, null, $warnlimit, $limit, $current); } } } @@ -104,7 +104,7 @@ d_echo($oids . "\n"); $oids = trim((string) $oids); $type = 'apc'; - $precision = '10'; + $divisor = 10; foreach (explode("\n", $oids) as $data) { $data = trim($data); if ($data) { @@ -127,12 +127,12 @@ $warnlimit_oid = '.1.3.6.1.4.1.318.1.1.12.2.4.1.1.3.' . $banknum; // rPDULoadBankConfigNearOverloadThreshold $bank = SnmpQuery::get($bank_oid)->value(); - $current = (SnmpQuery::get($current_oid)->value() / $precision); + $current = (SnmpQuery::get($current_oid)->value() / $divisor); $limit = SnmpQuery::get($limit_oid)->value(); $lowlimit = SnmpQuery::get($lowlimit_oid)->value(); $warnlimit = SnmpQuery::get($warnlimit_oid)->value(); if ($limit != -1 && $lowlimit != -1 && $warnlimit != -1) { - discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, null, $warnlimit, $limit, $current); + discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, $divisor, 1, $lowlimit, null, $warnlimit, $limit, $current); } } } @@ -146,7 +146,7 @@ d_echo($oids . "\n"); $oids = trim((string) $oids); $type = 'apc'; - $precision = '10'; + $divisor = 10; foreach (explode("\n", $oids) as $data) { $data = trim($data); if ($data) { @@ -166,7 +166,7 @@ $name_oid = '.1.3.6.1.4.1.318.1.1.26.9.4.3.1.3.' . $index; // rPDU2OutletMeteredStatusName $voltage = SnmpQuery::get($voltage_oid)->value(); - $current = (SnmpQuery::get($current_oid)->value() / $precision); + $current = (SnmpQuery::get($current_oid)->value() / $divisor); $limit = null; $lowlimit = null; @@ -179,7 +179,7 @@ } $descr = 'Outlet ' . $index . ' - ' . SnmpQuery::get($name_oid)->value(); - discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, null, $warnlimit, $limit, $current); + discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, $divisor, 1, $lowlimit, null, $warnlimit, $limit, $current); } } } @@ -188,7 +188,7 @@ $oids = snmp_walk($device, 'atsConfigPhaseTableIndex', '-OsqnU', 'PowerNet-MIB'); if (isset($oids) && $oids) { $type = 'apc'; - $precision = '10'; + $divisor = 10; d_echo($oids . "\n"); $oids = trim((string) $oids); if ($oids) { @@ -203,15 +203,15 @@ $warnlimit_oid = '.1.3.6.1.4.1.318.1.1.8.4.16.1.4.1'; // atsConfigPhaseNearOverLoadThreshold $index = 1; - $current = (SnmpQuery::get($current_oid)->value() / $precision); + $current = (SnmpQuery::get($current_oid)->value() / $divisor); $limit = SnmpQuery::get($limit_oid)->value(); - // No / $precision here! Nice, APC! + // No / $divisor here! Nice, APC! $lowlimit = SnmpQuery::get($lowlimit_oid)->value(); - // No / $precision here! Nice, APC! + // No / $divisor here! Nice, APC! $warnlimit = SnmpQuery::get($warnlimit_oid)->value(); - // No / $precision here! Nice, APC! + // No / $divisor here! Nice, APC! $descr = 'Output Feed'; - discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, null, $warnlimit, $limit, $current); + discover_sensor(null, SensorType::Current, $device, $current_oid, $index, $type, $descr, $divisor, 1, $lowlimit, null, $warnlimit, $limit, $current); } unset($oids); From 806bf965cf811964bd6d5cccdf027ec582bddb7d Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 26 Oct 2026 11:47:28 -0500 Subject: [PATCH 003/204] Fix poller group create button (#21047) --- resources/views/poller/groups.blade.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/views/poller/groups.blade.php b/resources/views/poller/groups.blade.php index aac0bdc4226..89111313416 100644 --- a/resources/views/poller/groups.blade.php +++ b/resources/views/poller/groups.blade.php @@ -138,10 +138,11 @@ $('#poller-groups').on('show.bs.modal', function (event) { var button = $(event.relatedTarget); - var group_id = button.data('group_id'); + var group_id = button.data('group_id') || ''; $('#group_id').val(group_id); - if(group_id != '') { - $('#group_id').val(group_id); + $('#group_name').val(''); + $('#descr').val(''); + if (group_id) { $.ajax({ type: "GET", url: route('pollergroup.show', {pollergroup: group_id}), From fa8736c22f0be770214f449488dc0dd82e988701 Mon Sep 17 00:00:00 2001 From: shivytyahoo Date: Mon, 26 Oct 2026 22:24:23 +0530 Subject: [PATCH 004/204] Fix Oxidized backup dates when the API returns `time` instead of `date` (#21019) * Fix Oxidized backup dates when the API returns `time` instead of `date` Oxidized returns the revision timestamp in the `date` field or, with some backends (such as git), in the `time` field instead. mapVersions() only looked at `date`, so those revisions were listed with a blank date in the Config tab. Accept either field, preferring `date` when present and parseable, and add unit tests for the `time`-only format and the precedence. Fixes #21018 * Simplify Oxidized date parsing per review Inline the date/time fallback in mapVersions() instead of the versionDate() helper, and apply the same fallback in latest() where the node timestamp may also arrive as time instead of mtime. Adds a test for the latest() fallback. * Revert the speculative node time fallback in latest() You are right, $node[time] does not exist: Oxidized serializes nodes with a top-level mtime, and time only appears inside the last job summary as a duration, not a timestamp. The fallback and its test are removed; the versions date/time fix is unaffected. --- .../Providers/OxidizedProvider.php | 2 +- tests/Unit/OxidizedProviderTest.php | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/app/ConfigBackup/Providers/OxidizedProvider.php b/app/ConfigBackup/Providers/OxidizedProvider.php index 2662d781a5c..7b212c41435 100644 --- a/app/ConfigBackup/Providers/OxidizedProvider.php +++ b/app/ConfigBackup/Providers/OxidizedProvider.php @@ -258,7 +258,7 @@ private function mapVersions(array $versions): array return array_map(fn ($version) => [ 'id' => (string) ($version['oid'] ?? ''), - 'date' => isset($version['date']) ? (strtotime((string) $version['date']) ?: null) : null, + 'date' => strtotime((string) ($version['date'] ?? '')) ?: strtotime((string) ($version['time'] ?? '')) ?: null, 'until' => null, 'type' => 'TEXT', 'content' => null, diff --git a/tests/Unit/OxidizedProviderTest.php b/tests/Unit/OxidizedProviderTest.php index bec733f8072..a7691fd2c2b 100644 --- a/tests/Unit/OxidizedProviderTest.php +++ b/tests/Unit/OxidizedProviderTest.php @@ -123,6 +123,41 @@ public function testBackupsMapsVersions(): void $this->assertSame(1, $list['totalPages']); } + public function testBackupsMapsVersionsWithTimeFieldWhenDateIsMissing(): void + { + Http::fake([ + 'oxidized:8888/node/show/*' => Http::response($this->fakeNode(), 200), + 'oxidized:8888/node/version?*' => Http::response([ + ['oid' => 'aaaa1111', 'date' => null, 'time' => '2026-07-29 23:36:42 +0000', 'message' => 'update'], + ['oid' => 'bbbb2222', 'time' => '2026-07-28 23:36:42 +0000', 'message' => 'update'], + ['oid' => 'cccc3333', 'message' => 'update'], + ], 200), + ]); + + $list = $this->makeProvider()->backups($this->makeDevice()); + + $this->assertSame(strtotime('2026-07-29 23:36:42 +0000'), $list['backups'][0]['date']); + $this->assertSame(strtotime('2026-07-28 23:36:42 +0000'), $list['backups'][1]['date']); + $this->assertNull($list['backups'][2]['date']); + $this->assertSame(3, $list['total']); + } + + public function testBackupsMapsVersionsPrefersDateOverTime(): void + { + Http::fake([ + 'oxidized:8888/node/show/*' => Http::response($this->fakeNode(), 200), + 'oxidized:8888/node/version?*' => Http::response([ + ['oid' => 'aaaa1111', 'date' => '2026-07-14 00:24:24 +0000', 'time' => '2026-07-29 23:36:42 +0000', 'message' => 'update'], + ['oid' => 'bbbb2222', 'date' => 'unknown', 'time' => '2026-07-28 23:36:42 +0000', 'message' => 'update'], + ], 200), + ]); + + $list = $this->makeProvider()->backups($this->makeDevice()); + + $this->assertSame(strtotime('2026-07-14 00:24:24 +0000'), $list['backups'][0]['date']); + $this->assertSame(strtotime('2026-07-28 23:36:42 +0000'), $list['backups'][1]['date']); + } + public function testLatestFetchesCurrentConfigWithoutVersionList(): void { Http::fake([ From c9095119a6d2a126599834d6b14e0d3c4d442753 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 26 Oct 2026 11:55:12 -0500 Subject: [PATCH 005/204] Fix notifications count making navbar tall (#21048) --- resources/views/layouts/menu.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/layouts/menu.blade.php b/resources/views/layouts/menu.blade.php index 371d04b043f..3a794f5e298 100644 --- a/resources/views/layouts/menu.blade.php +++ b/resources/views/layouts/menu.blade.php @@ -691,7 +691,7 @@ class="tw:flex tw:items-center tw:gap-2.5 tw:px-4 tw:py-2 tw:no-underline tw:tex + + @if($unknownMethods->isNotEmpty()) +
+
+ {{ __('poller.unknown_methods') }} +
+

{{ __('poller.unknown_methods_help') }}

+
    + @foreach($unknownMethods as $unknownMethod) +
  • + +
    +
    {{ $unknownMethod->typeName() }}
    +
    + {{ $unknownMethod->enabled ? __('Enabled') : __('Disabled') }} + @if($unknownMethod->secret) + · {{ $unknownMethod->secret->description }} + @endif +
    +
    + + @csrf + @method('DELETE') + + +
  • + @endforeach +
+
+ @endif @@ -84,7 +120,7 @@ class="tw:px-3 tw:py-3 tw:shrink-0 tw:transition-colors tw:text-base" -