From 2fa69f119b749ff79deaff49d7b682eb473d30b5 Mon Sep 17 00:00:00 2001 From: leejoh22 Date: Wed, 25 Sep 2024 16:03:23 -0700 Subject: [PATCH 01/11] Updated Admin sign in statistics to account for new sign up/sign in logging values --- app/models/daos/slick/UserDAOSlick.scala | 2 +- app/models/user/WebpageActivityTable.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/daos/slick/UserDAOSlick.scala b/app/models/daos/slick/UserDAOSlick.scala index a7f1c8e9cc..e5024033e2 100644 --- a/app/models/daos/slick/UserDAOSlick.scala +++ b/app/models/daos/slick/UserDAOSlick.scala @@ -493,7 +493,7 @@ object UserDAOSlick { // Map(user_id: String -> (most_recent_sign_in_time: Option[Timestamp], sign_in_count: Int)). val signInTimesAndCounts = - WebpageActivityTable.activities.filter(_.activity inSet List("AnonAutoSignUp", "SignIn")) + WebpageActivityTable.activities.filter(row => row.activity === "AnonAutoSignUp" || (row.activity like "SignIn%")) .groupBy(_.userId).map{ case (_userId, group) => (_userId, group.map(_.timestamp).max, group.length) } .list.map{ case (_userId, _time, _count) => (_userId, (_time, _count)) }.toMap diff --git a/app/models/user/WebpageActivityTable.scala b/app/models/user/WebpageActivityTable.scala index 8ef052c1da..9e038db8ba 100644 --- a/app/models/user/WebpageActivityTable.scala +++ b/app/models/user/WebpageActivityTable.scala @@ -46,7 +46,7 @@ object WebpageActivityTable { */ def selectAllSignInCounts: List[(String, String, Int)] = db.withTransaction { implicit session => val signIns = for { - _activity <- activities if _activity.activity === "SignIn" + _activity <- activities if _activity.activity like "SignIn%" _userRole <- userRoles if _activity.userId === _userRole.userId _role <- roles if _userRole.roleId === _role.roleId if _role.role =!= "Anonymous" From 7a3d4d8adcf9523f54c97820d45d6dacb3f229d2 Mon Sep 17 00:00:00 2001 From: leejoh22 Date: Sun, 29 Sep 2024 21:51:08 -0700 Subject: [PATCH 02/11] Refactored gallery code, replaced Modal with ExpandedView --- app/views/gallery.scala.html | 30 ++--- public/javascripts/Gallery/css/cards.css | 8 +- public/javascripts/Gallery/css/modal.css | 49 +++---- public/javascripts/Gallery/src/Main.js | 24 ++-- public/javascripts/Gallery/src/cards/Card.js | 24 ++-- .../Gallery/src/cards/CardContainer.js | 26 ++-- .../Gallery/src/displays/SeverityDisplay.js | 25 ++-- .../Gallery/src/displays/TagDisplay.js | 20 +-- .../src/displays/ValidationInfoDisplay.js | 11 +- .../Gallery/src/keyboard/Keyboard.js | 30 +++-- public/javascripts/Gallery/src/modal/Modal.js | 121 +++++++++--------- .../Gallery/src/validation/ValidationMenu.js | 40 +++--- 12 files changed, 222 insertions(+), 186 deletions(-) diff --git a/app/views/gallery.scala.html b/app/views/gallery.scala.html index 5fe71b2c08..8cedaf9be3 100644 --- a/app/views/gallery.scala.html +++ b/app/views/gallery.scala.html @@ -79,25 +79,25 @@
@Messages("validatio