From: Imre Farkas ifarkas@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=770809 --- src/app/controllers/deployables_controller.rb | 6 +++++- src/config/locales/en.yml | 1 + 2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb index 13d4f3e..05473b2 100644 --- a/src/app/controllers/deployables_controller.rb +++ b/src/app/controllers/deployables_controller.rb @@ -258,7 +258,11 @@ class DeployablesController < ApplicationController response end rescue RestClient::Exception, SocketError, URI::InvalidURIError - flash[:error] = t('catalog_entries.flash.warning.not_valid_or_reachable', :url => url) + if url.present? + flash[:error] = t('catalog_entries.flash.warning.not_valid_or_reachable', :url => url) + else + flash[:error] = t('catalog_entries.flash.warning.no_url_provided') + end nil end end diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml index 0275275..94e9873 100644 --- a/src/config/locales/en.yml +++ b/src/config/locales/en.yml @@ -631,6 +631,7 @@ en: flash: warning: not_valid_or_reachable: "Catalog entry XML file is either invalid or no longer reachable at %{url}" + no_url_provided: "No URL provided for the catalog entry XML file." not_valid: "Deployable XML file doesn't resolve valid XML" failed: Catalog entry was not created. notice:
On 12/29/2011 01:40 PM, ifarkas@redhat.com wrote:
From: Imre Farkasifarkas@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=770809
src/app/controllers/deployables_controller.rb | 6 +++++- src/config/locales/en.yml | 1 + 2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb index 13d4f3e..05473b2 100644 --- a/src/app/controllers/deployables_controller.rb +++ b/src/app/controllers/deployables_controller.rb @@ -258,7 +258,11 @@ class DeployablesController< ApplicationController response end rescue RestClient::Exception, SocketError, URI::InvalidURIError
flash[:error] = t('catalog_entries.flash.warning.not_valid_or_reachable', :url => url)
if url.present?
flash[:error] = t('catalog_entries.flash.warning.not_valid_or_reachable', :url => url)
else
flash[:error] = t('catalog_entries.flash.warning.no_url_provided')
endend nil end
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml index 0275275..94e9873 100644 --- a/src/config/locales/en.yml +++ b/src/config/locales/en.yml @@ -631,6 +631,7 @@ en: flash: warning: not_valid_or_reachable: "Catalog entry XML file is either invalid or no longer reachable at %{url}"
no_url_provided: "No URL provided for the catalog entry XML file." not_valid: "Deployable XML file doesn't resolve valid XML" failed: Catalog entry was not created. notice:
ACK
aeolus-devel@lists.fedorahosted.org