aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-12-10A few style tweaks, mostly to a dark theme.onefang1-1/+1
2018-06-20Provide meaningful filenames for graphsAlexander Meshcheryakov1-2/+5
Gives decent default name when saving graph from browser as file and distinguishable tab for tabs showing graph.php output.
2018-02-16GenericIO: Fix negative_io for multiple instancesAlex Hermann1-5/+5
When multiple instances are in one graph, every odd source must be negated, not just the first.
2016-10-05Fixes array_search comparison.david1-1/+1
See http://php.net/manual/en/function.array-search.php for details why this is required.
2015-06-22Bug fix in get_faded_colorStephen Kent1-2/+3
2015-06-22Don't show overlap AREA on Generic IO graphs when negative_io is setStephen Kent1-6/+8
2015-05-28type/GenericIO: in case of negative_io draw percentile line also on the ↵Pim van den Berg1-1/+5
negative y-axis Closes #119
2014-12-14Revert "make detail page accessible when using "canvas" graph_type"Peter Wu1-0/+2
This reverts commit 82d88098f4203cf7402d4faf5ad100cada70efaf. Breaks async rendering, see https://github.com/pommi/CGP/issues/106#issuecomment-66896905
2014-11-11make detail page accessible when using "canvas" graph_typePim van den Berg1-2/+0
Closes #106
2014-09-25type/base: allow rrdtool graph -l (lower-limit) to be configured via config ↵Pim van den Berg1-1/+4
or plugin json Closes #104
2014-09-25type/base: escape space character in rrdcached FLUSH commandPim van den Berg1-1/+1
Closes #105
2014-08-25move " on <HOSTNAME>" suffix in graph title to JSONŁukasz Kostka1-2/+2
Closes #101
2014-08-25fix rrd_escape() not escaping colonsBrad Jorgensen1-1/+1
2014-08-10type/base: fix undefined variable rrd_url when graph_type != canvasPim van den Berg1-4/+6
2014-08-10Support customized RRD URLsPeter Wu1-3/+9
Use case: I would like to bypass PHP for serving the RRD files and allow the webserver (nginx) to compress it to reduce load on the Raspberry Pi. I could go through all kinds of URL rewriting, but it is much easier to set `$CONFIG['rrd_url'] = 'rrd/{file}';` instead and add a corresponding location + alias directive to the nginx configuration. This depends on https://github.com/manuelluis/jsrrdgraph/pull/17 to avoid breaking on '='.
2014-07-23Remove from all files the ending php tagFrançois LASSERRE4-8/+0
2014-07-23type/base: stop escaping characters manually since we use escapeshellarg()Pim van den Berg1-10/+2
Closes #89
2014-07-21type/base: print shellcmd when rrd_graph('debug') is calledPim van den Berg1-1/+1
2014-07-20Fix regex for strange datadirsPeter Wu1-1/+4
If a datadir would contain characters with a special meaning in regex (e.g. `/tmp/logs (new)`), then the function would blow up.
2014-07-20Display a HTTP error if the command failedPeter Wu1-1/+4
... for instance, when using an overly large "s" parameter.
2014-07-20Use a more secure command line building methodPeter Wu5-69/+87
Previously, a command is built by string concatenation. Here, the distinction between a value and multiple params got lost. Solve this by using an array for shell arguments. As the escaping is now removed from the `rrd_gen_graph` function, the canvas style needs to manually add those quotes to make the JS code still work. That only supports double-quotes, so hopefully nobody creates a name with a double quote as that would break the fragile JS command line parser. Separate the rrdtool options from the rrdtool graph command to make the `$graph_type == 'canvas'` option work (it would otherwise not understand the `rrdtool graph - -a PNG` option). Merge the SVG and PNG cases as they are the same except for the Content-Type header. Fix a missing html escape in a debug style.
2014-07-20Fix type confusionPeter Wu1-1/+5
index.php expects that collectd_hosts() always return an array for array_diff. Since an empty array evaluates to FALSE anyway, do not change the type and just return the empty array. In base.php, if no files are returned, the loop is never called and three variables are not initialized. Do it now.
2014-07-20Defensive programming: more urlencode/htmlentitiesPeter Wu1-2/+2
Make build_url return an URL, not HTML. This separates presentation from data. plugin_header's return value is unused, remove the unnecessary return. At places where `printf("<tag att='%s'>", $x);` is used, it is now converted to `printf("<tag att=\"%s\">", htmlentities($x));` since the single quote is not escaped by default by htmlentities. In case the canvas style is used, JS should use `textContent` instead of `innerHTML` to avoid reading `&quot;` instead of `"`. Nobody (should) use(s) IE6 anymore, so it is a safe change. While at it, use the standard charset attribute of meta to specify the character set (UTF-8).
2014-07-16graph: don't overwrite config rrdtool_opts by rrdtool_opts from json pluginPim van den Berg1-4/+6
Closes #86
2014-07-05type/default: optionally draw min/max spikes in a lighter color in graphsPim van den Berg2-4/+5
Closes #73
2014-07-05type/genericio: apply percentile on scaled valuePim van den Berg1-1/+1
2014-06-28type/base: replace array_merge by + sign to merge a fallback arrayPim van den Berg1-2/+2
array_merge resets the index, while in case of $this->colors and $this->legend, we'd like to keep the index. An irq plugin sample: array(1 => 1, 'ERR' => 'ERR') must not become array(0 => 1, 'ERR' => 'ERR') after an array_merge.
2014-06-24add percentile support to network traffic graphsPim van den Berg2-0/+12
Set $CONFIG['percentile'] to a number and a XXth percentile line + legend will be added to all network traffic (if_octets) graphs. Closes #81
2014-05-18Add base option (1GB=1024Mo)Poil1-0/+3
2014-05-12type/base: set default title to "Plugin Type (PluginInstance) (Category)"Pim van den Berg1-1/+13
2014-05-03type/base: always use rainbow_colors and overwrite them afterwardsPim van den Berg1-3/+4
Since the previous commit [type/base: show tinstances not defined in $this->order in graph] all type instances that are not defined in the plugin, are colored black. This way you always have nice colors.
2014-05-03type/base: show tinstances not defined in $this->order in graphPim van den Berg1-6/+5
Previously if $this->order was defined in a graph, only type instances that were defined in $this->order showed up in the graph. Now it merges $this->order and the type instances.
2014-05-03rename ds_names and dsname to legendPim van den Berg5-21/+21
This had nothing to do with an RRD data source.
2014-05-03type/base: set default values for rrd_title and rrd_formatPim van den Berg1-1/+2
2014-05-03move collectd_flush function to base classPim van den Berg1-0/+70
2014-05-03type: move generic functions to base classPim van den Berg5-300/+306
2014-05-03type/Default: don't depend on external function GETPim van den Berg1-14/+12
2014-03-23add SVG graph supportPim van den Berg1-3/+20
2014-03-23type/Default: also escape * and ? in identifier before globPim van den Berg1-1/+1
2014-03-22type/Default: escape brackets in identifier before globPim van den Berg1-0/+1
2014-03-22type/Default: merge file2identifier function into rrd_filesPim van den Berg1-12/+2
2014-03-21mod_rewrite final cleanupsepich1-2/+2
2013-12-29fix heigth -> height typoPim van den Berg1-4/+4
2013-11-14Escape parentheses in filenamesJohan Bergström1-2/+2
The IPMI collectd plugin uses parentheses in filenames (`fanspeed-FAN 1 fan_cooling (29.1).rrd`), so we need to escape them before passing them to rrdtool.
2013-10-09Revert "type: fix undefined index in ds_names[$source] before empty check"Pim van den Berg4-4/+4
From the docs: "No warning is generated if the variable does not exist. That means empty() is essentially the concise equivalent to !isset($var) || $var == false." This reverts commit f2a4593558b3a3ec696e9cc1de93fa898b9521bb. Reported-By: Benoit Monin (https://github.com/pommi/CGP/commit/f2a4593)
2013-10-07type: fix undefined index in ds_names[$source] before empty checkPim van den Berg4-4/+4
2013-10-07type/GenericStacked: make stack NaN-safe using ADDNAN instead of +Pim van den Berg1-1/+1
Reported-By: Julien Genestoux <julien.genestoux@gmail.com> (https://github.com/pommi/CGP/issues/24)
2013-08-31type: use empty to access ds_namesBenoît Monin3-3/+3
Fix some potential undefined index errors by using the empty function to access ds_names in type other than default.
2013-08-31type/default: fix 'undefined index' in rrd_gen_graphBenoît Monin1-1/+1
Fix php notices emitted when generating graphs of ping, sensors and hddtemp plugins.
2013-08-24type/default: escape spaces in filenamesPim van den Berg1-0/+3