Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

--- 3.0 ---

* bug: Restore alert audio for down and triggered devices; getMonitorSound() looked for sounds in includes/sounds/ after the controller moved, so the audio element was never rendered
* feature: Replace the single Status column/filter with a multi-select Events filter (additive) and an Events column that shows a short pill per active event (Down, Recovering, Triggered, Down/Triggered M/A, Warn/Alert Ping, Failed Svc), 'None' when clean; the Status scope dropdown now only selects All Monitored / All Devices / Not Monitored / Without Thresholds
* bug: Centre the tile hostname under the glyph and keep it clickable in the Tiles & Time view
* bug: Remove the 'Names only' View option from the dropdown (the renderer is retained for direct ?view=names use)
Expand Down
2 changes: 1 addition & 1 deletion includes/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function isMonitorAudible(): bool {
function getMonitorSound(): string {
$sound = (string) read_user_setting('monitor_sound', read_config_option('monitor_sound'));
clearstatcache();
$file = __DIR__ . '/sounds/' . $sound;
$file = dirname(__DIR__) . '/sounds/' . $sound;
$exists = file_exists($file);

return $exists ? $sound : '';
Expand Down
19 changes: 19 additions & 0 deletions tests/Integration/MonitorSoundPathTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2026 The Cacti Group |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
*/

it('resolves the alert sound against the plugin sounds directory', function () {
$root = dirname(__DIR__, 2);
$contents = file_get_contents($root . '/includes/controller.php');

expect($contents)->not->toBeFalse();
expect($contents)->toContain("dirname(__DIR__) . '/sounds/'");
expect($contents)->not->toContain("__DIR__ . '/sounds/'");
expect(is_dir($root . '/sounds'))->toBeTrue();
expect(is_dir($root . '/includes/sounds'))->toBeFalse();
});
Loading