Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #98 from StudentsAgainstCovid19/develop
Browse files Browse the repository at this point in the history
Release to v1.0.0
  • Loading branch information
marcauberer authored Jul 23, 2020
2 parents c0aa4d1 + d34ab1e commit 1da5e98
Show file tree
Hide file tree
Showing 23 changed files with 15,165 additions and 78,457 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

This is the frontend of the Corona Aid application, developed by students of the DHBW Karlsruhe as part of a student project.

> Corona Aid ist der Name unseres Projekts. Wir haben einen Prototypen entwickelt, der ausgelasteten Gesundheitsämtern in Zeiten von Covid-19 helfen kann. Die Ämter müssen täglich mit den Patienten in Kontakt treten und z. B. deren Gesundheitszustand erfragen. Diesen Prozess haben wir mithilfe einer interaktiven Kartenanwendung vereinfacht. So wird die Verwaltung von Patientendaten zum Kinderspiel.
What is this project about? Discover more in our [documentary repo](https://github.com/StudentsAgainstCovid19/corona-aid-docs/wiki) (only available in German).

## Production website
The website is live here: [www.corona-aid-ka.de](https://www.corona-aid-ka.de)!

Expand Down
2 changes: 1 addition & 1 deletion src/css/popup_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
overflow: auto;
height: auto;
max-height: 70%;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
}

Expand Down
2 changes: 1 addition & 1 deletion src/dtd/district.dtd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml encoding="UTF-8"?>

<!ELEMENT List (item)*>
<!ELEMENT Set (item)*>

<!ELEMENT item (id,name,city,postalCode,geometry)>
<!ELEMENT id (#PCDATA)>
Expand Down
9 changes: 0 additions & 9 deletions src/dtd/realtime_sse.dtd

This file was deleted.

31 changes: 0 additions & 31 deletions src/dtd/realtime_update_merged.dtd

This file was deleted.

2 changes: 0 additions & 2 deletions src/js/call_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ async function calculatePriorities() {
let prioCalcXSL = getXSLT("./xslt_scripts/xslt_calculate_prio.xsl");

prioList = runXSLT(prioCalcXSL, callListsXML);
// console.log('=== PrioList XML:');
// console.log(new XMLSerializer().serializeToString(prioList));
initCallList();
}

Expand Down
3 changes: 2 additions & 1 deletion src/js/clustered_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ async function displayClusteredMap(idArray) {
}

infectedIdList.sort((a, b) => a[0] - b[0]);
let xmlString = "<infected>";
let xmlString = '<?xml version="1.0"?><!DOCTYPE infected SYSTEM "' + apiBaseUrl + 'dtd/calculate_prio_result.dtd">';
xmlString += "<infected>";
let xmlSerializer = new XMLSerializer();
for (let i = 0; i<infectedPeople.length && idArray.length > 0; i++) {
if (idArray[0] === infectedIdList[i][0]) {
Expand Down
10 changes: 8 additions & 2 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function loadConfig() {
// init configs
let configXML = loadXMLDoc(apiUrl+"config", "application/xml", configLoadErrorFn);


if (!configXML) return;
let items = configXML.getElementsByTagName("item");
for (let i=0; i<items.length; i++) {
Expand All @@ -64,8 +65,13 @@ function configLoadErrorFn(statusCode) {
"Es werden Standardkonfigurationen ausgewählt.\n" +
"Die Website wird vermutlich nicht funktionieren.",
null, null, true, true, true, false,"Schließen");
configHashTable = {"standardLat":"49.013868","standardLon":"8.404346", "clusteredDistance": "200",
"pieChartScale":"0.6","markerScale":"0.3","standardZoom":"13","zoomChange":"0.5", "animationDuration" : 200};

configHashTable = {"autoResetOffset":"900", "standardLat":"49.013868", "standardLon":"8.404346",
"clusteredDistance":"100", "pieChartScaleConstant":"0.38", "markerScale":"0.25", "standardZoom":"13",
"zoomChange":"0.5", "animationDuration":"200", "closeContinueSearchTime":"20000",
"realtimeRefreshInterval":"15", "frontendRefreshIntervall":"10000", "pieChartScaleLinear":"0.0018",
"projectionType":"EPSG:3857", "pieChartsDisableCachingMinRemainingPatients":"5000"
};
break;
case 502:
case 503:
Expand Down
2 changes: 1 addition & 1 deletion src/js/piecharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function createPieChart(size, amountDone, amountCalled, resolution) {
}
let colors = ["green", "purple"];
let angles = [0, amountDone / parseFloat(size) * 360, (amountDone + amountCalled) / parseFloat(size) * 360];
let xmlString = '<?xml version="1.0"?><!DOCTYPE chart SYSTEM "' + apiUrl + 'dtd/create_pie_chart_result.dtd">';
let xmlString = '<?xml version="1.0"?><!DOCTYPE chart SYSTEM "' + apiBaseUrl + 'dtd/create_pie_chart_result.dtd">';
xmlString += "<chart><amountRemaining>" + (size - amountDone) + "</amountRemaining><arcs>";

for (let i = 0; i < colors.length; i++) {
Expand Down
4 changes: 2 additions & 2 deletions src/js/popups.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function submitSymptoms() {

function constructSymptomPopupXML() {
let parser = new DOMParser();
let xmlHeaderString = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE symptomPopupXML SYSTEM "' + apiUrl
let xmlHeaderString = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE symptomPopupXML SYSTEM "' + apiBaseUrl
+ 'dtd/construct_symptom_popup_xml_result.dtd">';
let xmlDoc = parser.parseFromString(xmlHeaderString + "<symptomPopupXML></symptomPopupXML>", "application/xml");
xmlDoc.children[0].appendChild(deepCopyXML(initialSymptoms).children[0]);
Expand All @@ -118,7 +118,7 @@ function prescribeTest(id) {
document.getElementById("prescribeTest").setAttribute("disabled", "disabled");
document.getElementById("prescribeTest").classList.remove("grayButton");
document.getElementById("prescribeTest").classList.add("disabledButton");
console.log(xmlString);
// console.log(xmlString);
}, function (id) { }, id );
}

Expand Down
4 changes: 2 additions & 2 deletions src/js/prepare_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ function addHistoryItem(successProbability, infectedId, symptomList) {
"</symptoms>" + "<timestamp>" + Date.now() + "</timestamp>" +
"</History>";
}
let xmlHeaderString = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE History SYSTEM "' + apiUrl
let xmlHeaderString = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE History SYSTEM "' + apiBaseUrl
+ 'dtd/push_history_item.dtd">';
postRequest("history", xmlHeaderString+xmlString);
}

function prescribeTestSimulation(infectedId) {
let xmlString = "<TestInsertDto><infectedId>"+infectedId+"</infectedId><result>0</result><timestamp>"+Date.now()+"</timestamp></TestInsertDto>";
let xmlHeaderString = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE TestInsertDto SYSTEM "' + apiUrl
let xmlHeaderString = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE TestInsertDto SYSTEM "' + apiBaseUrl
+ 'dtd/push_prescribe_test.dtd">';
postRequest("test/", xmlHeaderString+xmlString);
}
Expand Down
3 changes: 2 additions & 1 deletion src/js/shared_variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ var confirmConfig = [null, null, null]; // list for generic confirm popup.
// onCancelCallback and third value are parameters for
// those callbacks

const apiUrl = "https://dev.api.corona-aid-ka.de/";
const apiUrl = "https://api.corona-aid-ka.de/";
const apiBaseUrl = "https://corona-aid-ka.de/";

var updateXMLStr = "";
var suppressUpdates = false;
Expand Down
Loading

0 comments on commit 1da5e98

Please sign in to comment.