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

Merge dev into main #178

Closed
wants to merge 438 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
438 commits
Select commit Hold shift + click to select a range
fe5edc3
Merge branch 'dev' into dev-java-21
w-hayes Nov 25, 2023
848c4b5
Merge pull request #132 from walisc/jempi-base-keycloack-login-api-up…
ajinkyagadewar Nov 27, 2023
bd4a805
partial add scala-em
w-hayes Nov 27, 2023
51ffa35
Merge branch 'dev' into dev-java-21
w-hayes Nov 27, 2023
33882c6
Specifying the replicas for the apis
walisc Nov 27, 2023
3de560b
Scaling the api services in the right place
walisc Nov 27, 2023
71d18ea
Removing it from the hub location
walisc Nov 27, 2023
8e3aa44
Merge branch 'dev' of github.com:jembi/JeMPI into jempi-base-keycloac…
walisc Nov 27, 2023
b0be70f
using haproxy for keyclock server
walisc Nov 28, 2023
cebca28
Adding keycloak to haproxy with check
walisc Nov 28, 2023
7d8ecff
Verifying token correctly
walisc Nov 28, 2023
71c2899
Reomving references to API_VARIANT
walisc Nov 28, 2023
bd1fe3e
Updating the documentation
walisc Nov 28, 2023
f353b5b
small readme update
walisc Nov 28, 2023
4331032
fix: conflict with dev branch
issambaccouch Nov 28, 2023
d9fbeae
ref:WIP browse component
issambaccouch Nov 15, 2023
f14f5ea
feat: finishing up browse enhancement
issambaccouch Nov 27, 2023
1c7c61b
chore: update upload menu position
issambaccouch Nov 28, 2023
e1dfcab
using haproxy instead
walisc Nov 29, 2023
a5a933e
Updating the keycloack swarm logic
walisc Nov 29, 2023
c2d01a3
defauling to the need to login
walisc Nov 29, 2023
e63bf5e
Starting the server keycloak server once everything has run
walisc Nov 29, 2023
1d37653
partial scala em
w-hayes Nov 29, 2023
9823760
Updating the keycloack import script
walisc Nov 29, 2023
198367c
Using header auth/sessiontransport instead of cookies
walisc Nov 30, 2023
8c7eb69
Authenticating use header auth
walisc Nov 30, 2023
90b2fb3
Handling current user requests correctly
walisc Nov 30, 2023
a060c68
Adding some comments regarding akka.http.session
walisc Nov 30, 2023
373b57b
linter updates
walisc Nov 30, 2023
84a4799
Merge branch 'dev-jmpi731-keycloak-backend' of github.com:jembi/JeMPI…
issambaccouch Nov 30, 2023
ec28485
updating readme file
walisc Nov 30, 2023
242a37b
Updating readme file
walisc Nov 30, 2023
20fffe4
Adding linking ability
walisc Dec 3, 2023
6a46964
Merge branch 'dev' of github.com:jembi/JeMPI into dev-jempi-754-m_and…
walisc Dec 3, 2023
4210783
chore: update keycloak env
issambaccouch Dec 4, 2023
169bf97
updating threshold updater
walisc Dec 4, 2023
57d8447
feat: update dev build
issambaccouch Dec 4, 2023
4a99ea3
fix: api client undefined headers
issambaccouch Dec 4, 2023
2229610
Merge pull request #152 from jembi/JMPI-776-update-dev-build-and-keyc…
issambaccouch Dec 4, 2023
fb073a5
Merge branch 'dev-jmpi731-keycloak-backend' of github.com:jembi/JeMPI…
issambaccouch Dec 4, 2023
0c94400
Merge pull request #146 from jembi/JMPI-761-update-browse-component
issambaccouch Dec 4, 2023
a24ce69
Updating mu a,b,c,d
walisc Dec 5, 2023
a7ff1ac
Add keycloak env vars for high server configuration
rcrichton Dec 5, 2023
cae02be
fix: build time warning
issambaccouch Dec 5, 2023
5cc48ea
fix: runtime warning
issambaccouch Dec 5, 2023
c8d3138
Adding unit test
walisc Dec 6, 2023
a5118e3
Update to the model
walisc Dec 6, 2023
3fc4c9a
chore: enhance top bar padding
issambaccouch Dec 6, 2023
8b2d47d
Merge pull request #154 from jembi/JMPI-783-fix-ui-cli-warnings
issambaccouch Dec 6, 2023
f39075d
updating haproxy config
walisc Dec 6, 2023
0ebe4a9
small typo
walisc Dec 6, 2023
916ba47
updating keycloack api name
walisc Dec 6, 2023
5f8dce4
fix: review link undefined uid
issambaccouch Nov 29, 2023
60fe8b1
Working on the field matrix tests
walisc Dec 6, 2023
d4985f1
chore: hide browse search
issambaccouch Dec 7, 2023
0769360
feat: implement import dashboard widget
issambaccouch Dec 7, 2023
7fdaee8
Updating kafka logic
walisc Dec 8, 2023
0a274c8
Making starting keycloak conditional (default to false)
walisc Dec 8, 2023
6c19925
updating readme file
walisc Dec 8, 2023
a4d97f4
Merge pull request #150 from jembi/dev-jmpi731-keycloak-backend
ajinkyagadewar Dec 8, 2023
8a6f62a
Merge branch 'dev' into dev-java-21
w-hayes Dec 8, 2023
1d1791b
partial scala-em
w-hayes Dec 8, 2023
0e0ba9f
partial scala-em
w-hayes Dec 8, 2023
ac44d0f
partial scala-em
w-hayes Dec 8, 2023
175b465
partial scala-em
w-hayes Dec 9, 2023
2870bbe
partial scala-em
w-hayes Dec 9, 2023
2227777
partial scala-em & database script cleanup
w-hayes Dec 10, 2023
4304465
partial scala-em & database scripts & keycloak
w-hayes Dec 10, 2023
4932637
partial scala-em & database script cleanup & keycloak/ui scripts
w-hayes Dec 10, 2023
2d1de1d
partial em integration
w-hayes Dec 10, 2023
6fa8359
Dockerized the bootstrapper app
walisc Dec 10, 2023
034af43
Small updates to dockerized container
walisc Dec 11, 2023
a6c993a
Using the bootstrapper instead to create schemas
walisc Dec 11, 2023
ac406c6
partial em integration
w-hayes Dec 11, 2023
b3e6d78
Add Sync Link interaction and re-format all java files using JeMPI_j…
w-hayes Dec 12, 2023
3a66df6
Merge branch 'dev' of github.com:jembi/JeMPI into JMPI-742-update-not…
issambaccouch Dec 15, 2023
acff469
Merge pull request #158 from jembi/JMPI-785-hide-browse-search
issambaccouch Dec 15, 2023
14df5d3
Merge pull request #159 from jembi/JMPI-784-implement-csv-import-dash…
issambaccouch Dec 15, 2023
e759a6f
Merge branch 'JMPI-742-update-notification-component' of github.com:j…
issambaccouch Dec 15, 2023
38b929f
chore: merge dev branch and update env
issambaccouch Dec 15, 2023
8cbb5bb
Updating the m and u calcution logic
walisc Dec 19, 2023
78ff403
Working on global ktable wrapper
walisc Nov 13, 2023
03efcda
Working on global kTable
walisc Nov 13, 2023
9af0629
Updates to global table data
walisc Nov 13, 2023
c6613a0
Updating global topic logic
walisc Nov 14, 2023
f0d60cb
Updating Ktable tests
walisc Nov 14, 2023
a808ae3
Updating Kafka global tables
walisc Nov 16, 2023
4d173b6
updating global table kafka
walisc Nov 16, 2023
0469f04
Updating kafka logic
walisc Dec 8, 2023
fe28da2
Updating the m and u calcution logic
walisc Dec 19, 2023
0be0a50
Removing updates to linker
walisc Dec 19, 2023
7976a5a
Refactoring the kafka global store logic
walisc Dec 19, 2023
8d9b3ba
Updating the kafka update logic
walisc Dec 20, 2023
9913ae1
Syncing with upstream dev
walisc Dec 20, 2023
8916ed9
Refactoring the manual m and u code
walisc Dec 20, 2023
becef75
Refactoring test folders
walisc Dec 20, 2023
db5ad1d
Merge branch 'dev-jempi-754-kafka-global-store' into dev-jempi-754-m_…
walisc Dec 20, 2023
3b16106
Refactoring the manual m and u logic
walisc Dec 20, 2023
42dd16d
Refactoring the store style logic
walisc Dec 20, 2023
abf2852
Check style updates
walisc Dec 20, 2023
1311003
Refactoring the store style logic
walisc Dec 20, 2023
a16c049
Adding test files
walisc Dec 20, 2023
09ac8fe
Adding stats logic for m and u
walisc Dec 27, 2023
a52dc27
Refactoring m_and_u library
walisc Dec 27, 2023
d41fc59
Catering for customized data
walisc Dec 27, 2023
77bcede
Using updated topology
walisc Dec 27, 2023
1e5a46a
Updating topology approach
walisc Dec 27, 2023
28139d9
working on multiple process logic
walisc Dec 27, 2023
ecd9cbe
global store refactor
walisc Dec 28, 2023
5a932ff
Style updates
walisc Dec 28, 2023
a122584
Allowing for the deleting to global store topics
walisc Dec 28, 2023
6ad290e
Merge branch 'dev-jempi-754-kafka-global-store' into dev-jempi-754-li…
walisc Dec 28, 2023
3d9d587
Updating mu logic to ue updated kafka global store
walisc Dec 30, 2023
a29d464
Using processid for the appid
walisc Dec 30, 2023
b04b16d
updating the configuration
walisc Dec 30, 2023
610739c
checking if stream alive when requesting
walisc Dec 30, 2023
f25a0a5
reverting the surefire plugin changes
walisc Dec 30, 2023
f445de7
reverting accidental changes
walisc Dec 30, 2023
e2d4ddb
Using processid for the appid
walisc Dec 30, 2023
72a50e7
checking if stream alive when requesting
walisc Dec 30, 2023
af91e58
Merge branch 'dev-jempi-754-kafka-global-store' into dev-jempi-754-li…
walisc Dec 30, 2023
9ed9130
small updates to the external runner
walisc Jan 3, 2024
bfdfde9
Getting run report
walisc Jan 3, 2024
c64a924
Updating external runner
walisc Jan 4, 2024
63b4dd2
Updating the ui logic
walisc Jan 5, 2024
00ab145
updating package.json
walisc Jan 5, 2024
5ffb6a3
reverting some changes for now
walisc Jan 5, 2024
d634122
Adding initiating script to the bootstrapper
walisc Jan 5, 2024
ef35f08
Adding back the debugger logs
walisc Jan 5, 2024
0dd9571
Merge branch 'dev-jempi-754-linker-m_and_u_tally' of github.com:jembi…
walisc Jan 7, 2024
afce3c2
Merging JMPI-742-update-notification-component
walisc Jan 7, 2024
f6adb5b
Merging JMPI-742-update-notification-component2
walisc Jan 7, 2024
04cf82c
Ensuring that we don't include linked golden records as alternative c…
walisc Jan 8, 2024
513268c
M and U stats refactor
walisc Jan 8, 2024
a91020e
Updating m and u dependant onnotification resolution
walisc Jan 8, 2024
fa6eed9
Updating m and u based on notification resolution
walisc Jan 8, 2024
76160d4
using candidates as well to update the M and U matrix
walisc Jan 8, 2024
404baa0
Merge pull request #137 from jembi/JMPI-742-update-notification-compo…
walisc Jan 8, 2024
96c7bd9
updating m and u for creating new record
walisc Jan 8, 2024
07c259a
using post for module resolution instead
walisc Jan 8, 2024
cdf7f9c
Working on logic to get sql dashboard data
walisc Jan 8, 2024
96b9d57
updating logic of the linker (dashboard and onnotification resolution)
walisc Jan 9, 2024
f45b528
removing old stats logic
walisc Jan 9, 2024
415b4cf
Updates to getting the ui data
walisc Jan 9, 2024
317d4a8
linking dashboard data
walisc Jan 9, 2024
197b7d7
Polling data
walisc Jan 9, 2024
625f1b8
Getting kafka store values
walisc Jan 9, 2024
254a1f4
Fixing serialization issue, and adding better logging
walisc Jan 9, 2024
058e96e
Reverting temporary changes that had been made for this
walisc Jan 9, 2024
0d97bb4
Shouwing m and u correctly
walisc Jan 9, 2024
a8e00fb
Refactoring the linker processor
walisc Jan 9, 2024
6728d6c
Adding logic for the true positive and negatives
walisc Jan 9, 2024
42ea3f9
Adding logic for linker progress
walisc Jan 9, 2024
425b2f9
style fixes
walisc Jan 9, 2024
a92035d
Small updates for teh dataset
walisc Jan 9, 2024
927953d
Updates to ui component
walisc Jan 10, 2024
e2ea997
Resolution updates [pu]
walisc Jan 10, 2024
f073006
Resolution updates backend [pu]
walisc Jan 10, 2024
641dc52
update scala libraries
w-hayes Jan 10, 2024
1e133d2
Resolution updates backend 2 [pu]
walisc Jan 10, 2024
a452345
merged dev
w-hayes Jan 10, 2024
d247f5a
disable SSO
w-hayes Jan 10, 2024
1d72520
add keycloak users database
w-hayes Jan 10, 2024
cf165ad
Merge pull request #165 from jembi/dev-java-21
walisc Jan 12, 2024
a281dd5
Merging java 21
walisc Jan 12, 2024
c7bb9a8
Updating the bootstrapper to create seperate dbs
walisc Jan 14, 2024
4592d62
Deleting multiple databases
walisc Jan 14, 2024
afd7ec8
Updating kafka topics bootstrapper
walisc Jan 14, 2024
e6f2076
Refactoring the code: checkstyle
walisc Jan 14, 2024
9e8de2f
updating the stack environemnt
walisc Jan 15, 2024
435bb35
small typo fix
walisc Jan 15, 2024
003b6a4
Merge pull request #160 from jembi/dev-jmpi-771-dockerize-bootstrappe…
ajinkyagadewar Jan 15, 2024
ba41068
partial delay-linking
w-hayes Jan 16, 2024
f320e93
Merge branch 'dev' into dev-delay-linking
w-hayes Jan 16, 2024
9df78bc
moving linker logic to controller
walisc Jan 16, 2024
ab717c4
Merge branch 'dev' of github.com:jembi/JeMPI into dev-jempi-754-libap…
walisc Jan 16, 2024
2c323ed
moving linker logic to controller 3
walisc Jan 16, 2024
b90a478
moving linker logic to controller 4
walisc Jan 16, 2024
3911b31
Working on controller routes
walisc Jan 17, 2024
c6fc7c7
Routing requests to the controller
walisc Jan 17, 2024
7719f77
Posting http server onNotification Raise
walisc Jan 17, 2024
d4218d4
String keycloak server in the correct place
walisc Jan 18, 2024
8caba75
Updating the notification types
walisc Jan 18, 2024
3d1bf15
Sharing the custom linker code
walisc Jan 18, 2024
6903bd4
using db values instead
walisc Jan 18, 2024
67d61d6
updating the handling
walisc Jan 18, 2024
5228326
Removing test file
walisc Jan 18, 2024
bea91df
Updating the csv path correctly
walisc Jan 18, 2024
78758d9
Starting controller correctly
walisc Jan 18, 2024
8e387d5
Updates to the stack for keycloak
walisc Jan 22, 2024
3007717
partial delayed linking
w-hayes Jan 22, 2024
aa0c87d
partial delayed linking
w-hayes Jan 22, 2024
c106b05
Merge pull request #167 from jembi/dev-jempi-754-libapi-mpi-stats
w-hayes Jan 23, 2024
9661141
partial delayed linking
w-hayes Jan 23, 2024
97950e0
partial delayed linking & merged with dev
w-hayes Jan 23, 2024
5100d57
partial delayed linking
w-hayes Jan 23, 2024
64a1a79
partial delayed linking
w-hayes Jan 23, 2024
a802d50
Adding new docker stack properties required for the docker images
walisc Jan 23, 2024
5953956
Using the correct values
walisc Jan 23, 2024
d49dd1a
Merge pull request #168 from jembi/dev_kafka_stack_updates
ajinkyagadewar Jan 23, 2024
aa1794b
Performance improvements for the tally methods
walisc Jan 23, 2024
7c670ec
Merge pull request #169 from jembi/dev_small_performance_improvements
w-hayes Jan 23, 2024
d13aa5a
partial delayed linking & alternative tallying method for m&u
w-hayes Jan 23, 2024
761d9e8
Automation Script with diffrent set of scripts
sushantpatil1214 Jan 24, 2024
baa9cd2
partial delayed linking + tally derived M&U's
w-hayes Jan 24, 2024
94ccebc
fixed notifications UI when names == null
w-hayes Jan 24, 2024
41f931d
limit em's input to max 50,000 records & fix 'high-end' docker stack …
w-hayes Jan 25, 2024
dd9fba6
resolved keyclock issue
sushantpatil1214 Jan 25, 2024
030280e
refactor
w-hayes Jan 25, 2024
4d419b6
ui cosmetics & include number of candidates for each interaction in t…
w-hayes Jan 26, 2024
f0a3b29
Merge pull request #171 from jembi/dev-delay-linking
w-hayes Jan 26, 2024
62fab7d
4G cache for dgraph lo-end & set config to reference/config-reference…
w-hayes Jan 26, 2024
078431d
Merge branch 'dev' of github.com:jembi/JeMPI into automation_Script
walisc Jan 26, 2024
b46994f
reverting some script, and setting postgres data permission correctly
walisc Jan 26, 2024
096f035
Reverting small script change
walisc Jan 26, 2024
a583883
Merge pull request #170 from jembi/automation_Script
walisc Jan 26, 2024
a96baa2
add missing config code generators
w-hayes Jan 26, 2024
418e4a6
Merge branch 'dev' into dev-update-config-tool
w-hayes Jan 26, 2024
56159d4
Merge pull request #172 from jembi/dev-update-config-tool
w-hayes Jan 26, 2024
e392583
Added new copy of stack scripts inside deployment folder
sushantpatil1214 Jan 27, 2024
5c0b538
Merge branch 'dev' into automation_script_fix
sushantpatil1214 Jan 27, 2024
e7b2dad
Added new copy of stack scripts inside deployment folder
sushantpatil1214 Jan 27, 2024
366724d
Merge pull request #173 from jembi/automation_script_fix
walisc Jan 27, 2024
4c063f4
Added Backup restore Scripts
sushantpatil1214 Jan 30, 2024
3af5635
Fix Dgraph Restore
sushantpatil1214 Jan 30, 2024
d13c9b7
Code clean
sushantpatil1214 Jan 30, 2024
bcada75
Code clean
sushantpatil1214 Jan 30, 2024
69568e5
Added confirmation for restore script
sushantpatil1214 Jan 30, 2024
8d08365
Added confirmation for restore script
sushantpatil1214 Jan 30, 2024
df728ed
Updated ReadMe
sushantpatil1214 Jan 30, 2024
8fdd45b
Updating waiting time while restart stack
sushantpatil1214 Jan 30, 2024
5a20647
Update README-Install.md
sushantpatil1214 Jan 31, 2024
b750216
update-config-tool
w-hayes Feb 1, 2024
af1416e
Merge pull request #175 from jembi/dev-update-config-tool
w-hayes Feb 1, 2024
e245aed
Merge branch 'dev' into db_restore_fix
sushantpatil1214 Feb 1, 2024
1cac13b
standalone wsl configuration
w-hayes Feb 2, 2024
fbe5cb0
Merge branch 'dev' into db_restore_fix
sushantpatil1214 Feb 2, 2024
315907d
Fixed Dgraph Restore Issue
sushantpatil1214 Feb 2, 2024
e2690a5
Added instructions in Readme
sushantpatil1214 Feb 2, 2024
bf7f8b8
Added pushd and popd for directory switch
sushantpatil1214 Feb 2, 2024
c0f742d
Added fucntionality to show resent 5 backups while resstore
sushantpatil1214 Feb 2, 2024
8a0e705
Merge pull request #174 from jembi/db_restore_fix
ajinkyagadewar Feb 2, 2024
d347904
ignore .metals
w-hayes Feb 7, 2024
1ae62f3
Updated readme
harmonytke Feb 8, 2024
87efd31
Update .gitignore and untrack files
harmonytke Feb 8, 2024
38986f8
Merge branch 'jembi:main' into updated-README.md
harmonytke Feb 8, 2024
80b795a
removed user related changes
harmonytke Feb 8, 2024
02af5d1
Merge branch 'updated-README.md' of github.com:harmonytke/JeMPI into …
harmonytke Feb 8, 2024
ef9fcfa
Resolved issues
harmonytke Feb 8, 2024
d3222b5
Merge pull request #177 from harmonytke/updated-README.md
walisc Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
*.java text
*.scala text
*.sbt text
*.py text

