Code assumes dashboard installed at root URL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Wishlist
|
Gabriel Hurley |
Bug Description
The OpenStack dashboard code currently assumes that the URL will be at the root. For example, installed at example.com/ instead of example.
There are a number of locations in the code where you see this assumption. There's code with hard-coded links relative to "/" such as:
dashboard/
<h1><a href="/">{% site_branding %}<span> Cloud Computing<
<a id="lnk_login" href="/
...
openstack-
<li class="
...
<li><h3><a href="/
openstack-
<input type="hidden" name="next" value="/" />
Also, /media is hard-coded as the media-location in base-root.html.
Changed in openstack-dashboard: | |
status: | New → Confirmed |
Changed in openstack-dashboard: | |
importance: | Undecided → Wishlist |
Changed in horizon: | |
milestone: | none → essex-1 |
Changed in horizon: | |
assignee: | nobody → Gabriel Hurley (gabriel-hurley) |
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | essex-1 → 2012.1 |
A couple notes:
* "/media" being hardcoded is fixed in https:/ /github. com/4P/ openstack- dashboard/ commit/ 333acaffee6d799 2afd1a3bef81f5d 2e36036464
* Links to the "/" should be replaced by a proper django url template tag with a named pattern for "home" or something of the sort. However, this is complicated by the fact that the root URL isn't defined in the dashboard URLconf right now, so it's up to the project (e.g. openstack-dashboard or any other replacement) to include that named pattern in its URLconf, and the site will break loudly if people forget to include it.
* In general, deploying a Django site at a subdirectory isn't as simple as it ought to be. It requires adding a prefix to *all* URL patterns in the project, and changing a number of settings. Take a look at the (now slightly dated) example here: http:// djangosnippets. org/snippets/ 2136/