diff --git a/PhotoUploadDevNotes.md b/PhotoUploadDevNotes.md deleted file mode 100644 index ff99393928..0000000000 --- a/PhotoUploadDevNotes.md +++ /dev/null @@ -1,13 +0,0 @@ -# Photo Upload - -There are currently three places to change the default photo upload size and default max count amount. These three places affect these pages or modals: `Submit -> Report an Encounter`, `Submit -> Report an Encounter (classic)`, `Submit -> Bulk Import`, `Submit -> Bulk Import -> See Instructions`. - -This is linked from comments in the relevant files which say: `Refer to PhotoUploadDevNotes.md for information/where else to change`. Non-development properties files are not annotated with this comment since those files will be changed by users. - -Order of using: -1. `commonConfiguration.properties`, which each production Wildbook can change if needed - - ./devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties - - ./devops/development/.dockerfiles/tomcat/commonConfiguration.properties - - ./src/main/resources/bundles/commonConfiguration.properties -2. `org/ecocean/CommonConfiguration.java`, first fallback if properties are not initialized -3. `frontend/src/constants/photoUpload.js`, second fallback if SiteSettings is not accessible \ No newline at end of file diff --git a/devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties b/devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties index d44f8b4888..b11359fe7a 100644 --- a/devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties +++ b/devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties @@ -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 diff --git a/devops/deploy/docker-compose.yml b/devops/deploy/docker-compose.yml index fce80da16c..573ea4c22e 100644 --- a/devops/deploy/docker-compose.yml +++ b/devops/deploy/docker-compose.yml @@ -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 @@ -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: @@ -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: @@ -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: diff --git a/devops/development/.dockerfiles/tomcat/commonConfiguration.properties b/devops/development/.dockerfiles/tomcat/commonConfiguration.properties index a38250d6c9..6e6e1a13f8 100644 --- a/devops/development/.dockerfiles/tomcat/commonConfiguration.properties +++ b/devops/development/.dockerfiles/tomcat/commonConfiguration.properties @@ -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 diff --git a/frontend/src/__tests__/pages/BulkImport/BulkImportTask.test.js b/frontend/src/__tests__/pages/BulkImport/BulkImportTask.test.js index 89f88cff3e..01117cbe40 100644 --- a/frontend/src/__tests__/pages/BulkImport/BulkImportTask.test.js +++ b/frontend/src/__tests__/pages/BulkImport/BulkImportTask.test.js @@ -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(); }); diff --git a/frontend/src/components/AttributesAndValueComponent.jsx b/frontend/src/components/AttributesAndValueComponent.jsx index 0c46dc45ee..ef83949102 100644 --- a/frontend/src/components/AttributesAndValueComponent.jsx +++ b/frontend/src/components/AttributesAndValueComponent.jsx @@ -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 ( -
{value}
-{value}
+
+
{`${" "}`}
-{`${measurement.value}${" "}${measurement.units}(${measurement.samplingProtocol})`}
-{`${" "}`}
+{`${measurement.value}${" "}${measurement.units}(${measurement.samplingProtocol})`}
+" + request.getRemoteUser() + " on " + diff --git a/src/main/resources/bundles/commonConfiguration.properties b/src/main/resources/bundles/commonConfiguration.properties index dcdc6a69d2..df23b2de97 100755 --- a/src/main/resources/bundles/commonConfiguration.properties +++ b/src/main/resources/bundles/commonConfiguration.properties @@ -305,7 +305,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 +maxMediaSize = 40 #Maximum number of media per encounter maximumMediaCountEncounter = 200