aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-01-04Better text for the page title.HEADmasteronefang1-1/+1
2020-01-04Fix up static URLs that got broken going through php.cgi.onefang1-19/+21
2019-12-10New config for "allowed" graphs, so people can hide some of them.onefang2-1/+7
2019-05-10fix LICENSE linksPim van den Berg1-1/+1
2018-12-09functions.inc.php: escape minus in regexJulian Brost1-1/+1
This makes CGP work on PHP 7.3 as it otherwise only shows an "Unknown host" error message and logs the following PHP warning: PHP Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in .../inc/functions.inc.php on line 37
2016-12-09inc/functions: check if $_GET value is empty before executing preg_matchPim van den Berg1-1/+1
When using "canvas" mode, a lot of these errors were thrown: > Invalid type instance in $_GET["ti"]: "" > Invalid type instance in $_GET["pi"]: "" Closes: #132
2016-12-09inc/html: fix php notice about html_weburl when type is canvasPim van den Berg1-2/+1
Fixes: > PHP Notice: Undefined variable: html_weburl in inc/html.inc.php on line 131 Mentioned in #132 Closes: #141
2015-07-04inc/functions: a host, pi and ti may contain colons (:) and spaces ( )Pim van den Berg1-1/+1
For example: "CPU Interface : 1" (snmp plugin + hp1810g switch)
2015-06-22inc/functions: a plugin/type instance may contain a dotPim van den Berg1-7/+2
Closes #123
2015-06-21responsive: introduce a hamburger navicon to toggle the menu on smaller devicesPim van den Berg1-16/+17
2015-06-21responsive: make the overview page look nice on all mediaPim van den Berg1-1/+3
2015-06-21add responsive cssPim van den Berg1-1/+4
For 4 types of devices: a. desktop / tablet 10" landscape (default) b. tablet 10" portrait / tablet 7" landscape c. tablet 7" portrait / smartphone landscape d. smartphone portrait
2015-06-21replace table on overview page by divsPim van den Berg1-13/+13
This works better in a responsive design.
2015-06-21inc/html: remove continue statements to prevent from incomplete htmlPim van den Berg1-25/+23
2015-05-25inc/functions: merge functions GET and validate_getPim van den Berg2-15/+53
And make sure all input from $_GET variables are parsed and validated.
2015-05-25inc/functions: make type argument of validate_get function exactly the same ↵Pim van den Berg2-11/+11
as $_GET value
2015-02-26inc/html: s/licence/license/Pim van den Berg1-1/+1
Closes #117
2014-12-14inc/collectd: vmem/vmpage_io should be split to multiple graphs per type ↵Pim van den Berg1-4/+5
instance Closes #113
2014-12-14Revert "make detail page accessible when using "canvas" graph_type"Peter Wu2-18/+0
This reverts commit 82d88098f4203cf7402d4faf5ad100cada70efaf. Breaks async rendering, see https://github.com/pommi/CGP/issues/106#issuecomment-66896905
2014-12-14inc/html: include jquery from local sourcePim van den Berg1-1/+1
So we don't depend on a remote source.
2014-12-13dashboard: showtime: load jquery + timeago.js when config is setPim van den Berg1-1/+7
2014-12-13dashboard: make timeago dynamic using jquery + timeagoPim van den Berg1-1/+4
2014-12-13Adding option to show time since last update on dashboard.David Severwright1-0/+13
Closes #110
2014-11-11make detail page accessible when using "canvas" graph_typePim van den Berg2-0/+18
Closes #106
2014-08-14inc/html: add deprecation message about collectd 4Pim van den Berg1-1/+12
2014-08-02Merge (a)sync code, reformat CGP.jsPeter Wu1-10/+7
Best viewed with `git diff -w`. Since CGP-sync.js and CGP-async.js are almost equal except for one function call, merge them into a single function. While at it, reformat CGP.js to expose a single namespace (`CGP`) which exports the symbol `drawAll`. Remove `alert()` and add a `console.error()` call instead. This is less intrustive to users (who will notice a broken graph anyway) and be more helpful for developers (who can examine the call trace in the Developer Console. Add `"use strict"` and use the standard four spaces as indent. Process the script through `js-beautify` which re-indented the code and added some spaces between operators. Replace double by single quotes for consistency. Rename `catch(e)` to `catch(ex)` to supress a jshint warning about IE8.
2014-07-25support php versions without json support and show a warning messagePim van den Berg1-0/+13
2014-07-24inc/collectd: get_host_rrd_files: filter non-plugin .rrd filesPim van den Berg1-1/+4
Closes #92
2014-07-23Remove from all files the ending php tagFrançois LASSERRE2-4/+0
2014-07-23Update html.inc.phpFrançois LASSERRE1-6/+6
Fix a link when no class selected.
2014-07-21Better x and y validation, report 400 on errorsPeter Wu1-1/+1
Report 400 Bad Request on query errors instead of reporting 200 OK (which can be cached). Add some additional validation for the 'x' and 'y' parameters, to catch underflow (test with `x=-10` for example). Also fix a typo in the error message and include more details (the actual error).
2014-07-21Fix overly permissive hostname validation, fix host checkPeter Wu1-2/+2
`[\w\W]` matches EVERYTHING. Validation failed. Also remove `\d` as that `\w` is a superset of it. Also check that the host parameter is actually non-empty, otherwise `collectd_plugins` will happily return results as the directory `$CONFIG['datadir'] . '/' . ''` trivially exists...
2014-07-20Escape file argument for rrd_infoPeter Wu1-2/+7
Also init info_array in case the output is empty.
2014-07-20Fix type confusionPeter Wu1-3/+3
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-47/+51
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-06-28Use config time_range for canvas graphsVincent Brillault1-0/+1
2014-06-28Keep the list of plugins sortedVincent Brillault1-0/+1
2014-06-11Add support for multiple types dbDao-hui Chen1-16/+23
2014-05-14inc/html.inc.php: fix canvas graphsPim van den Berg1-1/+1
Include graph.php instead of non-existing plugin/$plugin.php.
2014-05-12graph.php: use JSON plugins instead of including PHP plugin filesPim van den Berg2-0/+211
A couple of big changes here. A lot of logic moved to graph.php. The PHP plugin files have been rewritten to JSON. In these JSON files *everything* is optional. Also *NOT* having a JSON plugin file won't block you from having a graph. The JSON will just make the graphs prettier (by having a title, y-axis title, legend, colors, etc..). The Collectd types.db file is parsed and used to determine RRD content. When things are not defined in the JSON it will fallback to a default.
2014-05-03move collectd_flush function to base classPim van den Berg2-66/+5
2014-05-03inc: mv graphs_from_plugin, build_url functions to html.inc.phpPim van den Berg2-70/+68
They generate html.
2014-05-03inc/collectd: consistently return false instead of an empty array or falsePim van den Berg1-15/+17
This means we have to check the return value of these functions for example before doing a foreach. We can't just do a foreach and assume the return value of a function is an array, while it can be false and results in a PHP warning. Closes: https://github.com/pommi/CGP/pull/68
2014-04-15overview: disable showmem by default, add percent signPim van den Berg1-25/+25
And change all spaces to tabs.
2014-04-14overview: show used memory percentageBogdan Rădulescu1-1/+25
2014-04-06overview: only calculate cores when config option showload is enabledPim van den Berg1-2/+2
Closes: https://github.com/pommi/CGP/issues/60
2014-03-23inc/functions.inc.php: rm trailing slash in base and resolve symlinkPim van den Berg1-0/+5
When there was a symlink in the path of $base, strpos($realpath, $base) would have always return false. Closes: https://github.com/pommi/CGP/pull/49
2014-03-22add rrdcached flush supportPim van den Berg1-31/+44
2014-03-22inc/collectd.inc.php: use RegexIterator + strip $dir from resultPim van den Berg1-8/+7
2014-03-22inc/collectd.inc.php: replace glob by php5 iteratorsŁukasz Kostka1-2/+23