Project

General

Profile

Bug #1010

import new classes does not show error-message

Added by Alexander Rusa almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

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 ...")

Associated revisions

Revision 2c7681e3 (diff)
Added by Ohad Levy almost 8 years ago

fixes #1010 - import new classes does not show error-message

History

#1 Updated by Ohad Levy almost 8 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 8 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 8 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).

#4 Updated by Ohad Levy almost 8 years ago

  • Assignee set to Ohad Levy

#5 Updated by Ohad Levy almost 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF