Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
366 commits
Select commit Hold shift + click to select a range
de07c02
Fixed bug relaying incorrect cage locations to the state
LeviCameron1 Sep 24, 2024
50694f9
Fixed bug with checking already merged cages again when the rack was …
LeviCameron1 Sep 26, 2024
b0a0a7c
Fixed bug with naming new cages after merging
LeviCameron1 Sep 30, 2024
c03206c
Fixed bugs with merging two groups and renaming cage ids
LeviCameron1 Oct 3, 2024
d3d34b2
Moved cage num event to helper since it needed to be used in more places
LeviCameron1 Oct 7, 2024
3ea0bf7
Update the method in which cages are initially numbered
LeviCameron1 Oct 7, 2024
bdd94a5
Updated cage numbering and rack numbering when cages are placed to us…
LeviCameron1 Oct 7, 2024
1147036
Fixed bug with cage locations not being correctly numbered
LeviCameron1 Oct 7, 2024
e289d7a
Added context menu on right click for editing cages in the layout editor
LeviCameron1 Oct 10, 2024
4b9b342
Introduced checks to prevent two different "random" crashes in case o…
LeviCameron1 Oct 11, 2024
d420d2e
General Cleanup and fixed moveRack function to work with both cage lo…
LeviCameron1 Oct 15, 2024
3c19d53
Fixed bug with cage location not being right when multiple racks were…
LeviCameron1 Oct 15, 2024
4ba4d7b
Fixed bug causing merging to not be detected
LeviCameron1 Oct 15, 2024
42cf89b
Fixed bug with cage state not getting correct local coords for the ra…
LeviCameron1 Oct 16, 2024
51efc6e
Switched state management to work with four types of racks, and given…
LeviCameron1 Oct 18, 2024
2225f41
Added test data for beginning work on data storage
LeviCameron1 Oct 23, 2024
01f5cc7
Switch room type to be array of room items instead of racks
LeviCameron1 Oct 24, 2024
edae881
Additions to switching from room represented by racks to room items
LeviCameron1 Oct 25, 2024
1b2d1f4
added some EHR types and switched logic of svgs to follow unique rack…
LeviCameron1 Oct 29, 2024
d89f2d3
added room type and fixed bug with dragging shapes to the layout
LeviCameron1 Oct 30, 2024
dd07a5a
Fixed bugs with merging connecting and renaming
LeviCameron1 Nov 11, 2024
e7b4b48
State management and adjacency checker updated for dealing with conne…
LeviCameron1 Nov 13, 2024
ec00356
Fixed bug with connecting merged cages not being reset correctly
LeviCameron1 Nov 18, 2024
8ca8158
Fixed bug with crashing when closing context menu then dragging new cage
LeviCameron1 Nov 18, 2024
5fd8e9b
Fixed bug with renaming cages of different types
LeviCameron1 Nov 18, 2024
64333f6
changed rack group design to fit better with data
LeviCameron1 Nov 18, 2024
f6580b5
Basic support for loading previous data for single grouped racks and …
LeviCameron1 Nov 20, 2024
49f21ef
Implemented basic saving for layout
LeviCameron1 Nov 20, 2024
57b0fda
remove unused types/functions
LeviCameron1 Nov 21, 2024
579774a
Fixed bug with racks and grouped racks not being hard locked to the g…
LeviCameron1 Nov 21, 2024
95de13a
Added the ability to delete cages from the layout editor
LeviCameron1 Nov 26, 2024
fc9c908
Merge branch '24.11_fb_cageUI' of https://github.com/LabKey/wnprc-mod…
LeviCameron1 Nov 27, 2024
b568403
Change permission classes to fit with labkey 24.11
LeviCameron1 Nov 27, 2024
8d323e0
Fixed bug not letting merging happen after rename
LeviCameron1 Dec 2, 2024
aae6227
Added resizeable room border and set up default room sizes
LeviCameron1 Dec 10, 2024
2e91879
Added room selector for saving, clear messages for saving, error for …
LeviCameron1 Dec 13, 2024
13639a0
Fixed issue with inconsistent grid generation
LeviCameron1 Dec 16, 2024
6f9eb38
Updated layout history table columns, fixed loading in data to work w…
LeviCameron1 Dec 20, 2024
ef45e74
Fixed bugs with loading in room border and assigning new groups after…
LeviCameron1 Dec 20, 2024
fcf50fe
Added popup after submission, fixed some bugs with submission and roo…
LeviCameron1 Dec 23, 2024
3a5d519
Fixed bug causing confirmation to reset room name unexpectedly, fixed…
LeviCameron1 Dec 23, 2024
dbfbaf3
Allowed pens to be saved
LeviCameron1 Dec 26, 2024
f12cdd3
Fixed issue with saving and moving pens and loading empty rooms that …
LeviCameron1 Dec 26, 2024
3813d66
Merge in docker build for 24.11
LeviCameron1 Jan 2, 2025
02d0e12
update docker build url
LeviCameron1 Jan 2, 2025
bbeaa80
Fix bug with incorrect scaling in connected rack groups
LeviCameron1 Jan 2, 2025
5cb902e
Changed redirect window from dev link to build link
LeviCameron1 Jan 2, 2025
39d734e
undo docker build change
LeviCameron1 Jan 2, 2025
2823f98
Fixed bug with renaming cage numbers
LeviCameron1 Jan 3, 2025
2da7663
Fixed bug with context menu popups not closing
LeviCameron1 Jan 8, 2025
e8de07e
Switch context menu styles
LeviCameron1 Jan 9, 2025
a7e73bb
Prep for moving to own module
LeviCameron1 Jan 10, 2025
3576265
Switched CageUI to java based module
LeviCameron1 Jan 10, 2025
e75aea8
Merge branch 'refs/heads/release24.11-SNAPSHOT' into 24.11_fb_cageUI
LeviCameron1 Jan 14, 2025
d7dbf84
Fixed cage ui schema not showing up properly
LeviCameron1 Jan 14, 2025
538fd67
Allow users to change racks in the layout editor
LeviCameron1 Jan 17, 2025
d055e77
Simplified cage object and fixed bug with connecting racks
LeviCameron1 Jan 17, 2025
05e05ad
added room templates and clear grid
LeviCameron1 Jan 23, 2025
1819850
Removed option to click past the popup for layout popups
LeviCameron1 Jan 24, 2025
3809f6d
Added overlay to other two layout pop ups
LeviCameron1 Jan 24, 2025
eed90ea
Fix bug with deleting multiple cages
LeviCameron1 Jan 24, 2025
135b60e
Added option to delete entire racks
LeviCameron1 Jan 27, 2025
4fd3c56
Fixed bug loading in previous rooms
LeviCameron1 Jan 30, 2025
3bf49f4
Added room gate object, Room template fixes and drag off-center bug fix
LeviCameron1 Feb 4, 2025
74f27ef
Added Gate and created reusable context menu
LeviCameron1 Feb 11, 2025
80927e8
Fixed bug causing the start drag in layout function to not be called …
LeviCameron1 Feb 11, 2025
fb8e686
Refactoring
LeviCameron1 Feb 12, 2025
c3dabad
More refactoring
LeviCameron1 Feb 12, 2025
cee42ba
Bug fix for redirect causing crash for template renaming
LeviCameron1 Feb 13, 2025
1e23f43
Test for checking existance of layout editor
LeviCameron1 Feb 17, 2025
cd48ed1
Somehow context was renamed. This is a fix for that.
LeviCameron1 Feb 17, 2025
ef4047f
Update WNPRC_EHRTest.java
LeviCameron1 Feb 19, 2025
9091eb8
Added security and permissions
LeviCameron1 Feb 19, 2025
c3f5559
Room list in home page now fetches data
LeviCameron1 Feb 20, 2025
27d1437
Update cageui.xml
LeviCameron1 Feb 20, 2025
a496870
Added extra context for tracking default racks
LeviCameron1 Feb 21, 2025
7a1e371
Added room search list to home page
LeviCameron1 Feb 24, 2025
4298fcd
Tests and some fixes for that
LeviCameron1 Feb 25, 2025
684af13
Added home page map for backtracking easily
LeviCameron1 Feb 26, 2025
69fd5e0
Permissions and Roles added
LeviCameron1 Feb 28, 2025
f51c552
Added ability to open and close room gates
LeviCameron1 Mar 4, 2025
0aabc3c
Added sub views for room pages and loading in previous rooms
LeviCameron1 Mar 5, 2025
31b3b2f
Fixed border and scaling issues with loading rooms in the view pages
LeviCameron1 Mar 6, 2025
a1d59cf
Added permissions for cage ui tables and front end checks to enable/d…
LeviCameron1 Mar 10, 2025
310f1ba
Bug fix for crashing when the user drags to the layout by clicking on…
LeviCameron1 Mar 10, 2025
a5a50bc
Merge branch 'release24.11-SNAPSHOT' into 24.11_fb_cageUI
LeviCameron1 Mar 10, 2025
8f1c938
Fix deleteRows bug in table permissions
LeviCameron1 Mar 10, 2025
18c5341
Bug fix for cage numbering on svg load for the home view
LeviCameron1 Mar 11, 2025
729c901
Bug fixes for loading in a room with connected and merged racks
LeviCameron1 Mar 12, 2025
3c729aa
Added modification table and cage positioning
LeviCameron1 Mar 14, 2025
fd75846
Add group tracking and fixed bug for finding racks in the same group
LeviCameron1 Mar 17, 2025
6a6495e
Fixed layout editor bug not allowing small cages to be paired with l…
LeviCameron1 Mar 19, 2025
bd669e8
Added rack modification section in cage UI home
LeviCameron1 Mar 21, 2025
bebd492
Schema and db script for cage modifications
LeviCameron1 Mar 21, 2025
8d81c4b
Bug fix for fast drag end calls would produce incorrect ids for racks
LeviCameron1 Mar 24, 2025
49b2393
Bug fix causing rename crashing
LeviCameron1 Mar 24, 2025
44f77a9
Bug fix for layout merging being detected on incorrect cage positions
LeviCameron1 Mar 25, 2025
7566ad5
Fixed adding room callbacks so errors don't crash
LeviCameron1 Mar 26, 2025
2f22858
Bug fix for deleting racks causing incorrect state changes
LeviCameron1 Mar 26, 2025
13a21e1
Fixed bug with deleting cages not splitting groups correctly
LeviCameron1 Apr 16, 2025
7d8ee4f
Bug fix for loading prev room. Effect got deleted somehow, this is ad…
LeviCameron1 Apr 16, 2025
bfa1b4e
Rack modification storage
LeviCameron1 Apr 18, 2025
666fb2c
Fix bug with group ids and same rackId naming
LeviCameron1 Apr 29, 2025
9cf61e7
Modification and Cage popup added, modification state, modification f…
LeviCameron1 Apr 29, 2025
16b8fde
added dynamic cage mods for single cages
LeviCameron1 Apr 30, 2025
01ed67c
Added table customizer and modification tables
LeviCameron1 May 5, 2025
17ca1bf
Switched modification id convention for constants
LeviCameron1 May 6, 2025
78d0ce1
Ctunnel capabilities using new constant naming convention
LeviCameron1 May 6, 2025
6adb580
Work to the modifications editing table for individual cages
LeviCameron1 May 7, 2025
3085673
Fix bugs with mod table causing left mod to be incorrect and duplicat…
LeviCameron1 May 7, 2025
196b75e
bug fix for template layouts getting cleared when saving them as anot…
LeviCameron1 May 8, 2025
c7b9f02
Cleanup logs
LeviCameron1 May 12, 2025
545e42f
Update package.lock
LeviCameron1 May 12, 2025
abae12d
Move function to global helpers from home helpers
LeviCameron1 May 20, 2025
affb087
Modifications ID correctly and modification saving
LeviCameron1 May 27, 2025
f65115f
Fixed loading after save so modifications appear when changed
LeviCameron1 Jun 2, 2025
94134e6
Small change to how svg modifications are ID
LeviCameron1 Jun 2, 2025
243d619
Cage Modification table work
LeviCameron1 Jun 9, 2025
2b25e32
Merge branch 'release24.11-SNAPSHOT' into 24.11_fb_cageUI
LeviCameron1 Jul 1, 2025
ce07030
Merge fixes
LeviCameron1 Jul 2, 2025
3cf43c6
Bug fix for cageUI not loading pens correctly
LeviCameron1 Jul 9, 2025
5977014
Added separate saving for cage mods (WIP)
LeviCameron1 Jul 30, 2025
3a82a7a
update cage_modifications tables
LeviCameron1 Jul 30, 2025
03a2c0d
Fix bug with subsections not being updated correctly
LeviCameron1 Jul 31, 2025
81a819a
Merge remote-tracking branch 'origin/24.11_fb_cageUI' into 25.7_fb_ca…
LeviCameron1 Aug 12, 2025
75f76ac
Update labkey dependencies
LeviCameron1 Aug 12, 2025
67dfdfa
Add filtering to options to prevent basic incorrect layouts
LeviCameron1 Aug 12, 2025
93f834f
Optimize imports
LeviCameron1 Aug 12, 2025
b68e0b9
Fixed prevMods object reference and added beginning of final modifica…
LeviCameron1 Aug 12, 2025
01e0668
Added social panel mod and refactored temporary mod saving
LeviCameron1 Aug 14, 2025
7a26b7a
Bug fix for crashing due to incorrect id selector
LeviCameron1 Aug 14, 2025
d11e008
Cage modification auto submission for layout editor
LeviCameron1 Aug 29, 2025
8542154
Added cage modification history API for saving from the layout editor
LeviCameron1 Sep 2, 2025
6a47479
Error handling for cage modification history api
LeviCameron1 Sep 4, 2025
e9197b9
Bug fix for room layouts causing crashing to when switching rooms
LeviCameron1 Sep 5, 2025
bcb049c
Add new cage modifications history table to java
LeviCameron1 Sep 5, 2025
26c6ced
Java API creation for cage UI layout editor submission
LeviCameron1 Sep 11, 2025
4e5ea43
Merge branch 'refs/heads/release25.7-SNAPSHOT' into 25.7_fb_cageUI
LeviCameron1 Sep 12, 2025
f15b024
update local with merge
LeviCameron1 Sep 12, 2025
f5a1427
Add ehr_lookups.rooms layout data query updater
LeviCameron1 Sep 15, 2025
88e2b14
Finalize data saving for room layouts on java api
LeviCameron1 Sep 16, 2025
c35a399
Fix sql script after merge from 25.7
LeviCameron1 Sep 16, 2025
31086b1
clean up and rename layout saving api
LeviCameron1 Sep 16, 2025
a99cdc6
Added unique cage ids to allow for duplicate cage numbering
LeviCameron1 Sep 17, 2025
bcc9f0d
Bug fixes for splitting racks, cage numbering, context menus after de…
LeviCameron1 Sep 18, 2025
c56e981
Add validation for cage numbering and fix bug for loading in previous…
LeviCameron1 Sep 18, 2025
ec54d7e
Fix error in calculating previous cage coords
LeviCameron1 Sep 19, 2025
0788033
Correct names so they fit sql defs
LeviCameron1 Sep 19, 2025
a09f335
Switch css styles to better fit portrait layout
LeviCameron1 Sep 19, 2025
5ee6cd7
Added detailed errors list on validation and loading screen for submi…
LeviCameron1 Sep 22, 2025
cac2119
Bug fix for incorrect rack svg ids
LeviCameron1 Sep 23, 2025
4c0166a
Added type names to errors for duplicate cage numbering
LeviCameron1 Sep 23, 2025
aa183dc
Fix bug with cage modifications not correctly copying ids
LeviCameron1 Sep 23, 2025
d9a4e30
added cage modification submission workflow
LeviCameron1 Sep 29, 2025
90a0c23
Added cages table following tree like structure with rack and room
LeviCameron1 Sep 30, 2025
acb72bc
Added new tables for histories
LeviCameron1 Oct 2, 2025
56a06c6
Update sql to handle new layout_history and racks tables
LeviCameron1 Oct 2, 2025
3c77e79
Added in default room loading with new table structure
LeviCameron1 Oct 6, 2025
3381baa
Fix position of context menu after layout switch to portrait
LeviCameron1 Oct 6, 2025
c86bf92
Started template saving for layouts
LeviCameron1 Oct 10, 2025
c1c9b18
Added room history part to layout editor submission
LeviCameron1 Oct 15, 2025
da55a0f
Add cage history table
LeviCameron1 Oct 22, 2025
90bd31f
Add support for loading in real rooms
LeviCameron1 Oct 22, 2025
641d44a
Updated history forms to work with new tables
LeviCameron1 Oct 27, 2025
a7146f5
Merge branch 'release25.7-SNAPSHOT' into 25.7_fb_cageUI
LeviCameron1 Oct 27, 2025
44da934
Finished template layouts data packaging
LeviCameron1 Oct 28, 2025
0c8b924
Finish submission function to process transactions with bundled forms
LeviCameron1 Oct 29, 2025
e29afcb
Added new popup that lets users create new racks from existing rack t…
LeviCameron1 Nov 4, 2025
46bf14d
Remove room requirement from racks table
LeviCameron1 Nov 4, 2025
7360ae5
Add java code for cage history table
LeviCameron1 Nov 4, 2025
e40dd9c
Update tables to use objectids instead of rowids. Added real room lay…
LeviCameron1 Nov 11, 2025
8b3c016
Fix issue with loading in real rooms after object id switch
LeviCameron1 Nov 11, 2025
36ba7eb
Added default cage modifications to data submission
LeviCameron1 Nov 13, 2025
f4fb713
Work done to the server side layout submission
LeviCameron1 Dec 1, 2025
3b58079
update context manager for home into navigation and room management. …
LeviCameron1 Dec 5, 2025
0a8a488
bug fix for mod saving to be duplicated
LeviCameron1 Dec 10, 2025
6d31f3a
Switch contexts for home. Update mod saving to fix bugs and work with…
LeviCameron1 Dec 16, 2025
d9c65b5
Bug fix for modification saving due to shared reference being duplica…
LeviCameron1 Dec 16, 2025
e151714
Bug fixes for loading in racks and cages for side menu
LeviCameron1 Dec 22, 2025
3abfcc9
Add cage details, fix crashing for side bar racks and cages. Add exte…
LeviCameron1 Dec 30, 2025
defe776
Bug fix for saving mods between room layouts
LeviCameron1 Jan 5, 2026
683532b
Bug fix for saving room mods not being correct when handling modIds
LeviCameron1 Jan 9, 2026
6f892af
incorrect modId name
LeviCameron1 Jan 9, 2026
7d0423e
Updated mod submission to detect certain modifications and makes chan…
LeviCameron1 Jan 9, 2026
8e33540
Add legend to room display
LeviCameron1 Jan 15, 2026
c3987da
Update test to work with new cageui id naming
LeviCameron1 Jan 15, 2026
95d4046
Remove supports tunnel from rack types table since it went unused
LeviCameron1 Jan 16, 2026
0adad97
Intellij code cleanup
LeviCameron1 Jan 20, 2026
e625725
Fix enum for room object types
LeviCameron1 Jan 20, 2026
9788690
Fix bug causing crashing for template rooms
LeviCameron1 Jan 22, 2026
faa1f05
change rack and cage table PK to objectID
LeviCameron1 Jan 22, 2026
983fd84
Bug fix for saving template rooms
LeviCameron1 Jan 22, 2026
f88122c
Added group rotations to rack groups so that they can be detected fro…
LeviCameron1 Jan 28, 2026
34c70be
Updated racks and rack_types forms to include additional info. Fix bu…
LeviCameron1 Jan 29, 2026
f1ff8a1
Set default rotation for groups to 90 degrees
LeviCameron1 Jan 30, 2026
9e63404
Added trigger scripts for cage history and rack history
LeviCameron1 Feb 4, 2026
7bca604
Add group rotations to mod loading
LeviCameron1 Feb 4, 2026
b856e29
Fix bug with submitting layouts from racks that were pre-created
LeviCameron1 Feb 5, 2026
6012667
Fix context menu css annoyingly causing page to move when opened
LeviCameron1 Feb 6, 2026
d2917d2
Add new cage column and rename old column to cageOld
LeviCameron1 Feb 9, 2026
d63094d
Separate component for cage modifications editor and cage editor popup
LeviCameron1 Feb 9, 2026
2c7301f
Update UI for cage display popup to support animal editing
LeviCameron1 Feb 10, 2026
deec82c
Add feature that when creating racks it automatically assigns the rac…
LeviCameron1 Feb 10, 2026
5d8b1cc
remove console logs
LeviCameron1 Feb 10, 2026
e29b8ca
Update css styles
LeviCameron1 Feb 11, 2026
216758e
remove console logs
LeviCameron1 Feb 16, 2026
571bb84
Fix bug preventing templates from being saved correctly
LeviCameron1 Feb 16, 2026
8f87adf
Create instruction files
LeviCameron1 Feb 18, 2026
3f5f5ad
Start animal transfer client side work
LeviCameron1 Feb 18, 2026
1b9f6e5
Update old cage column and add new cage column
LeviCameron1 Feb 18, 2026
6a31998
Revert "Update old cage column and add new cage column"
LeviCameron1 Feb 18, 2026
f87dd7d
Revert "Start animal transfer client side work"
LeviCameron1 Feb 18, 2026
b653bd0
Merge branch 'release25.7-SNAPSHOT' into 25.7_fb_cageUI
LeviCameron1 Feb 18, 2026
068b249
rehydrate npm packages
LeviCameron1 Feb 18, 2026
ec140e0
css updates to rack and cage details.
LeviCameron1 Feb 19, 2026
79fe7de
Add size to rack types, remove name definition from sql file, and add…
LeviCameron1 Feb 19, 2026
2abb2a9
Update rack-type name field to be auto generated, fix rack change fun…
LeviCameron1 Feb 20, 2026
a5e05ad
Add cages overview for racks to display all animals within rack by ca…
LeviCameron1 Feb 20, 2026
529bcee
Implemented Rack Changes
LeviCameron1 Feb 26, 2026
e6b9639
Step one of switching cage home navigation to actionURL
LeviCameron1 Feb 26, 2026
b19fa4c
Update action url functionality for cageUI home
LeviCameron1 Feb 28, 2026
dc0b4e2
Bug fix for loading in racks and cages for home from url
LeviCameron1 Mar 2, 2026
0852777
Reset rack mods when changing rack type, specifically if rack manufac…
LeviCameron1 Mar 4, 2026
beadb1b
Force refresh of entire page when rack changes are made.
LeviCameron1 Mar 4, 2026
ba8b82b
Remove unused pages
LeviCameron1 Mar 4, 2026
7c4faec
Add validation to prevent room saving of templates and rooms, if they…
LeviCameron1 Mar 4, 2026
77c33d0
Auto add template- string to template renaming so users do not have to
LeviCameron1 Mar 4, 2026
6b102b1
Remove templates from room list
LeviCameron1 Mar 4, 2026
cb7b0da
Add permissions to cage home
LeviCameron1 Mar 6, 2026
86858e3
Webpack for iOS device testing through VPN
LeviCameron1 Mar 13, 2026
13096c0
Css changes for iOS chrome
LeviCameron1 Mar 13, 2026
0f7b049
Demo on how to set page meta tags
LeviCameron1 Mar 13, 2026
1fc61b7
Added ability to mark racks as damaged during the rack change process
LeviCameron1 Mar 13, 2026
cf4d36b
Added entry point for form to update rack condtiions for racks that a…
LeviCameron1 Mar 13, 2026
6dcd4d0
Users should only be able to assign racks that aren't in a current room.
LeviCameron1 Mar 16, 2026
696de76
Switch privacy and visual contact dividers
LeviCameron1 Mar 16, 2026
f803efd
Update legend svg file to switch privacy and visual dividers
LeviCameron1 Mar 16, 2026
d3f019e
Optimize Imports
LeviCameron1 Mar 17, 2026
26e63a2
Code Cleanup
LeviCameron1 Mar 17, 2026
b140435
Documentation updates
LeviCameron1 Mar 17, 2026
fcf5969
Fix tests and add new one for cage home
LeviCameron1 Mar 17, 2026
df74ed8
remove object id for racks test data
LeviCameron1 Mar 17, 2026
43a3357
Update WNPRC_EHRTest.java
LeviCameron1 Mar 18, 2026
6129354
Remove cage column switch in housing as this shouldn't be added yet
LeviCameron1 Mar 18, 2026
645be77
remove cageOld from wnprcOverRides
LeviCameron1 Mar 18, 2026
53f70d1
Update copywriting
LeviCameron1 Mar 18, 2026
6a0b618
Add four new rack manufacturers to lookup
LeviCameron1 Mar 18, 2026
fc0f912
Update docs with descriptions of the tables
LeviCameron1 Mar 19, 2026
818aa94
Introduce single point for localhost ip address for ios webpack
LeviCameron1 Mar 19, 2026
ab32b19
Update cageui-25.002-25.003.sql
dnicolalde Mar 19, 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
5 changes: 4 additions & 1 deletion CageUI/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* * Copyright (c) 2025 Board of Regents of the University of Wisconsin System
* * Copyright (c) 2026 Board of Regents of the University of Wisconsin System
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
Expand All @@ -22,7 +22,10 @@ plugins {
id 'org.labkey.build.module'
}
dependencies {
implementation project(path: "${project.parent.path}:DBUtils", configuration: "apiJarFile")

BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: "apiJarFile")
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: 'published', depExtension: 'module')
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:ehrModules:ehr", depProjectConfig: 'published', depExtension: 'module')
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: "${project.parent.path}:DBUtils", depProjectConfig: 'published', depExtension: 'module')
}
143 changes: 143 additions & 0 deletions CageUI/documentation/CageUI Instructions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<!--
~ /*
~ * Copyright (c) 2026 Board of Regents of the University of Wisconsin System
~ *
~ * Licensed under the Apache License, Version 2.0 (the "License");
~ * you may not use this file except in compliance with the License.
~ * You may obtain a copy of the License at
~ *
~ * http://www.apache.org/licenses/LICENSE-2.0
~ *
~ * Unless required by applicable law or agreed to in writing, software
~ * distributed under the License is distributed on an "AS IS" BASIS,
~ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ * See the License for the specific language governing permissions and
~ * limitations under the License.
~ */
-->

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CageUI Layout Editor Rules</title>
</head>
<body>
<h3>Workflow</h3>
<ol>
<li>When initially loading the page select the grid size. For larger rooms with more cages you would want to select
a larger grid to ensure that all the items can be placed on the layout. This grid size cannot be changed later.
</li>
<li>Move items to the layout by dragging and dropping them in position</li>
<li>Open an items context menu by right-clicking the item.
<ol>
<li>
Different items have different context menus, but they are all accessed the same way.
</li>
</ol>
</li>
<li>Place cages next to each other to merge them into the same rack or connect the racks.
<ol>
<li>
Cages cannot be merged unless they share the same type.
</li>
<li>
Generally you should create your racks before assigning them a rack type.
</li>
</ol>
</li>
</ol>
<h3>Context Menus</h3>
<div>
<h4>Cage context menus support the following actions</h4>
<ol>
<li>
Removing the cage or rack from the layout.
</li>
<li>
Changing the rack.
<ul>
<li>
In this menu you can also create new racks. Open the menu and enter the rack type and rack id, and it
will be automatically assigned to that rack when you save.
</li>
</ul>
</li>
<li>
Changing the cage number.
</li>
<li>
Rotating the rack group.
<ul>
<li>
Rotations start at 90 degrees.
</li>
<li>
Rotations are done clockwise. For the starting rotation and position this means that the top of the rack group
is the right side of the group.
</li>
<li>
Rack groups are all the cages/racks that are connected to each other.
</li>
</ul>
</li>
</ol>
</div>
<div>
<h4>Room Object context menus support the following actions</h4>
<ol>
<li>
Removing the room object from the layout.
</li>
<li>Gate objects have have two additonal actions.
<ol>
<li>
Set the room that the gate is connected to. This indicates that the two rooms have a connection that animals can go through.
</li>
<li>
Closing/opening the gate, indicating if the gate is open or closed and if animals are able to go between rooms.
</li>
</ol>
</li>
</ol>
</div>

