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

Ed 599 integration #122

Open
wants to merge 508 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
508 commits
Select commit Hold shift + click to select a range
d00af3b
change in users service
VISHNUDAS-tunerlabs Aug 3, 2022
902611d
entity-generalisation merge
VISHNUDAS-tunerlabs Aug 8, 2022
af5acb0
form baseurl added
VISHNUDAS-tunerlabs Aug 8, 2022
6d35abc
review changes
VISHNUDAS-tunerlabs Aug 15, 2022
cee79de
review changes
VISHNUDAS-tunerlabs Aug 19, 2022
8171414
review changes
VISHNUDAS-tunerlabs Aug 19, 2022
8831162
Hierarchy based access to the observation based on form's entity type
priyanka-TL Aug 21, 2022
b891cad
Merge pull request #76 from shikshalokam/SB-30686
aks30 Aug 22, 2022
8baab74
Merge pull request #84 from shikshalokam/master
aks30 Aug 22, 2022
435aed8
review changes and logic changes
VISHNUDAS-tunerlabs Aug 22, 2022
8eada11
default url added
VISHNUDAS-tunerlabs Aug 22, 2022
ef7f3c4
comments added
VISHNUDAS-tunerlabs Aug 22, 2022
7a2cb86
change in function signature
VISHNUDAS-tunerlabs Aug 22, 2022
51972de
formData name change
VISHNUDAS-tunerlabs Aug 23, 2022
2b68ae8
getSubEntitiesOfGivenType change
VISHNUDAS-tunerlabs Aug 23, 2022
19d3d86
review changes aug24
VISHNUDAS-tunerlabs Aug 24, 2022
77d7ebb
review change
VISHNUDAS-tunerlabs Aug 25, 2022
e66d703
users.js change
VISHNUDAS-tunerlabs Aug 25, 2022
181d7df
removed serch code
VISHNUDAS-tunerlabs Aug 25, 2022
5e2f6d8
user aggrigation change
VISHNUDAS-tunerlabs Aug 25, 2022
75bcffd
review change program helper
VISHNUDAS-tunerlabs Aug 25, 2022
f31af94
variable name change
VISHNUDAS-tunerlabs Aug 25, 2022
9e83b53
solution/create api
VISHNUDAS-tunerlabs Aug 26, 2022
b09917c
subEntities api
VISHNUDAS-tunerlabs Aug 26, 2022
be1eadb
test and review changes
VISHNUDAS-tunerlabs Aug 26, 2022
ffc0209
added entityType
priyanka-TL Aug 30, 2022
bf5e74e
Merge pull request #77 from shikshalokam/SB-30686
priyanka-TL Aug 30, 2022
499218b
Merge pull request #85 from shikshalokam/master
aks30 Aug 30, 2022
94fab83
commented scope entity type check
priyanka-TL Sep 1, 2022
1ca8091
Merge branch 'master' into 5.0-entity-generalization
priyanka-TL Sep 2, 2022
8582546
added getParentEntities
priyanka-TL Sep 2, 2022
99441f2
url issue
priyanka-TL Sep 2, 2022
549c7b5
url issue
priyanka-TL Sep 2, 2022
d00deee
es script to convert objectid to locationId
priyanka-TL Sep 2, 2022
a9aa1e2
heirarchy script added
VISHNUDAS-tunerlabs Sep 2, 2022
7f82ce6
script folder change
VISHNUDAS-tunerlabs Sep 2, 2022
b9c7270
remove file
VISHNUDAS-tunerlabs Sep 2, 2022
ceb29cc
search issue fixed for projects
priyanka-TL Sep 5, 2022
e21b39f
Merge pull request #78 from shikshalokam/searchIssueFix
aks30 Sep 5, 2022
09b382e
script folder changes
VISHNUDAS-tunerlabs Sep 5, 2022
a9169d2
Merge pull request #86 from shikshalokam/master
aks30 Sep 5, 2022
ee53b74
script readme change
VISHNUDAS-tunerlabs Sep 5, 2022
cb6ceb1
Merge branch 'master' into 5.0-entity-generalization
VISHNUDAS-tunerlabs Sep 5, 2022
047f9f5
migration fix
priyanka-TL Sep 5, 2022
0e2c5c7
Merge pull request #75 from shikshalokam/5.0-entity-generalization
aks30 Sep 5, 2022
3a94286
Merge branch 'release-5.0.0' into master
VISHNUDAS-tunerlabs Sep 5, 2022
d6f8902
Merge pull request #88 from shikshalokam/master
aks30 Sep 5, 2022
9427ba8
env variable change
VISHNUDAS-tunerlabs Sep 6, 2022
2989958
Merge pull request #79 from shikshalokam/check.5.0
aks30 Sep 6, 2022
67f0e5b
Merge pull request #89 from shikshalokam/master
aks30 Sep 6, 2022
73b1e66
QA_issue_5 & 6 - targetedEntity
VISHNUDAS-tunerlabs Sep 9, 2022
2c0a076
Merge pull request #80 from shikshalokam/5.0-QA_Fixes
aks30 Sep 9, 2022
fb756a8
Merge pull request #90 from shikshalokam/master
aks30 Sep 9, 2022
6c04b58
program details
priyanka-TL Sep 26, 2022
4e8b4d8
admin controller
priyanka-TL Sep 26, 2022
9a76eb8
admin apis
priyanka-TL Sep 27, 2022
cbda482
removed unwanted code
priyanka-TL Sep 27, 2022
25ad4c4
authenticator file changes
priyanka-TL Sep 27, 2022
67d0c60
Merge pull request #81 from shikshalokam/adminAPIS
aks30 Sep 27, 2022
b6560f4
Merge pull request #91 from shikshalokam/master
aks30 Sep 27, 2022
15a4fd8
commented dbDelete and dbUpdate
priyanka-TL Sep 28, 2022
beb844c
Merge pull request #82 from shikshalokam/adminAPIS
priyanka-TL Sep 28, 2022
b6dbe2d
commented dbDelete and dbUpdate
priyanka-TL Sep 28, 2022
a46699b
Merge pull request #83 from shikshalokam/adminAPIS
priyanka-TL Sep 28, 2022
8618612
Merge pull request #92 from shikshalokam/master
aks30 Sep 28, 2022
eea556b
certificate template apis added
VISHNUDAS-tunerlabs Sep 29, 2022
4f88e28
mapping certificate template to solution and project
VISHNUDAS-tunerlabs Oct 3, 2022
67f1c27
certificate template api changes
VISHNUDAS-tunerlabs Oct 6, 2022
10d140f
certificate template upload api added
VISHNUDAS-tunerlabs Oct 6, 2022
4213b9a
templateUrl property changed
VISHNUDAS-tunerlabs Oct 7, 2022
4ef1f12
templateUrl auto update added to template upload api
VISHNUDAS-tunerlabs Oct 7, 2022
bc0915a
upload folderpath changed
VISHNUDAS-tunerlabs Oct 7, 2022
fb1c44d
sample request and response changes
VISHNUDAS-tunerlabs Oct 13, 2022
8d8220e
sample req changes
VISHNUDAS-tunerlabs Oct 13, 2022
ab00911
document count added
VISHNUDAS-tunerlabs Oct 14, 2022
f0132cd
Merge pull request #85 from shikshalokam/adminApi
aks30 Oct 14, 2022
ed45d91
Merge pull request #94 from shikshalokam/master
aks30 Oct 14, 2022
96e7271
Merge pull request #4 from project-sunbird/release-5.0.0
priyanka-TL Oct 24, 2022
f39c76b
hotfix for search entity
priyanka-TL Oct 24, 2022
242924a
Merge pull request #86 from priyanka-TL/5.0
priyanka-TL Oct 27, 2022
4f805a5
form config type change
priyanka-TL Oct 27, 2022
66cb5ab
Merge pull request #87 from shikshalokam/formFix
priyanka-TL Oct 27, 2022
1c49ba6
review changes
VISHNUDAS-tunerlabs Oct 28, 2022
3fb9ec4
schema changes added, common.js conflict resolve
VISHNUDAS-tunerlabs Oct 28, 2022
8bdbbe9
env changes
VISHNUDAS-tunerlabs Oct 31, 2022
c8ee7b9
Merge branch 'master' into certificate-story
VISHNUDAS-tunerlabs Oct 31, 2022
2c05f40
oracle-cloud storage added
VISHNUDAS-tunerlabs Nov 10, 2022
784523a
downloadable url expiry removed
VISHNUDAS-tunerlabs Nov 10, 2022
7d11793
query removed from downloadable URL
VISHNUDAS-tunerlabs Nov 10, 2022
078a906
Review: .env.sample added, variable change && aws logic added
VISHNUDAS-tunerlabs Nov 11, 2022
b13a212
operator key added
VISHNUDAS-tunerlabs Nov 14, 2022
886c148
Merge pull request #88 from shikshalokam/oracle-cloud-storage
aks30 Nov 15, 2022
543e800
api endpoint change
VISHNUDAS-tunerlabs Nov 16, 2022
1485bee
certificate template model change
VISHNUDAS-tunerlabs Nov 16, 2022
fb3b5e6
review changes
VISHNUDAS-tunerlabs Nov 16, 2022
3210bb8
env changes
VISHNUDAS-tunerlabs Nov 16, 2022
4f5cfcf
generics utils missing code added
VISHNUDAS-tunerlabs Nov 18, 2022
8fea3b6
users service missing code added
VISHNUDAS-tunerlabs Nov 18, 2022
485ae5e
code update adminApi
VISHNUDAS-tunerlabs Nov 18, 2022
c855404
Merge branch 'master' into certificate-story
VISHNUDAS-tunerlabs Nov 18, 2022
77bea70
templateUpload review changes
VISHNUDAS-tunerlabs Nov 20, 2022
074dd01
Merge pull request #84 from shikshalokam/certificate-story
aks30 Nov 21, 2022
d2e256e
review changes
VISHNUDAS-tunerlabs Nov 21, 2022
654f3bf
review changes
VISHNUDAS-tunerlabs Nov 21, 2022
cd7a6e3
changes api-responses
VISHNUDAS-tunerlabs Nov 21, 2022
3666c8c
Merge pull request #89 from shikshalokam/certificate-story
aks30 Nov 21, 2022
905aa3f
svg Edit api added
VISHNUDAS-tunerlabs Nov 22, 2022
2e76b25
Merge pull request #91 from shikshalokam/svgTemplateEditAPI
aks30 Nov 22, 2022
156fa40
solution projection updated
VISHNUDAS-tunerlabs Nov 24, 2022
560b1a1
Merge pull request #92 from shikshalokam/certificate-story-stagingED103
aks30 Nov 24, 2022
de74046
solution list fix
priyanka-TL Nov 28, 2022
a216369
Merge pull request #93 from shikshalokam/fixSolutionList
priyanka-TL Nov 28, 2022
edaf3b4
user-extension solution api : criteriaLevelReport and scoringSystem …
VISHNUDAS-tunerlabs Dec 13, 2022
a6a2e02
Merge pull request #94 from shikshalokam/user-extension
aks30 Dec 15, 2022
8763643
solutions model updated : rootOrganisations and createdFor added
VISHNUDAS-tunerlabs Dec 29, 2022
8a044c6
Merge pull request #95 from shikshalokam/solutionUpdateFix
aks30 Dec 29, 2022
32c29bc
ED-599 PII data story- kafka added, join api added, solutions api upd…
VISHNUDAS-tunerlabs Jan 10, 2023
e3df299
admin api optimization
VISHNUDAS-tunerlabs Jan 12, 2023
a811784
index for code removed, not querying anywhere using code
VISHNUDAS-tunerlabs Jan 12, 2023
c6fcda7
url changes
VISHNUDAS-tunerlabs Jan 12, 2023
168e8a2
Merge pull request #96 from shikshalokam/Admin-API-optimization
aks30 Jan 12, 2023
ce2f22d
ED-599 programUsers helper added and db operations triggering from th…
VISHNUDAS-tunerlabs Jan 12, 2023
f27d058
Merge branch 'master' into 5.2-Sprint
VISHNUDAS-tunerlabs Jan 12, 2023
bd09107
program externalId also pushing to kafka
VISHNUDAS-tunerlabs Jan 17, 2023
6734add
consent history changes
VISHNUDAS-tunerlabs Jan 17, 2023
736e06e
baseTemplateFix
VISHNUDAS-tunerlabs Jan 20, 2023
cc61bf0
Merge pull request #98 from shikshalokam/BaseTemplateUpdate_Fix
aks30 Jan 20, 2023
a8e6db8
program join changes
VISHNUDAS-tunerlabs Jan 24, 2023
850d8d6
saving changes
Jan 25, 2023
8c2ffac
Added consent API
Jan 26, 2023
6248b7a
Added Consent API
Jan 26, 2023
80db856
Added Consent API
Jan 26, 2023
bbce236
Merge pull request #99 from shikshalokam/ED-599-2
VISHNUDAS-tunerlabs Jan 27, 2023
a8f5d73
PII join api changes
VISHNUDAS-tunerlabs Jan 29, 2023
0349261
ED-430-program listing changes
VISHNUDAS-tunerlabs Jan 30, 2023
0b21279
Added user Role check from userExtension
Feb 7, 2023
ce8e2b5
done with this pr
Feb 7, 2023
947efc8
schema.js added. it was removed by mistake
VISHNUDAS-tunerlabs Feb 13, 2023
c1a80cd
validation changes added for userRoleInformation
VISHNUDAS-tunerlabs Feb 14, 2023
f6a3383
fix for survey solution list via programs tile
VISHNUDAS-tunerlabs Feb 17, 2023
f207551
splited name and desgination in two line
Feb 20, 2023
d5e995e
splited name and desgination in two line
Feb 20, 2023
d1ba376
Merge pull request #101 from shikshalokam/surveyFlowIssue
aks30 Feb 20, 2023
6a96691
fixed template problem
Feb 20, 2023
1658d1c
Done with template changes
Feb 20, 2023
83525b8
Merge pull request #102 from shikshalokam/certificateName
aks30 Feb 20, 2023
0e62b80
PR review-1 Resolves
VISHNUDAS-tunerlabs Feb 20, 2023
87508af
isDelete filter added to program fetch
VISHNUDAS-tunerlabs Feb 20, 2023
4c43259
Merge branch 'master' into 5.2-Sprint
VISHNUDAS-tunerlabs Feb 20, 2023
1f38ec7
kafka consumer function removed
VISHNUDAS-tunerlabs Feb 20, 2023
ee7e6ff
review changes
VISHNUDAS-tunerlabs Feb 20, 2023
3d24079
comment removed
VISHNUDAS-tunerlabs Feb 20, 2023
07cb64b
pass array of solutionIds to survey list call
VISHNUDAS-tunerlabs Feb 20, 2023
6a48f1e
Merge pull request #103 from shikshalokam/surveyFlowIssue
aks30 Feb 22, 2023
78a8822
fix for Azure warning throwing if no Azure env found
VISHNUDAS-tunerlabs Feb 22, 2023
4fa57a8
Merge pull request #104 from shikshalokam/surveyFlowIssue
aks30 Feb 22, 2023
fd533b2
env samples updated
VISHNUDAS-tunerlabs Feb 23, 2023
c8bd3d7
rootOrganisations used for consent api req body
VISHNUDAS-tunerlabs Feb 24, 2023
94cca83
rootOrganisations array passed
VISHNUDAS-tunerlabs Feb 25, 2023
e69ffc8
resolves
VISHNUDAS-tunerlabs Mar 7, 2023
0a97dbb
requestForPIIConsent is added to kafka
VISHNUDAS-tunerlabs Mar 10, 2023
a6429cb
comments added
VISHNUDAS-tunerlabs Mar 10, 2023
80121c8
kafkaCommunicationsOnOff unwanted check removed
VISHNUDAS-tunerlabs Mar 13, 2023
dbf80a1
program join validation message changed
VISHNUDAS-tunerlabs Mar 13, 2023
bce3b83
comments added to understand pagination logic
VISHNUDAS-tunerlabs Mar 13, 2023
b3254a8
review resolves
VISHNUDAS-tunerlabs Mar 13, 2023
4e19419
on update only changing noOfResourcesStarted
VISHNUDAS-tunerlabs Mar 13, 2023
d871006
added api check solution is targeted or not
Mar 24, 2023
e08e586
added api check solution is targeted or not
Mar 24, 2023
482ac0e
done with changes
Mar 27, 2023
a1540af
Added few comments
Mar 27, 2023
888184c
Added few comments
Mar 27, 2023
00f85c9
Added few comments
Mar 27, 2023
1f60cd3
Merge pull request #106 from shikshalokam/temp-checking
aks30 Mar 27, 2023
2ee3580
added
Mar 27, 2023
26f52a3
done
Mar 27, 2023
2900a44
Fixed Public And Private Project
Mar 27, 2023
ab40083
Fixed Public And Private Project
Mar 27, 2023
79494b2
Fixed Public And Private Project
Mar 27, 2023
a1f281a
Merge pull request #105 from shikshalokam/ED-1475
aks30 Mar 28, 2023
2ab5020
changes added to not use hard coded app version
VISHNUDAS-tunerlabs Apr 5, 2023
76503d7
no of solutions added
VISHNUDAS-tunerlabs Apr 5, 2023
0aa6951
saving some changes
Apr 6, 2023
bb84951
changes added for observation link join and project join
VISHNUDAS-tunerlabs Apr 6, 2023
5e81320
program endDate sending with program solutions listing api call response
VISHNUDAS-tunerlabs Apr 7, 2023
4308842
updated condition to call consent api
VISHNUDAS-tunerlabs Apr 7, 2023
fea9fb5
migration script required for story ED-523 added
VISHNUDAS-tunerlabs Apr 7, 2023
75d5bd7
ED-523 added start date
Apr 10, 2023
2fccac9
ED-523 added start date
Apr 10, 2023
5117302
ED-523 added start date
Apr 10, 2023
868744a
ED-523 added start date
Apr 10, 2023
f826777
ED-523 added start date
Apr 10, 2023
5bbb643
ED-523 added start date
Apr 10, 2023
ad3a764
Review fix
VISHNUDAS-tunerlabs Apr 10, 2023
ec014ce
changes related to kafka env variables made.
VISHNUDAS-tunerlabs Apr 10, 2023
9363f2e
program join condition combined && fn signature updated : Review changes
VISHNUDAS-tunerlabs Apr 10, 2023
5272ee1
Added all data source and All types of solutions
Apr 10, 2023
b118c79
Resolved all comments
Apr 10, 2023
1bb9c17
Resolved all comments
Apr 10, 2023
d1ae329
Resolved all comments
Apr 10, 2023
c7c7afc
programs query change
VISHNUDAS-tunerlabs Apr 10, 2023
7a341e4
console added
VISHNUDAS-tunerlabs Apr 11, 2023
1f8d812
console and outpu log added
VISHNUDAS-tunerlabs Apr 11, 2023
fea181d
Resolving all the comments to PR ED-523
Apr 11, 2023
b88556e
Merge pull request #107 from shikshalokam/ED-523-migrationScript
aks30 Apr 11, 2023
938eba4
review resolve : env changes , fn added to determine program joined
VISHNUDAS-tunerlabs Apr 11, 2023
b731bb7
Removed UserExtensionHelperV2
Apr 11, 2023
13615e0
Removed UserExtensionHelperV2
Apr 11, 2023
0808699
Merge pull request #100 from shikshalokam/ED-94
aks30 Apr 11, 2023
82ec446
Resolved all the comments and merged with master branch
Apr 11, 2023
9f72a7d
Merge pull request #108 from shikshalokam/ED-523
aks30 Apr 11, 2023
bfe6e64
Review changes: resourcesStarted key added
VISHNUDAS-tunerlabs Apr 11, 2023
46dac80
Merge branch 'master' into 5.2-Sprint
VISHNUDAS-tunerlabs Apr 11, 2023
455c145
fn used for programJoined logic
VISHNUDAS-tunerlabs Apr 12, 2023
2c0b15b
fn used for programJoin logic
VISHNUDAS-tunerlabs Apr 12, 2023
a501a10
Merge branch '5.2-Sprint' of https://github.com/shikshalokam/ml-core-…
VISHNUDAS-tunerlabs Apr 12, 2023
675dbbc
presents of programId in solution checked
VISHNUDAS-tunerlabs Apr 13, 2023
475dec3
user/programs fn changes added
VISHNUDAS-tunerlabs Apr 14, 2023
77c6145
merge code issue resolved
VISHNUDAS-tunerlabs Apr 18, 2023
cc6ffac
facet query changed at list api
VISHNUDAS-tunerlabs Apr 18, 2023
2396278
programlistin api review changes
VISHNUDAS-tunerlabs Apr 18, 2023
632e32c
pagination generalised
VISHNUDAS-tunerlabs Apr 18, 2023
d7ec0d6
Merge pull request #97 from shikshalokam/5.2-Sprint
aks30 Apr 18, 2023
2459bfd
Added PR checklist
Apr 20, 2023
a63ba5f
Added PR checklist
Apr 20, 2023
a015e84
Added deleted keyclockfile
Apr 20, 2023
b530fb9
Added PR One more point
Apr 20, 2023
bfac161
Changed Pr checklist point
Apr 20, 2023
15d699e
Merge pull request #109 from shikshalokam/PRChecklist
aks30 Apr 20, 2023
ef2c834
console added
VISHNUDAS-tunerlabs May 4, 2023
75ae8c7
response check changes for v5/user/read added
VISHNUDAS-tunerlabs May 4, 2023
1821dca
bug fix, userRoleinformation not getting added for internal calls
VISHNUDAS-tunerlabs May 4, 2023
a41ae3e
console added to check program listing error
VISHNUDAS-tunerlabs May 4, 2023
cc5e2c7
targetedPrograms.data.data usage avoided
VISHNUDAS-tunerlabs May 4, 2023
4179fc0
debug console added
VISHNUDAS-tunerlabs May 4, 2023
564ba72
facetQuery bug fix. Programs list function
VISHNUDAS-tunerlabs May 5, 2023
6853699
change made to send requestForPIIConsent if it is present in programs…
VISHNUDAS-tunerlabs May 9, 2023
8333b03
rootOrganisations in programs made mandatory
VISHNUDAS-tunerlabs May 9, 2023
a92f826
code formatted
VISHNUDAS-tunerlabs May 9, 2023
05b9000
requestForPIIConsent added to program doc projection in programsByPla…
VISHNUDAS-tunerlabs May 10, 2023
4a78181
kafka push object prototype issue resolve
VISHNUDAS-tunerlabs May 15, 2023
7ba3e46
change in PROGRAM_DESCRIPTION constant
VISHNUDAS-tunerlabs May 16, 2023
9b7cc60
admin dbUpdate api code enabled
VISHNUDAS-tunerlabs May 16, 2023
8901499
consentShared key added and kafka event trigger conditions updated
VISHNUDAS-tunerlabs May 19, 2023
af5422c
changes added to pass consentShared value to front end
VISHNUDAS-tunerlabs May 20, 2023
f3e9928
pushProgramUsersDetailsToKafka determining codeblock change
VISHNUDAS-tunerlabs May 22, 2023
47a9fb3
added changes to check pushProgramUsersDetailsToKafka==true in single…
VISHNUDAS-tunerlabs May 22, 2023
56ac24e
bug fix program startDate and endDate
VISHNUDAS-tunerlabs May 24, 2023
8d6e22e
datatype change
VISHNUDAS-tunerlabs May 24, 2023
7ca4d90
program/update api enhancement
VISHNUDAS-tunerlabs May 26, 2023
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
25 changes: 20 additions & 5 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,24 @@ ML_SURVEY_SERVICE_URL = "http://ml-survey-service:3000"
# ML Project Service Service
ML_PROJECT_SERVICE_URL = "http://ml-project-service:3000" // ML Project service url