# Declare files that will always have CR line endings on checkout
*.sh text eol=lf
*.template text eol=lf
*.yml text eol=lf
*.sql text eol=lf

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
7 changes: 1 addition & 6 deletions .github/workflows/jempiUI.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
on:
pull_request:
branches:
- dev
- main
paths:
- "JeMPI_Apps/JeMPI_UI/**"
push:
branches:
- dev
paths:
- 'JeMPI_Apps/JeMPI_UI/**'
jobs:
common-setup:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
sandbox
my-notes
.Rproj.user
.settings
.classpath
.project
.metals
2 changes: 2 additions & 0 deletions JeMPI_Apps/.scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version = 3.7.17
runner.dialect = scala213
2 changes: 1 addition & 1 deletion JeMPI_Apps/JeMPI_API/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ADD API-1.0-SNAPSHOT-spring-boot.jar /app/app.jar

RUN printf "#!/bin/bash\n\
cd /app\n\
java -server --enable-preview -XX:MaxRAMPercentage=80 -XX:+UseZGC -jar /app/app.jar\n" > /entrypoint.sh
java -server -XX:MaxRAMPercentage=80 -jar /app/app.jar\n" > /entrypoint.sh

RUN chmod +x /entrypoint.sh

Expand Down
18 changes: 9 additions & 9 deletions JeMPI_Apps/JeMPI_API/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,15 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
<compilerArgs>--enable-preview</compilerArgs>
</configuration>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <source>${java.version}</source>-->
<!-- <target>${java.version}</target>-->
<!-- <compilerArgs>&#45;&#45;enable-preview</compilerArgs>-->
<!-- </configuration>-->
<!-- </plugin>-->

