Skip to content

Commit

Permalink
Fix some dynamic properties for PHP8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
martialblog committed Nov 15, 2024
1 parent f00f439 commit 9c50656
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
13 changes: 9 additions & 4 deletions application/controllers/IcingadbimgController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use ipl\Stdlib\Filter;
use ipl\Web\Url;

#[\AllowDynamicProperties]
class IcingadbimgController extends IcingadbGrafanaController
{
protected $host;
Expand Down Expand Up @@ -49,7 +48,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()
{
Expand Down Expand Up @@ -326,7 +331,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,
Expand All @@ -349,7 +354,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,
Expand Down
2 changes: 2 additions & 0 deletions application/controllers/IcingadbshowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class IcingadbshowController extends IcingadbGrafanaController
protected $showFullscreen;
protected $host;
protected $custvardisable = "grafana_graph_disable";
protected $config;
protected $object;

public function init()
{
Expand Down
7 changes: 7 additions & 0 deletions library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down

0 comments on commit 9c50656

Please sign in to comment.