From 71de4f3211259b9a13db7cb715469c5b404872f2 Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Thu, 14 Nov 2024 17:03:46 +0100 Subject: [PATCH] Fix some dynamic properties for PHP8.2 --- application/controllers/IcingadbimgController.php | 12 +++++++++--- application/controllers/IcingadbshowController.php | 2 ++ .../ProvidedHook/Icingadb/IcingaDbGrapher.php | 7 +++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/application/controllers/IcingadbimgController.php b/application/controllers/IcingadbimgController.php index 9942404..6c844a0 100644 --- a/application/controllers/IcingadbimgController.php +++ b/application/controllers/IcingadbimgController.php @@ -49,7 +49,13 @@ class IcingadbimgController extends IcingadbGrafanaController protected $cacheTime; protected $defaultdashboarduid; protected $refresh = "yes"; - + protected $customVars; + protected $timerangeto; + protected $object; + protected $dashboard; + protected $dashboarduid; + protected $panelId; + protected $orgId; public function init() { @@ -326,7 +332,7 @@ private function getMyimageHtml($serviceName, $hostName, &$imageHtml) return false; } - $this->pngUrl = sprintf( + $pngUrl = sprintf( '%s://%s/render/d-solo/%s/%s?var-hostname=%s&var-service=%s&var-command=%s%s&panelId=%s&orgId=%s' . '&width=%s&height=%s&theme=%s&from=%s&to=%s', $this->protocol, @@ -349,7 +355,7 @@ private function getMyimageHtml($serviceName, $hostName, &$imageHtml) // fetch image with curl $curl_handle = curl_init(); $curl_opts = array( - CURLOPT_URL => $this->pngUrl, + CURLOPT_URL => $pngUrl, CURLOPT_CONNECTTIMEOUT => 2, CURLOPT_FOLLOWLOCATION => true, CURLOPT_RETURNTRANSFER => true, diff --git a/application/controllers/IcingadbshowController.php b/application/controllers/IcingadbshowController.php index eb533bd..48bf123 100644 --- a/application/controllers/IcingadbshowController.php +++ b/application/controllers/IcingadbshowController.php @@ -31,6 +31,8 @@ class IcingadbshowController extends IcingadbGrafanaController protected $showFullscreen; protected $host; protected $custvardisable = "grafana_graph_disable"; + protected $config; + protected $object; public function init() { diff --git a/library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php b/library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php index 64fb453..5cdc4f7 100644 --- a/library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php +++ b/library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php @@ -68,6 +68,13 @@ trait IcingaDbGrapher protected $grafanaVersion = "0"; protected $defaultdashboarduid; protected $object; + protected $permission; + protected $dashboard; + protected $dashboarduid; + protected $panelId; + protected $orgId; + protected $customVars; + protected $pngUrl; protected function init() {