summaryrefslogtreecommitdiff
path: root/test-shim.js
diff options
context:
space:
mode:
authorThai Tran <tqtran@us.ibm.com>2015-07-21 10:45:40 -0700
committerShaoquan Chen <sean.chen2@hp.com>2015-07-22 04:10:50 +0000
commit35e47358f0e3567b91da1116120c3c9fd97d8e6c (patch)
tree30312a8ef925600f33fa2854515ec16328fcbb90 /test-shim.js
parentede7402604d4e9429148030547bf320ea6133b16 (diff)
downloadhorizon-35e47358f0e3567b91da1116120c3c9fd97d8e6c.tar.gz
Fix bug where WEBROOT is not respected
The WEB_ROOT setting needs to be respected rather than assuming / as the root of the application. Simiarly, we can not assume that STATIC_URL is a sub url of the WEB_ROOT. They can be configured as two indepedent url. Angular templates are loaded dynamically with Ajax, which requires an absolute base path. We define those base paths as angular constants for template use and future routing. TO TEST, follow directions at: http://docs.openstack.org/developer/horizon/topics/settings.html#webroot Co-Authored-By: Matt Borland <matt.borland@hp.com> Co-Authored-By: Shaoquan Chen <sean.chen2@hp.com> Co-Authored-By: Thai Tran <tqtran@us.ibm.com> Change-Id: Ifcd459633682edc94b270019ce77e17d64bea22d Closes-Bug: #1451681
Diffstat (limited to 'test-shim.js')
-rw-r--r--test-shim.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/test-shim.js b/test-shim.js
index 81efe92b9..5b364ba31 100644
--- a/test-shim.js
+++ b/test-shim.js
@@ -90,9 +90,7 @@ var horizonPlugInModules = [];
globals.npgettext = django.npgettext;
globals.interpolate = django.interpolate;
globals.get_format = django.get_format;
+ globals.STATIC_URL = '/static/';
+ globals.WEBROOT = '/';
}(this));
-
-
-
-