# Elastic search configurations
ELASTICSEARCH_COMMUNICATIONS_ON_OFF = "ON/OFF" // Elastic search enable/disable flag E.g. ON/OFF
ELASTICSEARCH_HOST_URL = "http://127.0.0.1:9200" // Elastic search host url
ELASTICSEARCH_ENTITIES_INDEX = "entities" // Elastic search index name for storing entities

#USER service
USER_SERVICE_URL = "http://user-service:3000" // Base url of the sunbird enviornment

CSV_REPORTS_PATH = "public/report" // Report path

APP_PORTAL_BASE_URL = "https://dev.sunbirded.org"

FORM_SERVICE_URL = "http://player:3000" // Base url for form search

# Oracle Cloud Configuration
OCI_ACCESS_KEY_ID = '23b90..............d01d' // Oracle cloud storage access key Id
OCI_SECRET_ACCESS_KEY = '22levMw5Ci............SmNE=' // Oracle cloud storage secret access key
OCI_BUCKET_NAME = 'oracle cloud bucket name' // Oracle cloud bucket name
OCI_BUCKET_REGION = 'ap-hyderabad-1' // Oracle cloud bucket region
OCI_BUCKET_ENDPOINT = 'https://pmt5.compat.storage.ap-h1.oraclecloud.com' // Oracle cloud bucket endPoint

