aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* type/GenericIO: in case of negative_io draw percentile line also on the ↵Pim van den Berg2015-05-281-1/+5
| | | | | | negative y-axis Closes #119
* inc/functions: merge functions GET and validate_getPim van den Berg2015-05-255-35/+74
| | | | 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-255-23/+23
| | | | as $_GET value
* inc/html: s/licence/license/Pim van den Berg2015-02-261-1/+1
| | | | Closes #117
* plugin/apache: don't use network_datasize for apache_bytesPim van den Berg2014-12-141-1/+1
| | | | | | network_datasize expects the source to be in bits. Closes #107
* plugin/mysql: remove defined colors from mysql_handler but rollbackPim van den Berg2014-12-141-30/+0
| | | | I'd like rollback to be black. I don't care about the rest.
* plugin/mysql: replace TI by PI in titlePim van den Berg2014-12-141-1/+1
| | | | Closes #112
* plugin/vmem: improve vmpage_ioPim van den Berg2014-12-141-1/+11
|
* inc/collectd: vmem/vmpage_io should be split to multiple graphs per type ↵Pim van den Berg2014-12-141-4/+5
| | | | | | instance Closes #113
* layout: make timeago smaller and give it some opacityPim van den Berg2014-12-141-1/+6
|
* Revert "make detail page accessible when using "canvas" graph_type"Peter Wu2014-12-145-26/+2
| | | | | | | 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.
* js: import jquery 2.1.1Pim van den Berg2014-12-141-0/+4
|
* dashboard: showtime: load jquery + timeago.js when config is setPim van den Berg2014-12-132-2/+10
|
* dashboard: timeago: show seconds, refresh every 5 secondsPim van den Berg2014-12-131-2/+2
|
* dashboard: make timeago dynamic using jquery + timeagoPim van den Berg2014-12-133-1/+227
|
* Adding option to show time since last update on dashboard.David Severwright2014-12-133-0/+19
| | | | Closes #110
* js/CGP: scroll wheel zoom center positionPeter Chiocchetti2014-12-131-2/+4
| | | | Closes #111
* plugins/ping: show ping_droprate in percentagePim van den Berg2014-12-091-1/+3
| | | | Closes #109
* jsrrdgraph: Set original step when change time interval.Manuel Luis Sanmartín Rozada2014-11-143-4/+8
|
* jsrrdgraph: Fix invalid function callPeter Wu2014-11-141-1/+1
| | | | During conversion from PHP, this function was apparently missed.
* jsrrdgraph: Fix undefined variablesPeter Wu2014-11-141-15/+13
| | | | | | | Fixed various typos in references to variables. Also throw an exception if a variable is not found in GPRINT for debugging purposes and move some variable declarations.
* jsrrdgraph: Guard out antique browsers for happier debuggingPeter Wu2014-11-141-2/+6
| | | | | | | | Comment out more code that existed solely for IE10 and older. This prevents breaking the "Break on exceptions" functionality of the Chromium developer tools for no gain. This also removes the final jshint warnings from this file.
* jsrrdgraph: Simplify matching logicPeter Wu2014-11-141-10/+8
| | | | | | Instead of using a flag for determining whether a value is set or not, set values that will never match and test for the validity of the results instead of checking the flags.
* jsrrdgraph: Improve performance for graphs in the futurePeter Wu2014-11-141-2/+14
| | | | | | | | The RRD file has finer details for more recent data points. When looking for a match for a graph past the last update ("the future"), a RRA would be picked which has a step size of 1. As we know that no data points are available, optimise this and return earlier with the full range set to NaN.
* jsrrdgraph: Fix undefined value issue in RrdDataFilePeter Wu2014-11-141-4/+6
| | | | | | | | | | | | `RRDRRAInfo.pdp_cnt` does not exist. A reference to the pdp_cnt member in a struct exists, this is available via the `getPdpPerRow()` method, so use that. (actually, `getMinStep() * getPdpPerRow()` can be simplified further, see below). While at it, replace the combination `RRDRRAInfo.getPdpPerRow() * RRAInfo.pdp_step` by `RRDRRAInfo.getStep()` since this is the same thing. As `RRDHeader.pdp_step` is copied into `RRDRRAInfo`, this can also be substituted.
* make detail page accessible when using "canvas" graph_typePim van den Berg2014-11-115-2/+26
| | | | Closes #106
* type/base: allow rrdtool graph -l (lower-limit) to be configured via config ↵Pim van den Berg2014-09-251-1/+4
| | | | | | or plugin json Closes #104
* type/base: escape space character in rrdcached FLUSH commandPim van den Berg2014-09-251-1/+1
| | | | Closes #105
* move " on <HOSTNAME>" suffix in graph title to JSONŁukasz Kostka2014-08-2545-142/+144
| | | | Closes #101
* fix rrd_escape() not escaping colonsBrad Jorgensen2014-08-251-1/+1
|
* inc/html: add deprecation message about collectd 4Pim van den Berg2014-08-142-2/+19
|
* type/base: fix undefined variable rrd_url when graph_type != canvasPim van den Berg2014-08-101-4/+6
|
* Merge remote-tracking branch 'lekensteyn/custom-urls'Pim van den Berg2014-08-103-5/+23
|\
| * Support customized RRD URLsPeter Wu2014-08-103-5/+23
| | | | | | | | | | | | | | | | | | | | | | 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 '='.
* | jsrrdgraph: Fix parsing of rrdfiles containing escapesPeter Wu2014-08-101-5/+7
| | | | | | | | | | | | This fixes parsing of URLs such as 'rrd.php?path=some%3Ffile.rrd', and if people really insist, paths such as 'C:\bar.rrd' (must be written as 'C\:\\bar.rrd', add additional escapes for Javascript strings if needed).
* | Add README filePeter Wu2014-08-103-3/+119
|/ | | | | | Documents requirements, installation instructions (obsoleting doc/INSTALL) and performance hints. Added a nginx server configuration example that optimises for performance.
* Merge (a)sync code, reformat CGP.jsPeter Wu2014-08-024-150/+136
| | | | | | | | | | | | | | | | | | | | 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.
* jsrrdgraph: Fix error functions. Error prototype.Manuel Luis Sanmartín Rozada2014-08-024-6/+7
|
* jsrrdgraph: Fix reduce in DEFManuel Luis Sanmartín Rozada2014-08-021-2/+2
|
* jsrrdgraph: Add fallback fonts.Manuel Luis Sanmartín Rozada2014-08-022-3/+3
|
* jsrrdgraph: Use Typed Arrays for better performancePeter Wu2014-08-021-7/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiling was done using Firebug in Firefox 31 on Linux x86_64. Test was performed as follows: - rrd generated using collectd with default rrdtool settings. - CPU utilization was visualized with 8 lines (idle, nice, etc.). - The data has gaps between 20% and 40% and 55% and 85% (were no data was collected). - The measured performance was from advancing the data 40% to the right (there are no gaps before that). The total running time is 18859.094ms (old), 5151.822ms (new). In the below profiles, common functions with similar running times and call counts were omitted. Columns in the profile table: function, call count, time spent in the function, average time spent per call in *total* (including other functions called by the function) and percentage of the total running time. The RrdGraph.data_calc function was not called much, but seems to be heavy enough to include in the trace. Profile for old implementation: - getEndianByteAt 246959 12200.42ms 0.063ms 64.69% - getDoubleAt 30306 3183.393ms 0.612ms 16.88% - RRDRRA.getEl 30306 1177.33ms 0.665ms 6.24% - RRDRRA.calc_idx 30306 449.201ms 0.015ms 2.38% - (RrdDataFile.build 47 431.986ms total=21189.434ms 2.29%) - getByteAt 254290 327.369ms 0.013ms 1.74% - (2 functions omitted) - getCStringAt 752 103.308ms 0.271ms 0.55% - RrdRpn.calc 5504 98.55ms 0.018ms 0.52% - (1 function omitted) - (RrdGraph.data_calc 1 75.417ms total=174.535ms 0.4%) - getLongAt 1128 65.796ms 0.212ms 0.35% Profile for new implementation: - RRDRRA.getEl 32280 1202.446ms 0.065ms 23.34% - RrdRpn.calc 43968 848.693ms 0.019ms 16.47% (probably includes the getByteAt call which is not visible in trace) - (RrdGraph.data calc 2 616.648ms total=1466.432ms 11.97%) - getDoubleAt 32280 460.894ms 0.014ms 8.95% - (RrdDataFile.build 48 438.1ms total=2719.07ms 8.5%) - (RRDRRA.calc_idx 32280 436.375ms total=436.375ms 8.47%) - (10 functions omitted) - getLongAt 1152 16.273ms 0.014ms 0.32% - (2 functions omitted) - getCStringAt 768 13.651ms 0.018ms 0.26% A second test was performed on a graph with no visible data points. I dragged it to the left to get in the future with only NaN values. Then the profile started. It turns out that the byte readings are not dominating here, 99% of the time was spent in RrdRpn.calc and RrdGraph.data_calc: - (old) RrdRpn.calc 3.14k 58493s 0.019ms - (new) RrdRpn.calc 3.10k 56912s 0.018ms - RrdGraph.data_calc (n=2) took about 46 seconds for both. - getByteAt (n=12096): 0.014ms (old), invisible/inlined (new) - getEndianByteAt (n=4608): 0.040ms (old only) - getCStringAt (n=768): 0.285ms (old), 0.018ms (new) - getLongAt (n=1152): 0.233ms (old), 0.014ms (new)
* jsrrdgraph: Remove unused getStringAt, move implementationPeter Wu2014-08-021-48/+43
| | | | | | | | | | | | Rename switch_endian to littleEndian to be more explicit (the meaning is now inversed too). Make getEndianByteAt private since it is an implementation detail. Drop getStringAt as this is not used in this library. Move getCharAt above getCStringAt since they are more related. Move the methods definition for the current implementation to a new function.
* jsrrdgraph: Drop iDataOffset and iDataLength parametersPeter Wu2014-08-021-11/+9
| | | | | These parameters are not used in this library. Should it ever be necessary to process a slice of data, then the caller should do so.
* jsrrdgraph: document.write is for dinosaursPeter Wu2014-08-021-1/+3
| | | | | Use conditional compilation for the antique browsers that provide VBScript support.
* jsrrdgraph: Performance fixPeter Wu2014-08-021-6/+9
| | | | | | | | | | | commit 2a74a333ff143499b465234f0395a4aad7bdaa78 ("Upgrade to javascriptrrd ver 1.1.1") converted getByteAt calls to a getEndianByteAt call, but this also introduced a branch operation. Since endianess is dependent on the file, we can move the switch_endian check outside the function. Performance improved from 0.148ms (n=336k) to .039ms (n=384k) which translates to about 30 seconds!
* jsrrdgraph: binaryXHR: jshint style fixesPeter Wu2014-08-021-257/+264
| | | | | | | | | | | Added jshint comment on top, added "use strict". Added missing semi-colons, converted to '===' (after validation). Added comment for `typeof strData == "unknown"`. Break one long line over two lines. There are no other changes except for whitespace and line ending changes. Check with `git diff -w`.
* jsrrdgraph: Fixed jshint warnings/errorsPeter Wu2014-08-0213-218/+185
| | | | | | | | | | | | | | | | | Many fall in the category missing semicolon, but there are legitimate bugs (like throwing an error with an undefined variable, using isInfinite instead of !isFinite or fabs instead of Math.abs). At some places, I moved the variable declarations to avoid duplicate definition warnings. Redundant breaks have been removed (after return / throw). Global variables were implicitly defined in RrdDataFile (which caught my attention) and Base64, these have been made local. Also fixed some whitespace errors. Yay, the consistency. Not all (style) issues are fixed.
* support php versions without json support and show a warning messagePim van den Berg2014-07-253-2/+21
|
* jsrrdgraph: Fix get reponseText in FetchBinaryURLManuel Luis Sanmartín Rozada2014-07-251-1/+1
|