Fix dailychart when using non-root location

When puppetboard is being run from a directory instead of the root of the domain, the daily chart will not work as it tries to load the data from the root. This change makes it load the data from the current working URL, instead of forcing root.
This commit is contained in:
Celant
2017-05-16 14:07:36 +01:00
parent c229f51556
commit 3b817e0a5e

View File

@@ -1,6 +1,6 @@
jQuery(function ($) { jQuery(function ($) {
function generateChart(el) { function generateChart(el) {
var url = "/daily_reports_chart.json"; var url = "daily_reports_chart.json";
var certname = $(el).attr('data-certname'); var certname = $(el).attr('data-certname');
if (typeof certname !== typeof undefined && certname !== false) { if (typeof certname !== typeof undefined && certname !== false) {
url = url + "?certname=" + certname; url = url + "?certname=" + certname;