Commit e9cae864 authored by Theis's avatar Theis
Browse files

Auto stash before merge of "master" and "origin/master"

parent 06de8271
Pipeline #95672 passed with stage
in 5 minutes and 2 seconds
......@@ -5,6 +5,7 @@
"requires": true,
"packages": {
"": {
"name": "api",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
......@@ -16,10 +17,10 @@
"express": "^4.17.1",
"path": "^0.12.7",
"postinstall": "^0.7.4",
"prisma": "^3.3.0",
"prisma-client-lib": "^1.34.12"
},
"devDependencies": {
"prisma": "^3.2.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.3.1"
}
......@@ -100,9 +101,10 @@
}
},
"node_modules/@prisma/engines": {
"version": "3.3.0-30.33838b0f78f1fe9052cf9a00e9761c9dc097a63c",
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.3.0-30.33838b0f78f1fe9052cf9a00e9761c9dc097a63c.tgz",
"integrity": "sha512-T3nEnRWmoneNZJPd9IBR29G8ZDUjNelA8+cG5y8/lh6vySm6ryWSNxj1s377U9YzFYyZmXiA9vK1iyxMoRff/g==",
"version": "3.2.0-34.afdab2f10860244038c4e32458134112852d4dad",
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.2.0-34.afdab2f10860244038c4e32458134112852d4dad.tgz",
"integrity": "sha512-MiZORXXsGORXTF9RqqKIlN/2ohkaxAWTsS7qxDJTy5ThTYLrXSmzxTSohM4qN/AI616B+o5WV7XTBhjlPKSufg==",
"devOptional": true,
"hasInstallScript": true
},
"node_modules/@prisma/engines-version": {
......@@ -3479,12 +3481,13 @@
}
},
"node_modules/prisma": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-3.3.0.tgz",
"integrity": "sha512-E7C9mXRwZVpcnSeJT533qGHUVrYULsE9ihFvAtQMuxhTXkxoRlMLyo/1ZOyeu9GdXP8DJ7ruLOw06kEs/N3dVg==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-3.2.0.tgz",
"integrity": "sha512-o8+DH0RD5DbP8QTZej2dsY64yvjOwOG3TWOlJyoCHQ+8DH9m4tzxo38j6IF/PqpN4PmAGPpHuNi/nssG1cvYlQ==",
"devOptional": true,
"hasInstallScript": true,
"dependencies": {
"@prisma/engines": "3.3.0-30.33838b0f78f1fe9052cf9a00e9761c9dc097a63c"
"@prisma/engines": "3.2.0-34.afdab2f10860244038c4e32458134112852d4dad"
},
"bin": {
"prisma": "build/index.js",
......@@ -5100,9 +5103,10 @@
}
},
"@prisma/engines": {
"version": "3.3.0-30.33838b0f78f1fe9052cf9a00e9761c9dc097a63c",
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.3.0-30.33838b0f78f1fe9052cf9a00e9761c9dc097a63c.tgz",
"integrity": "sha512-T3nEnRWmoneNZJPd9IBR29G8ZDUjNelA8+cG5y8/lh6vySm6ryWSNxj1s377U9YzFYyZmXiA9vK1iyxMoRff/g=="
"version": "3.2.0-34.afdab2f10860244038c4e32458134112852d4dad",
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.2.0-34.afdab2f10860244038c4e32458134112852d4dad.tgz",
"integrity": "sha512-MiZORXXsGORXTF9RqqKIlN/2ohkaxAWTsS7qxDJTy5ThTYLrXSmzxTSohM4qN/AI616B+o5WV7XTBhjlPKSufg==",
"devOptional": true
},
"@prisma/engines-version": {
"version": "3.2.0-34.afdab2f10860244038c4e32458134112852d4dad",
......@@ -7789,11 +7793,12 @@
"integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g=="
},
"prisma": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-3.3.0.tgz",
"integrity": "sha512-E7C9mXRwZVpcnSeJT533qGHUVrYULsE9ihFvAtQMuxhTXkxoRlMLyo/1ZOyeu9GdXP8DJ7ruLOw06kEs/N3dVg==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-3.2.0.tgz",
"integrity": "sha512-o8+DH0RD5DbP8QTZej2dsY64yvjOwOG3TWOlJyoCHQ+8DH9m4tzxo38j6IF/PqpN4PmAGPpHuNi/nssG1cvYlQ==",
"devOptional": true,
"requires": {
"@prisma/engines": "3.3.0-30.33838b0f78f1fe9052cf9a00e9761c9dc097a63c"
"@prisma/engines": "3.2.0-34.afdab2f10860244038c4e32458134112852d4dad"
}
},
"prisma-client-lib": {
......
......@@ -17,10 +17,10 @@
"express": "^4.17.1",
"path": "^0.12.7",
"postinstall": "^0.7.4",
"prisma": "^3.3.0",
"prisma-client-lib": "^1.34.12"
},
"devDependencies": {
"prisma": "^3.2.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.3.1"
}
......
const { PrismaClient } = require('@prisma/client')
const express = require("express");
const bunyan = require('bunyan');
//const cors = require("cors");
const cors = require("cors");
const axios = require('axios');
var https = require('https');
var http = require('http');
......@@ -12,25 +12,25 @@ app.use(express.static(path));
const prisma = new PrismaClient()
//app.use(cors(corsOptions));
app.use(cors(corsOptions));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
// var corsOptions = {
// origin: "http://localhost:8081"
// };
var corsOptions = {
origin: "http://localhost:8081"
};
/*var corsOptions = {
origin: "https://air-app.azurewebsites.net"
};*/
const log = bunyan.createLogger({ name: "AIR_UI_Backend: " });
const predictionURL = 'https://air-fastapi.azurewebsites.net/predict'
const log = bunyan.createLogger({ name: "AIR_UI_Backend: " });
const predictionURL_training_fall = 'https://air-fastapi.azurewebsites.net/predict_training'
function deleteVariable(variableToDelete) {
variableToDelete.forEach(element => {
function deleteVariable(variablesMarkedForDeletion) {
variablesMarkedForDeletion.forEach(element => {
element = undefined;
delete (element);
delete(element);
});
}
......@@ -55,7 +55,7 @@ function dataPreparationForML(age, gender /*, assistiveAids*/) {
}
function getPrediction(inputForMLPrediction) {
predictionResult = axios.post(predictionURL, inputForMLPrediction).then(result => {
predictionResult = axios.post(predictionURL_training_fall, inputForMLPrediction).then(result => {
return result.data;
}).catch(error => {
log.error("getPrediction() threw an exception: ", error)
......@@ -115,20 +115,20 @@ app.post("/home/:ssn", async (req, res) => {
deleteVariable([citizenData])
res.send(false)
} else {
const inputDataForMLPrediction = dataPreparationForML(citizenData.age, citizenData.gender);
const inputDataForMLPrediction = dataPreparationForML(citizenData.age, citizenData.gender /*, */);
var citizenPrediction = await getPrediction(inputDataForMLPrediction);
//console.log(citizenData)
//Send HMI to ATS Endpoint
convertDataSizeToKb("Combined datasize from both the ML Model and Database in Kb: ", { citizenData, citizenPrediction })
res.json({ citizenData, citizenPrediction })
deleteVariable([citizenData, citizenPrediction])
}
});
http.createServer(app).listen(80);
https.createServer(app).listen(443);
log.info(`Server is listening on port ${80} and ${443}.`);
//http.createServer(app).listen(80);
//https.createServer(app).listen(443);
//log.info(`Server is listening on port ${80} and ${443}.`);
/*const PORT = process.env.PORT || 8080;
const PORT = process.env.PORT || 8080;
app.listen(PORT, () => {
log.info(`Server is listening on port ${PORT}.`);
});*/
\ No newline at end of file
});
\ No newline at end of file
<template>
<div>
<v-card>
<div class="explanationTitle">Sandsynlighedsforklaring</div>
<v-divider horizontal />
<v-card-text>
......@@ -14,7 +13,6 @@
{{ getExplanation[13] }} {{ getExplanation[14] }} {{ getExplanation[15] }}.
</div>
</v-card-text>
</v-card>
</div>
</template>
......@@ -44,9 +42,9 @@ export default Vue.extend({
<style scoped>
.explanationTitle {
padding-top: 0.5rem;
padding-top: 0.25rem;
padding-left: 1rem;
padding-bottom: 0.5rem;
padding-bottom: 0.25rem;
font-size: 26px;
color: #35414f;
background-color: #e3e3e3;
......
import axios from "axios";
export default axios.create({
//baseURL: "http://localhost:8080/",
baseURL: "https://air-app.azurewebsites.net/",
baseURL: "http://localhost:8080/",
//baseURL: "https://air-app.azurewebsites.net/",
headers: {
"Content-type": "application/json"
}
......
......@@ -7,7 +7,7 @@ class DataService {
return !citizenData.data ? false : this.setCitizenInformation(citizenData)
}
//All data has to be stored from here (Exception Handling)
//All data has to be stored from this location
setCitizenInformation(citizenInformation: any) : boolean {
store.dispatch("citizenProfile", [
citizenInformation.data.citizenData.first_name,
......@@ -15,7 +15,7 @@ class DataService {
citizenInformation.data.citizenData.age,
citizenInformation.data.citizenData.ssn
]);
//store.dispatch("assistiveAids", citizenInformation.data.citizenData.Assistive_Aids);
//store.dispatch("assistiveAids", citizenInformation.data.citizenData.Assistive_Aids); (Whenever we get assistive aid data from KMD)
store.dispatch("trainingPlans", citizenInformation.data.citizenData.Training_Plans);
store.dispatch("homeCare", citizenInformation.data.citizenData.Home_Care);
store.dispatch("registeredFalls", citizenInformation.data.citizenData.Registered_Falls);
......
......@@ -24,7 +24,6 @@
<script lang="ts">
import Vue from "vue";
import Probability from "@/components/Probability.vue";
import AidTabs from "@/components/AidTabs.vue";
import Explainer from "@/components/Explainer.vue"
......
......@@ -9,7 +9,7 @@
<v-main>
<v-container fill-height>
<v-row justify="center" align="center">
<v-col cols="12" sm="5">
<v-col cols="12" sm="7">
<div v-if="errorMessage">
<v-alert
v-model="errorMessage"
......@@ -86,6 +86,11 @@ export default Vue.extend({
padding-left: 1rem;
}
.v-btn__content {
color: inherit;
text-decoration: none !important;
}
.search input {
color: rgb(46, 46, 46) !important;
font-size: 28px;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment