Hi -
Also on pcpfans.git fche/pmwebd:
commit 8c9ddae0b3ee7ce4cbe7e8c446ea516d6fe7a02a
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Sun Dec 27 13:31:53 2015 -0500
pmwebd: graphite/png mode: add units/sem to legend
Tweak the graphite/png rendering mode to add metric units, and tweak
chart dimensions to match closer the javascript-drawn versions.
Hand-tested, as QA cannot analyze image contents.
commit 2502fe758e8569ccf6762266d88bd8278559d924
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Sun Dec 27 12:12:48 2015 -0500
pmwebd: enable graphite image-mode caching via redirection
The graphite web-api allows relative time specifications (e.g.,
from=-2hr until=now). When rendered into a png, this allows a web
browser to cache those images for reuse later, by which time the "now"
is no longer current. Even emitting various cache-defeating http
headers has not proven reliable in preventing this.
So now we defeat this unwanted caching by emitting a HTTP 302 redirect
for PNG rendering requests that are suspected to include relative-time
coordinates, turning them into absolute (epoch-seconds) requests.
The PNGs resulting from those requests are more safely cachable.
While testing in the vicitity, it turns out that the %HEX quoting used
in "pmwebd -X" appears to awaken a latent graphite/graphlot webapp bug
in terms of buggy urlencoding of metric names. So we switch to ~HEX,
since the tilde ~ character is not a "reserved character" in RFC3986,
so does not need encoding.
|