File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
library/Grafana/ProvidedHook/Icingadb Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ public function getPreviewHtml(Model $object, $report = false)
472
472
// Add a data table with runtime information and configuration for debugging purposes
473
473
if (Url::fromRequest ()->hasParam ('grafanaDebug ' ) && $ this ->permission ->hasPermission ('grafana/debug ' ) && $ report === false ) {
474
474
$ returnHtml ->addHtml (HtmlElement::create ('h2 ' , null , 'Performance Graph Debug ' ));
475
- $ returnHtml ->add ($ this ->createDebugTable ());
475
+ $ returnHtml ->add ($ this ->createDebugTable ($ previewHtml ));
476
476
}
477
477
478
478
$ htmlForObject = HtmlElement::create ("div " , ["class " => "icinga-module module-grafana " ]);
@@ -486,15 +486,12 @@ public function getPreviewHtml(Model $object, $report = false)
486
486
/**
487
487
* createDebugTable creates a data table with runtime information and configuration for debugging purposes
488
488
*/
489
- private function createDebugTable ()
489
+ private function createDebugTable ($ previewHtml )
490
490
{
491
- if ($ this ->accessMode === 'indirectproxy ' ) {
492
- $ usedUrl = $ this ->pngUrl ;
493
- } else {
494
- $ usedUrl = preg_replace ('/.*?src\s*=\s*[ \'\"](.*?)[ \'\"].*/ ' , "$1 " , $ previewHtml );
495
- }
491
+ $ usedUrl = $ this ->pngUrl ;
496
492
497
493
if ($ this ->accessMode === 'iframe ' ) {
494
+ $ usedUrl = preg_replace ('/.*?src\s*=\s*[ \'\"](.*?)[ \'\"].*/ ' , "$1 " , $ previewHtml );
498
495
$ this ->height = '100% ' ;
499
496
}
500
497
You can’t perform that action at this time.
0 commit comments