Skip to content

Commit bc39b5d

Browse files
committed
fix: no graph generated, when grafanaimagefiltersarray not set
1 parent 6d3e4c6 commit bc39b5d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,10 @@ public function getPreviewHtml(Model $object, $report = false)
470470
$i++;
471471
}
472472

473-
foreach ($info as $value) {
473+
$i = 0;
474+
do {
475+
$value = $info ? $info[$i] : "";
476+
474477
// The image value will be returned as reference
475478
$previewHtml = new HtmlDocument();
476479
$res = $this->getMyPreviewHtml($serviceName, $hostName, $previewHtml, $value);
@@ -488,6 +491,8 @@ public function getPreviewHtml(Model $object, $report = false)
488491

489492
$html->addHtml($previewHtml);
490493
}
494+
$i++;
495+
} while ($i < count($info));
491496

492497
$returnHtml->add($html);
493498
}

0 commit comments

Comments
 (0)