Skip to content

Commit

Permalink
fix: no graph generated, when grafanaimagefiltersarray not set
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianbees committed Jan 30, 2025
1 parent 77bcec4 commit e56fecd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,19 @@ public function getPreviewHtml(Model $object, $report = false)
$i++;
}

foreach ($info as $value) {
$i = 0;
do {
$value = $info ? $info[$i] : "";

// The image value will be returned as reference
$previewHtml = new HtmlDocument();
$res = $this->getMyPreviewHtml($serviceName, $hostName, $previewHtml, $value);

if ($res) {
$html->addHtml($previewHtml);
}
}
$i++;
} while($i < count($info));

$returnHtml->add($html);
}
Expand Down

0 comments on commit e56fecd

Please sign in to comment.