Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: invalidating cache after submission process & remove unused code/views #416

Merged
merged 5 commits into from
Dec 20, 2023
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
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
//= require bp_ontolobridge
//= require bp_form_complete
//= require bp_analytics
//= require bp_user_intention_survey
//= require bp_search
//= require bp_mappings
//= require bp_admin
Expand Down
84 changes: 0 additions & 84 deletions app/assets/javascripts/bp_user_intention_survey.js

This file was deleted.

3 changes: 2 additions & 1 deletion app/assets/stylesheets/account.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@
font-weight: 400;
color: var(--primary-color);
}
.account-page-subscription div{
.account-page-subscription > div{
display: flex;
}

.account-page-subscription div .notes{
margin-right: 23px;
color: #666666 !important;
Expand Down
16 changes: 16 additions & 0 deletions app/components/concept_details_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,20 @@ def exclude_relation?(relation_to_check, ontology = nil)
return false
end

def remove_owl_notation(string)
# TODO_REV: No OWL notation, but should we modify the IRI?
return string

unless string.nil?
strings = string.split(":")
if strings.size<2
#return string.titleize
return string
else
#return strings[1].titleize
return strings[1]
end
end
end

end
11 changes: 0 additions & 11 deletions app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@ class AdminController < ApplicationController
layout :determine_layout
before_action :cache_setup

DEBUG_BLACKLIST = [:"$,", :$ADDITIONAL_ONTOLOGY_DETAILS, :$rdebug_state,
:$PROGRAM_NAME, :$LOADED_FEATURES, :$KCODE, :$-i, :$rails_rake_task, :$$, :$gems_build_rake_task,
:$daemons_stop_proc, :$VERBOSE, :$DAEMONS_ARGV, :$daemons_sigterm,
:$DEBUG_BEFORE, :$stdout, :$-0, :$-l, :$-I, :$DEBUG, :$',
:$gems_rake_task, :$_, :$CODERAY_DEBUG, :$-F, :$", :$0, :$=, :$FILENAME, :$?,
:$!, :$rdebug_in_irb, :$-K, :$TESTING, :$fileutils_rb_have_lchmod,
:$binding, :$-v, :$>, :$SAFE, :$/,
:$fileutils_rb_have_lchown, :$-p, :$-W, :$:, :$__dbg_interface,
:$stderr, :$\, :$&, :$<, :$debug, :$;, :$~, :$-a,
:$DEBUG_RDOC, :$CGI_ENV, :$LOAD_PATH, :$-d, :$*, :$., :$-w, :$+,
:$@, :$`, :$stdin, :$1, :$2, :$3, :$4, :$5, :$6, :$7, :$8, :$9]
ADMIN_URL = "#{LinkedData::Client.settings.rest_url}/admin/"
ONTOLOGIES_URL = "#{ADMIN_URL}ontologies_report"
USERS_URL = "#{LinkedData::Client.settings.rest_url}/users"
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/ajax_proxy_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ def json_ontology
render_json simple_ontology.to_json
end

def loading_spinner
render :partial => "loading_spinner"
end

private

Expand Down
66 changes: 0 additions & 66 deletions app/controllers/analytics_controller.rb

This file was deleted.

4 changes: 4 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ def detect_locale
before_action :set_global_thread_values, :domain_ontology_set, :authorize_miniprofiler, :clean_empty_strings_from_params_arrays, :init_trial_license


def invalidate_cache?
params[:invalidate_cache] && params[:invalidate_cache].to_s.eql?('true')
end

def show_image_modal
url = params[:url]
render turbo_stream: helpers.prepend('application_modal_content') { helpers.image_tag(url, style:'width: 100%') }
Expand Down
5 changes: 0 additions & 5 deletions app/controllers/concepts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ def biomixer
@concept = @ontology.explore.single_class({full: true}, params[:conceptid])
concept_not_found(params[:conceptid]) if @concept.nil?

@immediate_load = true

render partial: "biomixer", layout: false
end

Expand All @@ -185,9 +183,6 @@ def biomixer

def show_ajax_request
case params[:callback]
when 'load' # Load pulls in all the details of a node
gather_details
render :partial => 'load'
when 'children' # Children is called only for drawing the tree
@children = @concept.explore.children(pagesize: 750, concept_schemes: Array(@schemes).join(','), language: request_lang, display: 'prefLabel,obsolete,hasChildren').collection || []
@children.sort! { |x, y| (x.prefLabel || "").downcase <=> (y.prefLabel || "").downcase } unless @children.empty?
Expand Down
14 changes: 0 additions & 14 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ def index

end

def render_layout_partial
partial = params[:partial]
render partial: "layouts/#{partial}"
end

def all_resources
@conceptid = params[:conceptid]
Expand Down Expand Up @@ -109,9 +105,6 @@ def feedback
end
end

def user_intention_survey
render partial: 'user_intention_survey', layout: false
end

def site_config
render json: bp_config_json
Expand Down Expand Up @@ -140,13 +133,6 @@ def account

def feedback_complete; end

def validate_ontology_file_show; end

def validate_ontology_file
response = LinkedData::Client::HTTP.post('/validate_ontology_file', ontology_file: params[:ontology_file])
@process_id = response.process_id
end

def annotator_recommender_form
if params[:submit_button] == "annotator"
redirect_to "/annotator?text=#{params[:text]}"
Expand Down
Loading