Revision f5208832
Added by Ashish Humbe about 1 year ago
app/views/unattended/report_templates/host_-_compare_content_hosts_packages.erb | ||
---|---|---|
-%>
|
||
<%- packages = [] -%>
|
||
<%- hosts = load_hosts(search: "name ^ (#{input('Host 1')}, #{input('Host 2')})").to_a.flatten -%>
|
||
<%- if hosts.length != 2 -%>
|
||
<%- if (input('Host 1') == input('Host 2')) -%>
|
||
<%- raise _("You are trying to compare the same host.") -%>
|
||
<%- elsif hosts.length != 2 -%>
|
||
<%- raise _("At least one of the hosts couldn't be found") -%>
|
||
<%- else -%>
|
||
<%- host1 = hosts.first -%>
|
Also available in: Unified diff
Fixes #36244 - Notify user if he is trying to compare the same host