# KAFKA Configurations
KAFKA_COMMUNICATIONS_ON_OFF = "ON/OFF" // Kafka enable or disable communication flag
KAFKA_URL = "100.0.0.1:9092" // IP address of kafka server with port without HTTP
KAFKA_GROUP_ID = "mlcore" // Kafka group id
PROGRAM_USERS_JOINED_TOPIC = "dev.programuser.info" // Kafka submission topic for pushing program joined user's data
36 changes: 36 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# Description
These recommendations are intended to promote code quality and team communication during software development. They cover a variety of topics, including ensuring that pull requests are submitted to the correct branch, documenting new methods, preserving consistency across many services, and avoiding typical blunders like accessing APIs or DB queries within loops. Sensitive data should not be uploaded, and changes to environment variables or database models should be executed consistently. Teams may work more effectively and develop higher-quality software by adhering to these standards.


## Type of change
Please choose appropriate options.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Enhancement (additive changes to improve performance)
- [ ] This change requires a documentation update

## Checklist

- [ ] It's critical to avoid making needless file modifications in contributions, such as adding new lines, console logs, or additional spaces, to guarantee cleaner and more efficient code. Furthermore, eliminating unnecessary imports from a file might enhance code readability and efficiency.
- [ ] Ensure that the pull request is assigned to the right base branch and that the development branch name contains the JIRA Task Id. Furthermore, each commit message should include the JIRA Task Id in the manner "ED-100: message".
- [ ] Only update packages if it is mentioned and authorized in the design document, and make sure that you have the required permissions.
- [ ] Avoid making API and database queries inside a loop as it can lead to performance issues and slow down the system.
- [ ] When calling another function inside a given function, add comments explaining the purpose and meaning of the passed arguments and expected return values.
- [ ] If adding a blank argument in a function, add a comment explaining the reason for the blank argument.
- [ ] Before submitting a pull request, do a self-review of your code to ensure there are no conflicts with the base branch and all comments have been addressed.
- [ ] Before merging a pull request, it's important to have other team members review it to catch any potential errors or issues
- [ ] To maintain code integrity, it's important to remove all related changes when removing code during a code review.
- [ ] If new constants, endpoints, or utility functions are introduced, it is important to check if they already exist in the service to avoid any duplication.
- [ ] Whenever a new environment variable is added to a service, it's important to ensure that the necessary changes are made to related files such as ".env.sample" and "envVariables.js" to maintain consistency and avoid errors. Additionally, the new environment variable should be added to the devops repository to ensure that it is properly documented and accessible to the team.
- [ ] When adding a new function to a service, it is important to document it with relevant information such as the name, parameters, and return value in a consistent format across all services. Additionally, if there are any changes to the API response, ensure that the documentation in the controllers is updated accordingly.
- [ ] Write a clear and concise commit message that describes the changes made.
- [ ] Maintain consistent function signature and code across all services when adding a function to multiple services. Implement changes to database models in all services that use the same model.
- [ ] Use only let and const. Do not use var.
- [ ] Make common functions for repetitive code blocks.
- [ ] Avoid uploading sensitive information such as secret tokens or passwords in pull requests to ensure data security.
- [ ] Maintain consistent indentation and spacing throughout the code.


