Skip to content

Commit dfe5698

Browse files
authored
Merge branch 'dev' into bal-3478
2 parents bdab45c + 4121a89 commit dfe5698

File tree

42 files changed

+556
-864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+556
-864
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Packer build AWS AMI's
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- prod
6+
7+
jobs:
8+
plan:
9+
environment: Terraform
10+
defaults:
11+
run:
12+
working-directory: /home/runner/work/ballerine/deploy/aws_ami
13+
runs-on: ubuntu-latest
14+
name: Packer build Artifacts
15+
steps:
16+
- name: Checkout to Git
17+
uses: actions/checkout@v2
18+
19+
- name: Assume Role
20+
uses: ./
21+
env:
22+
ROLE_ARN: ${{ secrets.AWS_PACKER_ROLE }}
23+
ROLE_SESSION_NAME: packersession
24+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
25+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
26+
DURATION_SECONDS: 900
27+
28+
- name: Setup `packer`
29+
uses: hashicorp/setup-packer@main
30+
id: setup
31+
with:
32+
version: 1.8.7
33+
34+
- name: Run `packer init`
35+
id: init
36+
run: "packer init template.json.pkr.hcl"
37+
38+
- name: Run `packer validate`
39+
id: validate
40+
run: "packer validate template.json.pkr.hcl"
41+
42+
- name: Build AWS AMIs
43+
run: "packer build template.json.pkr.hcl"

apps/backoffice-v2/src/domains/business-reports/fetchers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const BusinessReportSchema = z
2323
reportType: z.enum([MERCHANT_REPORT_TYPES[0]!, ...MERCHANT_REPORT_TYPES.slice(1)]),
2424
createdAt: z.string().datetime(),
2525
updatedAt: z.string().datetime(),
26+
displayDate: z.string().datetime(),
2627
riskScore: z.number().nullable(),
2728
status: z.enum([MERCHANT_REPORT_STATUSES[0]!, ...MERCHANT_REPORT_STATUSES.slice(1)]),
2829
parentCompanyName: z.string().nullable(),

apps/backoffice-v2/src/pages/MerchantMonitoring/components/MerchantMonitoringTable/columns.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,12 @@ export const columns = [
153153
},
154154
header: 'Alert',
155155
}),
156-
columnHelper.accessor('createdAt', {
156+
columnHelper.accessor('displayDate', {
157157
cell: info => {
158-
const createdAt = info.getValue();
159-
160-
if (!createdAt) {
161-
return <TextWithNAFallback>{createdAt}</TextWithNAFallback>;
162-
}
158+
const displayDate = info.getValue();
163159

164160
// Convert UTC time to local browser time
165-
const localDateTime = dayjs.utc(createdAt).local();
161+
const localDateTime = dayjs.utc(displayDate).local();
166162

167163
const date = localDateTime.format('MMM DD, YYYY');
168164
const time = localDateTime.format('HH:mm');

apps/backoffice-v2/src/pages/MerchantMonitoringBusinessReport/MerchantMonitoringBusinessReport.page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ export const MerchantMonitoringBusinessReport: FunctionComponent = () => {
272272
</div>
273273
<div className={`text-sm`}>
274274
<span className={`me-2 leading-6 text-slate-400`}>Created at</span>
275-
{businessReport?.createdAt &&
276-
dayjs(new Date(businessReport?.createdAt)).format('HH:mm MMM Do, YYYY')}
275+
{businessReport?.displayDate &&
276+
dayjs(new Date(businessReport?.displayDate)).format('HH:mm MMM Do, YYYY')}
277277
</div>
278278
<div className={`flex items-center space-x-2 text-sm`}>
279279
<span className={`text-slate-400`}>Monitoring Status</span>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
websiteUrl,countryCode,lineOfBusiness,parentCompanyName,merchantName,correlationId
22
https://www.ballerine.com,,,,,
33
https://www.google.com,US,Search Engine,Alphabet Inc.,Google,1
4-
https://www.bbc.com,UK,Journalism,BBC Inc.,BBC,2
4+
https://www.bbc.com,GB,Journalism,BBC Inc.,BBC,2

apps/kyb-app/src/components/layouts/AppShell/Logo.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { useRefValue } from '@/hooks/useRefValue';
12
import { useEffect } from 'react';
23

34
interface Props {
@@ -16,14 +17,16 @@ const prefetchImage = (url: string) =>
1617
const fallback = (timeout: number) => new Promise(resolve => setTimeout(resolve, timeout));
1718

1819
export const Logo = ({ logoSrc, appName, onLoad }: Props) => {
20+
const onLoadRef = useRefValue(onLoad);
21+
1922
useEffect(() => {
2023
if (!onLoad) {
2124
return;
2225
}
2326

2427
// Using race here in case if image is corrupted or load takes to long we don't want to lock stepper breadcrumbs forever.
25-
Promise.race([prefetchImage(logoSrc), fallback(3000)]).then(onLoad);
26-
}, [logoSrc, onLoad]);
28+
Promise.race([prefetchImage(logoSrc), fallback(3000)]).then(onLoadRef.current);
29+
}, [logoSrc, onLoadRef]);
2730

2831
return <img src={logoSrc} alt={appName} className="max-h-[80px] max-w-[200px] object-cover" />;
2932
};

deploy/ansible/ballerine_playbook/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ You can run the ansible playbook with the following command
9999

100100
```bash
101101
cd ballerine/deploy/ansible/ballerine_playbook
102-
ansible-playbook -i inventory.txt ballerine-playbook.yml
102+
ansible-playbook -i inventory.txt ballerine-playbook.yml --skip-tags packer
103103
```
104104

105105
The command above will use the host information from the `inventory` file.
@@ -110,4 +110,4 @@ When it's all done, provided all went well and no parameters were changed, you s
110110

111111
## Make entries to the DNS server
112112

113-
Make sure the appropriate entries for the url in DNS are created
113+
Make sure the appropriate entries for the url in DNS are created

deploy/ansible/ballerine_playbook/roles/setup-ballerine/defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
docker_edition: 'ce'
44
docker_package: 'docker-{{ docker_edition }}'
55
docker_package_state: present
6+
default_user: ubuntu
7+
8+
cloud_user: ballerine
9+
cloud_group: ballerine
610

711
# Service options.
812
docker_service_state: started
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- name: Remove sensitive credential (1)
3+
shell: find / -name "authorized_keys" -exec rm -f {} \;
4+
become: true
5+
6+
- name: Remove sensitive credential (2)
7+
shell: find /root/ /home/*/ -name .cvspass -exec rm -f {} \;
8+
become: true
9+
10+
- name: Restart rsyslog
11+
shell: service rsyslog restart
12+
become: true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
- name: Clone Ballerine
3+
git:
4+
repo: https://github.com/ballerine-io/ballerine.git
5+
dest: "{{ install_dir }}"
6+
version: dev
7+
clone: yes
8+
update: yes
9+
ignore_errors: yes

0 commit comments

Comments
 (0)