<h3>Creating Templates</h3>
<div>
<h4>Rules for creating templates</h4>
<ul>
<li>
All racks/cages in a room must have a default rack type. By default, this is what they are when placed in the room.
This ensures that real racks/cages are not placed in rooms that "do not exist."
</li>
</ul>
</div>
<h3>Creating Real Rooms</h3>
<div>
<h4>Rules for creating real room layouts</h4>
<ul>
<li>
All racks/cages in a room must have a real rack type.
This ensures that racks/cages that "do not exist" are not placed in rooms that are real.
</li>
<li>No duplicate cage numbers.</li>
</ul>
</div>
<h3>Additional Notes for Both Types of Layouts</h3>
<div>
Both real rooms and template rooms have a resizeable border that determines the border of the room.
This helps compact the size of the layout into a more realistic room size when working with different size starting
grids. Ensure that no room objects or cages are placed outside this border as they will not be shown when viewing the
room from the display page.
</div>
<div>
<h4>Additional Actions</h4>
<ol>
<li>The Grid Enabled button turns off the grid lines to show a better view of what the room will look like on
the display page.
</li>
<li>Clear Layout wipes all the items from the layout, allowing you to start over.</li>
</ol>
</div>
</body>
</html>
124 changes: 124 additions & 0 deletions CageUI/documentation/Layout Editor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Layout Editor Documentation