4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ typings/
# Ignore all credentials gcp,fcm
config/credentials/*

# Ignore public directory
public/*

# next.js build output
.next

Expand All @@ -69,3 +72,4 @@ config/credentials/*
*.DS_Store

package-lock.json
keycloak-public-keys/
54 changes: 24 additions & 30 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,35 @@ node('build-slave') {
String ANSI_BOLD = "\u001B[1m"
String ANSI_RED = "\u001B[31m"
String ANSI_YELLOW = "\u001B[33m"

ansiColor('xterm') {
stage('Checkout') {
if (!env.hub_org) {
println(ANSI_BOLD + ANSI_RED + "Uh Oh! Please set a Jenkins environment variable named hub_org with value as registery/sunbidrded" + ANSI_NORMAL)
error 'Please resolve the errors and rerun..'
}
else
println(ANSI_BOLD + ANSI_GREEN + "Found environment variable named hub_org with value as: " + hub_org + ANSI_NORMAL)
cleanWs()
if (params.github_release_tag == "") {
checkout scm
commit_hash = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
branch_name = sh(script: 'git name-rev --name-only HEAD | rev | cut -d "/" -f1| rev', returnStdout: true).trim()
build_tag = branch_name + "_" + commit_hash
println(ANSI_BOLD + ANSI_YELLOW + "github_release_tag not specified, using the latest commit hash: " + commit_hash + ANSI_NORMAL)
}
else {
def scmVars = checkout scm
checkout scm: [$class: 'GitSCM', branches: [[name: "refs/tags/$params.github_release_tag"]], userRemoteConfigs: [[url: scmVars.GIT_URL]]]
build_tag = params.github_release_tag
println(ANSI_BOLD + ANSI_YELLOW + "github_release_tag specified, building from github_release_tag: " + params.github_release_tag + ANSI_NORMAL)
timestamps {
stage('Checkout') {
if (!env.hub_org) {
println(ANSI_BOLD + ANSI_RED + "Uh Oh! Please set a Jenkins environment variable named hub_org with value as registery/sunbidrded" + ANSI_NORMAL)
error 'Please resolve the errors and rerun..'
} else
println(ANSI_BOLD + ANSI_GREEN + "Found environment variable named hub_org with value as: " + hub_org + ANSI_NORMAL)
}
// cleanWs()
checkout scm
commit_hash = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
build_tag = sh(script: "echo " + params.github_release_tag.split('/')[-1] + "_" + commit_hash + "_" + env.BUILD_NUMBER, returnStdout: true).trim()
echo "build_tag: " + build_tag
}
stage('Build') {
env.NODE_ENV = "build"
print "Environment will be : ${env.NODE_ENV}"
sh('git submodule update --init')
sh('git submodule update --init --recursive --remote')
sh('chmod 777 build.sh')
sh("./build.sh ${build_tag} ${env.NODE_NAME} ${hub_org}")
}
stage('ArchiveArtifacts') {

stage('Build') {
env.NODE_ENV = "build"
print "Environment will be : ${env.NODE_ENV}"
sh('git submodule update --init')
sh('git submodule update --init --recursive --remote')
sh('chmod 777 build.sh')
sh("./build.sh ${build_tag} ${env.NODE_NAME} ${hub_org}")
}

stage('ArchiveArtifacts') {
archiveArtifacts "metadata.json"
currentBuild.description = "${build_tag}"
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# ml-core-service
Centralised Service to support other Services
Centralised Service to support other Services.
It is used by ml-survey, ml-project


19 changes: 7 additions & 12 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,13 @@ app.use(express.static("public"));


app.all("*", (req, res, next) => {
console.log("-------Request log starts here------------------");
console.log(
"%s %s on %s from ",
req.method,
req.url,
new Date(),
req.headers["user-agent"]
);
console.log("Request Headers: ", req.headers);
console.log("Request Body: ", req.body);
console.log("Request Files: ", req.files);
console.log("-------Request log ends here------------------");
console.log({"Debugging ML Core Service": true});
console.log("<------------Request log starts here------------------>");
console.log("Request URL: ", req.url);
console.log("Request Headers: ", JSON.stringify(req.headers));
console.log("Request Body: ", JSON.stringify(req.body));
// console.log("Request Files: ", req.files);
console.log("<--------------Request log ends here------------------>");
next();
});

Expand Down
55 changes: 55 additions & 0 deletions auto_build_deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@Library('deploy-conf') _
node('build-slave') {
try {
String ANSI_GREEN = "\u001B[32m"
String ANSI_NORMAL = "\u001B[0m"
String ANSI_BOLD = "\u001B[1m"
String ANSI_RED = "\u001B[31m"
String ANSI_YELLOW = "\u001B[33m"

ansiColor('xterm') {
timestamps {
stage('Checkout') {
tag_name = env.JOB_NAME.split("/")[-1]
pre_checks()
if (!env.hub_org) {
println(ANSI_BOLD + ANSI_RED + "Uh Oh! Please set a Jenkins environment variable named hub_org with value as registery/sunbidrded" + ANSI_NORMAL)
error 'Please resolve the errors and rerun..'
} else
println(ANSI_BOLD + ANSI_GREEN + "Found environment variable named hub_org with value as: " + hub_org + ANSI_NORMAL)
}
cleanWs()
def scmVars = checkout scm
checkout scm: [$class: 'GitSCM', branches: [[name: "refs/tags/$tag_name"]], userRemoteConfigs: [[url: scmVars.GIT_URL]]]
build_tag = tag_name + "_" + env.BUILD_NUMBER
commit_hash = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
artifact_version = tag_name + "_" + commit_hash
echo "build_tag: " + build_tag

// stage Build
env.NODE_ENV = "build"
print "Environment will be : ${env.NODE_ENV}"
sh('git submodule update --init')
sh('git submodule update --init --recursive --remote')
sh('chmod 777 build.sh')
sh("./build.sh ${build_tag} ${env.NODE_NAME} ${hub_org}")


// stage ArchiveArtifacts
archiveArtifacts "metadata.json"
currentBuild.description = "${build_tag}"

}
}
currentBuild.result = "SUCCESS"
slack_notify(currentBuild.result, tag_name)
email_notify()
auto_build_deploy()
}
catch (err) {
currentBuild.result = "FAILURE"
slack_notify(currentBuild.result, tag_name)
email_notify()
throw err
}
}
68 changes: 34 additions & 34 deletions config/db/elastic-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@


//dependencies
const { Client : esClient } = require('@elastic/elasticsearch');

/**
* Elastic search connection.
* @function
* @name connect
* @return {Object} elastic search client
*/

