summaryrefslogtreecommitdiffstats
path: root/library/Graphite/Graphing
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:21:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:21:35 +0000
commitcddcdba3c9be7e32454d0c54efd1d60e7cef7518 (patch)
tree485d573becbe08ff71189381739483cdb57cf949 /library/Graphite/Graphing
parentAdding upstream version 1.2.2. (diff)
downloadicingaweb2-module-graphite-upstream/1.2.4.tar.xz
icingaweb2-module-graphite-upstream/1.2.4.zip
Adding upstream version 1.2.4.upstream/1.2.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--library/Graphite/Graphing/Chart.php6
-rw-r--r--library/Graphite/Graphing/GraphiteWebClient.php6
-rw-r--r--library/Graphite/Graphing/MetricsQuery.php2
-rw-r--r--library/Graphite/Graphing/Template.php1
4 files changed, 8 insertions, 7 deletions
diff --git a/library/Graphite/Graphing/Chart.php b/library/Graphite/Graphing/Chart.php
index ded8ae8..bee5e7d 100644
--- a/library/Graphite/Graphing/Chart.php
+++ b/library/Graphite/Graphing/Chart.php
@@ -107,9 +107,9 @@ class Chart
$response
->setHeader('Content-Type', 'image/png', true)
->setHeader('Content-Disposition', 'inline; filename="graph.png"', true)
- ->setHeader('Cache-Control', null, true)
- ->setHeader('Expires', null, true)
- ->setHeader('Pragma', null, true)
+ ->setHeader('Cache-Control', '', true)
+ ->setHeader('Expires', '', true)
+ ->setHeader('Pragma', '', true)
->setBody($image)
->sendResponse();
diff --git a/library/Graphite/Graphing/GraphiteWebClient.php b/library/Graphite/Graphing/GraphiteWebClient.php
index b06b6ce..982a2af 100644
--- a/library/Graphite/Graphing/GraphiteWebClient.php
+++ b/library/Graphite/Graphing/GraphiteWebClient.php
@@ -2,10 +2,10 @@
namespace Icinga\Module\Graphite\Graphing;
+use GuzzleHttp\Client;
+use GuzzleHttp\ClientInterface;
+use GuzzleHttp\Psr7\Request;
use Icinga\Web\Url;
-use iplx\Http\Client;
-use iplx\Http\ClientInterface;
-use iplx\Http\Request;
/**
* HTTP interface to Graphite Web
diff --git a/library/Graphite/Graphing/MetricsQuery.php b/library/Graphite/Graphing/MetricsQuery.php
index da05c17..93d0c90 100644
--- a/library/Graphite/Graphing/MetricsQuery.php
+++ b/library/Graphite/Graphing/MetricsQuery.php
@@ -71,7 +71,7 @@ class MetricsQuery implements Queryable, Filterable, Fetchable
try {
$this->base = $target instanceof MacroTemplate ? $target : new MacroTemplate((string) $target);
} catch (InvalidArgumentException $e) {
- throw new InvalidArgumentException('Bad target', $e);
+ throw new InvalidArgumentException('Bad target', $e->getCode(), $e);
}
return $this;
diff --git a/library/Graphite/Graphing/Template.php b/library/Graphite/Graphing/Template.php
index a030fb7..0950fed 100644
--- a/library/Graphite/Graphing/Template.php
+++ b/library/Graphite/Graphing/Template.php
@@ -203,6 +203,7 @@ class Template
}
}
unset($_);
+ assert(isset($nextCurveName), 'loop did not initialize variable $nextCurveName');
$allowedNextCurveMetricsPerCurrentCurveName = [];
foreach ($currentCombination as $currentCurveName => $currentCurveMetric) {