This readme explains how the layout editor works and how to set up new room objects.

You can access the view with this url within your main container

`/cageui/WNPRC/EHR/layoutEditor.view`

If you are running the dev server just edit it slightly.

`/cageui/WNPRC/EHR/layoutEditorDev.view`

In order to use this project, make sure to enable the module in your folder set up within labkey.

This project was built for the Chrome browser. If you use a different browser, it may not work as expected. Additionally,
the layout editor was not built for mobile devices. The idea behind this is that once the users build the rooms, they can
be modified on mobile from different endpoints but the act of room creation is better done on desktop.


# Workflow in detail

## Context Manager

The main layout editor entry point is `LayoutEditor.tsx`. This file loads in previous room data if required or simply starts
a new room layout. When starting a new room layout, the user can select a room size from a list of predefined sizes. These sizes
are present in the `constants.ts` file. Once a room is created with a certain size, this cannot be changed.

The layout editor initializes with a context manager `LayoutEditorContextManager.tsx` with its types described in
`layoutEditorContextTypes.ts`. This context manager serves as a place to store the room state and has functions
for any edits that might occur to the room state.

In the context manager (CM) there are two Room objects, **localRoom** and **room**, **room** serves as the initial room or
previous room, and **localRoom** is the room that has changes applied to. This allows development to work with the previous room and
the current room that has local changes applied to it. You can use **room** when saving to check for changes or apply previous room data
to the **localRoom** that is being saved, **room** should not be modified at all during development.

