Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade tomcat, Java, and other components to supported versions #1488

Merged
merged 19 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
be1b0e5
replace geopattern with static image due for security
CalebSLane Nov 26, 2024
ab04928
Merge branch 'develop' of github.com:I-TECH-UW/OpenELIS-Global-2 into…
CalebSLane Jan 15, 2025
3cc2560
remove jars in lib directory
CalebSLane Jan 21, 2025
a610193
upgrade to java 21 and tomcat 9
CalebSLane Jan 22, 2025
6c4daaf
migrate tomcat9 to 10, spring 5 to 6, javax to jakarta
CalebSLane Jan 24, 2025
0411441
migrate spring 6.0 -> 6.2
CalebSLane Jan 24, 2025
c5792dc
Merge branch 'develop' of github.com:I-TECH-UW/OpenELIS-Global-2 into…
CalebSLane Jan 28, 2025
110f96f
updating and cleaning dependencies
CalebSLane Jan 28, 2025
6478153
Merge branch 'develop' of github.com:I-TECH-UW/OpenELIS-Global-2 into…
CalebSLane Jan 29, 2025
d305169
add SSO logout by default to react app
CalebSLane Jan 30, 2025
489c088
Merge branch 'develop' of github.com:I-TECH-UW/OpenELIS-Global-2 into…
CalebSLane Jan 30, 2025
0aedcc8
apply spotless formatting:
CalebSLane Jan 30, 2025
8a750ea
Merge branch 'develop' into componentUpgrade
CalebSLane Jan 31, 2025
358b820
make develop changes compatible with tomcat
CalebSLane Jan 31, 2025
233a534
Merge branch 'Tomcat10' into componentUpgrade
CalebSLane Jan 31, 2025
46bb38d
use updated versions in non-dev environment too
CalebSLane Jan 31, 2025
8d3a390
Merge branch 'Tomcat10' of github.com:I-TECH-UW/OpenELIS-Global-2 int…
CalebSLane Jan 31, 2025
74c31ba
Merge branch 'componentUpgrade' of github.com:CalebSLane/OpenELIS-Glo…
CalebSLane Jan 31, 2025
b466ad1
fix security issues preventing jsps to not load
CalebSLane Feb 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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