Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JeMPI UI configuration #229

Merged
merged 244 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
244 commits
Select commit Hold shift + click to select a range
1033396
feat: wip implement config prototyping
issambaccouch Dec 11, 2023
3bdb59c
chore: wip implement config common tab
issambaccouch Dec 12, 2023
aa973e1
chore: implement config unique interaction/gr tab
issambaccouch Dec 14, 2023
4b54b4e
chore: add deterministic tab
issambaccouch Dec 21, 2023
22522b5
chore: add blocking tab
issambaccouch Dec 22, 2023
16cc8d6
chore: update deterministic tab
issambaccouch Dec 22, 2023
7e7f6fb
feat: add golden record list
issambaccouch Dec 23, 2023
804cff4
fix: navigation menu not showing up
issambaccouch Dec 29, 2023
058dce3
feat: add settings diagram
issambaccouch Dec 29, 2023
f455a4f
Merge remote-tracking branch 'upstream/dev' into JMPI-786-implement-s…
NyashaMuusha Apr 17, 2024
76f02d2
added drag and drop functionality to widget nodes
NyashaMuusha Apr 18, 2024
514e7e4
added leader line dependency, refactored interactive nodes
NyashaMuusha Apr 23, 2024
db66851
Merge pull request #227 from jembi/Jmpi-make-nodes-draggable
MatthewErispe Apr 24, 2024
e76f38d
added draggable bounds,added drag functionality to source
NyashaMuusha Apr 25, 2024
492cd77
changed source label
NyashaMuusha Apr 25, 2024
2d5c867
update yarn lock
MatthewErispe Apr 25, 2024
dcaceb8
Merge pull request #228 from jembi/CU-86byfx5y9_Create-Draggable-Elem…
MatthewErispe Apr 25, 2024
48b650d
added configuration end point
NyashaMuusha Apr 26, 2024
22eecd6
added unit test for get configuration end point
NyashaMuusha Apr 29, 2024
fa0670d
added dependencies
NyashaMuusha Apr 29, 2024
46c193c
added dependencies
NyashaMuusha Apr 29, 2024
d97187b
Merge remote-tracking branch 'upstream/CU-86byc5x3c_Create-GetConfigu…
NyashaMuusha Apr 29, 2024
32e94ce
reverted yarn-lock file
NyashaMuusha Apr 29, 2024
8d98e31
fix lint issues
MatthewErispe Apr 29, 2024
57ee280
added generateID function to helpers
NyashaMuusha May 3, 2024
fb1cc17
unit tests for settings and common setting components
NyashaMuusha May 3, 2024
9c0ad13
refactored common settings
NyashaMuusha May 3, 2024
7a08e04
added demographic data, updated dependencies
NyashaMuusha May 3, 2024
36f1ef9
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86by51anc_…
NyashaMuusha May 3, 2024
bc30a48
refactored unique to GR
NyashaMuusha May 7, 2024
05cea9d
added unit tests
NyashaMuusha May 7, 2024
3899eed
updated imports
NyashaMuusha May 7, 2024
bb2e12a
Merge pull request #232 from jembi/CU-86by51anc_Create-Common-Form---…
MatthewErispe May 7, 2024
3011bef
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86byc5x3c_…
MatthewErispe May 7, 2024
4fb3a1c
Merge pull request #231 from jembi/CU-86byc5x3c_Create-GetConfigurati…
MatthewErispe May 7, 2024
355aac5
added unique to interaction
NyashaMuusha May 8, 2024
fd90617
added additional nodes to golden record lists
NyashaMuusha May 9, 2024
1c5824f
refactored common settings
NyashaMuusha May 9, 2024
b64ea5a
Merge remote-tracking branch 'upstream/CU-86by51gnb_Create-Form-Uniqu…
NyashaMuusha May 9, 2024
fce81e4
removed edit tool bar
NyashaMuusha May 9, 2024
4fc91af
removed edit tool bar
NyashaMuusha May 9, 2024
fbd68be
created helper function
NyashaMuusha May 9, 2024
b324bde
Merge remote-tracking branch 'upstream/CU-86by51gnb_Create-Form-Uniqu…
NyashaMuusha May 9, 2024
de08b9f
removed unused fields, refactored helper function
NyashaMuusha May 9, 2024
1722f1d
Merge remote-tracking branch 'upstream/CU-86by51hf7_Create-Form-Uniqu…
NyashaMuusha May 9, 2024
372c185
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86by51hf7_…
NyashaMuusha May 9, 2024
bde8356
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86by51gnb_…
MatthewErispe May 10, 2024
3055ea7
Merge pull request #236 from jembi/CU-86by51hf7_Create-Form-Unique-to…
MatthewErispe May 10, 2024
5209177
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86by51gnb_…
MatthewErispe May 10, 2024
91a921f
refactored generateid function
NyashaMuusha May 10, 2024
d0e6682
removed edit tool bar
NyashaMuusha May 10, 2024
d49a269
Merge remote-tracking branch 'upstream/CU-86by51gnb_Create-Form-Uniqu…
NyashaMuusha May 10, 2024
4c22fed
Merge pull request #235 from jembi/CU-86by51gnb_Create-Form-Unique-to…
MatthewErispe May 10, 2024
e81adf4
renamed folder
NyashaMuusha May 10, 2024
7703f49
refcatored golden record lists
NyashaMuusha May 10, 2024
ea83165
Added get configuration endpoint for fetching the config json data
May 12, 2024
db4fbb7
removed the configuration key
May 12, 2024
d0dbac2
parsed stringified json to valid json
May 12, 2024
462c852
Reformatted code
May 12, 2024
bd48a20
refactored rowsWithIds, refactored unit test
NyashaMuusha May 13, 2024
cd80901
Defined record and returned the configuration
May 13, 2024
feaab9f
Working deserialization
May 13, 2024
1fb1ede
remove configuration key
May 13, 2024
29fc74a
included none null
May 13, 2024
7a9ac5e
Get file path from enviroments
May 13, 2024
64088e7
refactored table column
NyashaMuusha May 13, 2024
a13b085
refactored handle cancel click
NyashaMuusha May 13, 2024
3d05e80
used a queryLink list
May 14, 2024
fe48612
code clean up
MatthewErispe May 14, 2024
374a58a
Revert changes
May 14, 2024
4edf26e
added csv col
NyashaMuusha May 14, 2024
47d4fa1
Merge remote-tracking branch 'upstream/CU-86by51r1q_Create-Form-Golde…
NyashaMuusha May 14, 2024
2084145
Update JeMPI_Apps/JeMPI_LibAPI/src/main/java/org/jembi/jempi/libapi/B…
MatthewErispe May 14, 2024
c8363b8
fix coderabbitai suggested change
MatthewErispe May 14, 2024
8561c52
refactor implementation
MatthewErispe May 14, 2024
2168444
Update JeMPI_Apps/JeMPI_LibAPI/src/main/java/org/jembi/jempi/libapi/R…
MatthewErispe May 14, 2024
fd9c198
refactor error handling
MatthewErispe May 14, 2024
8065dcd
refactor error handling
MatthewErispe May 14, 2024
713672c
Merge pull request #239 from jembi/CU-86byatqw4_Create-Load-Configura…
MatthewErispe May 14, 2024
71e125e
renamed component
NyashaMuusha May 15, 2024
3f2fa3b
added input fields to source view
NyashaMuusha May 15, 2024
894de82
Completed confugation upload endpoint - untested
May 15, 2024
c236ef2
Safely reject config request
May 15, 2024
9e7b78c
Removed error imports from BackEnd.java
May 15, 2024
46c0a06
Cleared unused imports
May 15, 2024
76c8d60
Made the app/conf/ file system read-write
May 15, 2024
e4699a6
Reformatted code
May 15, 2024
61ae391
CU-86byrhr3h - add csvCol property
NyashaMuusha May 15, 2024
9471311
update csvCol to number field instead of string
MatthewErispe May 16, 2024
29504c9
Merge pull request #240 from jembi/CU-86by51r1q_Create-Form-Golden-Re…
MatthewErispe May 16, 2024
3a9891e
refactored source view
NyashaMuusha May 16, 2024
5bcfcb2
refactored source view
NyashaMuusha May 18, 2024
73cad3e
refactored transform field function
NyashaMuusha May 20, 2024
5d0a12a
added demographicData prop
NyashaMuusha May 20, 2024
f24a170
added select fields to design view
NyashaMuusha May 20, 2024
71743af
unit test
NyashaMuusha May 20, 2024
c2d550d
added unit test, refactored fields
NyashaMuusha May 21, 2024
e6f73d8
added unit test
NyashaMuusha May 21, 2024
9af78ff
Merge branch dev' into CU-86by517dy_Create-Configuration-API-Endpoint
MatthewErispe May 21, 2024
40a1453
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86byrr5pw_…
NyashaMuusha May 21, 2024
75150ba
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86byrr0zg_…
NyashaMuusha May 21, 2024
a398afa
implement coderabbitai suggestion
MatthewErispe May 21, 2024
f3f3d4d
refactoted soruce view
NyashaMuusha May 22, 2024
d81ef1b
Merge remote-tracking branch 'upstream/CU-86byrr0zg_Source-View' into…
NyashaMuusha May 22, 2024
e6e98af
changed text style
NyashaMuusha May 22, 2024
56b3f37
Merge pull request #242 from jembi/CU-86by517dy_Create-Configuration-…
MatthewErispe May 23, 2024
e6ee870
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86byrr0zg_…
MatthewErispe May 23, 2024
82cb332
code clean up
MatthewErispe May 23, 2024
e71a563
Merge pull request #248 from jembi/CU-86byrr0zg_Source-View
MatthewErispe May 23, 2024
30fc3b9
CU-86byrr1tv - Design View
NyashaMuusha May 23, 2024
3828019
Merge remote-tracking branch 'upstream/CU-86byrr5pw_Add-Select-Field-…
NyashaMuusha May 23, 2024
807577d
merge confilct fixes
NyashaMuusha May 23, 2024
d109133
implement get fields configuration
MatthewErispe May 23, 2024
83ce781
Merge remote-tracking branch 'upstream/CU-86by1w64p_JeMPI-UI-Configur…
NyashaMuusha May 23, 2024
0284858
fixed mergre conflicts
NyashaMuusha May 23, 2024
2a5815e
update get and post system configuration
MatthewErispe May 23, 2024
92a4e7d
Remove JsonFieldsConfig.java, all references and json-simple library
MatthewErispe May 24, 2024
2409084
Update JeMPI_Apps/JeMPI_UI/src/utils/helpers.ts
MatthewErispe May 24, 2024
e7c2d9e
Update JeMPI_Apps/JeMPI_UI/src/pages/settings/deterministic/Determini…
MatthewErispe May 24, 2024
7fc1efe
code clean up
MatthewErispe May 24, 2024
d344d98
update key value
MatthewErispe May 24, 2024
774d1cf
update mock load configuration logic
MatthewErispe May 24, 2024
cc4a9a6
Merge pull request #250 from jembi/CU-86by882m6_Remove-dependency-on-…
MatthewErispe May 27, 2024
09c8535
Merge pull request #247 from jembi/CU-86byrr5pw_Add-Select-Field-List…
MatthewErispe May 27, 2024
bc000fb
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86byw9prc_…
MatthewErispe May 27, 2024
e833b10
Validate, LInking, Matching Tabs
NyashaMuusha May 27, 2024
517a63d
fix mapping of configuration
MatthewErispe May 27, 2024
256ccce
added sourceview
NyashaMuusha May 28, 2024
9b4c02c
Update JeMPI_Apps/JeMPI_UI/tests/services/configuration.test.ts
MatthewErispe May 28, 2024
50f0d4b
update configuration mock data
MatthewErispe May 28, 2024
5690105
Merge pull request #252 from jembi/CU-86byw9prc_Load-Configuration-In…
MatthewErispe May 28, 2024
98f7ef2
Merge remote-tracking branch 'upstream/CU-86by1w64p_JeMPI-UI-Configur…
NyashaMuusha May 28, 2024
03b8084
CU-86byyaner - Source view should be in a table format ie Rule 1 | R…
NyashaMuusha May 28, 2024
9780048
CU-86byyamnw - Subtabs for Linking, Validating and Matching
NyashaMuusha May 28, 2024
43dffb7
refactored configuration type
NyashaMuusha May 30, 2024
ee544c2
refactored deterministic tabs
NyashaMuusha May 30, 2024
5d67239
added unit tests
NyashaMuusha May 31, 2024
a0a9838
refactored deterministic component
NyashaMuusha May 31, 2024
aed4b81
CU-86bz1zxuq - Code Review Changes
NyashaMuusha Jun 4, 2024
f02ce41
added rules to blocking source view
NyashaMuusha Jun 5, 2024
66c98a8
CU-86bz2z6at - Update Select Comparator Function
NyashaMuusha Jun 5, 2024
1c55a54
code clean up
MatthewErispe Jun 6, 2024
49a0aca
updated types
NyashaMuusha Jun 6, 2024
d993956
Merge remote-tracking branch 'upstream/CU-86byj407g_Create-Form-Deter…
NyashaMuusha Jun 6, 2024
09c8b75
Merge remote-tracking branch 'upstream/CU-86byj407g_Create-Form-Deter…
NyashaMuusha Jun 6, 2024
2b06257
refactored SEttings
NyashaMuusha Jun 6, 2024
bcc3673
added hasUndefinedRule prop, changed data grid styles
NyashaMuusha Jun 6, 2024
90efcd8
Merge remote-tracking branch 'upstream/CU-86byj407g_Create-Form-Deter…
NyashaMuusha Jun 7, 2024
80b9fde
refactored blocking
NyashaMuusha Jun 10, 2024
a11f189
refactored select operator
NyashaMuusha Jun 10, 2024
406d23a
Merge remote-tracking branch 'upstream/CU-86byj407g_Create-Form-Deter…
NyashaMuusha Jun 10, 2024
2fe07db
Merge pull request #256 from jembi/CU-86byj407g_Create-Form-Determini…
MatthewErispe Jun 10, 2024
777268f
Merge remote-tracking branch 'upstream/CU-86by1w64p_JeMPI-UI-Configur…
NyashaMuusha Jun 10, 2024
1d84646
Merge branch 'dev' into CU-86by1w64p_JeMPI-UI-Configuration
MatthewErispe Jun 10, 2024
e567b57
context-based state management for configuration data
NyashaMuusha Jun 10, 2024
b998553
refactored design view for blocking
NyashaMuusha Jun 10, 2024
1fd3bff
added configuration to local storage
NyashaMuusha Jun 11, 2024
635879a
refactored get configuration
NyashaMuusha Jun 11, 2024
3bc10fb
added update configuration function
NyashaMuusha Jun 11, 2024
e80a6c4
update all api config for keycloak standalone
MatthewErispe Jun 12, 2024
6c44c6d
added blocking unit test
NyashaMuusha Jun 12, 2024
55ac2e3
refactored blocking content
NyashaMuusha Jun 12, 2024
6317e48
refactored get configuration
NyashaMuusha Jun 12, 2024
599c6c1
CU-86bz6manz - Operator Deleted On Save
NyashaMuusha Jun 13, 2024
6541c37
Merge remote-tracking branch 'upstream/CU-86by1w64p_JeMPI-UI-Configur…
NyashaMuusha Jun 14, 2024
c190765
Merge pull request #259 from jembi/CU-86byattmb_Create-Form-Blocking
MatthewErispe Jun 14, 2024
e4fab07
fix lint issue
MatthewErispe Jun 14, 2024
45f7cfd
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86bxxxcwe_…
sushantpatil1214 Jun 18, 2024
f461944
updated dependencies
NyashaMuusha Jun 18, 2024
41f7428
added probabilistic component to settings
NyashaMuusha Jun 18, 2024
655854a
added basic tabs
NyashaMuusha Jun 18, 2024
f67e8cb
added threshold input fields and sliders
NyashaMuusha Jun 18, 2024
88a485a
added link threshold type to Configuration Rule
NyashaMuusha Jun 19, 2024
fd8990f
added config data to probabilistic content
NyashaMuusha Jun 19, 2024
c0b8221
refactored probabilistic
NyashaMuusha Jun 19, 2024
186a60d
Merge pull request #258 from jembi/CU-86bxxxcwe_KeyCloak-in-JeMPI-sta…
MatthewErispe Jun 20, 2024
9557373
refactored handleValidateChange function
NyashaMuusha Jun 20, 2024
1c0f3d1
refactored probabilistic form
NyashaMuusha Jun 21, 2024
ba3808a
refactored probabilistic constants
NyashaMuusha Jun 21, 2024
2b74b19
updated dependencies
NyashaMuusha Jun 23, 2024
806e637
refactoed handle configuration
NyashaMuusha Jun 23, 2024
fb3a2b6
added handle update config
NyashaMuusha Jun 26, 2024
d263884
removed dependecies
NyashaMuusha Jun 26, 2024
f83850b
updated handle save
NyashaMuusha Jun 26, 2024
0c491a1
added handle update config
NyashaMuusha Jun 26, 2024
425011b
updated handle configuration
NyashaMuusha Jun 26, 2024
188012a
updated handle row process
NyashaMuusha Jun 26, 2024
fb12606
refactored processRowUpdate
NyashaMuusha Jun 26, 2024
adc3916
refactored golden record lists
NyashaMuusha Jul 1, 2024
33555ee
refactored golden record lists
NyashaMuusha Jul 1, 2024
1381b5d
added nodeIndex to get config
NyashaMuusha Jul 1, 2024
c9df185
updated node name
NyashaMuusha Jul 1, 2024
f12b537
updated golden record
NyashaMuusha Jul 1, 2024
37838fa
added csv col to get config
NyashaMuusha Jul 2, 2024
32a1f47
refcatored process row update
NyashaMuusha Jul 2, 2024
1b5832d
refactored processRowUpdate
NyashaMuusha Jul 2, 2024
26abc8f
updated handleUpdateConfiguration
NyashaMuusha Jul 2, 2024
2e8815f
updated get configuration
NyashaMuusha Jul 2, 2024
b4035cb
refactored unit tests, removed prop from golden recordlist
NyashaMuusha Jul 2, 2024
ca18740
updated unit test, removed props from common settings
NyashaMuusha Jul 2, 2024
6fb1f36
Merge remote-tracking branch 'upstream/CU-86bz9pz5f_Save-Common-Field…
NyashaMuusha Jul 2, 2024
7ad1f0b
removed unique to interaction props
NyashaMuusha Jul 3, 2024
0864801
add update configuration functionality
NyashaMuusha Jul 3, 2024
3c551e6
added handle update config to unique to GR
NyashaMuusha Jul 3, 2024
7b6a4c9
added rowIndex to handle update configuration
NyashaMuusha Jul 3, 2024
fca7291
refactored handlesave
NyashaMuusha Jul 3, 2024
cb92f8b
refactored handleSaveClick
NyashaMuusha Jul 4, 2024
d5eef4a
refactored handle update configuration
NyashaMuusha Jul 4, 2024
591c3d2
refactored handle update configuration
NyashaMuusha Jul 4, 2024
41d0eff
refactored handle update configuration
NyashaMuusha Jul 4, 2024
1991205
Merge pull request #266 from jembi/CU-86bz9qtxm_Save-Unique-to-Intera…
NyashaMuusha Jul 5, 2024
085d774
Merge pull request #267 from jembi/CU-86bz9quam_Save-Golden-Record-Li…
NyashaMuusha Jul 5, 2024
970b277
refactored settings
NyashaMuusha Jul 5, 2024
c6d6a30
CU-86bzg2vxh - Remove validate/matching
NyashaMuusha Jul 5, 2024
ad435b3
refactored deterministic content
NyashaMuusha Jul 8, 2024
4ae8a93
Merge branch 'dev' into CU-86by1w64p_JeMPI-UI-Configuration
MatthewErispe Jul 9, 2024
1beaacf
remove duplicate method
MatthewErispe Jul 9, 2024
7abf54e
update model for generate function
MatthewErispe Jul 9, 2024
472b080
updated get configuration
NyashaMuusha Jul 9, 2024
77b41dc
Added a save util function to ApiClient
martino-jembi Jul 9, 2024
6d5e3e8
Save button with basic state and API call
martino-jembi Jul 9, 2024
06b2fc0
refactored deterministic content
NyashaMuusha Jul 9, 2024
45526a6
refactored get updated configuration
NyashaMuusha Jul 9, 2024
76eef67
Merge pull request #270 from jembi/CU-86byatnr8_Create-Form-Button-Save
MatthewErispe Jul 9, 2024
cc4d5ef
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86bz9quw8_…
NyashaMuusha Jul 9, 2024
0274281
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86byatm6v_…
MatthewErispe Jul 10, 2024
0953a5e
add snackbar notification for saving probabilistic rule and configura…
MatthewErispe Jul 10, 2024
32a4bef
CU-86bzhpzfk - Update Configuration Model API
MatthewErispe Jul 10, 2024
f86a570
update fetch config to use api instead of mock and rename label
MatthewErispe Jul 10, 2024
f18ec53
Merge pull request #262 from jembi/CU-86byatm6v_Create-Form-Probabili…
MatthewErispe Jul 10, 2024
351d61a
Merge branch 'CU-86byatm6v_Create-Form-Probabilistic' into CU-86by1w6…
MatthewErispe Jul 10, 2024
9764098
Merge branch 'CU-86bz9pz5f_Save-Common-Fields-to-Local-Storage' of gi…
MatthewErispe Jul 10, 2024
3387e18
update m and u decimal places to 7
MatthewErispe Jul 10, 2024
0cbd301
Merge pull request #263 from jembi/CU-86bz9pz5f_Save-Common-Fields-to…
MatthewErispe Jul 10, 2024
b4a5ed9
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86bz9q0gr_…
MatthewErispe Jul 10, 2024
6fa8bd2
update customNode model
MatthewErispe Jul 10, 2024
7aca641
code clean up
MatthewErispe Jul 10, 2024
dd8c301
remove duplicate
MatthewErispe Jul 10, 2024
a602f81
Merge pull request #265 from jembi/CU-86bz9q0gr_Save-Unique-to-Golden…
MatthewErispe Jul 10, 2024
9aabc7e
Merge branch 'CU-86by1w64p_JeMPI-UI-Configuration' into CU-86bz9quw8_…
MatthewErispe Jul 10, 2024
4a91489
CU-86bzht01e - Incremental space edit on field update
MatthewErispe Jul 10, 2024
55f5040
fix failing tests
MatthewErispe Jul 10, 2024
71796da
Merge pull request #271 from jembi/CU-86bz9quw8_Save-Deterministic-Fi…
MatthewErispe Jul 10, 2024
1fbee89
Merge branch 'dev' into CU-86by1w64p_JeMPI-UI-Configuration
MatthewErispe Jul 11, 2024
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
23 changes: 0 additions & 23 deletions JeMPI_Apps/JeMPI_API/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,29 +153,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
</dependency>

