Commit 2d4ee7b3 by Jorem Magcawas

Merge branch 'feature-bugfix' into 'development'

Feature bugfix merge to development See merge request !18
parents 7e8c6e46 f612f5f3
...@@ -35,6 +35,8 @@ const OUTPUT_FILES = "../../output/" ...@@ -35,6 +35,8 @@ const OUTPUT_FILES = "../../output/"
const METRIC_FILES = "../../metrics/" const METRIC_FILES = "../../metrics/"
const HIGH_LIGHT_SCHEMA = "./src/highlight/dbSchema_anno.xlsx"
//this determines if the images will be retrieved from the gfs //this determines if the images will be retrieved from the gfs
const DOMAIN = "http://35.169.23.0:8080" const DOMAIN = "http://35.169.23.0:8080"
const CONTEXTROOT = "gfs-explorer-ws" const CONTEXTROOT = "gfs-explorer-ws"
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="./config.js"></script> <script src="./config.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" <script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
...@@ -35,6 +37,15 @@ ...@@ -35,6 +37,15 @@
} }
</script> </script>
<!-- <script>
window.onload = function () {
window.indexedDB.deleteDatabase("ImageDatabase");
localStorage.clear();
sessionStorage.clear();
}
</script> -->
<body> <body>
<div id="no-config" style="display:none"> There is no config file found</div> <div id="no-config" style="display:none"> There is no config file found</div>
<div id="with-config" style="display:grid"> <div id="with-config" style="display:grid">
......
record_no,filename,speed,eoe_timestamp,avg_speed
1,0001SVI_0005.tif,11989.100817438692,10/4/2022 3:08:20 PM,11989.100817438692
2,0001SVI_0004.tif,11195.928753180662,10/4/2022 3:48:58 PM,11592.514785309677
3,0001SVI_0006.tif,2265.39762447888,10/4/2022 3:49:41 PM,8483.475731699411
\ No newline at end of file
record_no,filename,speed,eoe_timestamp,avg_speed
1,0001SVI_0005.tif,5817.8106659862215,10/5/2022 8:45:10 AM,5817.8106659862215
2,0001SVI_0004.tif,5461.165048543689,10/5/2022 8:45:22 AM,5639.487857264956
3,0001SVI_0006.tif,7064.017660044151,10/5/2022 8:45:37 AM,6114.331124858021
4,0001SVI_0007.tif,8726.459071415251,10/5/2022 8:45:50 AM,6767.363111497329
5,0001SVI_0008.tif,2627.6093620748384,10/5/2022 8:46:12 AM,5939.412361612831
6,0001SVI_0009.tif,198.992214982345,10/5/2022 8:53:46 AM,4982.67567050775
7,0001SVI_0019.tif,5804.579168010318,10/5/2022 8:53:57 AM,5100.09045586526
8,0001SVI_0022.tif,292.5877763328999,10/5/2022 8:58:33 AM,4499.1526209237145
9,0001SVI_0025.tif,6424.399740428294,10/5/2022 8:58:51 AM,4713.068967535334
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0004.tif</Image_Source_Path>
<No_of_Keystrokes>15</No_of_Keystrokes>
<Processing_Time_Seconds>9.888</Processing_Time_Seconds>
<Payee>dwa</Payee>
<Particulars>dwa</Particulars>
<Account_No>dwa</Account_No>
<Transaction_Date>2022-10-12</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0005.tif</Image_Source_Path>
<No_of_Keystrokes>19</No_of_Keystrokes>
<Processing_Time_Seconds>11.757</Processing_Time_Seconds>
<Payee>dwa</Payee>
<Particulars>dwa</Particulars>
<Account_No>dwa</Account_No>
<Transaction_Date>2022-10-12</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0006.tif</Image_Source_Path>
<No_of_Keystrokes>24</No_of_Keystrokes>
<Processing_Time_Seconds>12.231</Processing_Time_Seconds>
<Payee>dwadaw</Payee>
<Particulars>dwadwa</Particulars>
<Account_No>dwadwa</Account_No>
<Transaction_Date>2022-10-11</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0007.tif</Image_Source_Path>
<No_of_Keystrokes>26</No_of_Keystrokes>
<Processing_Time_Seconds>10.726</Processing_Time_Seconds>
<Payee>fesesfse</Payee>
<Particulars>fdesesfse</Particulars>
<Account_No>fsefes</Account_No>
<Transaction_Date>2022-10-05</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0008.tif</Image_Source_Path>
<No_of_Keystrokes>15</No_of_Keystrokes>
<Processing_Time_Seconds>20.551</Processing_Time_Seconds>
<Payee>dwa</Payee>
<Particulars>dwa</Particulars>
<Account_No>dwa</Account_No>
<Transaction_Date>2022-10-12</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0009.tif</Image_Source_Path>
<No_of_Keystrokes>25</No_of_Keystrokes>
<Processing_Time_Seconds>452.279</Processing_Time_Seconds>
<Payee>dawdaw</Payee>
<Particulars>dwa</Particulars>
<Account_No>dwa</Account_No>
<Transaction_Date>2022-10-05</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0019.tif</Image_Source_Path>
<No_of_Keystrokes>15</No_of_Keystrokes>
<Processing_Time_Seconds>9.303</Processing_Time_Seconds>
<Payee>daw</Payee>
<Particulars>dwa</Particulars>
<Account_No>dwa</Account_No>
<Transaction_Date>2022-10-04</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0022.tif</Image_Source_Path>
<No_of_Keystrokes>22</No_of_Keystrokes>
<Processing_Time_Seconds>270.688</Processing_Time_Seconds>
<Payee>daw</Payee>
<Particulars>dwa</Particulars>
<Account_No>dwa</Account_No>
<Transaction_Date>2022-10-18</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0025.tif</Image_Source_Path>
<No_of_Keystrokes>22</No_of_Keystrokes>
<Processing_Time_Seconds>12.328</Processing_Time_Seconds>
<Payee>dwa</Payee>
<Particulars>dwa</Particulars>
<Account_No>dwa</Account_No>
<Transaction_Date>2022-10-19</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path>./input/0001SVI_0027.tif</Image_Source_Path>
<No_of_Keystrokes>15</No_of_Keystrokes>
<Processing_Time_Seconds>5.432</Processing_Time_Seconds>
<Payee>dwa</Payee>
<Particulars>dwad</Particulars>
<Account_No>dwa</Account_No>
<Transaction_Date>2022-10-12</Transaction_Date>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Image_Source_Path/>
<No_of_Keystrokes>12</No_of_Keystrokes>
<Processing_Time_Seconds>2.847</Processing_Time_Seconds>
<Payee>dwa</Payee>
<Particulars>dwa</Particulars>
<Account_No>dwa</Account_No>
<Transaction_Date>2022-10-19</Transaction_Date>
\ No newline at end of file
...@@ -84,7 +84,8 @@ function accessFile() { ...@@ -84,7 +84,8 @@ function accessFile() {
var count = store.count(); var count = store.count();
count.onsuccess = function() { count.onsuccess = function() {
if (count.result == 0 && (localStorage.length) == 0) {
if (count.result == 0 && localStorage.getItem("display_counter") === null) {
url = URL.createObjectURL(blob); url = URL.createObjectURL(blob);
window.addEventListener("load", loadDoc(url, TIFFViewer,filename), false); window.addEventListener("load", loadDoc(url, TIFFViewer,filename), false);
localStorage.setItem("display_counter", 1); localStorage.setItem("display_counter", 1);
...@@ -92,17 +93,16 @@ function accessFile() { ...@@ -92,17 +93,16 @@ function accessFile() {
File_Name = filename; File_Name = filename;
File_Path = img; File_Path = img;
var file = new File([blob], filename + ".TIFF", {type: "img"}); //uplaod to uploadimgfolder //scanned images var file = new File([blob], filename + ".TIFF", {type: "img"}); //uplaod to uploadimgfolder //scanned images
uploadFile(file); uploadFile(file);
} else if (count.result == 0 && localStorage.getItem("display_counter") == 1) {
} else if (count.result == 0 && (localStorage.length) == 1) {
store.put({ id: count.result + 1, address: blob , name:filename, path:img}); store.put({ id: count.result + 1, address: blob , name:filename, path:img});
localStorage.setItem("submit", "0"); localStorage.setItem("submit", "0");
localStorage.setItem("display_counter", 2); localStorage.setItem("display_counter", 2);
size = size + total; size = size + total;
var file = new File([blob], filename + ".TIFF", {type: "img"}); //uplaod to uploadimgfolder //scanned images var file = new File([blob], filename + ".TIFF", {type: "img"}); //uplaod to uploadimgfolder //scanned images
uploadFile(file); uploadFile(file);
}
} else if(img == null && count.result == 1 && (localStorage.length) == 2 && localStorage.getItem("submit") == 1){ //if only one file left else if(img == null && count.result == 1 && (localStorage.length) == 2 && localStorage.getItem("submit") == 1){ //if only one file left
const idQuery = store.get(1); const idQuery = store.get(1);
idQuery.onsuccess = function () { idQuery.onsuccess = function () {
...@@ -137,9 +137,11 @@ function accessFile() { ...@@ -137,9 +137,11 @@ function accessFile() {
}; };
size = size + total; size = size + total;
} else { }
else {
// console.log(count.result); // console.log(count.result);
// console.log(localStorage.length); // console.log(localStorage.length);
} }
} }
......
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.53 (Win64) OpenSSL/1.1.1n PHP/8.1.6 Server at localhost Port 80</address>
</body></html>
...@@ -5,8 +5,8 @@ let time_pause = 0 ...@@ -5,8 +5,8 @@ let time_pause = 0
let time_pause_spent = 0 let time_pause_spent = 0
const conflicts = ['F', 'f', 'alphabet', 'alphanumeric'] const conflicts = ['F', 'f', 'alphabet', 'alphanumeric']
const shift_shortcuts = ['f', 'F'] const shift_shortcuts = ['+', '_', 'ArrowLeft', 'ArrowRight', 'f', 'F']
const ctrl_shortcuts = ['PageUp', 'PageDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', '-', '='] const ctrl_shortcuts = ['.', ',', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown']
const ctrl_shift_shortcuts = ['v', 'h', 'V', 'H'] const ctrl_shift_shortcuts = ['v', 'h', 'V', 'H']
const shortcut_triggers = ['Shift', 'Control'] const shortcut_triggers = ['Shift', 'Control']
let shortcut_flag = false let shortcut_flag = false
......
...@@ -84,9 +84,6 @@ const displayFields = async (parentID) => { ...@@ -84,9 +84,6 @@ const displayFields = async (parentID) => {
inputContainer.appendChild(input) inputContainer.appendChild(input)
} }
window.onload = function() {
document.getElementById("Surname").focus();
}
const submit = document.createElement('input') const submit = document.createElement('input')
submit.type = 'submit' submit.type = 'submit'
...@@ -101,6 +98,13 @@ const displayFields = async (parentID) => { ...@@ -101,6 +98,13 @@ const displayFields = async (parentID) => {
}); });
dropdowns.on('select2:close', handleDropdown) dropdowns.on('select2:close', handleDropdown)
}) })
$(document).ready(function() {
$('form:first *:input[type!=hidden]:first').focus();
});
} catch(err) { } catch(err) {
console.log(err) console.log(err)
return { valid: false, error: err } return { valid: false, error: err }
......
...@@ -53,7 +53,7 @@ function highlight(nameVal){ ...@@ -53,7 +53,7 @@ function highlight(nameVal){
//uses coordinates given in coordinates text file //uses coordinates given in coordinates text file
ctx.beginPath(); ctx.beginPath();
ctx.lineWidth = 3; ctx.lineWidth = 2;
ctx.strokeStyle = `rgba(${fieldHighlightData[10]})`; ctx.strokeStyle = `rgba(${fieldHighlightData[10]})`;
ctx.rect(Math.round(fieldHighlightData[4]*resizeWidthVal),Math.round(fieldHighlightData[5]*resizeHeightVal),Math.round(fieldHighlightData[6]*resizeWidthVal),Math.round(fieldHighlightData[7]*resizeHeightVal)); ctx.rect(Math.round(fieldHighlightData[4]*resizeWidthVal),Math.round(fieldHighlightData[5]*resizeHeightVal),Math.round(fieldHighlightData[6]*resizeWidthVal),Math.round(fieldHighlightData[7]*resizeHeightVal));
ctx.stroke(); ctx.stroke();
...@@ -220,7 +220,7 @@ function initHighlight() { ...@@ -220,7 +220,7 @@ function initHighlight() {
}; };
fetch("./src/highlight/dbSchema_anno.xlsx") fetch(HIGH_LIGHT_SCHEMA)
.then(res => { .then(res => {
return res.arrayBuffer(); return res.arrayBuffer();
}).then(res => { }).then(res => {
......
...@@ -227,8 +227,11 @@ function TIFFViewer(xhr, TiffViewerImageName) { ...@@ -227,8 +227,11 @@ function TIFFViewer(xhr, TiffViewerImageName) {
if (setheight > 800 && setwidth > 1000) { if (setheight > 800 && setwidth > 1000) {
if (setheight > setwidth) { if (setheight > setwidth) {
img.style = "width: 870px; height: 1160px"; // img.style = "width: 870px; height: 1160px";
img.style = "width: 600; height: 800";
} else { } else {
// img.style = "width: 800; height: 600";
//img.style = "width: 600; height: 800";
img.style = "width: 800; height: 600"; img.style = "width: 800; height: 600";
} }
changed = true; changed = true;
...@@ -337,7 +340,7 @@ function TIFFViewer(xhr, TiffViewerImageName) { ...@@ -337,7 +340,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const rotateR = document.getElementById("TiffViewer_RotateR"); const rotateR = document.getElementById("TiffViewer_RotateR");
rotateR.addEventListener("click", rotateClockwise); rotateR.addEventListener("click", rotateClockwise);
document.addEventListener("keydown", (e) => { document.addEventListener("keydown", (e) => {
if (e.shiftKey && e.key === "PageUp") { if (e.ctrlKey && e.key === ".") {
e.preventDefault(); e.preventDefault();
rotateClockwise(); rotateClockwise();
} }
...@@ -354,7 +357,7 @@ function TIFFViewer(xhr, TiffViewerImageName) { ...@@ -354,7 +357,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const rotateL = document.getElementById("TiffViewer_RotateL"); const rotateL = document.getElementById("TiffViewer_RotateL");
rotateL.addEventListener("click", rotateCounterClockwise); rotateL.addEventListener("click", rotateCounterClockwise);
document.addEventListener("keydown", (e) => { document.addEventListener("keydown", (e) => {
if (e.shiftKey && e.key === "PageDown") { if (e.ctrlKey && e.key === ",") {
e.preventDefault(); e.preventDefault();
rotateCounterClockwise(); rotateCounterClockwise();
} }
...@@ -375,7 +378,7 @@ function TIFFViewer(xhr, TiffViewerImageName) { ...@@ -375,7 +378,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const zoomP = document.getElementById("TiffViewer_ZoomP"); const zoomP = document.getElementById("TiffViewer_ZoomP");
zoomP.addEventListener("click", zoomIn); zoomP.addEventListener("click", zoomIn);
document.addEventListener("keydown", (e) => { document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.key === "=") { if (e.shiftKey && e.key === "+") {
e.preventDefault(); e.preventDefault();
zoomIn(); zoomIn();
} }
...@@ -390,7 +393,7 @@ function TIFFViewer(xhr, TiffViewerImageName) { ...@@ -390,7 +393,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const zoomM = document.getElementById("TiffViewer_ZoomM"); const zoomM = document.getElementById("TiffViewer_ZoomM");
zoomM.addEventListener("click", zoomOut); zoomM.addEventListener("click", zoomOut);
document.addEventListener("keydown", (e) => { document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.key === "-") { if (e.shiftKey && e.key == "_") {
e.preventDefault(); e.preventDefault();
zoomOut(); zoomOut();
} }
...@@ -410,7 +413,7 @@ function TIFFViewer(xhr, TiffViewerImageName) { ...@@ -410,7 +413,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const prevB = document.getElementById("TiffViewer_PrevButton"); const prevB = document.getElementById("TiffViewer_PrevButton");
prevB.addEventListener("click", previousPage); prevB.addEventListener("click", previousPage);
document.addEventListener("keydown", (e) => { document.addEventListener("keydown", (e) => {
if (e.key === "F11") { if (e.shiftKey && e.keyCode == 37) {
e.preventDefault(); e.preventDefault();
previousPage(); previousPage();
...@@ -432,7 +435,7 @@ function TIFFViewer(xhr, TiffViewerImageName) { ...@@ -432,7 +435,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const nextB = document.getElementById("TiffViewer_NextButton"); const nextB = document.getElementById("TiffViewer_NextButton");
nextB.addEventListener("click", nextPage); nextB.addEventListener("click", nextPage);
document.addEventListener("keydown", (e) => { document.addEventListener("keydown", (e) => {
if (e.key === "F12") { if (e.shiftKey && e.keyCode == 39) {
e.preventDefault(); e.preventDefault();
nextPage(); nextPage();
} }
......
Markdown is supported
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