var connect = function () {

const elasticSearchClient = new esClient({
node: process.env.ELASTICSEARCH_HOST_URL,
maxRetries: 5,
requestTimeout: 60000,
sniffOnStart: process.env.ELASTIC_SEARCH_SNIFF_ON_START
});

elasticSearchClient.ping({
}, function (error) {
if (error) {
console.log(error);
} else {
console.log('Elasticsearch connection established.');
}
});

return {
client: elasticSearchClient
};

};

module.exports = connect;
// const { Client : esClient } = require('@elastic/elasticsearch');

// /**
// * Elastic search connection.
// * @function
// * @name connect
// * @return {Object} elastic search client
// */

// var connect = function () {

// const elasticSearchClient = new esClient({
// node: process.env.ELASTICSEARCH_HOST_URL,
// maxRetries: 5,
// requestTimeout: 60000,
// sniffOnStart: process.env.ELASTIC_SEARCH_SNIFF_ON_START
// });

// elasticSearchClient.ping({
// }, function (error) {
// if (error) {
// console.log(error);
// } else {
// console.log('Elasticsearch connection established.');
// }
// });

// return {
// client: elasticSearchClient
// };

// };

// module.exports = connect;
7 changes: 6 additions & 1 deletion config/db/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,16 @@ var databaseConfiguration = function () {
return model;
};

var getCollection = function (modelName) {
return db.collection(modelName);
}

return {
database: db,
createModel: createModel,
ObjectId: objectId,
models: db.models
models: db.models,
getCollection : getCollection
};
};

Expand Down
3 changes: 3 additions & 0 deletions config/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,7 @@ module.exports = function () {
}
});

//define cache as global variable
global.cache = require(ROOT_PATH+"/generics/helpers/cache");

};
17 changes: 14 additions & 3 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,18 @@ let db_connect = function () {
* @name elasticsearch_connect
*/

let elasticsearch_connect = function () {
global.elasticsearch = require("./db/elastic-search")();
// let elasticsearch_connect = function () {
// global.elasticsearch = require("./db/elastic-search")();
// };

/**
* Kafka connection.
* @function
* @name kafka_connect
*/

const kafka_connect = function() {
global.kafkaClient = require("./kafka")();
};

const configuration = {
Expand All @@ -35,6 +45,7 @@ const configuration = {
};

db_connect();
elasticsearch_connect();
kafka_connect();
// elasticsearch_connect();

module.exports = configuration;
Loading