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

Bnd UI custom #32

Open
wants to merge 74 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
d81efad
Initial file management version
priyamalu Aug 29, 2022
1b8c6d7
File management service folder structure
priyamalu Aug 30, 2022
11f110f
filemngmntchkstyleadded
priyamalu Aug 30, 2022
deeb9f7
'filemngmnttestng'
priyamalu Sep 3, 2022
9d3ff44
Added file management for Build
Sep 6, 2022
d7209af
adjusting pom file for Java version
Sep 6, 2022
1360934
adding SMS config
Sep 6, 2022
84f5078
resolving build issues
priyamalu Sep 6, 2022
8735f3e
Merge branch 'master' of https://github.com/ikmupyog/KSMART
priyamalu Sep 6, 2022
f2c3141
email config
Sep 6, 2022
f75c448
Merge branch 'master' of https://github.com/ikmupyog/KSMART
Sep 6, 2022
885fec6
added cert
Sep 9, 2022
e5197a8
adding cer for SMS
Sep 10, 2022
6f73610
changing to Mar22
Sep 12, 2022
7326fe4
filemgmnt initial template
priyamalu Sep 15, 2022
6cd2cfc
Merge branch 'master' of https://github.com/ikmupyog/KSMART
priyamalu Sep 15, 2022
a2deeb8
fixing hardcoded value for SMS
Sep 16, 2022
e2ab4f6
Merge branch 'master' of https://github.com/ikmupyog/KSMART
Sep 16, 2022
b2e2158
adjusted the certificate
Sep 16, 2022
59a4d1c
resource import
Sep 16, 2022
31f702c
classpath resource
Sep 16, 2022
d819468
Update map.js
MayaDevops Sep 17, 2022
d795f9f
Update map.js
MayaDevops Sep 17, 2022
35bee17
Update map.js
MayaDevops Sep 17, 2022
7d60597
Update index.html
MayaDevops Sep 17, 2022
6fe4058
Update application.properties
MayaDevops Sep 17, 2022
a10b714
adding certificate verify true
Sep 18, 2022
e311c84
Merge branch 'master' of https://github.com/ikmupyog/KSMART
Sep 18, 2022
5e7b847
Create .env
MayaDevops Sep 19, 2022
89f3da7
applicantpersonalcreateupdate
priyamalu Sep 19, 2022
cfa233d
resolving merge conflict
priyamalu Sep 19, 2022
8a277b2
Merge branch 'master' of https://github.com/ikmupyog/KSMART
priyamalu Sep 19, 2022
bb37c0c
refactoring names
priyamalu Sep 19, 2022
4ad2140
fm renaming interfaces
priyamalu Sep 19, 2022
ebd5291
calculationbystate
rajeshraghav Sep 20, 2022
0ef7ef4
Merge branch 'master' of https://github.com/ikmupyog/KSMART
rajeshraghav Sep 20, 2022
082b8d6
comitting the SMS cert change
Sep 23, 2022
7926a5f
Update index.js
MayaDevops Sep 26, 2022
13b5e17
filemngmntupdates
priyamalu Sep 27, 2022
b6035eb
Merge branch 'master' of https://github.com/ikmupyog/KSMART
priyamalu Sep 27, 2022
6f9eefc
new modification for filemanagement service
priyamalu Sep 27, 2022
5eb5509
Merge pull request #2 from ikmupyog/filemanagement
vbvarsha Sep 27, 2022
bc94719
Merge pull request #1 from ikmupyog/MayaDevops-patch-1
MayaDevops Sep 27, 2022
4cb3ed3
adding SMS default template ID
Sep 28, 2022
51fde61
SMS debug
Sep 28, 2022
ea7ef96
sms fix for password
Sep 28, 2022
989ce29
password fix
Sep 28, 2022
9fc62b0
adding w/o ssl
Sep 28, 2022
7977dd0
add
Sep 28, 2022
e4e7e11
adding back change
Sep 29, 2022
b97e876
adding cert log
Sep 29, 2022
dd8036f
ssl context
Sep 29, 2022
b64c1d2
adding sslcontext log
Sep 29, 2022
8680716
added
Sep 29, 2022
706f37c
adding print for default keystore
Sep 29, 2022
1d7c8bc
pkcs12
Sep 29, 2022
98f4902
making exactly like UPYOG
Oct 1, 2022
828b55a
sms issues
Oct 1, 2022
41009ba
adding cer in new way
Oct 1, 2022
6553375
adding pkcs12
Oct 1, 2022
2c3a286
pkcs11
Oct 1, 2022
c4bac29
adding changes for cert issue
Oct 2, 2022
ea6e618
fixing compilation error
Oct 2, 2022
d9be099
fixing slContext issue
Oct 2, 2022
cda3e49
adding email configuration
Oct 2, 2022
0bb42ee
Merge pull request #4 from upyog/master
ikmkerala Oct 4, 2022
40e1384
add fix for #issue in SMS
Oct 13, 2022
a01b4f4
Merge branch 'master' of https://github.com/ikmupyog/KSMART
Oct 13, 2022
6baf520
fixing the issue for SMS
Oct 14, 2022
cc3c6ce
adding SMS fix
Oct 15, 2022
ca762fe
Create newRegistration.js
MayaDevops Oct 16, 2022
9824b56
adding change for BND tiny url
Oct 20, 2022
55c31f0
short URL update
MayaDevops Oct 21, 2022
977444e
Update application.properties
MayaDevops Oct 21, 2022
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
frontend/micro-ui-internals/node_modules/*
.idea
index.lock
/.metadata/
/.sonarlint
.checkstyle
.pmd
14 changes: 14 additions & 0 deletions Migration/ApplicantAddress.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE IF NOT EXISTS eg_fm_applicantaddress
(
id character varying(64) PRIMARY KEY,
tenantid character varying(64),
houseno character varying(64),
housename character varying(64),
street character varying(64),
pincode character varying(64),
postofficename character varying(64),
createdby character varying(64),
createdat bigint,
lastmodifiedby character varying(64),
lastmodifiedat bigint
)
17 changes: 17 additions & 0 deletions Migration/ApplicantDet.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CREATE TABLE IF NOT EXISTS eg_fm_applicantpersonal
(
id character varying(64) PRIMARY KEY,
aadhaarno character varying(64),
email character varying(64),
firstname character varying(64),
lastname character varying(64),
title character varying(64),
mobileno character varying(64),
tenantid character varying(64),
createdby character varying(64),
createdat bigint,
lastmodifiedby character varying(64),
lastmodifiedat bigint,
applicantaddressid character varying(64)

)
15 changes: 15 additions & 0 deletions Migration/ApplicantServiceDet.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE IF NOT EXISTS eg_fm_applicantdetails
(
id character varying(64) PRIMARY KEY,
tenantid character varying(64),
servicedetailsid character varying(64),
applicantpersonalid character varying(64),
fatherfirstname character varying(64),
fatherlastname character varying(64),
motherfirstname character varying(64),
motherlastname character varying(64),
createdby character varying(64),
createdat bigint,
lastmodifiedby character varying(64),
lastmodifiedat bigint
)
14 changes: 14 additions & 0 deletions Migration/ServiceMaster.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE IF NOT EXISTS eg_fm_servicedetails
(
id character varying(64) PRIMARY KEY,
tenantid character varying(64),
servicecode character varying(64),
servicename character varying(64),
servicedescription character varying(64),
businessservice character varying(64),
workflowcode character varying(64),
createdby character varying(64),
createdat bigint,
lastmodifiedby character varying(64),
lastmodifiedat bigint
)
5 changes: 5 additions & 0 deletions build/build-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,11 @@ config:
image-name: "xstate-webchat-db"

#Municipal Services
- name: "builds/upyog/municipal-services/egov-filemgmnt"
build:
- work-dir: "municipal-services/egov-filemgmnt"
image-name: "egov-filemgmnt"
dockerfile: "build/maven/Dockerfile"

- name: "builds/upyog/municipal-services/egov-user-event"
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ spring.kafka.consumer.properties.spring.json.use.type.headers=false

#Email Configuration
mail.enabled=true
mail.sender.username=test
mail.sender.password=test
mail.sender.username=[email protected]
mail.sender.password=X7&vD5$fP3
mail.smtps.auth=true
mail.smtps.starttls.enable=true
mail.smtps.debug=false
mail.port=465
mail.host=smtp.gmail.com
mail.host=smtp.mail.gov.in
mail.protocol=smtps

#Localization config
Expand All @@ -35,7 +35,7 @@ egov.localization.default.locale=
egov.user.host=https://dev.digit.org
egov.user.context.path=/user
egov.user.search.endpoint=/_search
egov.user.state.tenant.id=pb
egov.user.state.tenant.id=kl

email.subject=UPYOG Notification
email.subject=KSMART Notification

Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ public MultiValueMap<String, String> getSmsRequestBody(Sms sms) {
if (value.startsWith("$")) {
switch (value) {
case "$username":
map.add(key, /*smsProperties.getUsername()*/"pbdwss.sms");
map.add(key, smsProperties.getUsername());
break;
case "$password":
map.add(key, /*smsProperties.getPassword()*/"Nkyf%403254");
map.add(key, smsProperties.getPassword());
break;
case "$senderid":
map.add(key, smsProperties.getSenderid());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ClassPathResource;

