Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
259 commits
Select commit Hold shift + click to select a range
39385da
fix exemple docker compose
jujusb Feb 26, 2025
6abc458
fix DemoCA certificate
jujusb Feb 26, 2025
2168be5
Merge pull request #38 from e-ucm/bff-compaction
jujusb Mar 3, 2025
7a4703b
fix dev and dev profiling
jujusb Mar 11, 2025
ff63b09
adding clinic
jujusb Mar 26, 2025
c012780
remove profiling
jujusb Mar 27, 2025
cd76adc
Fix limesurvey update
jujusb Jun 25, 2024
d9309a4
fix limesurvey urls
jujusb Mar 19, 2025
47bbfe5
adding case not connected to limesurvey to force user to connect to l…
jujusb Mar 21, 2025
0c5d6ac
fix generate students
jujusb Apr 2, 2025
71edc9f
fix previous groups
jujusb Apr 2, 2025
22e390e
fix get token or username only for current user
jujusb Apr 3, 2025
0106a7d
remove NODE_TLS_REJECT_UNAUTHORIZED = "0";
jujusb Apr 3, 2025
95c88b7
adding url to Xasu Config and to uAdventure Simva Config
jujusb Apr 9, 2025
e63aa80
adding /print for group and wait until loaded
jujusb Apr 9, 2025
24aa033
remove /print after print
jujusb Apr 9, 2025
36cef4f
Merge pull request #39 from e-ucm/Limesurvey-update
jujusb Apr 25, 2025
b2086d4
fix editlimesurveyurl and newlimesurveyurl
jujusb Apr 29, 2025
35b3b65
adding multi completion of activity for all participant automatically…
jujusb Jun 25, 2025
6946314
Merge pull request #41 from e-ucm/generateUsers
jujusb Sep 25, 2025
f7a1490
Merge pull request #56 from e-ucm/feature-43
jujusb Dec 4, 2025
c53da53
adding tmon dashboard link url
jujusb Jun 17, 2025
4352254
fix tmon url + round progress throught activity
jujusb Jun 18, 2025
8e8a58a
fix tmon url
jujusb Jun 24, 2025
f1f5542
Merge pull request #54 from e-ucm/feature-47
jujusb Dec 4, 2025
294f795
add locales in all pages in fr, en and es
jujusb Jul 16, 2025
4622fc1
fixed login page redirect to keycloak
jujusb Dec 4, 2025
11018e8
Merge pull request #52 from e-ucm/feature-49
jujusb Dec 4, 2025
7bcc17d
fixed login page from sso in a iframe instead of have a button that r…
jujusb Dec 4, 2025
ef25ac1
Merge pull request #51 from e-ucm/feature-50
jujusb Dec 9, 2025
0436c95
adding progress and suspension of activity in simva
jujusb Jun 17, 2025
07c68fd
Merge pull request #55 from e-ucm/feature-46
jujusb Dec 9, 2025
ac434dc
use new nomenclature
jujusb Dec 9, 2025
4479f0f
fix activity descriptions
jujusb Dec 9, 2025
ccda33f
fix simlets ns file in others languages es and fr
jujusb Dec 9, 2025
dce0ef4
fix Sesión
jujusb Dec 9, 2025
b7c55bc
fix translation messages
jujusb Dec 9, 2025
dfc248a
using route simlets instead of studies
jujusb Dec 9, 2025
34974cf
fix participant instead of user
jujusb Dec 9, 2025
9ac5446
fix coordinators in plural
jujusb Dec 9, 2025
d99eedb
fix css manual, gameplay and limesurvey activities
jujusb Dec 9, 2025
407808d
fix using async simva
jujusb Dec 10, 2025
320f789
add task list send
jujusb Dec 9, 2025
dab48bb
fix typo
jujusb Dec 10, 2025
2b2e43d
adding get complete group
jujusb Dec 11, 2025
0530683
fix group view sse message actions
jujusb Dec 11, 2025
c5feb15
get complete group/study in group/study class in backend
jujusb Dec 11, 2025
053c014
fix task send on backend for frontend
jujusb Dec 11, 2025
e35203c
fix add to queue list
jujusb Dec 11, 2025
5d64d51
fix sqlite new version
jujusb Feb 10, 2026
e0ab908
fix groups and study controler
jujusb Feb 10, 2026
a5830eb
fix: update allocator type references and add null checks in activity…
jujusb Feb 11, 2026
fe737ad
Refactor activity handling to use consistent activity_id and session_id
jujusb Feb 11, 2026
b75fc74
fix: update activity references to use activity_id and session_id
jujusb Feb 11, 2026
7ccaa97
fix: update group handling to use direct_permissions instead of coord…
jujusb Feb 11, 2026
72457ef
fix: update activity type references to use activity_activity_type
jujusb Feb 11, 2026
61a2334
fix: update activity handling to use activity_activity_type
jujusb Feb 17, 2026
88d27f9
fix: update user registration methods to remove unused parameters and…
jujusb Feb 17, 2026
cb13a27
feat: add deleteGroupParticipants method and corresponding API endpoi…
jujusb Feb 17, 2026
19aac0d
fix: update group ID references to use group_id instead of _id in gro…
jujusb Feb 17, 2026
e42864d
fix: prevent reloading group on participant removal error
jujusb Feb 17, 2026
40d510c
fix: update addGroup method to include newversion as a query parameter
jujusb Feb 17, 2026
d95c186
fix: update participant token check to use Boolean for consistency
jujusb Feb 17, 2026
976e168
fix: simplify group rendering logic by removing version check
jujusb Feb 17, 2026
8203e24
fix: update activity and group naming references for consistency acro…
jujusb Feb 18, 2026
eb585e0
fix: update activity properties for consistency and clarity in gamepl…
jujusb Feb 18, 2026
efb0d12
fix: add direct permissions handling for groups and studies, and upda…
jujusb Feb 19, 2026
5785fd1
fix: update study card rendering to use correct identifiers for consi…
jujusb Feb 19, 2026
98ed40a
fix: enhance error handling and update permissions retrieval in study…
jujusb Feb 23, 2026
2aa499c
fix: add session participants retrieval in tests controller
jujusb Feb 23, 2026
1ee5aba
fix: add activity initialization retrieval and setting methods in Sim…
jujusb Feb 23, 2026
03728fc
fix: update user management logic and improve activity URL handling i…
jujusb Feb 23, 2026
449cb96
fix: enhance error handling in activity schedule loading and improve …
jujusb Feb 23, 2026
64ba9cd
fix: update API endpoints for studies and add session activation func…
jujusb Feb 24, 2026
7930e78
feat: add user management and permissions endpoints
jujusb Feb 25, 2026
47bb285
feat: enhance activity painting functionality to include participant …
jujusb Feb 25, 2026
4af9990
refactor: update group and study handling to use group_id and simlet_…
jujusb Feb 25, 2026
8ffec08
refactor: streamline group and study update logic to use object destr…
jujusb Feb 25, 2026
524c4b7
Refactor activity name checks and update participant handling across …
jujusb Feb 25, 2026
0dd7941
refactor: update allocator handling to use allocations directly inste…
jujusb Feb 25, 2026
dc40222
feat: add endpoints for creating group permissions and deleting tests
jujusb Feb 25, 2026
f06b4ba
refactor: enhance permission handling and streamline owner deletion l…
jujusb Feb 25, 2026
bb48950
feat: enhance addTestToStudy functionality with description and manua…
jujusb Feb 25, 2026
64dd47c
refactor: simplify permission retrieval in activities, groups, and st…
jujusb Feb 27, 2026
891d4fc
fix: correct spelling of 'survey_language' in LimeSurveyPainter and g…
jujusb Mar 4, 2026
9ee2c0c
Refactor group management views and remove deprecated files
jujusb Mar 5, 2026
1b420e7
refactor: update group permissions handling to use consistent identif…
jujusb Mar 6, 2026
d6e20f5
feat: add functionality to manage group participants in Simva
jujusb Mar 6, 2026
b44782d
feat: enhance group allocation functionality and update related methods
jujusb Mar 6, 2026
8771996
feat: add random and session allocator painters with allocation funct…
jujusb Mar 9, 2026
ce52dc6
fix: update survey ID handling in LimeSurveyPainter and improve sessi…
jujusb Mar 11, 2026
8e3560a
feat: extend user role access to include administrator in various rou…
jujusb Mar 11, 2026
1857fa2
feat: enhance participant handling and result display in ActivityPain…
jujusb Mar 13, 2026
9d09778
feat: normalize activity type and ID handling in message processing a…
jujusb Mar 16, 2026
c8f46e6
feat: update LimeSurvey API endpoints and enhance activity result ret…
jujusb Mar 17, 2026
572f5c4
fix: correct activity type check in activities controller and update …
jujusb Mar 17, 2026
fa32a29
feat: enhance LimeSurvey integration by updating survey handling and …
jujusb Mar 19, 2026
53c04c0
fix: standardize activity property naming across ActivityPainter modules
jujusb Mar 19, 2026
cf713f7
feat: update activity handling in various painters and controllers to…
jujusb Mar 19, 2026
9134200
replace sessions buttons for kebab menu
MattCastUCM Mar 27, 2026
6d2355a
Refactor: Update Simva API methods to accept body objects directly
jujusb Mar 30, 2026
51b20d2
feat: update activity handling to include request object in activity …
jujusb Mar 30, 2026
9a387c0
Merge branch 'e-ucm:sqlite' into sqlite
MattCastUCM Mar 30, 2026
bc48b49
move expand/collapse and create session buttons, add activate button …
MattCastUCM Mar 30, 2026
b2ce082
Session status slider and label, move download buttons and simlet nam…
MattCastUCM Mar 31, 2026
dfa9e4d
Separate simlet elements into tabs
MattCastUCM Apr 6, 2026
ec54188
Fully collapse session and show info when collapsed
MattCastUCM Apr 7, 2026
db3ef1d
Add kebab menu to simlet cards
MattCastUCM Apr 7, 2026
247276d
fix archive simlet
jujusb Apr 27, 2026
83f2cf1
fix group allocate to session
jujusb Apr 27, 2026
cec6309
fix shlink
jujusb Apr 27, 2026
d1af869
fix reload study after change allocator
jujusb Apr 27, 2026
765edec
Merge remote-tracking branch 'upstream/sqlite' into sqlite
MattCastUCM Apr 27, 2026
5081e84
fix: update JWT handling and improve group participant retrieval logic
jujusb Apr 28, 2026
35b4e9f
adding missing locales
jujusb Apr 28, 2026
2ea4458
fix download result
jujusb Apr 28, 2026
cc4745e
fix allocate to session with a number instead of a string
jujusb Apr 28, 2026
b256054
fix get group participants
jujusb Apr 28, 2026
1685f39
fix typo from study to simlet
jujusb Apr 28, 2026
5454008
fix case complete participants empty
jujusb Apr 28, 2026
ea1336e
fix case [] instead of null
jujusb Apr 28, 2026
9128e4b
Adding fallback for setups where allocator-based participant endpoint…
jujusb Apr 28, 2026
eb306b6
Adding fallback showing ID for debug when group participant endpoints…
jujusb Apr 28, 2026
cb1371c
Merge branch 'e-ucm:sqlite' into sqlite
MattCastUCM Apr 29, 2026
5215d09
Fixes for archiving SIMLETs
MattCastUCM May 1, 2026
19dd9fc
feat: Implement tag management for studies and sessions
jujusb May 1, 2026
dff0ff7
fix: Update label from 'Characteristics' to 'Tags' in study view
jujusb May 1, 2026
636bff9
refactor: Move complete tests fetching to the end of getCompleteStudy…
jujusb May 1, 2026
dd71dcc
fix: Change response from send to json for improved data handling
jujusb May 1, 2026
9bb415f
Merge remote-tracking branch 'origin/sqlite-matt-interface-tags' into…
MattCastUCM May 2, 2026
f526450
Update SIMLETs list tab
MattCastUCM May 2, 2026
1117725
feat: Refactor shlink management in Simva and update related routes a…
jujusb May 5, 2026
946d88a
Merge remote-tracking branch 'origin/sqlite-matt-interface-tags' into…
MattCastUCM May 5, 2026
dae506f
Share SIMLET menus between study view and studies list
MattCastUCM May 7, 2026
39a5ab1
Update session cards and menus
MattCastUCM May 10, 2026
7334a6c
Add tags localization and change SIMLET localization structure
MattCastUCM May 10, 2026
1ec22ed
feat: Add LRS data retrieval for activities and sessions in Simva
jujusb May 12, 2026
815a1c5
feat: Enhance LRS data handling with pagination and download options …
jujusb May 12, 2026
74a1547
feat: Add defensive checks for user authentication and session manage…
jujusb May 13, 2026
feb11d7
feat: Implement session data download functionality with error handling
jujusb May 13, 2026
2917ebd
feat: Update localization for activities and SIMLETs to improve clari…
jujusb May 13, 2026
3b90097
feat: Update session state terminology from 'paused' and 'finished' t…
jujusb May 13, 2026
ed89ef1
feat: Enhance activity tooltips and add download/edit options in acti…
jujusb May 14, 2026
a16be2b
Refactor layout files to modularize header and script includes
jujusb May 14, 2026
59f06db
feat: Add descriptions for SIMLETs and enhance tooltips for better us…
jujusb May 14, 2026
8ab756d
feat: Update activity card styles and enhance layout for better usabi…
jujusb May 14, 2026
1c9146c
feat: Add tooltips and titles for activity components to enhance user…
jujusb May 14, 2026
87e6cf7
feat: Refactor about route to improve authentication handling and lay…
jujusb May 14, 2026
909bfd2
feat: Enhance About page with detailed sections and localization support
jujusb May 14, 2026
e44bd8d
feat: Add scheduler studies endpoint and update related views
jujusb May 14, 2026
9319ae4
feat: Update activity download method to use getMinioData for improve…
jujusb May 14, 2026
9879d14
feat: Update activity management to support study and test context in…
jujusb May 14, 2026
c19e32b
feat: Add configuration for activities and conditionally render activ…
jujusb May 14, 2026
f088ae6
feat: Update gameplay activity handling for game URL and type selection
jujusb May 14, 2026
6cebef9
feat: Enhance activity suspension handling to include user context an…
jujusb May 14, 2026
59e7b8d
feat: Update about section localization and enhance tutorial content …
jujusb May 14, 2026
b833dd4
feat: Update completion messages for clarity in activities
jujusb May 14, 2026
a773040
feat: Normalize body structure in setRole method and update related p…
jujusb May 14, 2026
a2d65da
feat: Add endpoints for retrieving test LRS data and enhance session …
jujusb May 14, 2026
84a8832
feat: Implement test data download functionality and user participati…
jujusb May 14, 2026
e93b3d1
feat: Update user ID handling in session group management for improve…
jujusb May 14, 2026
66ec8a6
SIMLET users tab and file structure changes
MattCastUCM May 14, 2026
b33a445
feat: Enhance unsetTesterForSession function to improve participant r…
jujusb May 15, 2026
878502d
feat: Implement export functionality for tests and studies, replacing…
jujusb May 15, 2026
e491cc2
feat: Add import functionality for tests and sessions, enhancing user…
jujusb May 15, 2026
f1ccf55
feat: Add import endpoint for tests, enabling session-specific test u…
jujusb May 15, 2026
1b722be
feat: Enhance import functionality for activities and studies, improv…
jujusb May 15, 2026
2c10806
feat: Improve deleteStudy function to enhance error handling and user…
jujusb May 15, 2026
03ae180
feat: Update subform visibility and tab management for improved user …
jujusb May 15, 2026
0c3a63c
feat: Hide new participant tab by default to improve user interface c…
jujusb May 15, 2026
7d3f9c1
feat: Implement group import and export functionality with UI enhance…
jujusb May 15, 2026
dbd32d0
fix: Correct filename generation for study export and improve comment…
jujusb May 15, 2026
93eaedc
feat: Enhance group deletion with error handling and user feedback
jujusb May 15, 2026
c65fe45
feat: Add functionality to set and unset current user as tester for s…
jujusb May 15, 2026
0f0d04c
Fix tabs buttons on nested forms and reload correctly when editing/cr…
MattCastUCM May 15, 2026
01192f3
feat: Refactor iframe handling and enhance user experience with new f…
jujusb May 16, 2026
72b6575
feat: Add localization for session activities and tester functionalit…
jujusb May 16, 2026
2c8e9af
feat: Add import tab localization for sessions and enhance iframe han…
jujusb May 16, 2026
c491ba1
feat: Implement floating iframe for enhanced user interaction and mod…
jujusb May 16, 2026
b5386c5
feat: Refactor form submission handling to improve consistency and re…
jujusb May 17, 2026
e761bdc
feat: Simplify session archiving logic in studies list for improved p…
jujusb May 17, 2026
9c21724
feat: Enhance group management localization and improve study form to…
jujusb May 17, 2026
fc84aa0
feat: Update session status handling for archive button logic in stud…
jujusb May 17, 2026
863cfe1
feat: Update date formatting to use current language code in studies …
jujusb May 17, 2026
dfddee3
feat: Refactor study link generation forms for improved clarity and f…
jujusb May 17, 2026
1243f71
feat: Update localization keys for LimeSurvey messages to improve cla…
jujusb May 17, 2026
f6a06a3
Add confirmation message on archivation, fix tab rendering when creat…
MattCastUCM May 17, 2026
bd519c8
feat: Update activity result retrieval to use 'full' type and adjust …
jujusb May 17, 2026
30ebe19
feat: Implement toggleIframeInFloating utility and refactor iframe ha…
jujusb May 17, 2026
ce2c7c1
feat: Add automatic page reload on SSE connection error to facilitate…
jujusb May 17, 2026
6dd424d
Add participants to groups, block actions on archived SIMLETs,
MattCastUCM May 17, 2026
ebf6275
feat: Add confirmation message for archiving SIMLET and update group …
jujusb May 17, 2026
d1e2af5
feat: Refactor session tester functionality and improve user feedback…
jujusb May 18, 2026
62b9654
feat: Refactor content display in painters and update session reload …
jujusb May 18, 2026
97e23f1
feat: Update localization keys for activities and sessions, and impro…
jujusb May 18, 2026
82a7e73
feat: Remove manual activation checkbox and default session activatio…
jujusb May 18, 2026
e8381aa
feat: Remove automatic page reload on SSE connection error
jujusb May 18, 2026
054acd0
feat: Update localization for deprecated group generation and enhance…
jujusb May 18, 2026
af41875
feat: Add import and export functionality for activities, including U…
jujusb May 18, 2026
dd99cad
Update group allocator rendering and groups localization file structure
MattCastUCM May 18, 2026
9973329
feat: Enhance activity forms with improved localization and UI elements
jujusb May 18, 2026
0bd866e
feat: Enhance activity localization by adding descriptions for variou…
jujusb May 18, 2026
d513ca3
fix: Correct navigation links for scheduler and simlets in header and…
jujusb May 18, 2026
f7ac94d
Block activity completion on archived SIMLET and fix participant dele…
MattCastUCM May 18, 2026
a1a3b6a
feat: Add descriptions for SIMLETs, About, and Home sections in multi…
jujusb May 18, 2026
5b5d09d
feat: Add new icons and enhance session functionality with test mode …
jujusb May 18, 2026
7040e05
Force activity form to always open on new activity tab
MattCastUCM May 18, 2026
329cd9b
feat: Add descriptions for gameplay and manual activities in multiple…
jujusb May 18, 2026
6d13525
fix: Standardize error message for loading results across activity pa…
jujusb May 19, 2026
202e97d
feat: Implement tester group management with reset functionality and …
jujusb May 19, 2026
3cbfa9f
fix: Improve error handling by using optional chaining for error resp…
jujusb May 19, 2026
15e3080
feat: Enhance scheduler functionality by adding test mode checks in h…
jujusb May 19, 2026
1653286
feat: Add upload description for LSS files in English, Spanish, and F…
jujusb May 19, 2026
2008c88
fix: Refactor LimeSurveyPainter form handling and streamline group pa…
jujusb May 19, 2026
b04d772
fix: Redirect unauthenticated users to login on error handling
jujusb May 20, 2026
8fd6f0e
fix: Update labels and descriptions in edit gameplay activity form fo…
jujusb May 20, 2026
a312151
feat: Implement session expiration handling with frontend redirect fo…
jujusb May 20, 2026
aed53b9
fix: Enable delete button for owners with full permissions in user ma…
jujusb May 20, 2026
51a530f
Fix icons colors and add icons to SIMLET view + buttons
MattCastUCM May 20, 2026
5099adf
fix: Adjust overflow properties in CSS and clean up commented JavaScr…
jujusb May 20, 2026
e4617f8
fix: Enhance user interaction handling with suspend timer for activit…
jujusb May 20, 2026
30bda35
feat: Add xAPI dashboard information and tracking details to about se…
jujusb May 20, 2026
7094531
feat: Add dashboard example image to xAPI dashboard section
jujusb May 20, 2026
5a53159
feat: Initialize game_url and manual_ressource_url to null for activi…
jujusb May 20, 2026
9e732cd
fix: Ensure game_url is null for DESKTOP activities and log extractio…
jujusb May 20, 2026
d82d37b
Add and show character limit in names and descriptions fields
MattCastUCM May 20, 2026
b907a67
Remove required descriptions and open participant form after creating…
MattCastUCM May 21, 2026
ebcdffb
Add option to select initial state when creating session
MattCastUCM May 21, 2026
b1698ff
Show confirmation message when creating a web activity with empty url
MattCastUCM May 21, 2026
43bdf72
Move add coordinators tab to common users menu
MattCastUCM May 21, 2026
e48875c
Update xAPI data management titles and descriptions for clarity in En…
jujusb May 21, 2026
ef4881d
Increase forms elements size and fix forms and sessions visibility wh…
MattCastUCM May 21, 2026
790e295
Improve group allocation to session by adding a check for session ID …
jujusb May 21, 2026
2b22af5
Refactor activity result handling to use Minio data URL and improve e…
jujusb May 21, 2026
caebd84
Use common form menu for download buttons and adjust floating forms r…
MattCastUCM May 21, 2026
aa29f6b
Enhance activity management by adding type selection and improving lo…
jujusb May 21, 2026
39d0367
Adjust checkbox positioning in activity menu
MattCastUCM May 21, 2026
7ba1b75
Refactor iframe handling to remove unnecessary display style manipula…
jujusb May 22, 2026
7750eb6
Refactor routes to include redirectToLogin middleware for enhanced au…
jujusb May 22, 2026
ccd5b22
Remove unnecessary redirect for /about-page and simplify language rou…
jujusb May 22, 2026
aee27de
Fix string interpolation for default activity type option in new acti…
jujusb May 22, 2026
a86edb2
Fix string interpolation for error message in activity type selection
jujusb May 22, 2026
b5dfd91
Tooltips style
MattCastUCM May 22, 2026
00be304
Add tooltips to the different views and adjust positioning depending …
MattCastUCM May 22, 2026
55a1ebc
Add more info to the activities tooltip
MattCastUCM May 22, 2026
909a4a3
Fix error when editing SIMLET from SIMLET lists and cap tags height o…
MattCastUCM May 22, 2026
5ae9c74
Adjust tags rendering overflow on SIMLETs list
MattCastUCM May 22, 2026
1022fac
Fix group creation when there are no sessions and exporting as PDF
MattCastUCM May 22, 2026
a2f803a
Add user count to groups card and fix pdf exporting for multiple groups
MattCastUCM May 28, 2026
3cc18a6
Merge pull request #69 from e-ucm/sqlite-lrs-yetanalytics-working
jujusb Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.github
Dockerfile
.dockerignore
*.heapsnapshot
*.log
5 changes: 5 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/node_modules/
/tmp/*
.clinic/

# Config files
config-test.js
*.log
*.heapsnapshot
*.crt
!DemoCA.crt
20 changes: 20 additions & 0 deletions DemoCA.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDSzCCAjOgAwIBAgIUCmGeUFwNiGdJZLwpkevTf29wjrowDQYJKoZIhvcNAQEL
BQAwFjEUMBIGA1UEAwwLRWFzeS1SU0EgQ0EwHhcNMTkwNjI1MTk0NjA4WhcNMjkw
NjIyMTk0NjA4WjAWMRQwEgYDVQQDDAtFYXN5LVJTQSBDQTCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBANKAEz3dPmYJvwjhSBssR0jP5JK7CO8iOqzhcqzy
cFb05hr9unPtPS76lrEEkYSgklwW5X4aVTOfqrJkc0RyoLwyYjmPei45xRiFeTfu
FA1cAwbRAriTuOySvp8U0H/J8WDCNrNrhDags9wzbtBZuTJt1UCNYXYJyHMF2NE3
7fO86x3AVW30v0iiHa00ev2Fk5YZkKUYuL0Dv2Ul3SbWFRq3hKjFypkOK+Iur/Ye
wW7XLAoVatOvlFZCmQ+kD59b0L9QCXqDU2odlwzgNrMpczfTyuzJKQyxm0iLJgxW
QvC329dkjyq/5RR7RvWjpjzyAopXMo5ZE4CWgHQz97Rfhv8CAwEAAaOBkDCBjTAd
BgNVHQ4EFgQUNOD0d021fHYcir4UebCMny2eQVAwUQYDVR0jBEowSIAUNOD0d021
fHYcir4UebCMny2eQVChGqQYMBYxFDASBgNVBAMMC0Vhc3ktUlNBIENBghQKYZ5Q
XA2IZ0lkvCmR69N/b3COujAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjANBgkq
hkiG9w0BAQsFAAOCAQEAFwfZVGQnd1ReZeL4uyvS2ZVI3U2GYFGrdxOiC+1nt3TG
QF5W+4RN2394Mv1DaUIjtzAuKanR73qyiVjxkFetsSj4dItzbZQBCpRT32E1EHb2
aFXbTJ76JGPHed0wmAdCxA+zlEjKZr7B73sS2GPfSLJw3CsQYMtVSCXLCox4DUrW
yOlF2kgO1OGI4kPbtw+CKWwCh0x0StckYo5tI8MF1U5UBtAXzPJ2pXyuc7t0Hejy
MMKILaiIrqCtK/9BdQWW3iqDhhcLX6VrPb33QNA7PV9UBVAfBPPIejDLSv1aS/X9
SuegPnlhRzBl1PL0zAMlEGI9GR3HruCJoDKo9MlR7g==
-----END CERTIFICATE-----
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM node:22.14.0-bullseye

# Install ca-certificates and update them
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates && \
update-ca-certificates && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app

# Set the working directory
WORKDIR /home/node/app

COPY --chown=node:node package*.json ./

RUN npm install -g clinic pm2

USER node

RUN npm install

# Copy the current directory contents into the container at /app
COPY --chown=node:node . .

RUN mkdir -p /home/node/logs && chown -R node:node /home/node/logs

# Make port 3050 available to the world outside this container
EXPOSE 3050

CMD [ "pm2-runtime", "ecosystem.config.js" ]
Empty file modified README.md
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions bin/cron-task.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { convertTimeToCron } = require("../routes/lib/date.js");
const cron = require('node-cron');
const logger = require('../logger');
const userClientsListManager = require('../routes/lib/userClientsListManager');
const sseManager = require('../routes/lib/sseManager'); // Import SSE Manager
const sseClientsListManager = require('../routes/lib/sseClientsListManager');
const usertools = require('../routes/lib/usertools.js');
const config = require('../config.js');

// Schedule a task to run every x minutes
cron.schedule(convertTimeToCron(config.simva.ping_task/(1000*60)), async () => {
logger.info('SSE Ping task is running at ' + new Date());
var clientsWithoutAction=sseClientsListManager.getTimeSuperiorToXMinClientList(5);
logger.debug(JSON.stringify(clientsWithoutAction));
sseManager.sendMessageToClientList(clientsWithoutAction, {message:'ping',type:'ping'});
});

// Schedule a task to run every x minutes
cron.schedule(convertTimeToCron(config.simva.auth_expired_task/(1000*60)), async () => {
logger.info('SSE auth expired task is running at ' + new Date())
var sessionsToRefresh=await usertools.getRefreshSessionsList();
var clientsToRefresh=userClientsListManager.getRefreshClientList(sessionsToRefresh);
logger.debug(JSON.stringify(clientsToRefresh));
sseManager.sendMessageToClientList(clientsToRefresh, {message:'auth expired',type:'refresh_auth'});
});
13 changes: 6 additions & 7 deletions bin/www
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
const app = require('../routes');
const http = require('http');
const config = require('../config');


const logger = require('../logger');
//XXX
//require('https').globalAgent.options.ca = require('ssl-root-cas/latest').create();

Expand Down Expand Up @@ -58,17 +57,17 @@ function onError (error) {

const bind = typeof port === 'string' ? `Pipe ${port}` : `Port ${port}`;

console.log(error.code);
console.log(error);
logger.info(error.code);
logger.info(error);

// handle specific listen errors with friendly messages
switch (error.code) {
case 'EACCES':
console.log(`${bind} requires elevated privileges`);
logger.info(`${bind} requires elevated privileges`);
process.exit(1);
break;
case 'EADDRINUSE':
console.log(`${bind} is already in use`);
logger.info(`${bind} is already in use`);
process.exit(1);
break;
default:
Expand All @@ -82,5 +81,5 @@ function onError (error) {
function onListening () {
const addr = server.address();
const bind = typeof addr === 'string' ? `pipe ${addr}` : `port ${addr.port}`;
console.log(`Listening on ${bind}`);
logger.info(`Listening on ${bind}`);
}
41 changes: 41 additions & 0 deletions config.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const ms = require("ms");
let config = {}

let default_protocol_ports = {
Expand All @@ -11,6 +12,10 @@ config.simva.host = process.env.SIMVA_HOST || 'simva.external.test'
config.simva.protocol = process.env.SIMVA_PROTOCOL || 'https'
let simvaPort = ((default_protocol_ports[config.simva.protocol] !== config.simva.port) ? `:${config.simva.port}` : '')
config.simva.url = process.env.SIMVA_URL || `${config.simva.protocol}://${config.simva.host}${simvaPort}`;
config.simva.cookieMaxAgeInMin=process.env.SIMVA_COOKIE_MAX_AGE_IN_MIN || 4*60
config.simva.profiling = process.env.ENABLE_DEBUG_PROFILING == undefined ? "false" : (process.env.ENABLE_DEBUG_PROFILING == "true")
config.simva.ping_task = process.env.PING_TASK !== undefined ? ms(process.env.PING_TASK) : ms("3min")
config.simva.auth_expired_task = process.env.AUTH_EXPIRED_TASK !== undefined ? ms(process.env.AUTH_EXPIRED_TASK) : ms("30min")

config.mongo = {}
config.mongo.host = process.env.MONGO_HOST || 'localhost:27017'
Expand Down Expand Up @@ -56,7 +61,43 @@ config.limesurvey.url = `${config.limesurvey.protocol}://${config.limesurvey.ho
config.limesurvey.adminUser = process.env.LIMESURVEY_ADMIN_USER || 'admin'
config.limesurvey.adminPassword = process.env.LIMESURVEY_ADMIN_PASSWORD || 'password'

config.hmac = {}
config.hmac.password = process.env.HMAC_PASSWORD || 'mypassword'
config.hmac.salt = process.env.HMAC_SALT || 'mysalt'
config.hmac.key = process.env.HMAC_KEY || 'mykey'
config.hmac.hmacKey = null

config.lti = {}
config.lti.enabled = process.env.LTI_ENABLED || 'false'

config.i18n = {}
config.i18n.debug = process.env.I18N_DEBUG === "true"
languages = process.env.SIMVA_LOCALES || "en,es";
config.i18n.languages = languages.split(",").map(s => s.trim());;
config.i18n.defaultLanguage = languages[0];

config.kafka = {}
config.kafka.clientId= process.env.SIMVA_KAFKA_CLIENTID || 'my-client-id'
config.kafka.brokers= [ process.env.SIMVA_KAFKA_BROKER ] || ['localhost:9092']
config.kafka.groupId= process.env.SIMVA_KAFKA_GROUPID || 'my-group-id'
config.kafka.topic= process.env.SIMVA_KAFKA_SIMVA_EVENTS_TOPIC || 'minio-events'

config.shlink = {}
config.shlink.apihost = process.env.SHLINK_SERVER_HOST || 'shlink.external.test'
config.shlink.protocol = process.env.SHLINK_PROTOCOL || 'https'
config.shlink.port = process.env.SHLINK_PORT || '443'
config.shlink.apiurl = `${config.shlink.protocol}://${config.shlink.apihost}:${config.shlink.port}`
config.shlink.apikey = process.env.SHLINK_SERVER_API_KEY || 'myapikey'

config.tmon = {}
config.tmon.port = parseInt(process.env.TMON_PORT || 443);
config.tmon.host = process.env.TMON_HOST || 'tmon.simva.external.test'
config.tmon.protocol = process.env.TMON_PROTOCOL || 'https'
let tmonPort = ((default_protocol_ports[config.tmon.protocol] !== config.tmon.port) ? `:${config.tmon.port}` : '')
config.tmon.url = process.env.TMON_URL || `${config.tmon.protocol}://${config.tmon.host}${tmonPort}`;
config.tmon.file = process.env.TMON_MINIO_TRACES_FILE || "traces.json"

config.activities = {};
config.activities.enabled = process.env.TEMPLATE_ACTIVITIES_ENABLED || 'false';

module.exports = config;
72 changes: 60 additions & 12 deletions docker-compose.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,76 @@ networks:

services:
mongodb:
image: mongo:4.0
image: mongo:4.2.8
volumes:
- mongo_data:/data/db
hostname: mongo.simva.dev.test

simva-api:
image: node:8
command: bash -c "cd /app && chmod +x docker-startup.sh && ./docker-startup.sh"
simva-front:
build: ./
command: [ "npm", "run", "dev" ]
stdin_open: true
tty: true
environment:
MONGO_HOST: mongo.simva.dev.test
MONGO_DB: /simva
LIMESURVEY_HOST: limesurvey-dev.external.test
LOG_LEVEL: debug
LOG_FOLDER: /home/node/logs
#LOG/DEBUG
DEBUG: true
#NODES
NODE_ENV: development
NODE_EXTRA_CA_CERTS: /home/node/app/DemoCA.crt
#SIMVA
SIMVA_PORT: 3050
SIMVA_HOST: simva.external.test
SIMVA_PROTOCOL: https
SIMVA_URL: https://simva.external.test/
#MONGO DB
MONGO_HOST: simva-mongo.dev.test
MONGO_DB: /simva-front
#SSO KEYCLOAK
SSO_HOST: sso.external.test
SSO_PROTOCOL: https
SSO_PORT: 443
SSO_ACCOUNT_PATH: /account
SSO_USER_CAN_SELECT_ROLE: true
SSO_ADMINISTRATOR_CONTACT: contact@administrator.com
SSO_STUDENT_ALLOWED_ROLE: true
SSO_TEACHING_ASSISTANT_ALLOWED_ROLE: true
SSO_TEACHER_ALLOWED_ROLE: true
SSO_RESEARCHER_ALLOWED_ROLE: true
SSO_REALM: simva
SSO_CLIENT_ID: simva
SSO_CLIENT_SECRET: secret
SSO_SSL_REQUIRED: external
SSO_PUBLIC_CLIENT: false
#SIMVA API
SIMVA_API_HOST: simva-api.external.test
SIMVA_API_PORT: 443
SIMVA_API_PROTOCOL: https
#LIMESURVEY
LIMESURVEY_HOST: "https://limesurvey-dev.external.test/"
LIMESURVEY_PROTOCOL: https
LIMESURVEY_PORT: 443
LIMESURVEY_ADMIN_USER: admin
LIMESURVEY_ADMIN_PASSWORD: password
NODE_EXTRA_CA_CERTS: /app/DemoCA.crt
LIMESURVEY_ADMIN_PASSWORD: secret
#LTI
LTI_ENABLED: false
#KAFKA
SIMVA_KAFKA_CLIENTID: simva_events
SIMVA_KAFKA_BROKER: "kafka1.dev.test:9092"
SIMVA_KAFKA_GROUPID: simva_events
SIMVA_KAFKA_SIMVA_EVENTS_TOPIC: simva_events_topic
#SHLINK
SHLINK_SERVER_HOST: shlink.external.test
SHLINK_PORT: 443
SHLINK_PROTOCOL: https
SHLINK_SERVER_API_KEY: password
volumes:
- ./:/app
- ./:/home/node/app
- /home/node/app/node_modules #exclude node_modules
depends_on:
- mongodb
hostname: simva-api.dev.test
hostname: simva.dev.test
dns:
- 172.31.0.53
networks:
Expand All @@ -40,4 +88,4 @@ services:
labels:
traefik.enable: true
traefik.port: 3000
traefik.frontend.rule: "Host:simva-api.external.test"
traefik.frontend.rule: "Host:simva.external.test"
13 changes: 0 additions & 13 deletions docker-startup.sh

This file was deleted.

32 changes: 32 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
apps: [
{
name: "main-app",
script: "bin/www",
watch: process.env.NODE_ENV === "development",
restart_delay: 5000,
node_args: process.env.NODE_ENV === "development"
? ( process.env.PROFILING === "true"
? "--inspect=0.0.0.0:9229 --prof --perf-basic-prof --interpreted-frames-native-stack" :
"--inspect=0.0.0.0:9229 --trace-warnings")
: "",
env : {
PROCESS_TAG: "[MAIN]"
}
},
{
name: "process-cron-task",
script: "bin/cron-task.js",
watch: process.env.NODE_ENV === "development",
restart_delay: 5000,
node_args: process.env.NODE_ENV === "development"
? ( process.env.PROFILING === "true"
? "--inspect=0.0.0.0:9230 --prof --perf-basic-prof --interpreted-frames-native-stack" :
"--inspect=0.0.0.0:9230 --trace-warnings")
: "",
env : {
PROCESS_TAG: "[CRON_TASK]"
}
}
]
};
Loading