diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..00b52fa --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +start +stop +start_debug +start_p +yottadb/* +package-lock.json +.idea +node_modules +configuration diff --git a/start b/start deleted file mode 100755 index 763c3fd..0000000 --- a/start +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# This script will correctly start the QEWD Container -# -# -# Run this startup script from the '~/qewd-baseline' folder -# (or whatever you've renamed it) using: -# -# - with persistence: ./start_p -# - without persistence: ./start -# -echo 'Starting qewd container' -docker run -d --name qewd --rm --network qewd-net -p 8080:8080 -v /home/pi/qewd-baseline:/opt/qewd/mapped rtweed/qewd-server-rpi -echo 'qewd Container has been started' \ No newline at end of file diff --git a/start_debug b/start_debug deleted file mode 100755 index bd71e04..0000000 --- a/start_debug +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# This script will correctly start the QEWD Container in debug/shell mode -# -# -# Run this startup script from the '~/qewd-baseline' folder -# (or whatever you've renamed it) using: -# -# ./start_debug -# -echo 'Starting qewd container in debug/shell mode' -echo ' ' -echo 'From the QEWD Container shell, start QEWD using:' -echo ' ' -echo ' node qewd' -docker run -it --name qewd --rm --network qewd-net -p 8080:8080 -p 9229:9229 -v /home/pi/qewd-baseline:/opt/qewd/mapped --entrypoint=/bin/bash rtweed/qewd-server-rpi \ No newline at end of file diff --git a/start_p b/start_p deleted file mode 100755 index 7ce2053..0000000 --- a/start_p +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# This script will correctly start the QEWD Container -# -# -# Run this startup script from the '~/qewd-baseline' folder -# (or whatever you've renamed it) using: -# -# - with persistence: ./start_p -# - without persistence: ./start -# -echo 'Starting qewd container' -docker run -d --name qewd --rm --network qewd-net -p 8080:8080 -v /home/pi/qewd-baseline:/opt/qewd/mapped -v /home/pi/qewd-baseline/yottadb:/root/.yottadb/r1.28_armv7l/g rtweed/qewd-server-rpi -echo 'qewd Container has been started' \ No newline at end of file diff --git a/stop b/stop deleted file mode 100755 index 0dce392..0000000 --- a/stop +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# This script will cleanly stop the qewd Container by issuing a command to QEWD to stop -# -# -# Run this shutdown script from the '~/qewd-baseline' folder -# (or whatever you've renamed it) using: -# -# ./stop -# -echo 'Stopping qewd Container' -# -# Send authenticated requests to cleanly shut down QEWD Containers -# -docker run -it --name qewd_shutdown --rm --network qewd-net -v $PWD:/node -e "node_script=shutdown" rtweed/node-runner-rpi \ No newline at end of file diff --git a/www/pt-wc-q/js/extended/vitals.js b/www/pt-wc-q/js/extended/vitals.js index 0bdf73a..9b7dc92 100644 --- a/www/pt-wc-q/js/extended/vitals.js +++ b/www/pt-wc-q/js/extended/vitals.js @@ -45,57 +45,71 @@ export function vitals_extended_crud(QEWD) { QEWD.reply({ type: state.summary.qewd.getSummary, params: { - properties: state.summary.data_properties + properties: ['heartrate', 'resprate', 'systolic_bp', 'score'] } }) .then((responseObj) => { console.log(responseObj); let data = responseObj.message.summary; - let result = data.map(el => { - return { - x: parseInt(el.systolic_bp), - y: el.id, - } + let heartrate = [], resprate = [], systolic_rate = []; + + + let result = data.forEach(el => { + heartrate.push({ + x: el.id, + y: el.heartrate, + }) + resprate.push({ + x: el.id, + y: el.resprate, + }) + systolic_rate.push({ + x: el.id, + y: el.systolic_bp, + }) }); - + console.log(heartrate); + console.log(resprate); + console.log(systolic_rate); let config = { - type: 'line', + type: 'scatter', data: { datasets: [{ - data: result, - backgroundColor: ['#4e73df', '#1cc88a', '#36b9cc'], - hoverBackgroundColor: ['#2e59d9', '#17a673', '#2c9faf'], - hoverBorderColor: "rgba(234, 236, 244, 1)", + label: 'Heart Rate', + backgroundColor: 'rgba(226,57,57,0.5)', + borderColor: '#e23939', + fill: false, + showLine: true, + + data: heartrate, + }, { + label: 'Resp Rate', + backgroundColor: 'rgba(57,171,226,0.5)', + borderColor: '#39abe2', + fill: false, + showLine: true, + + data: resprate, + }, { + label: 'Systolic Rate', + backgroundColor: 'rgba(226,57,220,0.5)', + borderColor: '#e239dc', + fill: false, + showLine: true, + + data: systolic_rate, }], - }, - options: { - maintainAspectRatio: false, - tooltips: { - backgroundColor: "rgb(255,255,255)", - bodyFontColor: "#858796", - borderColor: '#dddfeb', - borderWidth: 1, - xPadding: 15, - yPadding: 15, - displayColors: false, - caretPadding: 10, - callbacks: { - label: function (tooltipItem, data) { - var label = "Score: " + data.score + "\r\n"; - label += "Systolic BP: " + data.y + "\r\n"; - return label; - } - } - }, - legend: { - display: false + options: { + responsive: true, + maintainAspectRatio: false + }, - cutoutPercentage: 80, - }, + } }; - + this.canvas.height = '500px'; this.draw(config); + }); let card = this.getComponentByName('adminui-row', 'adminui-row-chart'); diff --git a/yottadb/yottadb.dat b/yottadb/yottadb.dat deleted file mode 100644 index a289099..0000000 Binary files a/yottadb/yottadb.dat and /dev/null differ diff --git a/yottadb/yottadb.gld b/yottadb/yottadb.gld deleted file mode 100644 index 2ebb23e..0000000 Binary files a/yottadb/yottadb.gld and /dev/null differ diff --git a/yottadb/yottadb.mjl b/yottadb/yottadb.mjl deleted file mode 100644 index c4d36ea..0000000 Binary files a/yottadb/yottadb.mjl and /dev/null differ