Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 0 additions & 13 deletions PhotoUploadDevNotes.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,7 @@ biologicalMeasurementSamplingProtocols2 = No lipids extracted, uncorrected

#Maximum uploadable media size in megabytes (MB)
#This value is used for encounter images and videos as well as for file associations added to a MarkedIndividual.
maxMediaSize = 3
#Maximum number of media per encounter
maximumMediaCountEncounter = 200
maxMediaSize = 40

#allow video download for not logged in users
videoDLNotLoggedIn = false
Expand Down
44 changes: 31 additions & 13 deletions devops/deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ services:
db:
image: postgres:13.4
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres || exit 1" ]
interval: 10s
timeout: 5s
retries: 60
# More robust check: verify PostgreSQL can actually execute a query
# pg_isready only checks if accepting connections, not if responsive
test: [ "CMD-SHELL", "pg_isready -U ${WILDBOOK_DB_USER:-wildbook} -d ${WILDBOOK_DB_NAME:-wildbook} && psql -U ${WILDBOOK_DB_USER:-wildbook} -d ${WILDBOOK_DB_NAME:-wildbook} -c 'SELECT 1' || exit 1" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
labels:
- autoheal=true
user: postgres
Expand Down Expand Up @@ -74,10 +77,13 @@ services:
opensearch:
image: opensearchproject/opensearch:2.15.0
healthcheck:
test: [ "CMD-SHELL", "curl --silent --fail 127.0.0.1:9200/_cluster/health || exit 1" ]
interval: 10s
timeout: 5s
retries: 60
# Check cluster health and verify status is not "red"
# Green = all shards allocated, Yellow = primary shards ok, Red = cluster down
test: [ "CMD-SHELL", "curl --silent --fail 127.0.0.1:9200/_cluster/health | grep -qE '\"status\":\"(green|yellow)\"' || exit 1" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
labels:
- autoheal=true
volumes:
Expand Down Expand Up @@ -108,6 +114,15 @@ services:
# TODO dkim and spf needs to be added/supported
smtp:
image: boky/postfix
healthcheck:
# Check if postfix master process is running
test: [ "CMD-SHELL", "pgrep -x master || exit 1" ]
interval: 60s
timeout: 10s
retries: 3
start_period: 30s
labels:
- autoheal=true
networks:
- intranet
ports:
Expand All @@ -125,11 +140,14 @@ services:
image: nginx:1.23.4
depends_on:
- wildbook
#healthcheck:
#test: [ "CMD", "curl", "-f", "http://localhost:84/"]
#interval: 10s
#timeout: 5s
#retries: 60
healthcheck:
# Check if nginx master process is running and can accept connections
# nginx:1.23.4 doesn't include curl, so we check the pid file and use nginx -t
test: [ "CMD-SHELL", "nginx -t 2>/dev/null && kill -0 $(cat /var/run/nginx.pid 2>/dev/null) || exit 1" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
labels:
- autoheal=true
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,7 @@ biologicalMeasurementSamplingProtocols2 = No lipids extracted, uncorrected

#Maximum uploadable media size in megabytes (MB)
#This value is used for encounter images and videos as well as for file associations added to a MarkedIndividual.
# Refer to PhotoUploadDevNotes.md for information/where else to change
maxMediaSize = 3
#Maximum number of media per encounter
maximumMediaCountEncounter = 200
maxMediaSize = 40

#allow video download for not logged in users
videoDLNotLoggedIn = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ describe("BulkImportTask", () => {
expect(
screen.getByText("BULK_IMPORT_TASK_STATUS_in_progress"),
).toBeInTheDocument();
expect(screen.getByText("RESULTS_PER_PAGE")).toBeInTheDocument();
expect(screen.getByTestId("simple-table")).toBeInTheDocument();
expect(screen.getByText("E123")).toBeInTheDocument();
});
Expand Down
23 changes: 12 additions & 11 deletions frontend/src/components/AttributesAndValueComponent.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import React from "react";
import { FormattedMessage } from "react-intl";

export const AttributesAndValueComponent = ({ attributeId, value }) => {
return (
<div className="mb-2 d-flex align-items-baseline gap-1">
<h6 className="mb-0 me-1">
<FormattedMessage id={attributeId} />{":"}
</h6>
<p className="mb-0">{value}</p>
</div>
);
}
return (
<div className="mb-2 d-flex align-items-baseline gap-1">
<h6 className="mb-0 me-1">
<FormattedMessage id={attributeId} />
{":"}
</h6>
<p className="mb-0">{value}</p>
</div>
);
};
24 changes: 13 additions & 11 deletions frontend/src/components/Divider.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React from 'react';
import React from "react";

export const Divider = () => {
return (
<div style={{
width: '100%',
height: "10px",
borderBottom: '1px solid #ccc',
marginTop: '10px',
marginBottom: '20px',
}}></div>
);
}
return (
<div
style={{
width: "100%",
height: "10px",
borderBottom: "1px solid #ccc",
marginTop: "10px",
marginBottom: "20px",
}}
></div>
);
};
33 changes: 6 additions & 27 deletions frontend/src/components/FollowUpSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const FollowUpSection = observer(({ store }) => {
store.setSubmitterName(e.target.value);
}}
value={store.followUpSection?.submitter?.name}
/>
></Form.Control>
</Form.Group>
</Col>
<Col>
Expand All @@ -39,20 +39,13 @@ export const FollowUpSection = observer(({ store }) => {
<FormattedMessage id="CONTACT_EMAIL" />
</Form.Label>
<Form.Control
type="email"
type="text"
placeholder={intl.formatMessage({ id: "TYPE_HERE" })}
onChange={(e) => {
store.setSubmitterEmail(e.target.value);
if (store.followUpSection?.submitter?.emailError) {
store.setSubmitterEmailError(false);
}
}}
value={store.followUpSection?.submitter?.email}
isInvalid={store.followUpSection?.submitter?.emailError}
/>
<Form.Control.Feedback type="invalid">
<FormattedMessage id="INVALID_EMAIL_FORMAT" />
</Form.Control.Feedback>
></Form.Control>
</Form.Group>
</Col>
</Row>
Expand All @@ -73,7 +66,7 @@ export const FollowUpSection = observer(({ store }) => {
store.setPhotographerName(e.target.value);
}}
value={store.followUpSection?.photographer?.name}
/>
></Form.Control>
</Form.Group>
</Col>
<Col>
Expand All @@ -82,20 +75,13 @@ export const FollowUpSection = observer(({ store }) => {
<FormattedMessage id="CONTACT_EMAIL" />
</Form.Label>
<Form.Control
type="email"
type="text"
placeholder={intl.formatMessage({ id: "TYPE_HERE" })}
onChange={(e) => {
store.setPhotographerEmail(e.target.value);
if (store.followUpSection?.photographer?.emailError) {
store.setPhotographerEmailError(false);
}
}}
value={store.followUpSection?.photographer?.email}
isInvalid={store.followUpSection?.photographer?.emailError}
/>
<Form.Control.Feedback type="invalid">
<FormattedMessage id="INVALID_EMAIL_FORMAT" />
</Form.Control.Feedback>
></Form.Control>
</Form.Group>
</Col>
</Row>
Expand All @@ -114,16 +100,9 @@ export const FollowUpSection = observer(({ store }) => {
placeholder={intl.formatMessage({ id: "CSL_EMAILS_EXAMPLE" })}
onChange={(e) => {
store.setAdditionalEmails(e.target.value);
if (store.followUpSection?.additionalEmailsError) {
store.setAdditionalEmailsError(false);
}
}}
value={store.followUpSection?.additionalEmails}
isInvalid={store.followUpSection?.additionalEmailsError}
/>
<Form.Control.Feedback type="invalid">
<FormattedMessage id="INVALID_EMAIL_FORMAT" />
</Form.Control.Feedback>
</Form.Group>
</div>
);
Expand Down
46 changes: 28 additions & 18 deletions frontend/src/components/IdentifyIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,31 @@ import React from "react";
import ThemeColorContext from "../ThemeColorProvider";

export default function IdentifyIcon() {
const theme = React.useContext(ThemeColorContext);
return (
<div
style={{
display: "flex",
width: "36px",
height: " 36px",
justifyContent: "center",
alignItems: "center",
borderRadius: "50%",
backgroundColor: theme.primaryColors.primary50,
}}>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
<path d="M13.9081 11.454V14.7267C13.9081 15.1767 13.5399 15.5449 13.0899 15.5449H3.27175C2.82175 15.5449 2.45356 15.1767 2.45356 14.7267V4.90851C2.45356 4.45851 2.82175 4.09033 3.27175 4.09033H5.74265C6.19265 4.09033 6.56084 3.72214 6.56084 3.27214C6.56084 2.82214 6.19265 2.45396 5.74265 2.45396H2.45356C1.55356 2.45396 0.8172 3.19033 0.8172 4.09033V15.5449C0.8172 16.4449 1.55356 17.1812 2.45356 17.1812H13.9081C14.8081 17.1812 15.5445 16.4449 15.5445 15.5449V11.454C15.5445 11.004 15.1763 10.6358 14.7263 10.6358C14.2763 10.6358 13.9081 11.004 13.9081 11.454ZM11.8627 13.9085H4.51538C4.17175 13.9085 3.98356 13.5158 4.19629 13.2458L5.61993 11.4212C5.78356 11.2167 6.09447 11.2085 6.25811 11.4131L7.53447 12.9512L9.4572 10.4803C9.62084 10.2676 9.94811 10.2676 10.1036 10.4885L12.1899 13.2621C12.3945 13.524 12.1981 13.9085 11.8627 13.9085ZM14.9717 6.45487C15.3645 5.82487 15.5854 5.08851 15.5363 4.27851C15.4299 2.51942 14.0308 1.03033 12.2881 0.842144C10.0627 0.59669 8.18084 2.32305 8.18084 4.49942C8.18084 6.53669 9.82538 8.18124 11.8545 8.18124C12.5745 8.18124 13.2454 7.96851 13.8099 7.60851L15.7817 9.58033C16.1008 9.89942 16.6245 9.89942 16.9436 9.58033C17.2627 9.26124 17.2627 8.7376 16.9436 8.41851L14.9717 6.45487ZM11.8627 6.54487C10.7336 6.54487 9.8172 5.62851 9.8172 4.49942C9.8172 3.37033 10.7336 2.45396 11.8627 2.45396C12.9917 2.45396 13.9081 3.37033 13.9081 4.49942C13.9081 5.62851 12.9917 6.54487 11.8627 6.54487Z" fill="#00ACCE" />
</svg>
</div>
);
}
const theme = React.useContext(ThemeColorContext);
return (
<div
style={{
display: "flex",
width: "36px",
height: " 36px",
justifyContent: "center",
alignItems: "center",
borderRadius: "50%",
backgroundColor: theme.primaryColors.primary50,
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="18"
height="18"
viewBox="0 0 18 18"
fill="none"
>
<path
d="M13.9081 11.454V14.7267C13.9081 15.1767 13.5399 15.5449 13.0899 15.5449H3.27175C2.82175 15.5449 2.45356 15.1767 2.45356 14.7267V4.90851C2.45356 4.45851 2.82175 4.09033 3.27175 4.09033H5.74265C6.19265 4.09033 6.56084 3.72214 6.56084 3.27214C6.56084 2.82214 6.19265 2.45396 5.74265 2.45396H2.45356C1.55356 2.45396 0.8172 3.19033 0.8172 4.09033V15.5449C0.8172 16.4449 1.55356 17.1812 2.45356 17.1812H13.9081C14.8081 17.1812 15.5445 16.4449 15.5445 15.5449V11.454C15.5445 11.004 15.1763 10.6358 14.7263 10.6358C14.2763 10.6358 13.9081 11.004 13.9081 11.454ZM11.8627 13.9085H4.51538C4.17175 13.9085 3.98356 13.5158 4.19629 13.2458L5.61993 11.4212C5.78356 11.2167 6.09447 11.2085 6.25811 11.4131L7.53447 12.9512L9.4572 10.4803C9.62084 10.2676 9.94811 10.2676 10.1036 10.4885L12.1899 13.2621C12.3945 13.524 12.1981 13.9085 11.8627 13.9085ZM14.9717 6.45487C15.3645 5.82487 15.5854 5.08851 15.5363 4.27851C15.4299 2.51942 14.0308 1.03033 12.2881 0.842144C10.0627 0.59669 8.18084 2.32305 8.18084 4.49942C8.18084 6.53669 9.82538 8.18124 11.8545 8.18124C12.5745 8.18124 13.2454 7.96851 13.8099 7.60851L15.7817 9.58033C16.1008 9.89942 16.6245 9.89942 16.9436 9.58033C17.2627 9.26124 17.2627 8.7376 16.9436 8.41851L14.9717 6.45487ZM11.8627 6.54487C10.7336 6.54487 9.8172 5.62851 9.8172 4.49942C9.8172 3.37033 10.7336 2.45396 11.8627 2.45396C12.9917 2.45396 13.9081 3.37033 13.9081 4.49942C13.9081 5.62851 12.9917 6.54487 11.8627 6.54487Z"
fill="#00ACCE"
/>
</svg>
</div>
);
}
6 changes: 2 additions & 4 deletions frontend/src/components/InactivePill.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import React from "react";
import PropTypes from "prop-types";
import ThemeColorContext from "../ThemeColorProvider";
Expand All @@ -16,7 +14,7 @@ export default function InactivePill({ text, onClick, style }) {
color: "#000",
borderRadius: "20px",
cursor: "pointer",
...style,
...style,
}}
>
{text}
Expand All @@ -26,4 +24,4 @@ export default function InactivePill({ text, onClick, style }) {
InactivePill.propTypes = {
text: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
};
};
5 changes: 3 additions & 2 deletions frontend/src/components/MainButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default function MainButton({
className = "",
children,
style,
noArrow,
target = false, // If true, opens link in a new tab
noArrow,
target = false, // If true, opens link in a new tab
...rest
}) {
const [isHovered, setIsHovered] = useState(false);
Expand Down Expand Up @@ -56,6 +56,7 @@ export default function MainButton({
target={target ? "_blank" : "_self"}
className="d-flex align-items-center justify-content-center text-decoration-none w-100 h-100"
style={{ color: "inherit" }}
rel="noreferrer"
>
{children}
<span className="ms-2"></span>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Pill.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function Pill({ text, onClick, style, active }) {
...style,
}}
>
{<FormattedMessage id={text}/>}
{<FormattedMessage id={text} />}
</div>
);
}
14 changes: 5 additions & 9 deletions frontend/src/components/PillWithButton.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@

// PillWithButton.jsx
import React from "react";
import ThemeColorContext from "../ThemeColorProvider";

export default function PillWithButton({
text,
onClick,
onClose,
}) {
export default function PillWithButton({ text, onClick, onClose }) {
const theme = React.useContext(ThemeColorContext);

return (
<div className="d-flex align-items-center me-3 mb-2"
<div
className="d-flex align-items-center me-3 mb-2"
style={{
display: "inline-flex",
alignItems: "center",
Expand All @@ -20,7 +16,8 @@ export default function PillWithButton({
color: "#000",
borderRadius: "20px",
cursor: onClick ? "pointer" : "default",
boxShadow: "inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px rgba(0,0,0,.08)",
boxShadow:
"inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px rgba(0,0,0,.08)",
}}
>
<span>{text}</span>
Expand All @@ -41,4 +38,3 @@ export default function PillWithButton({
</div>
);
}

Loading
Loading