<!-- <dependency>-->
<!-- <groupId>org.junit.jupiter</groupId>-->
<!-- <artifactId>junit-jupiter</artifactId>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->

<!-- <dependency>-->
<!-- <groupId>org.mockito</groupId>-->
<!-- <artifactId>mockito-core</artifactId>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->

<!-- <dependency>-->
<!-- <groupId>com.typesafe.akka</groupId>-->
<!-- <artifactId>akka-actor-testkit-typed_${scala.tools.version}</artifactId>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->

</dependencies>

<build>
Expand Down
20 changes: 13 additions & 7 deletions JeMPI_Apps/JeMPI_API/src/main/java/org/jembi/jempi/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ public final class AppConfig {
public static final String KAFKA_BOOTSTRAP_SERVERS = CONFIG.getString("KAFKA_BOOTSTRAP_SERVERS");
public static final String KAFKA_APPLICATION_ID = CONFIG.getString("KAFKA_APPLICATION_ID");
private static final String[] DGRAPH_ALPHA_HOSTS = CONFIG.getString("DGRAPH_HOSTS").split(",");
private static final int[] DGRAPH_ALPHA_PORTS = Arrays.stream(CONFIG.getString("DGRAPH_PORTS").split(",")).mapToInt(s -> {
try {
return Integer.parseInt(s);
} catch (NumberFormatException ex) {
return Integer.MIN_VALUE;
}
}).toArray();
private static final int[] DGRAPH_ALPHA_PORTS = Arrays.stream(CONFIG.getString("DGRAPH_PORTS").split(","))
.mapToInt(s -> {
try {
return Integer.parseInt(s);
} catch (NumberFormatException ex) {
return Integer.MIN_VALUE;
}
}).toArray();

public static final String LINKER_IP = CONFIG.getString("LINKER_IP");
public static final Integer LINKER_HTTP_PORT = CONFIG.getInt("LINKER_HTTP_PORT");
Expand All @@ -48,6 +49,11 @@ public final class AppConfig {
public static final Integer API_HTTP_PORT = CONFIG.getInt("API_HTTP_PORT");
public static final Level GET_LOG_LEVEL = Level.toLevel(CONFIG.getString("LOG4J2_LEVEL"));

public static final String SYSTEM_CONFIG_DIR = CONFIG.getString("SYSTEM_CONFIG_DIR");
public static final String API_CONFIG_REFERENCE_FILENAME = CONFIG.getString("API_CONFIG_REFERENCE_FILENAME");
public static final String API_CONFIG_MASTER_FILENAME = CONFIG.getString("API_CONFIG_MASTER_FILENAME");
public static final String API_FIELDS_CONFIG_FILENAME = CONFIG.getString("API_FIELDS_CONFIG_FILENAME");

private AppConfig() {
}

Expand Down
15 changes: 6 additions & 9 deletions JeMPI_Apps/JeMPI_API/src/main/java/org/jembi/jempi/api/API.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
import org.apache.logging.log4j.Logger;
import org.jembi.jempi.AppConfig;
import org.jembi.jempi.libapi.BackEnd;
import org.jembi.jempi.libapi.JsonFieldsConfig;

import java.util.UUID;

public final class API {

private static final Logger LOGGER = LogManager.getLogger(API.class);
private static final String CONFIG_RESOURCE_FILE_NAME = "config-api.json";
private final JsonFieldsConfig jsonFieldsConfig = new JsonFieldsConfig(CONFIG_RESOURCE_FILE_NAME);
private HttpServer httpServer;


private API() {
LOGGER.info("API started.");
}
Expand All @@ -45,10 +41,14 @@ public Behavior<Void> create() {
AppConfig.POSTGRESQL_NOTIFICATIONS_DB,
AppConfig.POSTGRESQL_AUDIT_DB,
AppConfig.KAFKA_BOOTSTRAP_SERVERS,
"CLIENT_ID_API-" + UUID.randomUUID()), "BackEnd");
"CLIENT_ID_API-" + UUID.randomUUID(),
AppConfig.SYSTEM_CONFIG_DIR,
AppConfig.API_CONFIG_REFERENCE_FILENAME,
AppConfig.API_CONFIG_MASTER_FILENAME,
AppConfig.API_FIELDS_CONFIG_FILENAME), "BackEnd");
context.watch(backEnd);
httpServer = HttpServer.create();
httpServer.open("0.0.0.0", AppConfig.API_HTTP_PORT, context.getSystem(), backEnd, jsonFieldsConfig.jsonFields);
httpServer.open("0.0.0.0", AppConfig.API_HTTP_PORT, context.getSystem(), backEnd);
return Behaviors.receive(Void.class).onSignal(Terminated.class, sig -> {
httpServer.close(context.getSystem());
return Behaviors.stopped();
Expand All @@ -59,9 +59,6 @@ public Behavior<Void> create() {
private void run() {
LOGGER.info("interface:port {}:{}", "0.0.0.0", AppConfig.API_HTTP_PORT);
try {
LOGGER.info("Loading fields configuration file ");
jsonFieldsConfig.load(CONFIG_RESOURCE_FILE_NAME);
LOGGER.info("Fields configuration file successfully loaded");
ActorSystem.create(this.create(), "API-App");
} catch (Exception e) {
LOGGER.error("Unable to start the API", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
import akka.actor.typed.ActorSystem;
import akka.http.javadsl.Http;
import akka.http.javadsl.ServerBinding;
import akka.http.javadsl.model.HttpEntity;
import akka.http.javadsl.model.StatusCodes;
import akka.http.javadsl.server.AllDirectives;
import akka.http.javadsl.server.ExceptionHandler;
import akka.http.javadsl.server.RejectionHandler;
import akka.http.javadsl.server.Route;
import ch.megard.akka.http.cors.javadsl.settings.CorsSettings;
import org.apache.logging.log4j.LogManager;
Expand All @@ -17,7 +13,6 @@
import org.jembi.jempi.AppConfig;
import org.jembi.jempi.libapi.BackEnd;
import org.jembi.jempi.libapi.Routes;
import org.jembi.jempi.shared.models.GlobalConstants;

import java.util.concurrent.CompletionStage;

Expand All @@ -43,10 +38,9 @@ public void open(
final String httpServerHost,
final int httpPort,
final ActorSystem<Void> actorSystem,
final ActorRef<BackEnd.Event> backEnd,
final String jsonFields) {
final ActorRef<BackEnd.Event> backEnd) {
http = Http.get(actorSystem);
binding = http.newServerAt(httpServerHost, httpPort).bind(this.createCorsRoutes(actorSystem, backEnd, jsonFields));
binding = http.newServerAt(httpServerHost, httpPort).bind(this.createCorsRoutes(actorSystem, backEnd));
LOGGER.info("Server online at http://{}:{}", httpServerHost, httpPort);
}

Expand All @@ -57,37 +51,18 @@ public void close(final ActorSystem<Void> actorSystem) {

public Route createCorsRoutes(
final ActorSystem<Void> actorSystem,
final ActorRef<BackEnd.Event> backEnd,
final String jsonFields) {
final ActorRef<BackEnd.Event> backEnd) {
final var settings = CorsSettings.create(AppConfig.CONFIG);

final RejectionHandler rejectionHandler = RejectionHandler.defaultHandler().mapRejectionResponse(response -> {
if (response.entity() instanceof HttpEntity.Strict) {
String message = ((HttpEntity.Strict) response.entity()).getData().utf8String();
LOGGER.warn("Request was rejected. Reason: %s".formatted(message));
}

return response;
});

final ExceptionHandler exceptionHandler = ExceptionHandler.newBuilder().match(Exception.class, x -> {
LOGGER.error("An exception occurred while executing the Route", x);
return complete(StatusCodes.INTERNAL_SERVER_ERROR, "An exception occurred, see server logs for details");
}).build();

return cors(settings,
() -> pathPrefix("JeMPI",
() -> concat(Routes.createCoreAPIRoutes(actorSystem,
backEnd,
jsonFields,
AppConfig.LINKER_IP,
AppConfig.LINKER_HTTP_PORT,
AppConfig.CONTROLLER_IP,
AppConfig.CONTROLLER_HTTP_PORT,
http),
path(GlobalConstants.SEGMENT_POST_FIELDS_CONFIG,
() -> complete(StatusCodes.OK, jsonFields))))).seal(rejectionHandler,
exceptionHandler);
http))));
}

}
23 changes: 0 additions & 23 deletions JeMPI_Apps/JeMPI_API_KC/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,29 +163,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
</dependency>

<!-- <dependency>-->
<!-- <groupId>org.junit.jupiter</groupId>-->
<!-- <artifactId>junit-jupiter</artifactId>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->

<!-- <dependency>-->
<!-- <groupId>org.mockito</groupId>-->
<!-- <artifactId>mockito-core</artifactId>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->

<!-- <dependency>-->
<!-- <groupId>com.typesafe.akka</groupId>-->
<!-- <artifactId>akka-actor-testkit-typed_${scala.tools.version}</artifactId>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public final class AppConfig {
public static final Integer CONTROLLER_HTTP_PORT = CONFIG.getInt("CONTROLLER_HTTP_PORT");
public static final String SESSION_SECRET = CONFIG.getString("JEMPI_SESSION_SECRET");
public static final Level GET_LOG_LEVEL = Level.toLevel(CONFIG.getString("LOG4J2_LEVEL"));
public static final String SYSTEM_CONFIG_DIR = CONFIG.getString("SYSTEM_CONFIG_DIR");
public static final String API_CONFIG_REFERENCE_FILENAME = CONFIG.getString("API_CONFIG_REFERENCE_FILENAME");
public static final String API_CONFIG_MASTER_FILENAME = CONFIG.getString("API_CONFIG_MASTER_FILENAME");
public static final String API_FIELDS_CONFIG_FILENAME = CONFIG.getString("API_FIELDS_CONFIG_FILENAME");

private AppConfig() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@
import org.jembi.jempi.AppConfig;
import org.jembi.jempi.api.httpServer.HttpServer;
import org.jembi.jempi.libapi.BackEnd;
import org.jembi.jempi.libapi.JsonFieldsConfig;

import java.util.UUID;

public final class APIKC {

private static final Logger LOGGER = LogManager.getLogger(APIKC.class);
private static final String CONFIG_RESOURCE_FILE_NAME = "config-api.json";
private final JsonFieldsConfig jsonFieldsConfig = new JsonFieldsConfig(CONFIG_RESOURCE_FILE_NAME);
private HttpServer httpServer;


private APIKC() {
LOGGER.info("API started.");
}
Expand All @@ -45,18 +41,17 @@ public Behavior<Void> create() {
AppConfig.POSTGRESQL_NOTIFICATIONS_DB,
AppConfig.POSTGRESQL_AUDIT_DB,
AppConfig.KAFKA_BOOTSTRAP_SERVERS,
"CLIENT_ID_API_KC-" + UUID.randomUUID()),
"CLIENT_ID_API_KC-" + UUID.randomUUID(),
AppConfig.SYSTEM_CONFIG_DIR,
AppConfig.API_CONFIG_REFERENCE_FILENAME,
AppConfig.API_CONFIG_MASTER_FILENAME,
AppConfig.API_FIELDS_CONFIG_FILENAME),
"BackEnd");
context.watch(backEnd);
// final var notificationsSteam = new NotificationStreamProcessor();
// notificationsSteam.open(AppConfig.POSTGRESQL_DATABASE,
// AppConfig.POSTGRESQL_PASSWORD,
// AppConfig.KAFKA_APPLICATION_ID,
// AppConfig.KAFKA_BOOTSTRAP_SERVERS);
final DispatcherSelector selector = DispatcherSelector.fromConfig("akka.actor.default-dispatcher");
final MessageDispatcher dispatcher = (MessageDispatcher) system.dispatchers().lookup(selector);
httpServer = new HttpServer(dispatcher);
httpServer.open("0.0.0.0", AppConfig.API_KC_HTTP_PORT, context.getSystem(), backEnd, jsonFieldsConfig.jsonFields);
httpServer.open("0.0.0.0", AppConfig.API_KC_HTTP_PORT, context.getSystem(), backEnd);
return Behaviors.receive(Void.class).onSignal(Terminated.class, sig -> {
LOGGER.info("API Server Terminated. Reason {}", sig);
httpServer.close(context.getSystem());
Expand All @@ -68,9 +63,6 @@ public Behavior<Void> create() {
private void run() {
LOGGER.info("interface:port {}:{}", "0.0.0.0", AppConfig.API_KC_HTTP_PORT);
try {
LOGGER.info("Loading fields configuration file ");
jsonFieldsConfig.load(CONFIG_RESOURCE_FILE_NAME);
LOGGER.info("Fields configuration file successfully loaded");
ActorSystem.create(this.create(), "API-App");
} catch (Exception e) {
LOGGER.error("Unable to start the API", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
public final class HttpServer extends HttpSessionAwareDirectives<UserSession> {
private static final Logger LOGGER = LogManager.getLogger(HttpServer.class);
private CompletionStage<ServerBinding> binding = null;

private ActorSystem<Void> actorSystem;
private ActorRef<BackEnd.Event> backEnd;
private String jsonFields;
private Http akkaHttpServer = null;

public HttpServer(final MessageDispatcher dispatcher) {
Expand All @@ -46,12 +44,10 @@ public void open(
final String httpServerHost,
final int httpPort,
final ActorSystem<Void> actorSystem,
final ActorRef<BackEnd.Event> backEnd,
final String jsonFields) {
final ActorRef<BackEnd.Event> backEnd) {

this.actorSystem = actorSystem;
this.backEnd = backEnd;
this.jsonFields = jsonFields;
Configurator.setLevel(this.getClass(), AppConfig.GET_LOG_LEVEL);

akkaHttpServer = Http.get(actorSystem);
Expand All @@ -67,10 +63,6 @@ public Http getAkkaHttpServer() {
return akkaHttpServer;
}

public String getJsonFields() {
return jsonFields;
}

public ActorRef<BackEnd.Event> getBackEnd() {
return backEnd;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public Route getRouteEntries() {
return concat(new UserRoutes(this.httpServer).getRouteEntries(),
requireSession(Routes.createCoreAPIRoutes(this.httpServer.getActorSystem(),
this.httpServer.getBackEnd(),
this.httpServer.getJsonFields(),
AppConfig.LINKER_IP,
AppConfig.LINKER_HTTP_PORT,
AppConfig.CONTROLLER_IP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,7 @@ private Route routeLogout() {
@Override
public Route getRouteEntries() {
return concat(post(() -> path(GlobalConstants.SEGMENT_VALIDATE_OAUTH, () -> routeLoginWithKeycloakRequest(checkHeader))),
get(() -> concat(path(GlobalConstants.SEGMENT_POST_FIELDS_CONFIG,
() -> httpServer.setNewCsrfToken(checkHeader,
() -> complete(StatusCodes.OK,
httpServer.getJsonFields()))),
path(GlobalConstants.SEGMENT_CURRENT_USER, this::routeCurrentUser),
get(() -> concat(path(GlobalConstants.SEGMENT_CURRENT_USER, this::routeCurrentUser),
path(GlobalConstants.SEGMENT_LOGOUT, this::routeLogout)))

);
Expand Down
24 changes: 0 additions & 24 deletions JeMPI_Apps/JeMPI_LibAPI/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,35 +145,11 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<!--
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor-testkit-typed_${scala.tools.version}</artifactId>
<scope>test</scope>
</dependency>
-->

</dependencies>

<build>
Expand Down
Loading