**unitLocs** is another important state within the CM. This state tracks cage positional data within the layout and
serves it in an easy-to-access object. Its keys are rack types and the values contain the x and y global coords of the cage object.
This state tracks the locations of the cages, by rack type. This is used within the editor to determine if two cages are
adjacent to each other. Any action that changes the cage location in the editor should update this state with the
new locations. Please note that the coordinates here are global coords.

The last important state in the CM is **cageConnections** this state tracks which cages
are connected/merged to other cages and is used within the CM when deleting cages to split cages into new groups.
An example this is what happens when you have a row of three connected cages and delete the middle cage? The system will
have to split up the remaining two cages on either side into new groups to handle this correctly. This is a complicated
group of functions that hopefully shouldn't need to be updated as it should be working, but it's worth noting here. Additionally,
it can be avoided by proper room creation or by deleting the entire group of cages/racks and rebuilding them if needed.

### **Important**

While the CM manages the state, this doesn't automatically handle the changes completely. There is a lot of DOM
manipulation with adding new objects, merging cages, connecting racks, etc. These DOM changes cannot
be performed within the CM and have to be done on the same file that the layout-grid SVG is served from. That is why the
`Editor.tsx` file is very long.

## Editor

The `Editor.tsx` file is another important file here in the layout editor portion of the project.
This file manages all the SVG DOM manipulation and changes that occur when adding and moving objects around the room.
The file is also where the majority of the code is written for the layout editor.
By pairing this file with the context manager and any used functions within the helper files you essentially have the
entire layout editor. The editor file uses effects to track changes to the unitLocs state to determine if a merge or connect
is requested, if the room should be reloaded with new changes to **localRoom** or when objects/cages are added to the layout.
It uses D3.js and basic DOM functions to handle the dragging and placement of the objects within the editor.

