Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/models/search_eds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ def search_url(term, facets, page, per_page)
end

def search_filtered(term, facets, page, per_page)
Rails.logger.debug(
"EDS Search URL: #{search_url(term, facets, page, per_page)}"
)
result = HTTP.headers(accept: 'application/json',
'x-authenticationToken': @auth_token,
'x-sessionToken': @session_key)
.timeout(:global, write: 2, connect: 2, read: 2)
.get(search_url(term, facets, page, per_page).to_s).to_s
JSON.parse(result)
end
Expand Down
9 changes: 8 additions & 1 deletion app/views/search/_trigger_search.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
$('#<%= id %>').load("/search/search_boxed?q=<%= URI.encode_www_form_component(params[:q]) %>&target=<%= target %>", function() {
$.ajax({
url: "/search/search_boxed?q=<%= URI.encode_www_form_component(params[:q]) %>&target=<%= target %>",
context: $('#<%= id %>')
}).done(function( msg ) {
$('#<%= id %>').html( msg );
TrackLinks( $( this ).find( 'a' ) );
ReportSummary( '<%= target %>', $( this ).find('[data-count]').data('count') );
}).fail(function( xhr, textStatus ) {
console.log(xhr);
$('#<%= id %>').html( 'Sorry, an error has occurred loading results at this time.' ).addClass('alert error');
});
7 changes: 7 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
# Suppress logger output for asset requests.
config.assets.quiet = true

# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug

# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]

# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/rollbar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']

# Here we'll disable in 'test':
if Rails.env.test?
if Rails.env.test? || Rails.env.development?
config.enabled = false
end

Expand Down