aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* add responsive cssPim van den Berg2015-06-211-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
* replace table on overview page by divsPim van den Berg2015-06-211-13/+13
| | | | This works better in a responsive design.
* inc/html: remove continue statements to prevent from incomplete htmlPim van den Berg2015-06-211-25/+23
|
* inc/functions: merge functions GET and validate_getPim van den Berg2015-05-252-15/+53
| | | | And make sure all input from $_GET variables are parsed and validated.
* inc/functions: make type argument of validate_get function exactly the same ↵Pim van den Berg2015-05-252-11/+11
| | | | as $_GET value
* inc/html: s/licence/license/Pim van den Berg2015-02-261-1/+1
| | | | Closes #117
* inc/collectd: vmem/vmpage_io should be split to multiple graphs per type ↵Pim van den Berg2014-12-141-4/+5
| | | | | | instance Closes #113
* Revert "make detail page accessible when using "canvas" graph_type"Peter Wu2014-12-142-18/+0
| | | | | | | This reverts commit 82d88098f4203cf7402d4faf5ad100cada70efaf. Breaks async rendering, see https://github.com/pommi/CGP/issues/106#issuecomment-66896905
* inc/html: include jquery from local sourcePim van den Berg2014-12-141-1/+1
| | | | So we don't depend on a remote source.
* dashboard: showtime: load jquery + timeago.js when config is setPim van den Berg2014-12-131-1/+7
|
* dashboard: make timeago dynamic using jquery + timeagoPim van den Berg2014-12-131-1/+4
|
* Adding option to show time since last update on dashboard.David Severwright2014-12-131-0/+13
| | | | Closes #110
* make detail page accessible when using "canvas" graph_typePim van den Berg2014-11-112-0/+18
| | | | Closes #106
* inc/html: add deprecation message about collectd 4Pim van den Berg2014-08-141-1/+12
|
* Merge (a)sync code, reformat CGP.jsPeter Wu2014-08-021-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.
* support php versions without json support and show a warning messagePim van den Berg2014-07-251-0/+13
|
* inc/collectd: get_host_rrd_files: filter non-plugin .rrd filesPim van den Berg2014-07-241-1/+4
| | | | Closes #92
* Remove from all files the ending php tagFrançois LASSERRE2014-07-232-4/+0
|
* Update html.inc.phpFrançois LASSERRE2014-07-231-6/+6
| | | Fix a link when no class selected.
* Better x and y validation, report 400 on errorsPeter Wu2014-07-211-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).
* Fix overly permissive hostname validation, fix host checkPeter Wu2014-07-211-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...
* Escape file argument for rrd_infoPeter Wu2014-07-201-2/+7
| | | | Also init info_array in case the output is empty.
* Fix type confusionPeter Wu2014-07-201-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.
* Defensive programming: more urlencode/htmlentitiesPeter Wu2014-07-201-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).
* Merge remote-tracking branch 'feandil/time_range'Pim van den Berg2014-06-281-0/+1
|\
| * Use config time_range for canvas graphsVincent Brillault2014-06-281-0/+1
| |
* | Keep the list of plugins sortedVincent Brillault2014-06-281-0/+1
|/
* Add support for multiple types dbDao-hui Chen2014-06-111-16/+23
|
* inc/html.inc.php: fix canvas graphsPim van den Berg2014-05-141-1/+1
| | | | Include graph.php instead of non-existing plugin/$plugin.php.
* graph.php: use JSON plugins instead of including PHP plugin filesPim van den Berg2014-05-122-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.
* move collectd_flush function to base classPim van den Berg2014-05-032-66/+5
|
* inc: mv graphs_from_plugin, build_url functions to html.inc.phpPim van den Berg2014-05-032-70/+68
| | | | They generate html.
* inc/collectd: consistently return false instead of an empty array or falsePim van den Berg2014-05-031-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
* overview: disable showmem by default, add percent signPim van den Berg2014-04-151-25/+25
| | | | And change all spaces to tabs.
* overview: show used memory percentageBogdan Rădulescu2014-04-141-1/+25
|
* overview: only calculate cores when config option showload is enabledPim van den Berg2014-04-061-2/+2
| | | | Closes: https://github.com/pommi/CGP/issues/60
* inc/functions.inc.php: rm trailing slash in base and resolve symlinkPim van den Berg2014-03-231-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
* add rrdcached flush supportPim van den Berg2014-03-221-31/+44
|
* inc/collectd.inc.php: use RegexIterator + strip $dir from resultPim van den Berg2014-03-221-8/+7
|
* inc/collectd.inc.php: replace glob by php5 iteratorsŁukasz Kostka2014-03-221-2/+23
|
* use &amp; instead of & in htmlPim van den Berg2014-02-102-5/+5
|
* Add a configuration option for sync/async choice for the canvas graphsVincent Brillault2014-01-121-0/+11
|
* automatic page refresh support + config settingPim van den Berg2013-12-291-0/+6
| | | | Closes: https://github.com/pommi/CGP/pull/35
* inc/collectd.inc.php: typoPim van den Berg2013-08-241-1/+1
|
* inc/collectd.inc.php: don't group type instances when snmp + if_octetsPim van den Berg2013-08-241-1/+4
| | | | | | | | The snmp plugin is saving if_octets this way: <host>/snmp/if_octets-<port>.rrd Where the interfaces plugin is saving if_octets with this structure: <host>/interface-<port>/if_octets.rrd
* add viewport meta tag for better experience on mobile devicesPim van den Berg2013-06-221-0/+1
|
* overview: add color to load averagesPim van den Berg2013-06-221-4/+11
| | | | | | | | | | The load average number turns: * orange When the load is higher than the number of cpu cores. * red When the load is more than twice as high as the number of cpu cores.
* start using fieldset + legend for showing dataPim van den Berg2013-06-221-3/+6
|
* integrate jsrrdgraph in CGPPim van den Berg2013-05-183-6/+61
|
* rewrite some code of added overview_filter featurePim van den Berg2013-03-301-7/+4
| | | | Use less variables, less code.