Bug #1010
closed
import new classes does not show error-message
Added by Alexander Rusa over 13 years ago.
Updated over 13 years ago.
Description
If I click on "Import new puppet classes and environments" at the Puppet Classes page and foreman doesn't find the modules-directory it doesn't print an error-message.
If I do the same on the Environments page it does show an error ("Unable to find directory ... in environment ...")
Can you try this patch?
diff --git a/app/controllers/puppetclasses_controller.rb b/app/controllers/puppetclasses_controller.rb
index 746b382..3b41947 100644
--- a/app/controllers/puppetclasses_controller.rb
+++ b/app/controllers/puppetclasses_controller.rb
@@ -7,7 +7,6 @@ class PuppetclassesController < ApplicationController
def index
begin
values = Puppetclass.search_for(params[:search], :order => params[:order])
- flash.clear
rescue => e
error e.to_s
values = Puppetclass.search_for ""
I deleted the "flash.clear" and now it shows the error correctly but i didn't manage to apply the patch by using git apply - maybe this is because I haven't got enough practice with git patches ;-)
$ git apply --check <patch>
error: patch failed: app/controllers/puppetclasses_controller.rb:7
error: app/controllers/puppetclasses_controller.rb: patch does not apply
- Category set to Web Interface
- Target version set to 0.4
naa.. it wasnt a proper git patch.
I'll add it to the repo officially, so you would simply get it with a git pull.
you would probably need to do git checkout app/controllers/puppetclasses_controller.rb first (so git could apply the patch).
- Assignee set to Ohad Levy
- Status changed from New to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF