Skip to content

Instantly share code, notes, and snippets.

@rhelmer
Created January 21, 2012 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhelmer/1650682 to your computer and use it in GitHub Desktop.
Save rhelmer/1650682 to your computer and use it in GitHub Desktop.
diff --git a/js/dashboard.js b/js/dashboard.js
index a55fcac..6b996c0 100644
--- a/js/dashboard.js
+++ b/js/dashboard.js
@@ -80,7 +80,9 @@
datatype: datatype };
var html = '<a href="graph.html#' + $.param(params) + '">';
if (USE_GENERATED_IMAGES_IN_DASHBOARD) {
- html += '<img src="/images/dashboard/flot-' +
+ var href = window.location.href;
+ var url = href.substring(0, href.lastIndexOf('/'));
+ html += '<img src="' + url + '/images/dashboard/flot-' +
testid + '-' + branchid + '-' + platformid + '_' +
displayDays + '.png' + '">';
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment