From c5a530cd7e97e22e36e37f617756fa4f53164d63 Mon Sep 17 00:00:00 2001 From: alcatron <27321443+alcatron@users.noreply.github.com> Date: Fri, 16 Oct 2026 23:28:01 +1030 Subject: [PATCH 1/5] Use 1000M as the inherited link bandwidth default --- CHANGELOG.md | 2 ++ lib/WeatherMapLink.class.php | 8 ++++---- locales/po/cacti.pot | 14 +++++++------- tests/Unit/DefaultLinkBandwidthTest.php | 14 ++++++++++++++ 4 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 tests/Unit/DefaultLinkBandwidthTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index eae61f01..1df424f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ IMPORTANT NOTE: This version only works on CACTI 1.x++! --- develop --- +* feature: Default implicit link capacities to 1000M in both directions, while preserving explicitly configured capacities + * Add traffic colour presets and optional high-load link pulsing * Fix Safari rendering of high-traffic link glows using native SVG filters diff --git a/lib/WeatherMapLink.class.php b/lib/WeatherMapLink.class.php index 4dcf2796..daef31c5 100644 --- a/lib/WeatherMapLink.class.php +++ b/lib/WeatherMapLink.class.php @@ -239,10 +239,10 @@ function __construct() { // 'outcomment' => '', 'zorder' => 300, 'overlibcaption' => ['', ''], - 'max_bandwidth_in' => 100000000, - 'max_bandwidth_out' => 100000000, - 'max_bandwidth_in_cfg' => '100M', - 'max_bandwidth_out_cfg' => '100M' + 'max_bandwidth_in' => 1000000000, + 'max_bandwidth_out' => 1000000000, + 'max_bandwidth_in_cfg' => '1000M', + 'max_bandwidth_out_cfg' => '1000M' ]; // $this->a_offset = 'C'; diff --git a/locales/po/cacti.pot b/locales/po/cacti.pot index 18edb16a..a89d7aa5 100644 --- a/locales/po/cacti.pot +++ b/locales/po/cacti.pot @@ -1,17 +1,17 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR The Cacti Group -# This file is distributed under the same license as the Cacti package. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Cacti 1.7\n" -"Report-Msgid-Bugs-To: developers@cacti.net\n" -"POT-Creation-Date: 2026-10-15 10:19+1030\n" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-16 23:17+1030\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Cacti Developers \n" -"Language-Team: Cacti Developers \n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/tests/Unit/DefaultLinkBandwidthTest.php b/tests/Unit/DefaultLinkBandwidthTest.php new file mode 100644 index 00000000..21518392 --- /dev/null +++ b/tests/Unit/DefaultLinkBandwidthTest.php @@ -0,0 +1,14 @@ +Reset($map); + foreach([$map->links['DEFAULT'],$link] as $item){ + self::assertSame(1000000000,$item->max_bandwidth_in);self::assertSame(1000000000,$item->max_bandwidth_out); + self::assertSame('1000M',$item->max_bandwidth_in_cfg);self::assertSame('1000M',$item->max_bandwidth_out_cfg); + } + } +} From f6536b01a30649702eca4aeb76c010ccc36bfc54 Mon Sep 17 00:00:00 2001 From: alcatron <27321443+alcatron@users.noreply.github.com> Date: Fri, 16 Oct 2026 23:30:17 +1030 Subject: [PATCH 2/5] Reference PR #310 in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1df424f4..29eb1840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ IMPORTANT NOTE: This version only works on CACTI 1.x++! --- develop --- -* feature: Default implicit link capacities to 1000M in both directions, while preserving explicitly configured capacities +* feature#310: Default implicit link capacities to 1000M in both directions, while preserving explicitly configured capacities * Add traffic colour presets and optional high-load link pulsing From b60e7df3d851fb61d37a5d21fa768e03ff42750b Mon Sep 17 00:00:00 2001 From: alcatron <27321443+alcatron@users.noreply.github.com> Date: Fri, 16 Oct 2026 23:40:49 +1030 Subject: [PATCH 3/5] Preserve translation template project metadata --- locales/po/cacti.pot | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locales/po/cacti.pot b/locales/po/cacti.pot index a89d7aa5..18edb16a 100644 --- a/locales/po/cacti.pot +++ b/locales/po/cacti.pot @@ -1,17 +1,17 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# Copyright (C) YEAR The Cacti Group +# This file is distributed under the same license as the Cacti package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-10-16 23:17+1030\n" +"Project-Id-Version: Cacti 1.7\n" +"Report-Msgid-Bugs-To: developers@cacti.net\n" +"POT-Creation-Date: 2026-10-15 10:19+1030\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Last-Translator: Cacti Developers \n" +"Language-Team: Cacti Developers \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" From c8901488382a033ff6e0f9deb57d1c6e92c5bfba Mon Sep 17 00:00:00 2001 From: alcatron <27321443+alcatron@users.noreply.github.com> Date: Sat, 17 Oct 2026 02:19:52 +1030 Subject: [PATCH 4/5] Set plugin working directory in bandwidth regression test --- CHANGELOG.md | 2 ++ tests/Unit/DefaultLinkBandwidthTest.php | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29eb1840..bfd9c05c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ IMPORTANT NOTE: This version only works on CACTI 1.x++! --- develop --- +-issue#310: Run the bandwidth engine test from the plugin directory + * feature#310: Default implicit link capacities to 1000M in both directions, while preserving explicitly configured capacities * Add traffic colour presets and optional high-load link pulsing diff --git a/tests/Unit/DefaultLinkBandwidthTest.php b/tests/Unit/DefaultLinkBandwidthTest.php index 21518392..e8d47908 100644 --- a/tests/Unit/DefaultLinkBandwidthTest.php +++ b/tests/Unit/DefaultLinkBandwidthTest.php @@ -4,6 +4,7 @@ final class DefaultLinkBandwidthTest extends TestCase { #[\PHPUnit\Framework\Attributes\RunInSeparateProcess] #[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)] public function testNewMapsAndInheritedLinksUseGigabitCapacity(): void { + chdir(dirname(__DIR__,2)); require_once dirname(__DIR__,2).'/lib/WeatherMap.class.php'; $map=new WeatherMap();$link=new WeatherMapLink();$link->Reset($map); foreach([$map->links['DEFAULT'],$link] as $item){ From 6b0c7163a159b4617d68731d65d70cfeae153ff3 Mon Sep 17 00:00:00 2001 From: alcatron <27321443+alcatron@users.noreply.github.com> Date: Sat, 17 Oct 2026 11:51:35 +1030 Subject: [PATCH 5/5] Add the required license notice to bandwidth regression --- tests/Unit/DefaultLinkBandwidthTest.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/Unit/DefaultLinkBandwidthTest.php b/tests/Unit/DefaultLinkBandwidthTest.php index e8d47908..218ba4e9 100644 --- a/tests/Unit/DefaultLinkBandwidthTest.php +++ b/tests/Unit/DefaultLinkBandwidthTest.php @@ -1,4 +1,27 @@