import new classes does not show error-message
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 ...")
#1 Updated by Ohad Levy almost 9 years ago
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 ""
#2 Updated by Alexander Rusa almost 9 years ago
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
#3 Updated by Ohad Levy almost 9 years ago
- 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).