oveits / ProvisioningEngine

Ruby on Rails based ProvisioningEngine Frontend for provisioning of legacy systems via Apache Camel Backend (SOAP/XML+SPML+File import)
3 stars 6 forks source link

Delayed Jobs link leads to wrong URL if the base URL is not "/" #30

Closed oveits closed 8 years ago

oveits commented 8 years ago

On the pre-production system, we have a second web portal running on port 3001, which can be reached by prepending '/dev' to the URL. However, on https://192.168.113.105/dev/provisionings, there is a link named "Delayed Jobs" that does not lead to the right URL: image after clicking "Delayed Jobs" we are forwarded to https://192.168.113.105/delayed_job/overview instead of https://192.168.113.105/dev/delayed_job/overview. There, we will not find the corresponding jobs we are looking for.

oveits commented 8 years ago

Prio set to low, since this problem is only seen on the development process, but not on the production process, as long as the base URL of the production process is kept to be "/".

oveits commented 8 years ago

Easy to solve: exchange static link "/delayed_job/overview" by delayed_job_path

diff --git a/app/views/provisionings/_sidebar.html.erb b/app/views/provisionings/_sidebar.html.erb
index 19eb69a..ae9712b 100644
--- a/app/views/provisionings/_sidebar.html.erb
+++ b/app/views/provisionings/_sidebar.html.erb
@@ -10,7 +10,7 @@
             <% end %>

                 <li><%= link_to 'Clear Table', removeAll_provisionings_path, method: :delete, data: { confirm: 'This will remove all Provisioning Tas
-                <li><%= link_to "Delayed Jobs", "/delayed_job/overview", :target => "_blank" %></li>
+                <li><%= link_to "Delayed Jobs", delayed_job_path, :target => "_blank" %></li>

Solved on development branch (not yet committed).