Skip to content

Commit

Permalink
Merge pull request #7537 from scinote-eln/develop
Browse files Browse the repository at this point in the history
May 2024 Release
  • Loading branch information
artoscinote authored May 8, 2024
2 parents ddd939f + 6bcff08 commit f50725a
Show file tree
Hide file tree
Showing 45 changed files with 624 additions and 166 deletions.
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ source 'http://rubygems.org'

ruby '3.2.2'

gem 'activerecord-session_store'
gem 'bootsnap', require: false
gem 'devise', '~> 4.8.1'
gem 'devise_invitable'
Expand All @@ -24,7 +25,9 @@ gem 'omniauth', '~> 2.1'
gem 'omniauth-azure-activedirectory-v2'
gem 'omniauth-linkedin-oauth2'
gem 'omniauth-okta', git: 'https://github.com/scinote-eln/omniauth-okta', branch: 'org_auth_server_support'
gem 'omniauth_openid_connect'
gem 'omniauth-rails_csrf_protection', '~> 1.0'
gem 'omniauth-saml'

# Gems for API implementation
gem 'active_model_serializers', '~> 0.10.7'
Expand Down Expand Up @@ -91,7 +94,7 @@ gem 'graphviz'
gem 'cssbundling-rails'
gem 'jsbundling-rails'

gem 'tailwindcss-rails', '~> 2.0'
gem 'tailwindcss-rails', '~> 2.4'