## Templates vs Real layouts

The layout editor supports two styles of rooms, templates and real. While similar in building they differ on a couple
fundamentals. Template rooms are created with the idea that they do not represent a real physcial location. They are merely
a layout that will be loaded into the editor in the future for easier building by users. The major difference and key point
here is that when a cage is dragged onto the layout it is considered to be a "default" of that cage type. "Defaults" do not
represent real racks or cages and as such they cannot be saved in real rooms. So in order to save a room as a template,
it's racks must all be a "default" type, otherwise it will throw an error. Likewise in order for a real room to be saved
it cannot have any "default" types and the user must assign a real physical rack to that position. The system will not show
racks that are already in other rooms preventing double assignment.

## Editor Context Menu

Every object that can be placed within the room has a context menu that the user can access via right-clicking.
Room objects and cages have different menus, but they use the same component. Developers can add additional components to the
context menu via the "menuItems" prop. Refer to the `CageUI Insturctions.html` file on what each current menu item will do.

## Adding New Objects

If you would like to add additional room objects or cage sizes that is also possible. Here is what you will have to do to
make this possible.

1. Create your SVG file within an editor, I used Adobe Illustrator for this and exported it as an SVG. Once you create this
file that will be used as your object add it to `CageUI/resources/web/CageUI/static`.
1. If you encounter issues with loading the file after adding it here try going to `localhost:8080/cageui/static/{filename}.svg`
to ensure that it works and is loaded in correctly.
2. Add your object under the correct enum in `typings.ts`.
1. If your new object is a rack/cage type add it under RackTypes, create a default as well.
2. If your new object is a room object (ex. door) then add it under RoomObjectTypes.
3. Add your new object to ehr_lookups.cageui_item_types. Ensure your enum value and table values are matching. Additionally,
if your item is a caging type, give it a size in the description field of the table. The size is the number of cells of the object both length and width.
This is untested for caging types that aren't perfect squares.
3. Next you should add your object into the `Editor.tsx` file via the **RoomItemTemplate** component. Look to others for examples.

