Incorrect URL for polling heat stack

There is a "topology" tab in the Horizon page which shows heat stack details.
It shows stack's resource dependencies graph. Horizon polls for stack changes
every few seconds.

Currently these pool requests fail in some environments with errors in the
apache log. This is due to the WEBROOT not being taken into account which would
change the path required. This patch fixes this issue.

Change-Id: I894d8ab97bc3f67d408ce2f5496da1570d2fb1d3
Closes-Bug: #1707619
(cherry picked from commit 953cd789a6)
This commit is contained in:
Beth Elwell 2017-07-31 11:34:11 +01:00
parent 246ff9f812
commit 954ce9c271
1 changed files with 1 additions and 2 deletions

View File

@ -265,12 +265,11 @@ function ajax_poll(poll_time){
}
/* eslint-disable no-use-before-define */
if ($(container).length){
var width = $(container).width(),
height = 500,
stack_id = $("#stack_id").data("stack_id"),
ajax_url = '/project/stacks/get_d3_data/' + stack_id + '/',
ajax_url = WEBROOT + 'project/stacks/get_d3_data/' + stack_id + '/',
graph = $("#d3_data").data("d3_data"),
force = d3.layout.force()
.nodes(graph.nodes)