gem 'base62' # Used for smart annotations
gem 'newrelic_rpm'
Expand Down
64 changes: 60 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ GEM
activesupport (= 7.0.8.1)
activerecord-import (1.4.1)
activerecord (>= 4.2)
activerecord-session_store (2.1.0)
actionpack (>= 6.1)
activerecord (>= 6.1)
cgi (>= 0.3.6)
multi_json (~> 1.11, >= 1.11.2)
rack (>= 2.0.8, < 4)
railties (>= 6.1)
activestorage (7.0.8.1)
actionpack (= 7.0.8.1)
activejob (= 7.0.8.1)
Expand All @@ -141,6 +148,7 @@ GEM
railties (>= 3.1)
aspector (0.14.0)
ast (2.4.2)
attr_required (1.0.1)
auto_strip_attributes (2.6.0)
activerecord (>= 4.0)
awesome_print (1.9.2)
Expand Down Expand Up @@ -219,6 +227,7 @@ GEM
mail
case_transform (0.2)
activesupport
cgi (0.4.1)
childprocess (4.1.0)
chunky_png (1.4.0)
coderay (1.1.3)
Expand Down Expand Up @@ -478,6 +487,25 @@ GEM
omniauth-rails_csrf_protection (1.0.1)
actionpack (>= 4.2)
omniauth (~> 2.0)
omniauth-saml (2.1.0)
omniauth (~> 2.0)
ruby-saml (~> 1.12)
omniauth_openid_connect (0.7.1)
omniauth (>= 1.9, < 3)
openid_connect (~> 2.2)
openid_connect (2.2.0)
activemodel
attr_required (>= 1.0.0)
faraday (~> 2.0)
faraday-follow_redirects
json-jwt (>= 1.16)
net-smtp
rack-oauth2 (~> 2.2)
swd (~> 2.0)
tzinfo
validate_email
validate_url
webfinger (~> 2.0)
orm_adapter (0.5.0)
overcommit (0.60.0)
childprocess (>= 0.6.3, < 5)
Expand Down Expand Up @@ -518,6 +546,13 @@ GEM
rack (>= 1.0, < 3)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-oauth2 (2.2.0)
activesupport
attr_required
faraday (~> 2.0)
faraday-follow_redirects
json-jwt (>= 1.11.0)
rack (>= 2.1.0)
rack-protection (3.0.6)
rack
rack-test (2.1.0)
Expand Down Expand Up @@ -626,6 +661,9 @@ GEM
rubocop (>= 1.33.0, < 2.0)
ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
ruby-saml (1.16.0)
nokogiri (>= 1.13.10)
rexml
ruby-vips (2.1.4)
ffi (~> 1.12)
rubyzip (2.3.2)
Expand Down Expand Up @@ -663,13 +701,18 @@ GEM
activesupport (>= 5.2)
sprockets (>= 3.0.0)
stream (0.5.5)
swd (2.0.2)
activesupport (>= 3)
attr_required (>= 0.0.5)
faraday (~> 2.0)
faraday-follow_redirects
sys-uname (1.2.3)
ffi (~> 1.1)
tailwindcss-rails (2.0.29)
tailwindcss-rails (2.4.0)
railties (>= 6.0.0)
tailwindcss-rails (2.0.29-arm64-darwin)
tailwindcss-rails (2.4.0-arm64-darwin)
railties (>= 6.0.0)
tailwindcss-rails (2.0.29-x86_64-linux)
tailwindcss-rails (2.4.0-x86_64-linux)
railties (>= 6.0.0)
thor (1.3.1)
tilt (2.2.0)
Expand All @@ -688,6 +731,12 @@ GEM
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
uniform_notifier (1.16.0)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
validate_url (1.0.15)
activemodel (>= 3.0.0)
public_suffix
uri (0.13.0)
version_gem (1.1.3)
view_component (3.9.0)
Expand All @@ -696,6 +745,10 @@ GEM
method_source (~> 1.0)
warden (1.2.9)
rack (>= 2.0.9)
webfinger (2.1.2)
activesupport
faraday (~> 2.0)
faraday-follow_redirects
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand All @@ -722,6 +775,7 @@ PLATFORMS
DEPENDENCIES
active_model_serializers (~> 0.10.7)
activerecord-import
activerecord-session_store
acts_as_list
ajax-datatables-rails (~> 0.3.1)
aspector
Expand Down Expand Up @@ -780,6 +834,8 @@ DEPENDENCIES
omniauth-linkedin-oauth2
omniauth-okta!
omniauth-rails_csrf_protection (~> 1.0)
omniauth-saml
omniauth_openid_connect
overcommit
pg (~> 1.5)
pg_search
Expand Down Expand Up @@ -814,7 +870,7 @@ DEPENDENCIES
simplecov
sneaky-save!
sprockets-rails
tailwindcss-rails (~> 2.0)
tailwindcss-rails (~> 2.4)
timecop
turbolinks (~> 5.2.0)
tzinfo-data
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.32.0.2
1.33.0
15 changes: 9 additions & 6 deletions app/assets/javascripts/repository_columns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,15 @@ var RepositoryColumns = (function() {
let editUrl = $(el).attr('data-edit-column-url');
let destroyUrl = $(el).attr('data-destroy-column-url');
let thederName;

if ($(el).find('.modal-tooltiptext').length > 0) {
thederName = $(el).find('.modal-tooltiptext').text();
} else {
thederName = el.innerText;
}
thederName = _.escape(thederName);

const e2eName = thederName.toLowerCase().replace(' ', '_');

if (['row-name', 'archived-by', 'archived-on'].includes(el.id)) {
visClass = '';
Expand All @@ -303,24 +306,24 @@ var RepositoryColumns = (function() {
destroyButton = `<button class="btn icon-btn btn-light btn-xs delete-repo-column manage-repo-column"
data-action="destroy"
data-modal-url="${destroyUrl}">
<span class="sn-icon sn-icon-delete" title="Delete"></span>
<span class="sn-icon sn-icon-delete" title="Delete" data-e2e="e2e-BT-invItems-manageColumnsModal-${e2eName}-delete"></span>
</button>`;
}

let listItem = `<li class="col-list-el ${visLi} ${customColumn} ${editableRow}" data-position="${colIndex}" data-id="${colId}">
<i class="grippy sn-icon sn-icon-drag"></i>
<i class="grippy sn-icon sn-icon-drag" data-e2e="e2e-BT-invItems-manageColumnsModal-${e2eName}-drag"></i>
<span class="vis-controls">
<span class="vis sn-icon ${visClass}" title="${visText}"></span>
<span class="vis sn-icon ${visClass}" title="${visText}" data-e2e="e2e-BT-invItems-manageColumnsModal-${e2eName}-visibility"></span>
</span>
<div class="text truncate" title="${thederName}">${thederName}</div>
<div class="text truncate" title="${thederName}" data-e2e="e2e-TX-invItems-manageColumnsModal-${e2eName}-columnName">${thederName}</div>
<span class="column-type pull-right shrink-0">${
getColumnTypeText(el, colId) || '<i class="sn-icon sn-icon-locked-task"></i>'
getColumnTypeText(el, colId) || `<i class="sn-icon sn-icon-locked-task" data-e2e="e2e-IC-invItems-manageColumnsModal-${e2eName}-locked"></i>`
}</span>
<span class="sci-btn-group manage-controls pull-right" data-view-mode="active">
<button class="btn icon-btn btn-light btn-xs edit-repo-column manage-repo-column"
data-action="edit"
data-modal-url="${editUrl}">
<span class="sn-icon sn-icon-edit" title="Edit"></span>
<span class="sn-icon sn-icon-edit" title="Edit" data-e2e="e2e-BT-invItems-manageColumnsModal-${e2eName}-edit"></span>
</button>
${destroyButton}
</span>
Expand Down
14 changes: 7 additions & 7 deletions app/assets/javascripts/session_end.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
timeoutID = setTimeout(functionCallback, timeoutTime);
}

function toogleDocumentTitle(timeString = null) {
function toggleDocumentTitle(timeString = null) {
var sleepEmoticon = String.fromCodePoint(0x1F62A);
var originalTitle = document.title.split(sleepEmoticon).pop().trim();

Expand Down Expand Up @@ -70,21 +70,21 @@

function reviveSession() {
$.post($('meta[name=\'revive-url\']').attr('content'));
toogleDocumentTitle();
toggleDocumentTitle();
window.localStorage.removeItem('sessionEnd');
setSessionTimeout(initializeSessionCountdown, oneSecondTimeout);
}

function initializeSessionReviveCallbacks() {
$('#session-expire').modal().off('hide.bs.modal').on('hide.bs.modal', function() {
if (sessionExpireIn() > 0) {
if (sessionExpireIn() > 0 && sessionExpireIn() < expireLimit) {
reviveSession();
}
});

// for manual page reload
$(window).off('beforeunload').on('beforeunload', function() {
if (sessionExpireIn() > 0) {
if (sessionExpireIn() > 0 && sessionExpireIn() < expireLimit) {
reviveSession();
}
});
Expand All @@ -98,7 +98,7 @@
initializeSessionCountdown();
} else if (expireIn > 0 && expireIn <= expireLimit) {
timeString = newTimerStr(expireIn / 1000);
toogleDocumentTitle(timeString);
toggleDocumentTitle(timeString);
$('.expiring').text(I18n.t('devise.sessions.expire_modal.session_end_in.header', { time: timeString }));

if (!$('#session-expire').hasClass('in')) {
Expand All @@ -107,7 +107,7 @@

setSessionTimeout(sessionCountdown, oneSecondTimeout);
} else if (expireIn <= 0) {
toogleDocumentTitle();
toggleDocumentTitle();
$('#session-expire').modal('hide');
$('#session-finished').modal();
}
Expand All @@ -130,7 +130,7 @@
}
setSessionTimeout(initializeSessionCountdown, oneSecondTimeout);
} else if (expireOn && !event.originalEvent.newValue) {
toogleDocumentTitle();
toggleDocumentTitle();
}

expireOn = event.originalEvent.newValue;
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/label_templates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class LabelTemplatesController < ApplicationController
include InputSanitizeHelper
include TeamsHelper

before_action :check_feature_enabled, except: %i(index zpl_preview)
before_action :check_feature_enabled, except: %i(index zpl_preview list)
before_action :load_label_templates, only: %i(index datatable list)
before_action :load_label_template, only: %i(show set_default update template_tags)
before_action :check_view_permissions, except: %i(create duplicate set_default delete update)
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/repositories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -563,11 +563,11 @@ def log_activity(type_of, message_items = {})

def set_breadcrumbs_items
@breadcrumbs_items = []
archived_branch = @repository&.archived? || (!@repository && params[:archived] == 'true')
archived_branch = @repository&.archived? || (!@repository && params[:view_mode] == 'archived')

@breadcrumbs_items.push({
label: t('breadcrumbs.inventories'),
url: archived_branch ? repositories_path(archived: true) : repositories_path,
url: archived_branch ? repositories_path(view_mode: 'archived') : repositories_path,
archived: archived_branch
})

Expand Down
Loading

0 comments on commit f50725a

Please sign in to comment.