From c4d3fe7b50f1c3cc89ac823c0359a97ec99e7673 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Mon, 23 Dec 2024 12:14:18 -0500 Subject: [PATCH 1/3] fix popovers on this app list --- apps/dashboard/app/javascript/application.js | 4 ++-- .../views/batch_connect/shared/_app_list_item.html.erb | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/dashboard/app/javascript/application.js b/apps/dashboard/app/javascript/application.js index b8639950eb..dc7e54422d 100644 --- a/apps/dashboard/app/javascript/application.js +++ b/apps/dashboard/app/javascript/application.js @@ -49,6 +49,6 @@ jQuery(function(){ title: function(){ return $(this).text() } }); - $('[data-toggle="popover"]').popover(); - $('[data-toggle="tooltip"]').tooltip(); + $('[data-bs-toggle="popover"]').popover(); + $('[data-bs-toggle="tooltip"]').tooltip(); }); diff --git a/apps/dashboard/app/views/batch_connect/shared/_app_list_item.html.erb b/apps/dashboard/app/views/batch_connect/shared/_app_list_item.html.erb index 5968e4dc97..f1568a0ee5 100644 --- a/apps/dashboard/app/views/batch_connect/shared/_app_list_item.html.erb +++ b/apps/dashboard/app/views/batch_connect/shared/_app_list_item.html.erb @@ -3,12 +3,12 @@ link_to( link.url.to_s, class: "list-group-item list-group-item-action #{"active" if local_assigns[:current_url] == link.url}", + title: link.title, data: { - toggle: "popover", - content: manifest_markdown(link.description), - html: true, - trigger: "hover", - title: link.title, + 'bs-toggle': "popover", + 'bs-content': manifest_markdown(link.description), + 'bs-html': true, + 'bs-trigger': "hover", container: "body", }.merge(link.data) ) do From 5740ef1efc02f676fbb92553b87ee7499bab41ec Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Mon, 23 Dec 2024 12:39:42 -0500 Subject: [PATCH 2/3] fix test based on new html structure --- .../test/integration/sessions_controller_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/dashboard/test/integration/sessions_controller_test.rb b/apps/dashboard/test/integration/sessions_controller_test.rb index 987608c5f3..9fe99483f0 100644 --- a/apps/dashboard/test/integration/sessions_controller_test.rb +++ b/apps/dashboard/test/integration/sessions_controller_test.rb @@ -35,10 +35,10 @@ def setup assert_select 'div.card div.list-group a.list-group-item', 2 assert_select 'div.card div.list-group a.list-group-item' do |links| # Items are sorted by title - assert_equal 'Jupyter Notebook', links[0]['data-title'] + assert_equal 'Jupyter Notebook', links[0]['title'] assert_equal '/batch_connect/sys/bc_jupyter/session_contexts/new', links[0]['href'] - assert_equal 'Paraview', links[1]['data-title'] + assert_equal 'Paraview', links[1]['title'] assert_equal '/batch_connect/sys/bc_paraview/session_contexts/new', links[1]['href'] end end @@ -65,10 +65,10 @@ def setup assert_select 'div.card div.list-group a.list-group-item', 2 assert_select 'div.card div.list-group a.list-group-item' do |links| # Configuration order must be kept - assert_equal 'Jupyter Notebook', links[0]['data-title'] + assert_equal 'Jupyter Notebook', links[0]['title'] assert_equal '/batch_connect/sys/bc_jupyter/session_contexts/new', links[0]['href'] - assert_equal 'Paraview', links[1]['data-title'] + assert_equal 'Paraview', links[1]['title'] assert_equal '/batch_connect/sys/bc_paraview/session_contexts/new', links[1]['href'] end end From c01ba9473b917b5286d5a6be4195e9ac5dce5f12 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Mon, 23 Dec 2024 13:00:03 -0500 Subject: [PATCH 3/3] fix test based on new html structure --- apps/dashboard/test/integration/batch_connect_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/dashboard/test/integration/batch_connect_test.rb b/apps/dashboard/test/integration/batch_connect_test.rb index 970075702e..f28527fe8a 100644 --- a/apps/dashboard/test/integration/batch_connect_test.rb +++ b/apps/dashboard/test/integration/batch_connect_test.rb @@ -41,10 +41,10 @@ def setup assert_select 'div.card div.list-group a.list-group-item', 2 assert_select 'div.card div.list-group a.list-group-item' do |links| # Items are sorted by title - assert_equal 'Jupyter Notebook', links[0]['data-title'] + assert_equal 'Jupyter Notebook', links[0]['title'] assert_equal '/batch_connect/sys/bc_jupyter/session_contexts/new', links[0]['href'] - assert_equal 'Paraview', links[1]['data-title'] + assert_equal 'Paraview', links[1]['title'] assert_equal '/batch_connect/sys/bc_paraview/session_contexts/new', links[1]['href'] end end @@ -68,10 +68,10 @@ def setup assert_select 'div.card div.list-group a.list-group-item', 2 assert_select 'div.card div.list-group a.list-group-item' do |links| # Configuration order must be kept - assert_equal 'Jupyter Notebook', links[0]['data-title'] + assert_equal 'Jupyter Notebook', links[0]['title'] assert_equal '/batch_connect/sys/bc_jupyter/session_contexts/new', links[0]['href'] - assert_equal 'Paraview', links[1]['data-title'] + assert_equal 'Paraview', links[1]['title'] assert_equal '/batch_connect/sys/bc_paraview/session_contexts/new', links[1]['href'] end end