Skip to content

Commit

Permalink
Merge branch 'upstream' into pr/align-bioportal-agroportal-part-4
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Dec 15, 2024
2 parents fa600ee + 6626755 commit affe9da
Show file tree
Hide file tree
Showing 25 changed files with 106 additions and 194 deletions.
10 changes: 6 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ gem 'net-http'
# Multi-Provider Authentication
gem 'omniauth'
gem 'omniauth-rails_csrf_protection'
gem 'omniauth-github'
gem 'omniauth-google-oauth2'
gem 'omniauth-keycloak'
gem 'omniauth-orcid'

# Additional authentication providers are not yet implemented
# gem 'omniauth-github'
# gem 'omniauth-google-oauth2'
# gem 'omniauth-keycloak'
# gem 'omniauth-orcid'

group :staging, :production, :appliance do
# Application performance monitoring
Expand Down
131 changes: 44 additions & 87 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
aes_key_wrap (1.1.0)
airbrussh (1.5.3)
sshkit (>= 1.6.1, != 1.7.0)
ast (2.4.2)
Expand All @@ -93,8 +92,8 @@ GEM
base64 (0.1.0)
bcrypt_pbkdf (1.1.1)
bcrypt_pbkdf (1.1.1-arm64-darwin)
bcrypt_pbkdf (1.1.1-x86_64-darwin)
bigdecimal (3.1.8)
bindata (2.5.0)
bindex (0.8.1)
bootsnap (1.18.4)
msgpack (~> 1.2)
Expand Down Expand Up @@ -149,34 +148,34 @@ GEM
addressable
csv (3.3.0)
dalli (3.2.8)
date (3.4.0)
date (3.4.1)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
deepl-rb (3.0.2)
deepl-rb (3.1.0)
diff-lcs (1.5.1)
docile (1.4.1)
domain_name (0.6.20240107)
ed25519 (1.3.0)
erubi (1.13.0)
erubis (2.7.0)
excon (1.2.0)
excon (1.2.2)
execjs (2.10.0)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
faraday (2.12.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-excon (2.3.0)
excon (>= 1.0.0)
faraday (>= 2.11.0, < 3)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (3.3.0)
net-http
ffi (1.17.0)
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
flag-icons-rails (3.4.6.1)
sass-rails
globalid (1.2.1)
Expand Down Expand Up @@ -229,7 +228,7 @@ GEM
inline_svg (1.10.0)
activesupport (>= 3.0)
nokogiri (>= 1.6)
io-console (0.7.2)
io-console (0.8.0)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
Expand All @@ -243,16 +242,7 @@ GEM
railties (>= 3.2.16)
jsbundling-rails (1.3.1)
railties (>= 6.0.0)
json (2.8.1)
json-jwt (1.16.7)
activesupport (>= 4.2)
aes_key_wrap
base64
bindata
faraday (~> 2.0)
faraday-follow_redirects
jwt (2.9.3)
base64
json (2.9.0)
language_server-protocol (3.17.0.3)
launchy (3.0.1)
addressable (~> 2.8)
Expand All @@ -267,7 +257,7 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.1)
logger (1.6.2)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -296,18 +286,17 @@ GEM
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.1105)
mime-types-data (3.2024.1203)
mini_mime (1.1.5)
minitest (5.25.1)
minitest (5.25.3)
msgpack (1.7.5)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.4.1)
mysql2 (0.5.6)
net-ftp (0.3.8)
net-protocol
time
net-http (0.5.0)
net-http (0.6.0)
uri
net-imap (0.4.18)
date
Expand All @@ -324,47 +313,23 @@ GEM
net-protocol
net-ssh (7.3.0)
netrc (0.11.0)
newrelic_rpm (9.15.0)
newrelic_rpm (9.16.0)
nio4r (2.7.4)
nokogiri (1.16.7-aarch64-linux)
nokogiri (1.16.8-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
nokogiri (1.16.8-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
nokogiri (1.16.8-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.8-x86_64-linux)
racc (~> 1.4)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
multi_xml (~> 0.5)
rack (>= 1.2, < 4)
snaky_hash (~> 2.0)
version_gem (~> 1.1)
oj (3.16.7)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omniauth (2.1.2)
hashie (>= 3.4.6)
rack (>= 2.2.3)
rack-protection
omniauth-github (2.0.1)
omniauth (~> 2.0)
omniauth-oauth2 (~> 1.8)
omniauth-google-oauth2 (1.2.0)
jwt (>= 2.9)
oauth2 (~> 2.0)
omniauth (~> 2.0)
omniauth-oauth2 (~> 1.8)
omniauth-keycloak (1.5.2)
faraday
json-jwt (> 1.13.0)
omniauth (>= 2.0)
omniauth-oauth2 (>= 1.7, < 1.9)
omniauth-oauth2 (1.8.0)
oauth2 (>= 1.4, < 3)
omniauth (~> 2.0)
omniauth-orcid (2.1.1)
omniauth-oauth2 (~> 1.3)
ruby_dig (~> 0.0.2)
omniauth-rails_csrf_protection (1.0.2)
actionpack (>= 4.2)
omniauth (~> 2.0)
Expand All @@ -374,10 +339,11 @@ GEM
ast (~> 2.4.1)
racc
popper_js (2.11.8)
pry (0.14.2)
pry (0.15.0)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.2.0)
psych (5.2.1)
date
stringio
public_suffix (6.0.1)
puma (5.6.9)
Expand Down Expand Up @@ -407,9 +373,9 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
rails-html-sanitizer (1.6.1)
loofah (~> 2.21)
nokogiri (~> 1.14)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails-i18n (7.0.10)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
Expand All @@ -425,13 +391,13 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdoc (6.7.0)
rdoc (6.8.1)
psych (>= 4.0.0)
recaptcha (5.9.0)
json
redcarpet (3.6.0)
regexp_parser (2.9.2)
reline (0.5.11)
regexp_parser (2.9.3)
reline (0.5.12)
io-console (~> 0.5)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
Expand All @@ -456,21 +422,20 @@ GEM
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
rubocop (1.68.0)
rspec-support (3.13.2)
rubocop (1.69.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.36.1)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
ruby_dig (0.0.2)
ruby_parser (3.21.1)
racc (~> 1.5)
sexp_processor (~> 4.16)
Expand Down Expand Up @@ -500,9 +465,6 @@ GEM
simplecov (~> 0.19)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
Expand All @@ -520,8 +482,7 @@ GEM
railties (>= 6.0.0)
stringio (3.1.2)
temple (0.10.3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
terminal-table (1.6.0)
terser (1.2.4)
execjs (>= 0.3.0, < 3)
thor (1.3.2)
Expand All @@ -534,9 +495,10 @@ GEM
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0)
uri (1.0.1)
version_gem (1.1.4)
unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.2)
view_component (2.83.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
Expand All @@ -562,10 +524,9 @@ GEM

PLATFORMS
aarch64-linux
arm64-darwin-22
arm64-darwin-23
arm64-darwin
x86_64-darwin
x86_64-linux
x86_64-linux-musl

DEPENDENCIES
base64 (= 0.1.0)
Expand Down Expand Up @@ -612,10 +573,6 @@ DEPENDENCIES
newrelic_rpm
oj
omniauth
omniauth-github
omniauth-google-oauth2
omniauth-keycloak
omniauth-orcid
omniauth-rails_csrf_protection
ontologies_api_client!
pry
Expand Down
8 changes: 6 additions & 2 deletions app/assets/stylesheets/bioportal.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.turbo-progress-bar {
height: 5px;
background-color: var(--admin-color);
height: 10px;
background-color: #ffffff;
}

.tabs-container .tab-items > div button{
color: var(--primary-color) !important
}

a{
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/tabs_container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
transition: opacity 0.3s ease;

a, button {
color: #5e5e5e !important;
color: #5e5e5e;
border: none;
background: none;
}
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/theme-variables.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<% themes = {
"agroportal" => { primary: "#3CB371", hover: "#41C67C", secondary: "#ffc107", light: "#F1F6FA" },
"stageportal" => { primary: "#37AEA0", hover: "#3BBDAE", secondary: "#ffc107", light: "#ECF7F6" },
"bioportal" => { primary: "#76A7CC", hover: "#6B96B7", secondary: "#ffc107", light: "#F0F5F6" },
"bioportal" => { primary: "#234979", hover: "#6B96B7", secondary: "#ffc107", light: "#F0F5F6" },
"ontoportal" => { primary: "#5499a4", hover: "#6B96B7", secondary: "#ffc107", light: "#F1F6FA" },
"testportal" => { primary: "#5499a4", hover: "#6B96B7", secondary: "#ffc107", light: "#F1F6FA" }
} %>

<% ui_theme = $UI_THEME.to_s.parameterize %>
<% selected_theme_key = themes.key?(ui_theme) ? ui_theme : "ontoportal" %>
<% selected_theme_key = themes.key?(ui_theme) ? ui_theme : 'ontoportal' %>
<% selected_theme = themes[selected_theme_key] %>

:root {
Expand Down
28 changes: 0 additions & 28 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,34 +236,6 @@ def redirect_to_home # Redirect to Home Page
redirect_to "/"
end

def redirect_new_api(class_view = false)
# Hack to make ontologyid and conceptid work in addition to id and ontology params
params[:ontology] = params[:ontology].nil? ? params[:ontologyid] : params[:ontology]
# Error checking
if params[:ontology].nil? || params[:id] && params[:ontology].nil?
@error = "Please provide an ontology id or concept id with an ontology id."
return
end
acronym = BPIDResolver.id_to_acronym(params[:ontology])
not_found unless acronym
if class_view
@ontology = LinkedData::Client::Models::Ontology.find_by_acronym(acronym).first
@submission = get_ontology_submission_ready(@ontology)
concept = get_class(params, @submission).first.to_s
redirect_to "/ontologies/#{acronym}?p=classes#{params_string_for_redirect(params, prefix: "&")}", :status => :moved_permanently
else
redirect_to "/ontologies/#{acronym}#{params_string_for_redirect(params)}", :status => :moved_permanently
end
end

def params_cleanup_new_api
params = @_params
if params[:ontology] && params[:ontology].to_i > 0
params[:ontology] = BPIDResolver.id_to_acronym(params[:ontology])
end

params
end

def params_string_for_redirect(params, options = {})
prefix = options[:prefix] || "?"
Expand Down
Loading

0 comments on commit affe9da

Please sign in to comment.