Title: [opsview] [9871] make graph url use full uri
Revision
9871
Author
aburzynski
Date
2012-08-21 09:45:00 +0100 (Tue, 21 Aug 2012)

Log Message

make graph url use full uri

Modified Paths


Modified: trunk/opsview-web/root/graph/style/graph_common
===================================================================
--- trunk/opsview-web/root/graph/style/graph_common	2012-08-17 11:40:42 UTC (rev 9870)
+++ trunk/opsview-web/root/graph/style/graph_common	2012-08-21 08:45:00 UTC (rev 9871)
@@ -1,17 +1,18 @@
 <script type="text/_javascript_">
 // AjaxGraph Options
+var baseUrl = window.self.location.protocol + '//'+ window.self.location.host
 var graphOptions = {
   timezoneOffset: [% timezone_offset * 1000 %],
   urls: {
     svgYLabel: "[% c.uri_for('/pub/ylabel.svg').path | escape_js_string %]",
-    bookmarkLink: "[% c.uri_for('/graph').path | escape_js_string %]?style=singleton&state={{state}}",
+    bookmarkLink: baseUrl + "[% c.uri_for('/graph').path | escape_js_string %]?style=singleton&state={{state}}",
     [%# The uri_for should include the full URI -%]
     embedTag: "<iframe width='{{width}}' height='{{height}}' style='overflow: hidden;' frameborder='0' "+
               "scrolling='0' marginheight='0' marginwidth='0' " + 
-              "src=''/graph').path | escape_js_string %]?style=embed&state={{state}}'></iframe><br />" + 
-              "<small><a href=''/graph').path | escape_js_string %]?style=singleton&state={{state}}'>" + 
+              "src="" c.uri_for('/graph').path | escape_js_string %]?style=embed&state={{state}}'></iframe><br />" + 
+              "<small><a href="" c.uri_for('/graph').path | escape_js_string %]?style=singleton&state={{state}}'>" + 
               "[% c.loc("ui.graph.help.viewLargerGraph") | escape_js_string %]</a></small>",
-    seriesAutocompleter: "[% c.uri_for('/search/performancemetric').path | escape_js_string %]",
+    seriesAutocompleter: baseUrl + "[% c.uri_for('/search/performancemetric').path | escape_js_string %]",
     loadingIcon: "[% images.indicator | escape_js_string %]",
     invalidIcon: "[% c.uri_for('/images/warning-16x16.png').path | escape_js_string %]",
     connectionErrorIcon: "[% c.uri_for('/images/error-16x16.png').path | escape_js_string %]"

Modified: trunk/opsview-web/root/graph/style/summary
===================================================================
--- trunk/opsview-web/root/graph/style/summary	2012-08-17 11:40:42 UTC (rev 9870)
+++ trunk/opsview-web/root/graph/style/summary	2012-08-21 08:45:00 UTC (rev 9871)
@@ -13,7 +13,8 @@
 
 <script type="text/_javascript_">
 // Initialize graph group
-var graphSummaryUrl = "[% c.uri_for_params("", req_params, [ "state" ]).path_query | escape_js_string %]&state=";
+var baseUrl = window.self.location.protocol + '//'+ window.self.location.host
+var graphSummaryUrl = baseUrl + "[% c.uri_for_params("", req_params, [ "state" ]).path_query | escape_js_string %]&state=";
 var allGraphs = new AjaxGraphs.GraphGroup(function() {
   // create container
   var e = $AG.createElement('div', { id: 'anothergraph'+$AG.uuid() });

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to