From 30aaab0063abb5ad56d7253f806460821fd5e10d Mon Sep 17 00:00:00 2001 From: TheWitness <1439914+TheWitness@users.noreply.github.com> Date: Mon, 12 Oct 2026 14:40:30 -0400 Subject: [PATCH 1/3] issue: shorten flowview graph drilldown button title to 'NetFlow' The graph action menu now renders each drilldown button's title as a visible label, so 'View NetFlow Traffic In Range' reads as an overlong menu entry. Shorten it to 'NetFlow' and regenerate locales/po/cacti.pot for the changed translatable string. --- CHANGELOG.md | 1 + locales/po/cacti.pot | 4 ++-- setup.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80b51d3..ba1d87d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ --- develop --- +* issue: Shorten the graph drilldown button title from 'View NetFlow Traffic In Range' to 'NetFlow' so it reads cleanly as a label in Cacti's graph action menu * feature: Add an optional FlowView Query Service (a long-running Go service under service/flowview-query) as a selectable Parallel Query Backend under FlowView Settings (default Legacy PHP Runner); when enabled, the parallel query parent runner (flowview_runner.php) delegates the whole query to the service over localhost instead of forking a PHP worker per shard, running the same cache-aware map-reduce (sharing parallel_database_query_shard_cache) and writing results back, with automatic fallback to the legacy runner when the service is unreachable * bug: Load the pre-1.3 report compatibility shims (reports_run/reports_queue/reports_log_and_notify) only when the running Cacti is older than 1.3, decided with cacti_version_compare(CACTI_VERSION, '1.3', ...) rather than a function_exists() probe; because the plugin's functions.php is included during plugin init before core loads lib/reports.php, the function_exists() check ran while the now-native helpers were still absent, declared the shims, and core then fatally redeclared reports_log_and_notify() on 1.3.0 develop builds (falls back to function_exists() only when the Cacti version helpers are unavailable, e.g. the unit tests) diff --git a/locales/po/cacti.pot b/locales/po/cacti.pot index 8345ac0..23efd5d 100644 --- a/locales/po/cacti.pot +++ b/locales/po/cacti.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Cacti \n" "Report-Msgid-Bugs-To: developers@cacti.net\n" -"POT-Creation-Date: 2026-10-10 20:49-0400\n" +"POT-Creation-Date: 2026-10-12 14:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Cacti Developers >\n" "Language-Team: Cacti Developers \n" @@ -2792,5 +2792,5 @@ msgid "Flowview" msgstr "" #: setup.php -msgid "View NetFlow Traffic In Range" +msgid "NetFlow" msgstr "" diff --git a/setup.php b/setup.php index abaa507..8726c0f 100644 --- a/setup.php +++ b/setup.php @@ -1564,7 +1564,7 @@ function flowview_graph_button($data): bool { //cacti_log("The URL is this:" . $url); if (api_user_realm_auth('flowview.php') && !empty($host_id)) { - print '
'; + print '
'; } } return true; From 3629f18a0ad8e1b753a9062202d482ba344ac816 Mon Sep 17 00:00:00 2001 From: TheWitness <1439914+TheWitness@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:53:36 -0400 Subject: [PATCH 2/3] dev: create flowview config.php from dist in CI before install The integration-test workflow installed Cacti's config.php but never created the plugin's own config.php, so 'plugin_manage.php --plugin=flowview --install' failed with 'needs configuration'. Copy config.php.dist to config.php (it defaults to using the Cacti database) before the install step. --- .github/workflows/plugin-ci-workflow.yml | 6 ++++++ CHANGELOG.md | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 508c439..23baf30 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -156,6 +156,12 @@ jobs: cd ${{ github.workspace }}/cacti sudo php cli/install_cacti.php --accept-eula --install --force + - name: Create flowview config.php + run: | + cp ${{ github.workspace }}/cacti/plugins/flowview/config.php.dist \ + ${{ github.workspace }}/cacti/plugins/flowview/config.php + sudo chmod 664 ${{ github.workspace }}/cacti/plugins/flowview/config.php + - name: Install flowview Plugin run: | cd ${{ github.workspace }}/cacti diff --git a/CHANGELOG.md b/CHANGELOG.md index ba1d87d..6245364 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ --- develop --- * issue: Shorten the graph drilldown button title from 'View NetFlow Traffic In Range' to 'NetFlow' so it reads cleanly as a label in Cacti's graph action menu +* dev: Create the plugin's config.php from config.php.dist in the integration-test workflow before installing flowview, so the install no longer fails with "needs configuration" * feature: Add an optional FlowView Query Service (a long-running Go service under service/flowview-query) as a selectable Parallel Query Backend under FlowView Settings (default Legacy PHP Runner); when enabled, the parallel query parent runner (flowview_runner.php) delegates the whole query to the service over localhost instead of forking a PHP worker per shard, running the same cache-aware map-reduce (sharing parallel_database_query_shard_cache) and writing results back, with automatic fallback to the legacy runner when the service is unreachable * bug: Load the pre-1.3 report compatibility shims (reports_run/reports_queue/reports_log_and_notify) only when the running Cacti is older than 1.3, decided with cacti_version_compare(CACTI_VERSION, '1.3', ...) rather than a function_exists() probe; because the plugin's functions.php is included during plugin init before core loads lib/reports.php, the function_exists() check ran while the now-native helpers were still absent, declared the shims, and core then fatally redeclared reports_log_and_notify() on 1.3.0 develop builds (falls back to function_exists() only when the Cacti version helpers are unavailable, e.g. the unit tests) From 1e13c52833dbd05e3bacadf650b8085ebe310409 Mon Sep 17 00:00:00 2001 From: TheWitness <1439914+TheWitness@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:58:29 -0400 Subject: [PATCH 3/3] dev: make flowview config.php transient to the install step in CI Creating config.php persistently made the FlowviewLifecycleTest 'no config file exists' case reach flowview_connect() and error. Create config.php only for the install step and remove it immediately, so the unit tests run with no config file and the poller falls back to the Cacti database. --- .github/workflows/plugin-ci-workflow.yml | 11 +++++------ CHANGELOG.md | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 23baf30..5a5a0c0 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -156,16 +156,15 @@ jobs: cd ${{ github.workspace }}/cacti sudo php cli/install_cacti.php --accept-eula --install --force - - name: Create flowview config.php - run: | - cp ${{ github.workspace }}/cacti/plugins/flowview/config.php.dist \ - ${{ github.workspace }}/cacti/plugins/flowview/config.php - sudo chmod 664 ${{ github.workspace }}/cacti/plugins/flowview/config.php - - name: Install flowview Plugin run: | cd ${{ github.workspace }}/cacti + # flowview's pre-install check requires a config.php; create it from the + # dist (which defaults to the Cacti database) only for the install and + # remove it afterwards so the unit tests still run with no config file. + cp plugins/flowview/config.php.dist plugins/flowview/config.php sudo php cli/plugin_manage.php --plugin=flowview --install --enable + rm -f plugins/flowview/config.php - name: Check PHP Syntax for Plugin run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 6245364..3ca11bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ --- develop --- * issue: Shorten the graph drilldown button title from 'View NetFlow Traffic In Range' to 'NetFlow' so it reads cleanly as a label in Cacti's graph action menu -* dev: Create the plugin's config.php from config.php.dist in the integration-test workflow before installing flowview, so the install no longer fails with "needs configuration" +* dev: Create the plugin's config.php from config.php.dist for the flowview install step in the integration-test workflow (removed immediately afterwards so the unit tests still run with no config file), so the install no longer fails with "needs configuration" * feature: Add an optional FlowView Query Service (a long-running Go service under service/flowview-query) as a selectable Parallel Query Backend under FlowView Settings (default Legacy PHP Runner); when enabled, the parallel query parent runner (flowview_runner.php) delegates the whole query to the service over localhost instead of forking a PHP worker per shard, running the same cache-aware map-reduce (sharing parallel_database_query_shard_cache) and writing results back, with automatic fallback to the legacy runner when the service is unreachable * bug: Load the pre-1.3 report compatibility shims (reports_run/reports_queue/reports_log_and_notify) only when the running Cacti is older than 1.3, decided with cacti_version_compare(CACTI_VERSION, '1.3', ...) rather than a function_exists() probe; because the plugin's functions.php is included during plugin init before core loads lib/reports.php, the function_exists() check ran while the now-native helpers were still absent, declared the shims, and core then fatally redeclared reports_log_and_notify() on 1.3.0 develop builds (falls back to function_exists() only when the Cacti version helpers are unavailable, e.g. the unit tests)