Revision cdd8bb6f
Added by Paul Kelly about 14 years ago
- ID cdd8bb6f9dedcfc2eccd882ad79c5ac637c6bcf5
app/controllers/application_controller.rb | ||
---|---|---|
return "#{klass}ScaffoldController".constantize rescue super
|
||
end
|
||
|
||
# host list AJAX methods
|
||
# its located here, as it might be requested from the dashboard controller or via the hosts controller
|
||
def fact_selected
|
||
@fact_name_id = params[:search_fact_values_fact_name_id_eq].to_i
|
||
@fact_values = FactValue.find(:all, :select => 'DISTINCT value', :conditions => {
|
||
:fact_name_id => @fact_name_id }, :order => 'value ASC') if @fact_name_id > 0
|
||
render :partial => 'common/fact_selected', :layout => false
|
||
end
|
||
|
||
protected
|
||
|
||
def require_ssl
|
||
... | ... | |
end
|
||
|
||
def invalid_request
|
||
render :text => 'Invalid query', :status => 400 and return
|
||
render :text => 'Invalid query', :status => 400 and return
|
||
end
|
||
|
||
def setgraph chart, data, options = {}
|
||
... | ... | |
return chart
|
||
end
|
||
|
||
private
|
||
def load_tabs
|
||
@tabs = session[:tabs] ||= {}
|
||
@active_tab = session[:active_tab]
|
||
end
|
||
|
||
def manage_tabs
|
||
return if params[:tab_name].empty? or params[:tab_name] == "Reset"
|
||
|
||
if params[:remove_me] and @tabs.has_key? params[:tab_name]
|
||
@tabs.delete params[:tab_name]
|
||
@active_tab = session[:active_tab] = @tabs.keys.sort.first
|
||
else
|
||
@active_tab = session[:active_tab] = params[:tab_name]
|
||
@tabs[@active_tab] = params[:search]
|
||
end
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
Fixes #183 - Adds searchbar facility to hosts
Qualified the fact_selected partial
Added a reset button
Added popup help
Beautification and grooming