import lombok.extern.slf4j.Slf4j;

import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;

@Service
@Slf4j
Expand All @@ -47,20 +51,53 @@ private void postConstruct() {
log.info("postConstruct() start");
try
{
//sslContext = SSLContext.getInstance("TLSv1.2");
sslContext = SSLContext.getInstance("TLSv1.2");
if(smsProperties.isVerifyCertificate()) {
log.info("checking certificate");
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
//KeyStore trustStore = KeyStore.getInstance("pkcs11");
//System.out.println(KeyStore.getDefaultType());
//File file = new File(System.getenv("JAVA_HOME")+"/lib/security/cacerts");
File file = new File(getClass().getClassLoader().getResource("smsgwsmsgovin-Mar22.cer").getFile());
InputStream is = new FileInputStream(file);
trustStore.load(is, "changeit".toCharArray());
TrustManagerFactory trustFactory = TrustManagerFactory
.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustFactory.init(trustStore);

TrustManager[] trustManagers = trustFactory.getTrustManagers();
sslContext.init(null, trustManagers, null);
//File file = new File(Thread.currentThread().getContextClassLoader().getResource("smsgwsmsgovin-sep22.cer").getFile());
//InputStream is = new FileInputStream(file);
//Resource resource = (Resource) new ClassPathResource("smsgwsmsgovin-sep22.cer");
//InputStream is = resource.getInputStream();
//InputStream is = getClass().getClassLoader().getResourceAsStream("smsgwsmsgovin-sep22.cer");
//trustStore.load(is, "changeit".toCharArray());


try (InputStream is = getClass().getClassLoader()
.getResourceAsStream("smsgwsmsgovin-sep22.cer")) {

//KeyStore trustStore = KeyStore.getInstance("pkcs12");
//trustStore.load(is, "changeit".toCharArray());

CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
X509Certificate caCert = (X509Certificate) certFactory.generateCertificate(is);

KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
trustStore.load(null);
trustStore.setCertificateEntry("caCert", caCert);

TrustManagerFactory trustFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustFactory.init(trustStore);

TrustManager[] trustManagers = trustFactory.getTrustManagers();
sslContext.init(null, trustManagers, null);
}
catch(Exception e) {
e.printStackTrace();
log.error("Not able to load SMS certificate from the specified path");
}


//TrustManagerFactory trustFactory = TrustManagerFactory
// .getInstance(TrustManagerFactory.getDefaultAlgorithm());
//trustFactory.init(trustStore);

//TrustManager[] trustManagers = trustFactory.getTrustManagers();
//sslContext.init(null, trustManagers, null);
//System.out.println(sslContext.getSocketFactory());
}
else {
log.info("not checking certificate");
Expand Down Expand Up @@ -95,19 +132,20 @@ protected void submitToExternalSmsService(Sms sms) {

String final_data="";
final_data+="username="+ smsProperties.getUsername();
final_data+="&pin="+ smsProperties.getPassword();

//final_data+="&pin="+ smsProperties.getPassword();
final_data+="&pin="+ "GHt%40%23321ter";
String smsBody = sms.getMessage();

if(smsBody.split("#").length > 1) {
String templateId = smsBody.split("#")[1];

//String templateId = smsBody.split("#")[1];
String templateId=smsBody.substring(smsBody.lastIndexOf("#")+1, smsBody.length());
sms.setTemplateId(templateId);
smsBody = smsBody.split("#")[0];
//smsBody = smsBody.split("#")[0];
smsBody=smsBody.substring(0,smsBody.lastIndexOf("#")-1);

}else if(StringUtils.isEmpty(sms.getTemplateId())){
log.info("No template Id, Message Not sent"+smsBody);
return;
//return;
}

String message= "" + smsBody ;
Expand All @@ -125,11 +163,16 @@ protected void submitToExternalSmsService(Sms sms) {
else
final_data+="&dlt_template_id="+sms.getTemplateId();

log.info("URL which is sending+"+final_data);
if(smsProperties.isSmsEnabled()) {
HttpsURLConnection conn = (HttpsURLConnection) new URL(smsProperties.getUrl()+"?"+final_data).openConnection();
conn.setSSLSocketFactory(sslContext.getSocketFactory());
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setRequestMethod("GET");
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.connect();

final BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
final StringBuffer stringBuffer = new StringBuffer();
String line;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ sms.provider.class=NIC
sms.provider.requestType=POST
sms.provider.url=https://smsgw.sms.gov.in/failsafe/MLink
sms.provider.contentType=application/json
sms.provider.username=iupyo.sms
sms.provider.password=C6%rE4#jM3
sms.provider.username=ikmlsg.sms
sms.provider.password=GHt%40%23321ter
sms.verify.response = true
sms.print.response = true
sms.verify.responseContains="success":true
sms.verify.ssl = true
sms.senderid=UPYOG
sms.senderid=IKMLSG
sms.mobile.prefix=
sms.sender.secure.key=value
sms.blacklist.numbers=9999X,5*
sms.whitelist.numbers=
sms.success.codes=200,201,202
sms.error.codes=
sms.verify.certificate=false
sms.verify.certificate=true
sms.msg.append=""
sms.provider.entityid=1001842650153206278
sms.default.tmplid=1
sms.provider.entityid=1701159193290176741
sms.default.tmplid=1707165950461405440
sms.debug.msggateway=true
sms.enabled=true
#msdg
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
egov.persist.yml.repo.path=classpath:egov-pg-service-persister.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ spring.redis.port=6379
app.timezone=UTC

spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/urlshortening
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.datasource.url=jdbc:postgresql://ikm-firstqa-eks-db.c865b3gqkoui.ap-south-1.rds.amazonaws.com:5432/ikmeksqadb
spring.datasource.username=ikmeksqadb
spring.datasource.password=ikm123456

#----------------------------- FLYWAY CONFIGURATIONS ------------------------------#
spring.flyway.url=jdbc:postgresql://localhost:5432/urlshortening
spring.flyway.url=jdbc:postgresql://ikm-firstqa-eks-db.c865b3gqkoui.ap-south-1.rds.amazonaws.com:5432/ikmeksqadb
spring.flyway.user=postgres
spring.flyway.password=postgres
spring.flyway.table=public
Expand Down Expand Up @@ -52,10 +52,10 @@ url.shorten.indexer.topic=save-url-shortening-deatils

db.persistance.enabled=true

host.name=https://qa.digit.org/
egov.user.host=http://egov-user.egov:8080/
host.name=https://ksmart-qa.lsgkerala.gov.in/
egov.user.host=https://ksmart-qa.lsgkerala.gov.in/
egov.user.search.path=user/_search
state.level.tenant.id=pb
state.level.tenant.id=kl

hashids.salt=randomsalt
hsahids.min.length=3
hsahids.min.length=3
2 changes: 2 additions & 0 deletions frontend/micro-ui/web/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REACT_APP_STATE_LEVEL_TENANT_ID=kl
REACT_APP_PROXY_URL=https://ksmart-qa.lsgkerala.gov.in/
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ <h2>There is a problem</h2>

<!-- map -->
<div class="card">
<header class="card-header">Pin Complaint Location</header>
<header class="card-header">Pin Test Complaint Location</header>
<p class="card-text">
Click and hold to drop the pin to complaint location. If you are not able to pin the location you can skip the continue for next step.
</p>
Expand All @@ -360,6 +360,7 @@ <h2>There is a problem</h2>
<!-- <img src="./svg/searchicon.svg" class="map-search-bar-icon" alt=""> -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#505A5F" width="48px" height="48px" class="map-search-bar-icon">
<path d="M0 0h24v24H0z" fill="none" />
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAQOd09-vjmk1sXFb_ZQYDz2nlfhXq7Wf8&callback=initMap"></script>
<path
d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
let map;
var script = document.createElement("script");
const key = globalConfigs?.getConfig("GMAPS_API_KEY");
const key = globalConfigs?.getConfig("gmaps_api_key");
script.src = `https://maps.googleapis.com/maps/api/js?key=${key}&callback=initAutocomplete&libraries=places`;
script.defer = true;
window.initAutocomplete = function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ const Home = () => {
Icon: <ComplaintIcon />,
onClick: () => history.push("/digit-ui/citizen/pgr-home"),
},
{
name: t("MODULE_PT"),
Icon: <PTIcon className="fill-path-primary-main" />,
onClick: () => history.push("/digit-ui/citizen/pt-home"),
},
//{
// name: t("MODULE_PT"),
// Icon: <PTIcon className="fill-path-primary-main" />,
// onClick: () => history.push("/digit-ui/citizen/pt-home"),
// },
{
name: t("MODULE_TL"),
Icon: <CaseIcon className="fill-path-primary-main" />,
Expand All @@ -57,9 +57,14 @@ const Home = () => {
// onClick: () => history.push("/digit-ui/citizen")
// },
{
name: t("CS_COMMON_INBOX_BPA"),
name: t("ACTION_TEST_BIRTH"),
Icon: <OBPSIcon />,
onClick: () => history.push("/citizen/birth-citizen/home"),
},
{
name: t("ACTION_TEST_DEATH"),
Icon: <OBPSIcon />,
onClick: () => history.push("/digit-ui/citizen/obps-home"),
onClick: () => history.push("/citizen/death-citizen/home"),
},
],
styles: { display: "flex", flexWrap: "wrap", justifyContent: "flex-start", width: "100%" },
Expand Down
Loading