If done correctly, your new object should be available to be placed within the editor.

## Important Notes

Here are some additional things to keep in mind when using the layout editor.

1. When cages are placed within the layout they are assigned a rack group, rack and then their cage number/id
2. Users can merge two cages. When this is done, it moves the dragged cage into the target cages rack.
3. Users can connect two cages. When this is done, it moves the dragged cage and rack into the target cages rack group.
4. Merging and connecting is created with the idea that it lets users build racks and then connect racks, all from single cages. These
changes are reflected within the DOM as well as the state.
1. To get a grasp on what goes on here, I would suggest inspecting the 'layout-grid' SVG within the DOM and using an
effect to console log the localRoom state variable from the Editor.tsx file.











45 changes: 45 additions & 0 deletions CageUI/documentation/Migrating to cageUI cages table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@


# Housing Changes

### 1. Add New Cage Column
#### A.
We have to remove the old cage table that is used in ehr_lookups with the new cage table in the cageui module.
For the WNPRC this change needed to be done in the following files.

1. >WNPRC_EHR/resources/queries/study/Housing.query.xml
2. >WNPRC_EHR/resources/queries/study/Housing/.qview.xml
3. >WNPRC_EHR/resources/queries/study/Housing/Active Housing.qview.xml
4. >WNPRC_EHR/resources/queries/study/Housing/Current Housing Plus Weight.qview.xml
5. >WNPRC_EHR/resources/referenceStudy/study/datasets/datasets_metadata.xml
6. >WNPRC_EHR/resources/web/ehr/metadata/Default.js
7. >WNPRC_EHR/resources/web/ehr/metadata/Metadata.js
8. >WNPRC_EHR/resources/web/wnprc_ehr/wnprcOverRides.js

#### B.
After changing these files, go into the table definition editor in EHR and rename the cage column to cageOld.
Then add a new column named cage. This will rename the previous cage column while preserving the data and
allowing us to work with the new cage column under the old name.

As we add new data to the housing table we should insert it under the new column if using the new housing system.
If using the old housing system, insert it under the old column. This will allow us to use the old housing system while
testing the new system until we are ready to switch over to the new housing system.

At the WNPRC we will only be using the new system in a select few rooms for testing. Unfortunately, the users will have
to submit their housing changes under both systems during this phase until we are ready to switch over. This will ensure
data integrity.

### 3. Cage Details
Add override for cageDetails.html and cageDetails.view.xml including new cages table instead of cages from ehr_lookups.


Next go through and update the links so they point to your module instead of "ehr".
Add rooms.query.xml file to your ehr_lookups schema and edit the url there as well.

Old:
>/ehr/WNPRC/EHR/cageDetails.view?room=a140a&cage=0001

New:
>/wnprc_ehr/WNPRC/EHR/cageDetails.view?room=a140a&cage=0001


Loading
Loading