</plugins>

Expand Down
35 changes: 21 additions & 14 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 @@ -14,21 +14,21 @@ public final class AppConfig {
private static final Logger LOGGER = LogManager.getLogger(AppConfig.class);
private static final Config SYSTEM_PROPERTIES = ConfigFactory.systemProperties();
private static final Config SYSTEM_ENVIRONMENT = ConfigFactory.systemEnvironment();
public static final Config CONFIG = new Builder()
.withSystemEnvironment()
.withSystemProperties()
.withOptionalRelativeFile("/conf/server.production.conf")
.withOptionalRelativeFile("/conf/server.staging.conf")
.withOptionalRelativeFile("/conf/server.test.conf")
.withResource("application.local.conf")
.withResource("application.conf")
.build();
public static final Config CONFIG = new Builder().withSystemEnvironment()
.withSystemProperties()
.withOptionalRelativeFile("/conf/server.production.conf")
.withOptionalRelativeFile("/conf/server.staging.conf")
.withOptionalRelativeFile("/conf/server.test.conf")
.withResource("application.local.conf")
.withResource("application.conf")
.build();
public static final String POSTGRESQL_IP = CONFIG.getString("POSTGRESQL_IP");
public static final Integer POSTGRESQL_PORT = CONFIG.getInt("POSTGRESQL_PORT");

public static final String POSTGRESQL_USER = CONFIG.getString("POSTGRESQL_USER");
public static final String POSTGRESQL_PASSWORD = CONFIG.getString("POSTGRESQL_PASSWORD");
public static final String POSTGRESQL_DATABASE = CONFIG.getString("POSTGRESQL_DATABASE");
public static final String POSTGRESQL_NOTIFICATIONS_DB = CONFIG.getString("POSTGRESQL_NOTIFICATIONS_DB");
public static final String POSTGRESQL_AUDIT_DB = CONFIG.getString("POSTGRESQL_AUDIT_DB");
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(",");
Expand All @@ -42,18 +42,23 @@ public final class AppConfig {

public static final String LINKER_IP = CONFIG.getString("LINKER_IP");
public static final Integer LINKER_HTTP_PORT = CONFIG.getInt("LINKER_HTTP_PORT");

public static final String CONTROLLER_IP = CONFIG.getString("CONTROLLER_IP");
public static final Integer CONTROLLER_HTTP_PORT = CONFIG.getInt("CONTROLLER_HTTP_PORT");
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"));

private AppConfig() {
}

public static String[] getDGraphHosts() {
return DGRAPH_ALPHA_HOSTS;
}

public static int[] getDGraphPorts() {
return DGRAPH_ALPHA_PORTS;
}

private AppConfig() {
}

private static class Builder {
private Config conf = ConfigFactory.empty();

Expand All @@ -80,7 +85,9 @@ Builder withSystemEnvironment() {

Builder withResource(final String resource) {
Config resourceConfig = ConfigFactory.parseResources(resource);
String empty = resourceConfig.entrySet().isEmpty() ? " contains no values" : "";
String empty = resourceConfig.entrySet().isEmpty()
? " contains no values"
: "";
conf = conf.withFallback(resourceConfig);
LOGGER.info("Loaded config file from resource ({}){}", resource, empty);
return this;
Expand Down
31 changes: 13 additions & 18 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 @@ -16,7 +16,7 @@
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 static final String CONFIG_RESOURCE_FILE_NAME = "config-api.json";
private final JsonFieldsConfig jsonFieldsConfig = new JsonFieldsConfig(CONFIG_RESOURCE_FILE_NAME);
private HttpServer httpServer;

Expand All @@ -35,25 +35,20 @@ public static void main(final String[] args) {

public Behavior<Void> create() {
return Behaviors.setup(context -> {
ActorRef<BackEnd.Event> backEnd =
context.spawn(BackEnd.create(AppConfig.GET_LOG_LEVEL,
AppConfig.getDGraphHosts(),
AppConfig.getDGraphPorts(),
AppConfig.POSTGRESQL_IP,
AppConfig.POSTGRESQL_PORT,
AppConfig.POSTGRESQL_USER,
AppConfig.POSTGRESQL_PASSWORD,
AppConfig.POSTGRESQL_DATABASE,
AppConfig.KAFKA_BOOTSTRAP_SERVERS,
"CLIENT_ID_API-" + UUID.randomUUID()),
"BackEnd");
ActorRef<BackEnd.Event> backEnd = context.spawn(BackEnd.create(AppConfig.GET_LOG_LEVEL,
AppConfig.getDGraphHosts(),
AppConfig.getDGraphPorts(),
AppConfig.POSTGRESQL_IP,
AppConfig.POSTGRESQL_PORT,
AppConfig.POSTGRESQL_USER,
AppConfig.POSTGRESQL_PASSWORD,
AppConfig.POSTGRESQL_NOTIFICATIONS_DB,
AppConfig.POSTGRESQL_AUDIT_DB,
AppConfig.KAFKA_BOOTSTRAP_SERVERS,
"CLIENT_ID_API-" + UUID.randomUUID()), "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, jsonFieldsConfig.jsonFields);
return Behaviors.receive(Void.class).onSignal(Terminated.class, sig -> {
httpServer.close(context.getSystem());
return Behaviors.stopped();
Expand Down
Loading
Loading