From c75e75848b26f41a6ce216fe7c6533e2a82fa046 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 22 Jun 2015 16:34:00 +0200 Subject: [PATCH] GraphDatasource: allow to enable/disable single ones --- library/Graphite/GraphDatasource.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/library/Graphite/GraphDatasource.php b/library/Graphite/GraphDatasource.php index fc45236..39a3df8 100644 --- a/library/Graphite/GraphDatasource.php +++ b/library/Graphite/GraphDatasource.php @@ -42,6 +42,8 @@ class GraphDatasource protected $stacked = false; + protected $enabled = true; + public function __construct($path) { $this->path = $path; @@ -77,6 +79,17 @@ class GraphDatasource return $this; } + public function isEnabled() + { + return $this->enabled; + } + + public function disable() + { + $this->enabled = false; + return $this; + } + public function getName() { if ($this->alias !== null) {