Skip to content

Commit

Permalink
Merge pull request #1488 from CalebSLane/componentUpgrade
Browse files Browse the repository at this point in the history
Upgrade tomcat, Java, and other components to supported versions
  • Loading branch information
CalebSLane authored Feb 3, 2025
2 parents 7e528c4 + b466ad1 commit 73cd5c5
Show file tree
Hide file tree
Showing 806 changed files with 2,514 additions and 2,634 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
# Build Stage
#
FROM maven:3-jdk-11 AS build
FROM maven:3-eclipse-temurin-21 AS build

RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
Expand Down Expand Up @@ -49,7 +49,7 @@ RUN --mount=type=cache,target=/root/.m2,sharing=locked \
##
# Run Stage
#
FROM tomcat:8.5-jdk11
FROM tomcat:10-jre21

COPY install/createDefaultPassword.sh ./

Expand Down
37 changes: 20 additions & 17 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
##
# Build Stage
#
FROM maven:3-jdk-11 as build
FROM maven:3-eclipse-temurin-21 AS build
ADD ./dataexport /build/dataexport
##
# Build DataExport

WORKDIR /build/dataexport/dataexport-core
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn dependency:go-offline
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn clean install -DskipTests
WORKDIR /build/dataexport/
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn dependency:go-offline
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn clean install -DskipTests



RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
Expand All @@ -10,6 +26,7 @@ RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
&& apt-get -y --no-install-recommends install \
git apache2-utils


##
# Copy Source Code
#
Expand All @@ -25,21 +42,7 @@ ARG DEFAULT_PW="adminADMIN!"
ADD ./install/createDefaultPassword.sh /build/install/createDefaultPassword.sh
RUN ./install/createDefaultPassword.sh -c -p ${DEFAULT_PW}

##
# Build DataExport
#
WORKDIR /build/dataexport/dataexport-core
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn dependency:go-offline
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn clean install -DskipTests
WORKDIR /build/dataexport/
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn dependency:go-offline
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn clean install -DskipTests

##
##a53414f9f76aaeba34b61c9b551f9aa13ee18
# Build the Project
#
WORKDIR /build
Expand All @@ -53,7 +56,7 @@ RUN --mount=type=cache,target=/root/.m2,sharing=locked \
##
# Run Stage
#
FROM tomcat:8.5-jdk11
FROM tomcat:10-jre21

ADD install/createDefaultPassword.sh ./

Expand Down
6 changes: 4 additions & 2 deletions dev.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ services:

oe.openelis.org:
container_name: openelisglobal-webapp
build:
context: .
dockerfile: Dockerfile.dev
image: itechuw/openelis-global-2-dev:develop
# platform: linux/amd64
depends_on:
Expand All @@ -50,7 +53,6 @@ services:
networks:
default:
ipv4_address: 172.20.1.121

environment:
- DEFAULT_PW=adminADMIN!
- TZ=Africa/Nairobi
Expand All @@ -60,7 +62,7 @@ services:
- key_trust-store-volume:/etc/openelis-global
- ./volume/plugins/:/var/lib/openelis-global/plugins
- ./volume/tomcat/oe_server.xml:/usr/local/tomcat/conf/server.xml
- ./target/OpenELIS-Global.war:/usr/local/tomcat/webapps/OpenELIS-Global.war
# - ./target/OpenELIS-Global.war:/usr/local/tomcat/webapps/OpenELIS-Global.war
- ./volume/properties/SystemConfiguration.properties:/var/lib/openelis-global/properties/SystemConfiguration.properties
- lucene_index-vol:/var/lib/lucene_index
secrets:
Expand Down
1 change: 1 addition & 0 deletions frontend/public/images/patient-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 46 additions & 15 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,53 @@ export default function App() {
}

