Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
use helper to generate urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels Baumgartner authored and mmoll committed Jul 1, 2019
1 parent a94e376 commit d70d4bf
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app/views/compute_resources_vms/form/_hypervisors.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
disabled: (controller_name != 'hosts'),
label: _("Hypervisor"), },
{ title: 'Refresh available hypervisors',
url: '/foreman_xen/cache/refresh',
url: url_for(controller: "foreman_xen/cache",
action: "refresh", only_path: true),
compute_resource_id: compute_resource.id,
attribute: 'available_hypervisors' }
) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
{ class: "span2",
label: _("Target Repository"), },
{ title: 'Refresh available storage repositories',
url: '/foreman_xen/cache/refresh',
url: url_for(controller: "foreman_xen/cache",
action: "refresh", only_path: true),
compute_resource_id: compute_resource.id,
attribute: 'storage_pools' }
) %>
Expand Down
3 changes: 2 additions & 1 deletion app/views/compute_resources_vms/form/_isos.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
{ class: "span2",
label: _('Attach ISO'), },
{ title: 'Refresh available storage repositories',
url: '/foreman_xen/cache/refresh',
url: url_for(controller: "foreman_xen/cache",
action: "refresh", only_path: true),
compute_resource_id: compute_resource.id,
attribute: 'isos' }
) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
prompt: 'No Template'},
{ class: 'span2', label: 'VM Template' },
{ title: 'Refresh available builtin templates',
url: '/foreman_xen/cache/refresh',
url: url_for(controller: "foreman_xen/cache",
action: "refresh", only_path: true),
compute_resource_id: compute_resource.id,
attribute: 'builtin_templates' }
) %>
Expand Down
3 changes: 2 additions & 1 deletion app/views/compute_resources_vms/form/_templates.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
{ prompt: 'Select a Template'},
{ class: 'span2', label: 'Builtin Template' },
{ title: 'Refresh available builtin templates',
url: '/foreman_xen/cache/refresh',
url: url_for(controller: "foreman_xen/cache",
action: "refresh", only_path: true),
compute_resource_id: compute_resource.id,
attribute: 'builtin_templates' }
) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
sizer: 'col-md-8',
disabled: (controller_name != 'hosts') },
{ title: 'Refresh available networks',
url: '/foreman_xen/cache/refresh',
url: url_for(controller: "foreman_xen/cache",
action: "refresh", only_path: true),
compute_resource_id: compute_resource.id,
attribute: 'networks' }
%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
{ class: 'span2',
label: _("Storage Repository") },
{ title: 'Refresh available storage repositories',
url: '/foreman_xen/cache/refresh',
url: url_for(controller: "foreman_xen/cache",
action: "refresh", only_path: true),
compute_resource_id: compute_resource.id,
attribute: 'storage_pools' }
%>
Expand Down

0 comments on commit d70d4bf

Please sign in to comment.