Skip to content

Commit 2ed2d87

Browse files
author
Stephen Poserina
committed
fix merge conflicts
2 parents 9fa05a4 + 7304841 commit 2ed2d87

File tree

21 files changed

+18647
-545
lines changed

21 files changed

+18647
-545
lines changed

src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _Docker Compose instructions_
1919
- `docker-compose up -d` to bring up the application.
2020
- Scheduler docker will not start. To run the scheduler, use profile flag `production-only` as explained in the Production Environment section.
2121

22-
#### Finally - Run The UI on http://localhost:3000
22+
#### Finally - Run The UI on http://localhost:80
2323

2424
---------------------------------------
2525
Production Environment

src/client/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pull official base image
2-
FROM node:13.12.0-alpine as builder
2+
FROM node:16-alpine as builder
33

44
# set working directory
55
WORKDIR /app

src/client/package-lock.json

Lines changed: 18033 additions & 231 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/src/pages/Admin.js

Lines changed: 155 additions & 157 deletions
Large diffs are not rendered by default.

src/client/src/pages/DataView360/View/View360.js

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@ class View360 extends Component {
6868
});
6969
response = await response.json();
7070

71-
let shelterluvInfo = await fetch(`/api/person/${this.state.matchId}/animals`);
71+
let shelterluvInfo = await fetch(`/api/person/${this.state.matchId}/animals`,
72+
{
73+
method: 'GET',
74+
headers: {
75+
'Content-Type': 'application/json',
76+
'Authorization': 'Bearer ' + this.props.access_token
77+
}
78+
});
7279
shelterluvInfo = await shelterluvInfo.json()
7380
const shelterluvShortId = shelterluvInfo["person_details"]["shelterluv_short_id"]
7481
let animalInfo = shelterluvInfo["animal_details"]
@@ -89,7 +96,14 @@ class View360 extends Component {
8996
});
9097
}
9198

92-
let supportOverviewData = await fetch(`/api/person/${this.state.matchId}/support`);
99+
let supportOverviewData = await fetch(`/api/person/${this.state.matchId}/support`,
100+
{
101+
method: 'GET',
102+
headers: {
103+
'Content-Type': 'application/json',
104+
'Authorization': 'Bearer ' + this.props.access_token
105+
}
106+
});
93107
supportOverviewData = await supportOverviewData.json()
94108

95109
this.setState({
@@ -104,7 +118,14 @@ class View360 extends Component {
104118
}
105119

106120
async getAnimalEvents(animalId, matchId) {
107-
let response = await fetch(`/api/person/${matchId}/animal/${animalId}/events`);
121+
let response = await fetch(`/api/person/${matchId}/animal/${animalId}/events`,
122+
{
123+
method: 'GET',
124+
headers: {
125+
'Content-Type': 'application/json',
126+
'Authorization': 'Bearer ' + this.props.access_token
127+
}
128+
});
108129
return await response.json()
109130
}
110131

src/client/src/pages/DataView360/View/components/Adoptions.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class Adoptions extends Component {
3737

3838
getLatestPets(animals) {
3939
const latestPets = _.sortBy(animals, animal => {
40-
return animal.Events.Time
40+
return (animal.Events && animal.Events.Time) ? animal.Events.Time : 1
41+
4142
}).reverse()
4243

4344
return latestPets.slice(0, PET_COUNT)
@@ -46,11 +47,15 @@ class Adoptions extends Component {
4647
createRows(data) {
4748
const result = _.map(data, (row, index) => {
4849
const photo = row.Photos[0]
50+
const eventDate = (row.Events && row.Events.Time) ? moment.unix(row.Events.Time).format("YYYY-MM-DD") : ''
51+
52+
53+
4954
return (
5055
<TableRow key={index}>
5156
<TableCell align="center">{row.Name}</TableCell>
5257
<TableCell align="center">{row.Type}</TableCell>
53-
<TableCell align="center">{moment.unix(row.Events.Time).format("YYYY-MM-DD")}</TableCell>
58+
<TableCell align="center">{eventDate}</TableCell>
5459
<TableCell align="center">{showAnimalAge(row.DOBUnixTime)}</TableCell>
5560
<TableCell align="center">{<img src={photo} alt="animal" style={{ "maxWidth": "100px" }} />}</TableCell>
5661
</TableRow>

src/client/src/pages/DataView360/View/components/SupportOverview.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ class SupportOverview extends Component {
2222
}
2323
const rows = [
2424
{ "title": "First Gift Date", "value": data.first_donation_date },
25-
{ "title": "First Gift Amount", "value": `$${data.first_gift_amount}`},
26-
{ "title": "Lifetime Giving", "value": `$${data.total_giving}`},
25+
{ "title": "First Gift Amount", "value": `$${data.first_gift_amount.toFixed(2)}`},
26+
{ "title": "Lifetime Giving", "value": `$${data.total_giving.toFixed(2)}`},
2727
{ "title": "Total # of Gifts", "value": data.number_of_gifts},
28-
{ "title": "Largest Gift", "value": `$${data.largest_gift}`},
28+
{ "title": "Largest Gift", "value": `$${data.largest_gift.toFixed(2)}`},
2929
{ "title": "Recurring Donor?", "value": data.is_recurring ? "Yes" : "No"},
3030
{ "title": "RFM Score", "value": data.rfm_score }
3131
// { "title": "PAWS Legacy Society?", "value": "test" }

src/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ services:
99
volumes:
1010
- postgres:/var/lib/postgresql/data
1111
environment:
12-
POSTGRES_PASSWORD: thispasswordisverysecure
1312
POSTGRES_DB: paws
13+
POSTGRES_PASSWORD: thispasswordisverysecure
1414

1515
server:
1616
container_name: paws-compose-server
@@ -53,3 +53,4 @@ services:
5353
volumes:
5454
postgres:
5555
src_archive:
56+
server_logs:

src/helm-chart/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ spec:
88
{{- if not .Values.autoscaling.enabled }}
99
replicas: {{ .Values.replicaCount }}
1010
{{- end }}
11+
strategy:
12+
type: Recreate
1113
selector:
1214
matchLabels:
1315
{{- include "helm-chart.selectorLabels" . | nindent 6 }}

src/helm-chart/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ server:
99
repository: ghcr.io/codeforphilly/paws-data-pipeline/server
1010
pullPolicy: Always
1111
# Overrides the image tag whose default is the chart appVersion.
12-
tag: "2.33"
12+
tag: "2.34"
1313

1414
client:
1515
image:
1616
repository: ghcr.io/codeforphilly/paws-data-pipeline/client
1717
pullPolicy: Always
1818
# Overrides the image tag whose default is the chart appVersion.
19-
tag: "2.33"
19+
tag: "2.34"
2020

2121
db:
2222
image:

0 commit comments

Comments
 (0)