const logout = () => {
fetch(config.serverBaseUrl + "/Logout", {
//includes the browser sessionId in the Header for Authentication on the backend server
method: "POST",
headers: {
"Content-Type": "application/json",
"X-CSRF-Token": localStorage.getItem("CSRF"),
},
})
.then((response) => response.status)
.then(() => {
getUserSessionDetails();
window.location.href = config.loginRedirect;
if (userSessionDetails.loginMethod === "SAML") {
fetch(config.serverBaseUrl + "/Logout?useSAML=true", {
//includes the browser sessionId in the Header for Authentication on the backend server
method: "POST",
headers: {
"Content-Type": "application/json",
"X-CSRF-Token": localStorage.getItem("CSRF"),
},
})
.catch((error) => {
console.error(error);
});
.then((response) => response.text())
.then((html) => {
const POPUP_HEIGHT = 700;
const POPUP_WIDTH = 600;
const top =
window.outerHeight / 2 + window.screenY - POPUP_HEIGHT / 2;
const left = window.outerWidth / 2 + window.screenX - POPUP_WIDTH / 2;
const newWindow = window.open(
"",
"SAML Popup",
`height=${POPUP_HEIGHT},width=${POPUP_WIDTH},top=${top},left=${left}`,
);
newWindow.document.write(html);
newWindow.document.close();
getUserSessionDetails();
window.location.href = config.loginRedirect;
})
.catch((error) => {
console.error(error);
});
} else {
fetch(config.serverBaseUrl + "/Logout", {
//includes the browser sessionId in the Header for Authentication on the backend server
method: "POST",
headers: {
"Content-Type": "application/json",
"X-CSRF-Token": localStorage.getItem("CSRF"),
},
})
.then((response) => response.status)
.then(() => {
getUserSessionDetails();
window.location.href = config.loginRedirect;
})
.catch((error) => {
console.error(error);
});
}
};

const changeLanguageReact = (lang) => {
Expand Down
25 changes: 13 additions & 12 deletions frontend/src/components/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,19 @@ function Login(props) {
password: "",
}}
onSubmit={(values) => {
fetch(config.serverBaseUrl + "/LoginPage", {
//includes the browser sessionId in the Header for Authentication on the backend server
credentials: "include",
method: "GET",
})
.then((response) => response.status)
.then(() => {
doLogin(values);
})
.catch((error) => {
console.error(error);
});
doLogin(values);
// fetch(config.serverBaseUrl + "/LoginPage", {
// //includes the browser sessionId in the Header for Authentication on the backend server
// credentials: "include",
// method: "GET",
// })
// .then((response) => response.status)
// .then(() => {
// doLogin(values);
// })
// .catch((error) => {
// console.error(error);
// });
}}
>
{({ isValid, handleChange, handleSubmit }) => (
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/components/common/PatientHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react";
import { Grid, Column, Section, Tag } from "@carbon/react";
import { FormattedMessage } from "react-intl";
import Avatar from "react-avatar";
import GeoPattern from "geopattern";

const PatientHeader = (props) => {
const {
Expand All @@ -23,7 +22,6 @@ const PatientHeader = (props) => {
isOrderPage = false,
className = "patient-header",
} = props;
const patternUrl = GeoPattern.generate(id).toDataUri();
return (
<Grid fullWidth={true}>
<Column lg={16} md={8} sm={4}>
Expand All @@ -49,7 +47,7 @@ const PatientHeader = (props) => {
size={referringFacility ? "150" : "120"}
textSizeRatio={2}
style={{
backgroundImage: `url(${patternUrl})`,
backgroundImage: `url('/images/patient-background.svg')`,
backgroundRepeat: "round",
}}
/>
Expand Down Expand Up @@ -146,7 +144,7 @@ const PatientHeader = (props) => {
size={referringFacility ? "150" : "120"}
textSizeRatio={2}
style={{
backgroundImage: `url(${patternUrl})`,
backgroundImage: `url('/images/patient-background.svg')`,
backgroundRepeat: "round",
}}
/>
Expand Down
Loading

0 comments on commit 73cd5c5

Please sign in to comment.