diff --git a/Gemfile b/Gemfile
index f863065a11..49da6cd18c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -95,9 +95,9 @@ gem 'string-similarity'
gem 'inline_svg'
# ISO language codes and flags
+gem 'countries', '~> 5.7'
gem 'flag-icons-rails', '~> 3.4'
gem 'iso-639', '~> 0.3.6'
-gem 'countries', '~> 5.7'
# Custom API client
gem 'ontologies_api_client', git: 'https://github.com/lifewatch-eric/ontologies_api_ruby_client.git', branch: 'master'
@@ -108,14 +108,14 @@ gem 'net-http', '~> 0.3.2'
# Multi-Provider Authentication
gem 'omniauth'
-gem 'omniauth-rails_csrf_protection'
gem 'omniauth-github'
gem 'omniauth-google-oauth2'
-gem 'omniauth-keycloak'
+gem 'omniauth-keycloak', '~> 1.4'
gem 'omniauth-orcid'
+gem 'omniauth-rails_csrf_protection', '~> 1.0', '>= 1.0.1'
# Used to generate colors randomly
-gem "color", "~> 1.8"
+gem 'color', '~> 1.8'
group :staging, :production, :appliance do
# Application performance monitoring
@@ -157,9 +157,9 @@ group :development do
# Internationalization tasks
# gem 'i18n-debug'
+ gem 'deepl-rb'
gem 'i18n-tasks'
gem 'i18n-tasks-csv', '~> 1.1'
- gem 'deepl-rb'
# Email preview in the browser
gem 'letter_opener_web', '~> 2.0'
@@ -184,4 +184,4 @@ group :test do
gem 'rspec-rails'
end
-gem 'openid_connect', '~> 2.2.0'
\ No newline at end of file
+gem 'openid_connect', '~> 2.2.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 7562e32730..d961380a27 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/lifewatch-eric/ontologies_api_ruby_client.git
- revision: 2e9540fe610faacfb0502d9136bb5f7f81f752db
+ revision: 36cbe8703376cb74c9e7b897740ec382e50ba72a
branch: master
specs:
ontologies_api_client (2.2.0)
@@ -109,7 +109,7 @@ GEM
bugsnag (6.27.1)
concurrent-ruby (~> 1.0)
builder (3.3.0)
- capistrano (3.19.1)
+ capistrano (3.19.2)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
@@ -151,7 +151,7 @@ GEM
addressable
csv (3.3.0)
dalli (3.2.8)
- date (3.3.4)
+ date (3.4.0)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
@@ -162,7 +162,7 @@ GEM
ed25519 (1.3.0)
erubi (1.13.0)
erubis (2.7.0)
- excon (0.112.0)
+ excon (1.2.0)
execjs (2.10.0)
faraday (2.0.1)
faraday-net_http (~> 2.0)
@@ -181,7 +181,7 @@ GEM
sass-rails
globalid (1.2.1)
activesupport (>= 6.1)
- graphql (2.3.19)
+ graphql (2.4.3)
base64
fiber-storage
graphql-client (0.23.0)
@@ -195,7 +195,7 @@ GEM
activesupport (>= 5.1)
haml (>= 4.0.6)
railties (>= 5.1)
- hashdiff (1.1.1)
+ hashdiff (1.1.2)
hashie (5.0.0)
highline (2.1.0)
html2haml (2.3.0)
@@ -243,7 +243,7 @@ GEM
railties (>= 3.2.16)
jsbundling-rails (1.3.1)
railties (>= 6.0.0)
- json (2.7.4)
+ json (2.8.1)
json-jwt (1.16.7)
activesupport (>= 4.2)
aes_key_wrap
@@ -296,10 +296,10 @@ GEM
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
- mime-types-data (3.2024.1001)
+ mime-types-data (3.2024.1105)
mini_mime (1.1.5)
minitest (5.25.1)
- msgpack (1.7.3)
+ msgpack (1.7.5)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.4.1)
@@ -309,7 +309,7 @@ GEM
time
net-http (0.3.2)
uri
- net-imap (0.4.17)
+ net-imap (0.4.18)
date
net-protocol
net-pop (0.1.2)
@@ -324,8 +324,8 @@ GEM
net-protocol
net-ssh (7.3.0)
netrc (0.11.0)
- newrelic_rpm (9.14.0)
- nio4r (2.7.3)
+ newrelic_rpm (9.15.0)
+ nio4r (2.7.4)
nokogiri (1.15.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.6-x86_64-linux)
@@ -337,7 +337,7 @@ GEM
rack (>= 1.2, < 4)
snaky_hash (~> 2.0)
version_gem (~> 1.1)
- oj (3.16.6)
+ oj (3.16.7)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omniauth (2.1.2)
@@ -378,16 +378,16 @@ GEM
validate_email
validate_url
webfinger (~> 2.0)
- ostruct (0.6.0)
+ ostruct (0.6.1)
parallel (1.26.3)
- parser (3.3.5.0)
+ parser (3.3.6.0)
ast (~> 2.4.1)
racc
popper_js (1.16.1)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
- psych (5.1.2)
+ psych (5.2.0)
stringio
public_suffix (5.1.1)
puma (5.6.9)
@@ -427,7 +427,7 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
- rails-i18n (7.0.9)
+ rails-i18n (7.0.10)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.0.4)
@@ -448,7 +448,7 @@ GEM
json
redcarpet (3.6.0)
regexp_parser (2.9.2)
- reline (0.5.10)
+ reline (0.5.11)
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
@@ -458,7 +458,7 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.3.9)
- rouge (4.4.0)
+ rouge (4.5.1)
rspec-core (3.13.2)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
@@ -467,7 +467,7 @@ GEM
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
- rspec-rails (7.0.1)
+ rspec-rails (7.1.0)
actionpack (>= 7.0)
activesupport (>= 7.0)
railties (>= 7.0)
@@ -476,7 +476,7 @@ GEM
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
- rubocop (1.67.0)
+ rubocop (1.68.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
@@ -486,7 +486,7 @@ GEM
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
- rubocop-ast (1.32.3)
+ rubocop-ast (1.35.0)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
@@ -509,7 +509,7 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
- sexp_processor (4.17.2)
+ sexp_processor (4.17.3)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
@@ -539,7 +539,7 @@ GEM
stimulus-rails (1.3.4)
railties (>= 6.0.0)
string-similarity (2.1.0)
- stringio (3.1.1)
+ stringio (3.1.2)
swd (2.0.3)
activesupport (>= 3)
attr_required (>= 0.0.5)
@@ -552,9 +552,9 @@ GEM
execjs (>= 0.3.0, < 3)
thor (1.3.2)
tilt (2.4.0)
- time (0.4.0)
+ time (0.4.1)
date
- timeout (0.4.1)
+ timeout (0.4.2)
turbo-rails (2.0.11)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
@@ -562,7 +562,7 @@ GEM
concurrent-ruby (~> 1.0)
unaccent (0.4.0)
unicode-display_width (2.6.0)
- uri (0.13.1)
+ uri (1.0.1)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
@@ -648,9 +648,9 @@ DEPENDENCIES
omniauth
omniauth-github
omniauth-google-oauth2
- omniauth-keycloak
+ omniauth-keycloak (~> 1.4)
omniauth-orcid
- omniauth-rails_csrf_protection
+ omniauth-rails_csrf_protection (~> 1.0, >= 1.0.1)
ontologies_api_client!
openid_connect (~> 2.2.0)
pry
diff --git a/app/assets/images/icons/x.svg b/app/assets/images/icons/x.svg
new file mode 100644
index 0000000000..e2eb4122bf
--- /dev/null
+++ b/app/assets/images/icons/x.svg
@@ -0,0 +1,6 @@
+
diff --git a/app/assets/images/static/lucia.png b/app/assets/images/static/lucia.png
new file mode 100644
index 0000000000..aae03c441b
Binary files /dev/null and b/app/assets/images/static/lucia.png differ
diff --git a/app/assets/stylesheets/components/tree_view.scss b/app/assets/stylesheets/components/tree_view.scss
index 1582b9c3a3..26c507e6f5 100644
--- a/app/assets/stylesheets/components/tree_view.scss
+++ b/app/assets/stylesheets/components/tree_view.scss
@@ -37,7 +37,7 @@ a.tree-link {
padding: 5px;
word-break: break-all;
text-wrap: wrap;
- color: var(--primary-color) !important;
+ color: var(--primary-color);
}
a.tree-link.active {
@@ -167,4 +167,4 @@ color: black;
}
.simpleTree a:hover {
cursor: pointer;
-}
\ No newline at end of file
+}
diff --git a/app/assets/stylesheets/login.scss b/app/assets/stylesheets/login.scss
index f77d8a6b71..0577319d0d 100644
--- a/app/assets/stylesheets/login.scss
+++ b/app/assets/stylesheets/login.scss
@@ -1,5 +1,6 @@
.login-form{
margin-top: 10px;
+ margin-bottom: 40px;
padding: 37px 41px;
box-shadow: rgba(0, 0, 0, 0.08) 0px 20px 50px;
border-radius: 14px;
@@ -60,4 +61,4 @@
}
.login-active-sso path{
fill: var(--primary-color)
-}
\ No newline at end of file
+}
diff --git a/app/assets/stylesheets/ontologies.scss b/app/assets/stylesheets/ontologies.scss
index 3b71432d37..e68fa8db16 100644
--- a/app/assets/stylesheets/ontologies.scss
+++ b/app/assets/stylesheets/ontologies.scss
@@ -110,7 +110,7 @@ $widget-table-border-color: #EFEFEF;
.ont-section-toolbar {
display: flex;
- align-items: baseline;
+ align-items: center;
}
.ont-metadata-card {
diff --git a/app/assets/stylesheets/theme-variables.scss.erb b/app/assets/stylesheets/theme-variables.scss.erb
index 9d657a29bd..7dfe15fa0b 100644
--- a/app/assets/stylesheets/theme-variables.scss.erb
+++ b/app/assets/stylesheets/theme-variables.scss.erb
@@ -32,7 +32,7 @@
}
<% when "ecoportal" %>
:root{
- --primary-color: #0f4e8a;
+ --primary-color: #0F4E8A;
--hover-color: #0f4e8a;
--secondary-color: #ffc107;
--light-color: #F1F6FA;
@@ -56,8 +56,3 @@
--bg-warning-light-color: rgba(234, 179, 8, 0.1);
--bg-success-light-color: rgba(34, 197, 94, 0.1);
}
-
-
-
-
-
diff --git a/app/components/tree_link_component.rb b/app/components/tree_link_component.rb
index fd23706d96..f16ed15035 100644
--- a/app/components/tree_link_component.rb
+++ b/app/components/tree_link_component.rb
@@ -3,7 +3,7 @@
class TreeLinkComponent < ViewComponent::Base
include MultiLanguagesHelper, ModalHelper, ApplicationHelper
- def initialize(child:, href:, children_href:, selected: false, data: {}, muted: false, target_frame: nil, open_in_modal: false, is_reused: nil)
+ def initialize(child:, href:, children_href:, selected: false, data: {}, tooltip: nil , muted: false, target_frame: nil, open_in_modal: false, is_reused: nil)
super
@child = child
@@ -13,7 +13,7 @@ def initialize(child:, href:, children_href:, selected: false, data: {}, muted:
@children_link = children_href
@pref_label_html, @tooltip = node_label(child)
-
+ @tooltip = "#{tooltip} #{@tooltip}" if tooltip
@data ||= { controller: 'tooltip', 'tooltip-position-value': 'right', turbo: true, 'turbo-frame': target_frame, action: 'click->simple-tree#select' }
@data.merge!(data) do |_, old, new|
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 264ee5cb75..ed57a95b92 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -298,7 +298,10 @@ def process_doi_requests
if params['actions'].nil? || params['actions'].empty?
response[:errors] = "No operation 'actions' was specified in params for request processing"
else
- response = process_identifier_requests('processed', 'processing', params['actions'])
+ response = process_identifier_requests('processed', 'processing',
+ params['actions'],
+ helpers.current_user.name,
+ helpers.portal_name)
end
if !response[:errors].blank?
diff --git a/app/controllers/concerns/doi_request_administration.rb b/app/controllers/concerns/doi_request_administration.rb
index 8bffd6b0a6..73273b617f 100644
--- a/app/controllers/concerns/doi_request_administration.rb
+++ b/app/controllers/concerns/doi_request_administration.rb
@@ -16,7 +16,7 @@ def doi_requests
doi_requests_data_parsed = JSON.parse(doi_requests_data, symbolize_names: true)
- doi_requests_result = doi_requests_data_parsed.map{ |req| new_doi_request_hash(req) }
+ doi_requests_result = doi_requests_data_parsed.map { |req| new_doi_request_hash(req) }
response[:doi_requests] = doi_requests_result
response[:success] = 'DOI requests list generated'
@@ -27,14 +27,14 @@ def doi_requests
response
end
- def process_identifier_requests(success_keyword, error_keyword, action)
+ def process_identifier_requests(success_keyword, error_keyword, action, current_user, portal_name)
response = { errors: '', success: '' }
if params['doi_requests'].nil? || params['doi_requests'].empty?
response[:errors] = 'No doi_requests parameter passed. Syntax: ?doi_requests=req1,req2,...,reqN'
else
- doi_requests = params['doi_requests'].split(',').map { |o| o.strip }
+ doi_requests = params['doi_requests'].split(',').map(&:strip)
doi_requests.each do |request_id|
begin
doi_request = LinkedData::Client::Models::IdentifierRequest.find(request_id)
@@ -44,7 +44,7 @@ def process_identifier_requests(success_keyword, error_keyword, action)
error_response = nil
case action
when 'process'
- error_response = process_doi(doi_request)
+ error_response = process_doi(doi_request, current_user, portal_name)
when 'reject'
error_response = change_request_status(doi_request, 'REJECTED') unless error_response
else
@@ -64,38 +64,40 @@ def process_identifier_requests(success_keyword, error_keyword, action)
else
response[:errors] << "Request #{request_id} was not found in the system, "
end
- rescue Exception => e
+ rescue StandardError => e
response[:errors] << "Problem #{error_keyword} Request #{request_id} - #{e.class}: #{e.message}, "
end
end
response[:success] = response[:success][0...-2] unless response[:success].empty?
response[:errors] = response[:errors][0...-2] unless response[:errors].empty?
end
- response
+ response
end
private
- def process_doi(doi_request)
- doi_req_submission = doi_request.submission
+ def process_doi(doi_request, current_user, portal_name)
+ doi_req_submission = doi_request.submission
ont_submission_id = doi_req_submission.submissionId
- hash_metadata = data_cite_metadata_json(doi_req_submission.ontology, ont_submission_id)
+ hash_metadata = data_cite_metadata_json(doi_req_submission.ontology, ont_submission_id, current_user, portal_name)
if doi_request.requestType == 'DOI_CREATE'
satisfy_doi_creation_request(doi_request, hash_metadata, doi_req_submission)
elsif doi_request.requestType == 'DOI_UPDATE'
- #satisfy_doi_update_request(doi_request, hash_metadata)
+ # satisfy_doi_update_request(doi_request, hash_metadata)
end
end
- def data_cite_metadata_json( ontology, ont_submission_id)
+ def data_cite_metadata_json(ontology, ont_submission_id, current_user, portal_name)
ontology_acronym = ontology.acronym
sub_metadata_url = SUB_DATA_CITE_METADATA_URL.call(ontology_acronym, ont_submission_id)
hash_metadata = LinkedData::Client::HTTP.get(sub_metadata_url, {}, raw: true)
json = JSON.parse(hash_metadata, symbolize_names: true)
- json[:titles].each {|t| t.delete(:titleType) if t[:titleType].blank? }
- #json[:title] = ontology_name
- json[:url] = json[:url] || (helpers.ontologies_url + '/' +ontology_acronym)
+ json[:titles].each { |t| t.delete(:titleType) if t[:titleType].blank? }
+ json[:publisher] ||= portal_name
+ json[:creators] ||= [{ name: current_user }]
+
+ json[:url] = json[:url] || (helpers.ontologies_url + '/' + ontology_acronym)
json
end
@@ -122,13 +124,12 @@ def datacite_response_errors(error_hash)
return errors unless error_hash && error_hash.length > 0
errors = error_hash[:error]
- errors.to_a.map{|x,y| "#{x}: #{y}"}
+ errors.to_a.map { |x, y| "#{x}: #{y}" }
end
def satisfy_doi_creation_request(doi_request, hash_metadata, submission)
return OpenStruct.new({ errors: ['Ontology submission not found'] }) if submission.nil?
-
dc_response = DataciteCreatorService.new(hash_metadata).call
# If there is an error, returns it
@@ -152,7 +153,7 @@ def satisfy_doi_creation_request(doi_request, hash_metadata, submission)
end
def satisfy_doi_update_request(doi_request, hash_metadata)
- #Ecoportal::DataciteSrv.update_doi_information_to_datacite(hash_metadata.to_json)
+ # Ecoportal::DataciteSrv.update_doi_information_to_datacite(hash_metadata.to_json)
end
def change_request_status(doi_request, new_status)
diff --git a/app/controllers/oauth2_controller.rb b/app/controllers/oauth2_controller.rb
deleted file mode 100644
index 33a89ae7fb..0000000000
--- a/app/controllers/oauth2_controller.rb
+++ /dev/null
@@ -1,156 +0,0 @@
-class Oauth2Controller < ApplicationController
-
- skip_before_action :verify_authenticity_token
-
- def index
- # Sets the redirect properties
- if params[:redirect]
- # Get the original, encoded redirect
- uri = URI.parse(request.url)
- orig_params = Hash[uri.query.split("&").map {|e| e.split("=",2)}].symbolize_keys
- session[:redirect] = orig_params[:redirect]
- else
- session[:redirect] = request.referer
- end
-
- redirect_to login_index_path
- end
-
- def login
-
- client = build_oauth2_client
-
- session[:state] = SecureRandom.hex(16)
- session[:nonce] = SecureRandom.hex(16)
-
- # Authorization Request
- authorization_uri = client.authorization_uri(
- scope: [],
- state: session[:state],
- nonce: session[:nonce]
- )
- redirect_to authorization_uri, allow_other_host: true
- end
-
- def authorize_callback
- # Parameter checking
- code = params[:code]
- state = params[:state]
-
- @errors = []
-
- if code.nil?
- @errors.append("Missing code
argument in the callback from the Identity Provider")
- end
-
- if state.nil?
- @errors.append("Missing state
argument in the callback from the Identity Provider")
- end
-
- if state != session[:state]
- @errors.append("The state
argument in the callback from the Identity Provider does not match the expected value")
- end
-
- unless @errors.empty?
- flash[:notice] = @errors.join("
").html_safe
- redirect_to_home
- end
-
- # Request tokens
- client = build_oauth2_client
- client.authorization_code = code
-
- access_token = client.access_token!
-
- # Authenticate the user with the access token to obtain the apikey
- #
- logged_in_user = LinkedData::Client::HTTP.post("#{LinkedData::Client.settings.rest_url}/users/authenticate", { token: access_token.access_token })
- logged_in_user.id_token = access_token.id_token
-
- if logged_in_user && !logged_in_user.errors
- loginInternal(logged_in_user)
- redirect = "/"
-
- if session[:redirect]
- redirect = CGI.unescape(session[:redirect])
- end
-
- redirect_to redirect
- else
- errorMsg = "Login Failed"
- if logged_in_user&.errors
- errorMsg += "
"
- errorMsg += logged_in_user.errors.join("
")
- end
- flash[:error] = errorMsg.html_safe
- redirect_to_home
- end
- end
-
- def loginInternal(user)
- return unless user
- session[:user] = user
- custom_ontologies_text = session[:user].customOntology && !session[:user].customOntology.empty? ? "The display is now based on your Custom Ontology Set." : ""
- notice = "Welcome " + user.username.to_s + "! " + custom_ontologies_text
- flash[:success] = notice.html_safe
- end
-
- def logout
-
- redirect = request.referer || "/"
- external_redirect_allowed = false
-
- # Delete internal security context
-
- if session[:admin_user]
- old_user = session[:user]
- session[:user] = session[:admin_user]
- session.delete(:admin_user)
- flash[:success] = "Logged out #{old_user.username}, returned to #{session[:user].username}".html_safe
- else
- idt = session[:user]&.id_token
-
- session[:user] = nil
- flash[:success] = "You have successfully logged out"
-
- if redirect == "/"
- redirect = request.protocol + request.host_with_port + "/"
- end
- redirect = build_url_with_params(@@configStruct.end_session_endpoint, {client_id: @@configStruct.client_id, id_token_hint: idt, post_logout_redirect_uri: redirect})
- end
-
- # Start an RP-initiated logout process
- redirect_to redirect, allow_other_host: true
- end
-
- def self.config(&block)
- raise "missing code block" unless block_given?
- @@configStruct = OpenStruct.new
-
- yield @@configStruct
- end
-
- private
-
- def build_oauth2_client
- raise 'OAUTH2 has not been configured' unless @@configStruct
- OpenIDConnect::Client.new(
- identifier: @@configStruct.client_id,
- secret: @@configStruct.client_secret,
- redirect_uri: request.protocol + request.host_with_port + "/oauth2/authorize_callback",
- host: @@configStruct.host,
- authorization_endpoint: @@configStruct.authorization_endpoint,
- token_endpoint: @@configStruct.token_endpoint,
- userinfo_endpoint: @@configStruct.userinfo_endpoint
- )
- end
-
- def build_url_with_params(url, params)
- # See https://stackoverflow.com/a/26867426
- uri = URI.parse(url)
- new_query_ar = URI.decode_www_form(uri.query || '')
- params.each_key { |k| new_query_ar << [k, params[k]] }
- uri.query = URI.encode_www_form(new_query_ar)
- uri.to_s
- end
-end
\ No newline at end of file
diff --git a/app/controllers/taxonomy_controller.rb b/app/controllers/taxonomy_controller.rb
index b3afa2542a..c75dab259a 100644
--- a/app/controllers/taxonomy_controller.rb
+++ b/app/controllers/taxonomy_controller.rb
@@ -34,6 +34,7 @@ def nest_categories_children(categories)
categories.each do |category|
category[:parentCategory].each do |parent_id|
parent = category_index[parent_id]
+ next unless parent
parent[:children] ||= []
parent[:children] << category
end
diff --git a/app/helpers/components_helper.rb b/app/helpers/components_helper.rb
index 97fded4d03..318c7b6f1e 100644
--- a/app/helpers/components_helper.rb
+++ b/app/helpers/components_helper.rb
@@ -1,13 +1,13 @@
module ComponentsHelper
include TermsReuses
- def dropdown_component(id: ,title: nil, tooltip:nil , is_open: false, &block)
+ def dropdown_component(id:, title: nil, tooltip: nil, is_open: false, &block)
render DropdownContainerComponent.new(id: id, title: title, tooltip: tooltip, is_open: is_open) do |d|
capture(d, &block) if block_given?
end
end
- def portal_button(name: nil , color: nil , light_color: nil, link: nil, tooltip: nil)
+ def portal_button(name: nil, color: nil, light_color: nil, link: nil, tooltip: nil)
render FederatedPortalButtonComponent.new(name: name, color: color, link: link, tooltip: tooltip, light_color: light_color)
end
@@ -20,13 +20,13 @@ def alert_component(message, type: "info")
render Display::AlertComponent.new(type: type, message: message)
end
- def chips_component(id: , name: , label: , value: , checked: false , tooltip: nil, disabled: false, &block)
+ def chips_component(id:, name:, label:, value:, checked: false, tooltip: nil, disabled: false, &block)
content_tag(:div, data: { controller: 'tooltip' }, title: tooltip) do
check_input(id: id, name: name, value: value, label: label, checked: checked, disabled: disabled, &block)
end
end
- def group_chip_component(id: nil, name: , object: , checked: , value: nil, title: nil, disabled: false, &block)
+ def group_chip_component(id: nil, name:, object:, checked:, value: nil, title: nil, disabled: false, &block)
title ||= object["name"]
value ||= (object["value"] || object["acronym"] || object["id"])
@@ -34,7 +34,8 @@ def group_chip_component(id: nil, name: , object: , checked: , value: nil, title
checked: checked,
value: value, tooltip: title, disabled: disabled, &block)
end
- alias :category_chip_component :group_chip_component
+
+ alias :category_chip_component :group_chip_component
def rdf_highlighter_container(format, content)
render Display::RdfHighlighterComponent.new(format: format, text: content)
@@ -48,26 +49,26 @@ def check_resolvability_container(url)
end
end
- def search_page_input_component(name:, value: nil, placeholder: , button_icon: 'icons/search.svg', type: 'text', &block)
+ def search_page_input_component(name:, value: nil, placeholder:, button_icon: 'icons/search.svg', type: 'text', &block)
content_tag :div, class: 'search-page-input-container', data: { controller: 'reveal' } do
search_input = content_tag :div, class: 'search-page-input' do
concat text_field_tag(name, value, type: type, placeholder: placeholder)
concat(content_tag(:div, class: 'search-page-button') do
- render Buttons::RegularButtonComponent.new(id:'search-page-button', value: "Search", variant: "primary", type: "submit") do |btn|
- btn.icon_right { inline_svg_tag button_icon}
+ render Buttons::RegularButtonComponent.new(id: 'search-page-button', value: "Search", variant: "primary", type: "submit") do |btn|
+ btn.icon_right { inline_svg_tag button_icon }
end
end)
end
- options = block_given? ? capture(&block) : ''
+ options = block_given? ? capture(&block) : ''
(search_input + options).html_safe
end
end
- def paginated_list_component(id:, results:, next_page_url:, child_url:, child_turbo_frame:, child_param:, open_in_modal: false , selected: nil, auto_click: false, submission: nil)
+ def paginated_list_component(id:, results:, next_page_url:, child_url:, child_turbo_frame:, child_param:, open_in_modal: false, selected: nil, auto_click: false, submission: nil)
render(TreeInfiniteScrollComponent.new(
- id: id,
+ id: id,
collection: results.collection,
next_url: next_page_url,
current_page: results.page,
@@ -86,13 +87,13 @@ def paginated_list_component(id:, results:, next_page_url:, child_url:, child_tu
if concepts && !concepts.empty?
concepts.each do |concept|
concept.id = concept["@id"] unless concept.id
- data = { child_param => concept.id }
+ data = { child_param => concept.id }
href = child_url.include?('?') ? "#{child_url}&id=#{escape(concept.id)}" : "#{child_url}?id=#{escape(concept.id)}"
concat(render(TreeLinkComponent.new(
child: concept,
href: href,
children_href: '#',
- selected: selected.blank? ? false : concept.id.eql?(selected) ,
+ selected: selected.blank? ? false : concept.id.eql?(selected),
target_frame: child_turbo_frame,
data: data,
open_in_modal: open_in_modal,
@@ -111,7 +112,7 @@ def resolvability_check_tag(url)
end
def rounded_button_component(link)
- render RoundedButtonComponent.new(link: link, target: '_blank',size: 'small',title: t("components.go_to_api"))
+ render RoundedButtonComponent.new(link: link, target: '_blank', size: 'small', title: t("components.go_to_api"))
end
def copy_link_to_clipboard(url, show_content: false)
@@ -129,7 +130,7 @@ def generated_link_to_clipboard(url, acronym)
def htaccess_tag(acronym)
content_tag(:span, 'data-controller': 'tooltip', style: 'display: inline-block; width: 18px;', title: "See #{t("ontologies.htaccess_modal_title", acronym: acronym)}") do
- link_to_modal(nil, "/ontologies/#{acronym}/htaccess", data: {show_modal_title_value: "#{t("ontologies.htaccess_modal_title", acronym: acronym)}", show_modal_size_value: 'modal-xl'}) do
+ link_to_modal(nil, "/ontologies/#{acronym}/htaccess", data: { show_modal_title_value: "#{t("ontologies.htaccess_modal_title", acronym: acronym)}", show_modal_size_value: 'modal-xl' }) do
inline_svg_tag("icons/copy_link.svg")
end
end
@@ -160,9 +161,11 @@ def tree_component(root, selected, target_frame:, sub_tree: false, id: nil, auto
raise ArgumentError, t('components.error_block')
end
+ is_not_in_current_scheme = child.isInActiveScheme&.empty?
tree_child.child(child: child, href: href,
children_href: children_link, selected: child.id.eql?(selected&.id),
- muted: child.isInActiveScheme&.empty?,
+ muted: is_not_in_current_scheme,
+ tooltip: is_not_in_current_scheme ? 'Not in the current scheme' : nil,
target_frame: target_frame,
data: data, is_reused: concept_reused?(submission: submission, concept_id: child.id)) do
tree_component(child, selected, target_frame: target_frame, sub_tree: true,
@@ -189,7 +192,7 @@ def chart_component(title: '', type:, labels:, datasets:, index_axis: 'x', show_
content_tag(:canvas, nil, data: data)
end
- def loader_component(type:'pulsing', small: false )
+ def loader_component(type: 'pulsing', small: false)
render LoaderComponent.new(type: type, small: small)
end
@@ -208,7 +211,7 @@ def properties_list_component(c, properties, truncate: true, &block)
content = if block_given?
capture(values, &block)
else
- if Array(values).any?{|v| link?(v)}
+ if Array(values).any? { |v| link?(v) }
horizontal_list_container(values, truncate: truncate) { |v| link?(v) ? render(LinkFieldComponent.new(value: v)) : v }
else
Array(values).join(', ')
@@ -269,7 +272,7 @@ def properties_dropdown(id, title, tooltip, properties, is_open: false, &block)
end
def regular_button(id, value, variant: "secondary", state: "regular", size: "slim", &block)
- render Buttons::RegularButtonComponent.new(id:id, value: value, variant: variant, state: state, size: size) do |btn|
+ render Buttons::RegularButtonComponent.new(id: id, value: value, variant: variant, state: state, size: size) do |btn|
capture(btn, &block) if block_given?
end
end
@@ -292,7 +295,7 @@ def form_cancel_button
def text_with_icon(text:, icon:)
content_tag(:div, class: 'd-flex align-items-center icon') do
- inline_svg_tag(icon, height: '18', weight: '18') + content_tag(:div, class: 'text') {text}
+ inline_svg_tag(icon, height: '18', weight: '18') + content_tag(:div, class: 'text') { text }
end
end
end
diff --git a/app/helpers/fair_score_helper.rb b/app/helpers/fair_score_helper.rb
index 15227866cf..85e1aed8ea 100644
--- a/app/helpers/fair_score_helper.rb
+++ b/app/helpers/fair_score_helper.rb
@@ -20,7 +20,7 @@ def get_fairness_json(ontologies_acronyms, apikey = user_apikey)
begin
time = Benchmark.realtime do
conn = Faraday.new do |conn|
- conn.options.timeout = 30
+ conn.options.timeout = 10
end
response = conn.get(get_fairness_service_url(apikey) + "&ontologies=#{ontologies_acronyms}&combined")
if response.status.eql?(200)
@@ -195,4 +195,3 @@ def read_large_data(key)
end
end
-
diff --git a/app/helpers/federation_helper.rb b/app/helpers/federation_helper.rb
index d961712bc0..14e966037c 100644
--- a/app/helpers/federation_helper.rb
+++ b/app/helpers/federation_helper.rb
@@ -125,8 +125,7 @@ def alert_message_if_federation_error(errors, &block)
def class_federation_configuration(class_object)
is_external = federation_external_class?(class_object)
- portal_name = is_external ? helpers.portal_name_from_uri(class_object.links['ui']) : nil
-
+ portal_name = is_external ? helpers.portal_name_from_uri(class_object.links['ui']) : helpers.portal_name
result = {
portal_name: portal_name,
portal_color: is_external ? federated_portal_color(portal_name) : nil,
diff --git a/app/helpers/ontologies_helper.rb b/app/helpers/ontologies_helper.rb
index 1c6180b6f1..3cbf228ddb 100644
--- a/app/helpers/ontologies_helper.rb
+++ b/app/helpers/ontologies_helper.rb
@@ -143,7 +143,7 @@ def social_share_link(ont, sharer)
data-sharer='#{sharer.downcase}'
data-title='#{ont.name}'
data-url='#{CGI::escapeHTML($UI_URL + ontology_path(ont.acronym))}'>
-
+ #{sharer.downcase.eql?('twitter') ? inline_svg_tag('icons/x.svg', width: '21px', height: '18px') : ""}
HTML
.html_safe
diff --git a/app/services/datacite_creator_service.rb b/app/services/datacite_creator_service.rb
index e7331a8c5c..84e877f253 100644
--- a/app/services/datacite_creator_service.rb
+++ b/app/services/datacite_creator_service.rb
@@ -30,7 +30,6 @@ def create_new_doi_from_data_cite(json_metadata)
attributes: json_metadata
}
}
-
url = URI(@url)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
@@ -42,6 +41,7 @@ def create_new_doi_from_data_cite(json_metadata)
request.body = data_cite_hash.to_json
response = http.request(request)
+
json_response = response.read_body
# convert response as json if response is a string containing a json
json_response = JSON.parse(json_response) if json_response.is_a?(String) && json_response.start_with?('{')
diff --git a/app/views/home/cookies.html.haml b/app/views/home/cookies.html.haml
index 453490073b..eb08a7e681 100644
--- a/app/views/home/cookies.html.haml
+++ b/app/views/home/cookies.html.haml
@@ -1,5 +1,5 @@
= turbo_frame_tag :cookies_modal do
- - if session[:cookies_accepted].nil? # don't re-render if a true/false selected
+ - if cookies[:cookies_accepted].nil? # don't re-render if a true/false selected
%section.cookies-modal
%h4
= t('cookies_modal.title')
diff --git a/app/views/login/index.html.haml b/app/views/login/index.html.haml
index 0d39f910b2..c05ce8ba4e 100644
--- a/app/views/login/index.html.haml
+++ b/app/views/login/index.html.haml
@@ -19,16 +19,18 @@
= t('login.no_account')
%a.text-decoration-none{:href => new_user_path}= t('login.register')
%hr.divider.w-100.mb-4.mt-4
- %div.d-flex.justify-content-around.flew-wrap
+ %p.dont-have-account
+ Or connect using
+ %div.d-flex.justify-content-center.flew-wrap
- omniauth_providers_info.each do |provider, config|
- if config[:enable]
= button_to "/auth/#{config[:name] || config[:strategy] || provider}",
- class: 'btn btn-lg',disabled: !config[:enable] ,style:'width: 70px', title: t('login.login_with_provider', provider: provider.to_s.humanize), 'data-turbo': false do;
+ class: 'btn btn-lg', disabled: !config[:enable] , title: t('login.login_with_provider', provider: provider.to_s.humanize), 'data-turbo': false do;
- if config[:icon]
- = inline_svg "icons/#{config[:icon]}", class: 'login-active-sso'
+ = inline_svg "#{config[:icon]}", class: 'login-active-sso'
- else
= provider.to_s.humanize
- else
.disabled-login-sso
= render Display::InfoTooltipComponent.new(text: "#{provider.to_s.humanize} is disabled") do
- = inline_svg "icons/#{config[:icon]}", width: "40", height: "40"
\ No newline at end of file
+ = inline_svg "icons/#{config[:icon]}", width: "40", height: "40"
diff --git a/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml b/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml
index 520c39d8fe..dff44cffed 100644
--- a/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml
+++ b/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml
@@ -66,7 +66,7 @@
- l.row do
%section.ont-metadata-card.ont-socialshare-card
%div.ont-section-toolbar
- %span.pb-2 Share on socials
+ %span Share on socials
= social_share_link(@ontology, "Facebook")
= social_share_link(@ontology, "Twitter")
= social_share_link(@ontology, "LinkedIn")
@@ -85,4 +85,3 @@
%div.text-center.w-50
= link_to_modal(nil, metadata_export_datacite_export_path(ontology: @ontology.acronym), {data: {show_modal_title_value: "DataCite metadata", show_modal_size_value: 'modal-xl' }}) do
Export to DataCite
-
diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml
index 55bdb61edc..70b60ff551 100644
--- a/app/views/projects/_form.html.haml
+++ b/app/views/projects/_form.html.haml
@@ -51,7 +51,4 @@
%th= t('projects.form.description')
%td= text_area :project, :description, value: @project.description, :rows=>6, :class=>"required", :tabindex => 6
%div#ontology_picker_project{style: "padding-top: 2em;"}
- - selected_ontologies = @project.ontologyUsed && @project.ontologyUsed.map {|id| id.split('/').last } || []
- - locals = { sel_text: t('projects.form.select_ontologies'), selected_ontologies: selected_ontologies, form_object: :project, form_attribute: "ontologyUsed" }
- = ontologies_selector(id:'projects_page_ontologies_selector' ,name: 'project[ontologyUsed][]', selected: @usedOntologies)
-
+ = ontologies_selector(id:'projects_page_ontologies_selector' , label: t('projects.form.select_ontologies'), name: 'project[ontologyUsed][]', selected: @usedOntologies)
diff --git a/app/views/static_pages/team.html.haml b/app/views/static_pages/team.html.haml
index c9b1475bc9..1c54184415 100644
--- a/app/views/static_pages/team.html.haml
+++ b/app/views/static_pages/team.html.haml
@@ -23,7 +23,7 @@
%p ilaria.rosati[at]cnr.it
.team-card
%div.team-card-image
- %img{alt: 'Lucia Vaira', src: 'https://cdn-djihj.nitrocdn.com/IeGNEtFQTgDNmjBKutlxatJePkfnEidb/assets/images/optimized/rev-e5da706/www.lifewatchitaly.eu/wp-content/uploads/LuciaVaira.jpg'}
+ %img{alt: 'Lucia Vaira', src: asset_path('static/lucia.png')}
%div.team-card-content
%h4 Lucia Vaira
%p Data and Service Architect
diff --git a/config/deploy.rb b/config/deploy.rb
index 6f44754159..798755a80e 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -5,42 +5,20 @@
set :deploy_via, :remote_cache
-# Default branch is :master
-# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
-
-# default deployment branch is master which can be overwritten with BRANCH env var
-# BRANCH env var can be set to specific branch of tag, i.e 'v6.8.1'
# Default deploy_to directory is /var/www/my_app
set :deploy_to, "/srv/ontoportal/bioportal_web_ui"
-# Default value for :scm is :git
-# set :scm, :git
-
-# Default value for :format is :pretty
-# set :format, :pretty
-
# Default value for :log_level is :debug
set :log_level, :error
-# Default value for :pty is false
-# set :pty, true
-
-# Default value for :linked_files is []
-# set :linked_files, %w{config/bioportal_config.rb config/database.yml public/robots.txt}
-
# Default value for linked_dirs is []
-# set :linked_dirs, %w{bin log tmp/pids tmp/cache public/system public/assets config/locales}
set :linked_dirs, %w{log tmp/pids tmp/cache}
append :linked_files, 'config/database.yml', 'config/bioportal_config_appliance.rb'
-#append :linked_dirs, 'log', 'tmp', '.bundle'
append :linked_files, 'config/secrets.yml', 'config/site_config.rb','config/credentials/appliance.key', 'config/credentials/appliance.yml.enc'
-# Default value for default_env is {}
-# set :default_env, { path: "/opt/ruby/bin:$PATH" }
-# Default value for keep_releases is 5
set :keep_releases, 5
set :bundle_without, 'development:test'
set :bundle_config, { deployment: true }
@@ -53,86 +31,9 @@
# If you want to restart using `touch tmp/restart.txt`, add this to your config/deploy.rb:
set :passenger_restart_with_touch, true
-# If you want to restart using `passenger-config restart-app`, add this to your config/deploy.rb:
-# set :passenger_restart_with_touch, false # Note that `nil` is NOT the same as `false` here
-# If you don't set `:passenger_restart_with_touch`, capistrano-passenger will check what version of passenger you are running
-# and use `passenger-config restart-app` if it is available in that version.
-
-# you can set custom ssh options
-# it's possible to pass any option but you need to keep in mind that net/ssh understand limited list of options
-# you can see them in [net/ssh documentation](http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start)
-# set it globally
-# set :ssh_options, {
-# keys: %w(/home/rlisowski/.ssh/id_rsa),
-# forward_agent: false,
-# auth_methods: %w(password)
-# }
-# and/or per server
-# server 'example.com',
-# user: 'user_name',
-# roles: %w{web app},
-# ssh_options: {
-# user: 'user_name', # overrides user setting above
-# keys: %w(/home/user_name/.ssh/id_rsa),
-# forward_agent: false,
-# auth_methods: %w(publickey password)
-# # password: 'please use keys'
-# }
-# setting per server overrides global ssh_options
-SSH_JUMPHOST = ENV.include?('SSH_JUMPHOST') ? ENV['SSH_JUMPHOST'] : 'jumpbox.hostname.com'
-SSH_JUMPHOST_USER = ENV.include?('SSH_JUMPHOST_USER') ? ENV['SSH_JUMPHOST_USER'] : 'username'
-
-JUMPBOX_PROXY = "#{SSH_JUMPHOST_USER}@#{SSH_JUMPHOST}"
-set :ssh_options, {
- user: 'ontoportal',
- forward_agent: 'true',
- keys: %w(config/deploy_id_rsa),
- auth_methods: %w(publickey),
- # use ssh proxy if UI servers are on a private network
- proxy: Net::SSH::Proxy::Command.new("ssh #{JUMPBOX_PROXY} -W %h:%p")
-}
-
-#private git repo for configuraiton
-PRIVATE_CONFIG_REPO = ENV.include?('PRIVATE_CONFIG_REPO') ? ENV['PRIVATE_CONFIG_REPO'] : 'https://your_github_pat_token@github.com/your_organization/ontoportal-configs.git'
-desc "Check if agent forwarding is working"
-task :forwarding do
- on roles(:all) do |h|
- if test("env | grep SSH_AUTH_SOCK")
- info "Agent forwarding is up to #{h}"
- else
- error "Agent forwarding is NOT up to #{h}"
- end
- end
-end
namespace :deploy do
- desc 'display remote system env vars'
- task :show_remote_env do
- on roles(:all) do
- remote_env = capture("env")
- puts remote_env
- end
- end
-
- desc 'Incorporate the bioportal_conf private repository content'
- # Get cofiguration from repo if PRIVATE_CONFIG_REPO env var is set
- # or get config from local directory if LOCAL_CONFIG_PATH env var is set
- task :get_config do
- if defined?(PRIVATE_CONFIG_REPO)
- TMP_CONFIG_PATH = "/tmp/#{SecureRandom.hex(15)}".freeze
- on roles(:app) do
- execute "git clone -q #{PRIVATE_CONFIG_REPO} #{TMP_CONFIG_PATH}"
- execute "rsync -a #{TMP_CONFIG_PATH}/#{fetch(:config_folder_path)}/ #{release_path}/"
- execute "rm -rf #{TMP_CONFIG_PATH}"
- end
- elsif defined?(LOCAL_CONFIG_PATH)
- on roles(:app) do
- execute "rsync -a #{LOCAL_CONFIG_PATH}/#{fetch(:application)}/ #{release_path}/"
- end
- end
- end
-
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
@@ -141,16 +42,5 @@
end
end
-
- #after :updating, :get_config
after :publishing, :restart
-
- after :restart, :clear_cache do
- on roles(:app), in: :groups, limit: 3, wait: 10 do
- # Here we can do anything such as:
- # within release_path do
- # execute :rake, 'cache:clear'
- # end
- end
- end
end
diff --git a/config/deploy/agroportal.rb b/config/deploy/agroportal.rb
deleted file mode 100644
index c01f3fb90a..0000000000
--- a/config/deploy/agroportal.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# Simple Role Syntax
-# ==================
-# Supports bulk-adding hosts to roles, the primary
-# server in each group is considered to be the first
-# unless any hosts have the primary property set.
-# Don't declare `role :all`, it's a meta role
-role :app, %w[agroportal.lirmm.fr]
-role :db, %w[agroportal.lirmm.fr] # sufficient to run db:migrate only on one system
-set :branch, ENV.include?('BRANCH') ? ENV['BRANCH'] : 'master'
-# Extended Server Syntax
-# ======================
-# This can be used to drop a more detailed server
-# definition into the server list. The second argument
-# something that quacks like a hash can be used to set
-# extended properties on the server.
-# server 'example.com', user: 'deploy', roles: %w{web app}, my_property: :my_value
-set :log_level, :error
diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb
deleted file mode 100644
index 47b158aec2..0000000000
--- a/config/deploy/staging.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# Simple Role Syntax
-# ==================
-# Supports bulk-adding hosts to roles, the primary
-# server in each group is considered to be the first
-# unless any hosts have the primary property set.
-# Don't declare `role :all`, it's a meta role
-role :app, %w{stageportal.lirmm.fr}
-role :db, %w{stageportal.lirmm.fr} # sufficient to run db:migrate only on one system
-set :branch, ENV.include?('BRANCH') ? ENV['BRANCH'] : 'stage'
-# Extended Server Syntax
-# ======================
-# This can be used to drop a more detailed server
-# definition into the server list. The second argument
-# something that quacks like a hash can be used to set
-# extended properties on the server.
-#server 'example.com', user: 'deploy', roles: %w{web app}, my_property: :my_value
-set :log_level, :error
diff --git a/config/deploy/test.rb b/config/deploy/test.rb
index fcbe1efcec..5d6d351840 100644
--- a/config/deploy/test.rb
+++ b/config/deploy/test.rb
@@ -1,17 +1,13 @@
-# Simple Role Syntax
-# ==================
-# Supports bulk-adding hosts to roles, the primary
-# server in each group is considered to be the first
-# unless any hosts have the primary property set.
-# Don't declare `role :all`, it's a meta role
-role :app, %w{testportal.lirmm.fr}
-role :db, %w{testportal.lirmm.fr} # sufficient to run db:migrate only on one system
-# Extended Server Syntax
-# ======================
-# This can be used to drop a more detailed server
-# definition into the server list. The second argument
-# something that quacks like a hash can be used to set
-# extended properties on the server.
-#server 'example.com', user: 'deploy', roles: %w{web app}, my_property: :my_value
-set :log_level, :error
-set :branch, ENV.include?('BRANCH') ? ENV['BRANCH'] : 'test'
+set :branch, 'master'
+set :server, 'ecoportal.lifewatchdev.eu'
+
+server fetch(:server), user: fetch(:user), roles: %w{web app}
+
+set :ssh_options, {
+ user: 'ontoportal',
+ forward_agent: 'true',
+ #keys: %w(config/deploy_id_rsa),
+ #auth_methods: %w(publickey),
+ # use ssh proxy if UI servers are on a private network
+ #proxy: Net::SSH::Proxy::Command.new('ssh deployer@sshproxy.ontoportal.org -W %h:%p')
+}
diff --git a/config/initializers/oauth2.rb b/config/initializers/oauth2.rb
deleted file mode 100644
index ab92ae7620..0000000000
--- a/config/initializers/oauth2.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-if $SSO_ENABLED
- # Oauth2Controller.config do |config|
- # idpMetadataJSON = JSON.parse(IO.read(Rails.root.join("config/oauth2/idp-configuration.json")), {symbolize_names: true})
- #
- # config.client_id = Rails.application.credentials.oauth2[:client_id]
- # config.client_secret = Rails.application.credentials.oauth2[:client_secret]
- # config.authorization_endpoint = idpMetadataJSON[:authorization_endpoint]
- # config.token_endpoint = idpMetadataJSON[:token_endpoint]
- # config.userinfo_endpoint = idpMetadataJSON[:userinfo_endpoint]
- # config.end_session_endpoint = idpMetadataJSON[:end_session_endpoint]
- # end
-end
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb
index c7c4027c3e..3ca7354cc6 100644
--- a/config/initializers/omniauth.rb
+++ b/config/initializers/omniauth.rb
@@ -1,5 +1,8 @@
Rails.application.config.middleware.use OmniAuth::Builder do
Array($OMNIAUTH_PROVIDERS).each do |provider, config|
- provider config[:strategy] || provider, config[:client_id], config[:client_secret], client_options: {}.merge(config[:client_options].to_h)
+ provider config[:strategy] || provider, config[:client_id],
+ config[:client_secret],
+ client_options: {}.merge(config[:client_options].to_h),
+ name: config[:name]
end
-end
\ No newline at end of file
+end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 7656f89ae3..a68931c7c9 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -386,7 +386,7 @@ en:
message: Thank you for taking the time to share your feedback with us. Our support team will review your message and get back to you as soon as possible with a response. We value your opinion and appreciate your help in improving our services. Thank you for your support!
suggest_slice: Suggest a new group/slice
slices_description: Slices allow users to interact (both via API or UI) only with a subset of ontologies in AgroPortal. If browsing the slice, all the portal features will be restricted to the chosen subset, enabling users to focus on their specific use cases. On AgroPortal, slices and groups are synchronized, so every group has a corresponding slice displaying only the ontologies from that group.
- ontoportal_description: "The OntoPortal Alliance %{ontoportal_link} is a consortium of research and infrastructure teams dedicated to promoting the development of ontology repositories and semantic artefact catalogues based on the open, collaboratively developed OntoPortal software %{github_link}. Hereafter are the current public and open repositories built with the technology maintained by the Alliance."
+ ontoportal_description: "The OntoPortal Alliance %{ontoportal_link} is a consortium of research and infrastructure teams dedicated to promoting the development of semantic resource repositories and semantic artefact catalogues based on the open, collaboratively developed OntoPortal software %{github_link}. Hereafter are the current public and open repositories built with the technology maintained by the Alliance."
viewing_slice: "Viewing the slice:"
view_full_site: View full website
landscape:
@@ -521,7 +521,7 @@ en:
enter_email: Enter your username
enter_password: Enter your password
forgot_password: Forgot password?
- private_ontology: This ontology is private. Please login.
+ private_ontology: This semantic resource is private. Please login.
no_account: Do not have an account?
password: Password
register: Register
@@ -558,7 +558,7 @@ en:
rest: A mapping added by a user using the REST API (or the UI, which is calling the API to create it)
same_uri: Created between 2 concepts with the same URI.
skos: Mappings based on SKOS relationships, (e.g. skos:exactMatch or skos:closeMatch)
- filter_ontologies: Filter ontologies in the bubble view
+ filter_ontologies: Filter semantic resources in the bubble view
filter_bubbles: Filter bubbles
external_mappings: "External Mappings (%{number_with_delimiter})"
interportal_mappings: "Interportal Mappings - %{acronym} (%{number_with_delimiter})"
@@ -901,7 +901,7 @@ en:
classes_with_definitions: Classes with definitions
show_advanced_options: Show options
hide_advanced_options: Hide options
- match_in: Match in %{results_size} ontologies from %{portals}
+ match_in: Match in %{results_size} semantic resources from %{portals}
ontologies: semantic resources
result_component:
details: Details
@@ -1018,11 +1018,11 @@ en:
and top concept assertion. %{link}
ontology_obo_language_link: the OBOinOWL parser.
ontology_obo_language_help: >
- OBO ontologies submitted to %{portal_name} will be parsed by the OWL-API which integrates %{link}
+ OBO semantic resources submitted to %{portal_name} will be parsed by the OWL-API which integrates %{link}
The resulting RDF triples will then be loaded in %{portal_name} triple-store.
ontology_owl_language_link: the Protégé
ontology_owl_language_help: >
- OWL ontologies submitted to %{portal_name} will be parsed by the OWL-API. An easy way to verify if your ontology will parse is to open it with
+ OWL semantic resources submitted to %{portal_name} will be parsed by the OWL-API. An easy way to verify if your semantic resource will parse is to open it with
%{link}
software which does use the same component.
@@ -1210,7 +1210,7 @@ en:
processing_message: |
We will now put your semantic resource in the queue to be processed. Please keep in mind that it may take up to several
hours before %{site} users will be able to explore and search your semantic resource.
- notification_message: "When your ontology is ready for viewing, you will receive an email notification and it will be available here:"
+ notification_message: "When your semantic resource is ready for viewing, you will receive an email notification and it will be available here:"
contact_support_at: "If you have any questions or problems, please email the %{site} support team at:"
collecting_data_message: We are still collecting data for %{acronym}
submit_new_ontology: Submit new semantic resource
@@ -1255,7 +1255,7 @@ en:
methodology_and_provenance: Methodology and provenance
community: Community
content: Content
- info_tooltip_properties_dropdown: Metadata properties primarily encompass the design, methods, and actions to create the ontology. This includes elements such as the tools and software employed by the creator of the ontology during its configuration.
+ info_tooltip_properties_dropdown: Metadata properties primarily encompass the design, methods, and actions to create the semantic resource. This includes elements such as the tools and software employed by the creator of the semantic resource during its configuration.
info_tooltip_community_dropdown: Metadata properties related to community information such as the code repository and issue tracker, the mailing list or the target audience. This includes also the Groups in %{site}. See more information about Groups and Categories.
visits: Visits
views: Views of %{acronym}
@@ -1484,4 +1484,4 @@ en:
federation:
results_from_external_portals: Results from external portals
not_responding: is not responding.
- check_status: Checking %{portal} availability
\ No newline at end of file
+ check_status: Checking %{portal} availability
diff --git a/config/settings.yml b/config/settings.yml
index 6c2194f525..24b138dd83 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -21,7 +21,7 @@ shared:
virtual_appliance: 'https://ontoportal.github.io/administration/'
widgets: 'http://www.bioontology.org/wiki/NCBO_Widgets'
mappings: 'https://www.bioontology.org/wiki/BioPortal_Help#Mappings_Tab'
- metadata_help: 'https://doc.jonquetlab.lirmm.fr/share/32c082ff-97f5-45f4-bafe-05f41c9a5ce4'
+ metadata_help: 'https://ontoportal.github.io/documentation/user_guide/metadata_schema/EcoPortal'
wiki: 'https://github.com/lifewatch-eric/documentation/wiki'
youtube: 'https://www.youtube.com/channel/UCP6ag3SoJ6oeisE7ibg4-pg'
diff --git a/db/schema.rb b/db/schema.rb
index 22dc2b318a..ec76487f77 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[7.0].define(version: 2020_09_21_120918) do
+ActiveRecord::Schema[7.0].define(version: 2023_11_30_210229) do
create_table "analytics", id: :integer, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "segment"
t.string "action"