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/"
const METRIC_FILES = "../../metrics/"
const HIGH_LIGHT_SCHEMA = "./src/highlight/dbSchema_anno.xlsx"
//this determines if the images will be retrieved from the gfs
const DOMAIN = "http://35.169.23.0:8080"
const CONTEXTROOT = "gfs-explorer-ws"
......
......@@ -9,6 +9,8 @@
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300&display=swap" rel="stylesheet">
<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" />
<script src="./config.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
......@@ -35,6 +37,15 @@
}
</script>
<!-- <script>
window.onload = function () {
window.indexedDB.deleteDatabase("ImageDatabase");
localStorage.clear();
sessionStorage.clear();
}
</script> -->
<body>
<div id="no-config" style="display:none"> There is no config file found</div>
<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() {
var count = store.count();
count.onsuccess = function() {
if (count.result == 0 && (localStorage.length) == 0) {
if (count.result == 0 && localStorage.getItem("display_counter") === null) {
url = URL.createObjectURL(blob);
window.addEventListener("load", loadDoc(url, TIFFViewer,filename), false);
localStorage.setItem("display_counter", 1);
......@@ -93,16 +94,15 @@ function accessFile() {
File_Path = img;
var file = new File([blob], filename + ".TIFF", {type: "img"}); //uplaod to uploadimgfolder //scanned images
uploadFile(file);
} else if (count.result == 0 && (localStorage.length) == 1) {
} else if (count.result == 0 && localStorage.getItem("display_counter") == 1) {
store.put({ id: count.result + 1, address: blob , name:filename, path:img});
localStorage.setItem("submit", "0");
localStorage.setItem("display_counter", 2);
size = size + total;
var file = new File([blob], filename + ".TIFF", {type: "img"}); //uplaod to uploadimgfolder //scanned images
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);
idQuery.onsuccess = function () {
......@@ -137,7 +137,9 @@ function accessFile() {
};
size = size + total;
} else {
}
else {
// console.log(count.result);
// 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
let time_pause_spent = 0
const conflicts = ['F', 'f', 'alphabet', 'alphanumeric']
const shift_shortcuts = ['f', 'F']
const ctrl_shortcuts = ['PageUp', 'PageDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', '-', '=']
const shift_shortcuts = ['+', '_', 'ArrowLeft', 'ArrowRight', 'f', 'F']
const ctrl_shortcuts = ['.', ',', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown']
const ctrl_shift_shortcuts = ['v', 'h', 'V', 'H']
const shortcut_triggers = ['Shift', 'Control']
let shortcut_flag = false
......
......@@ -84,9 +84,6 @@ const displayFields = async (parentID) => {
inputContainer.appendChild(input)
}
window.onload = function() {
document.getElementById("Surname").focus();
}
const submit = document.createElement('input')
submit.type = 'submit'
......@@ -101,6 +98,13 @@ const displayFields = async (parentID) => {
});
dropdowns.on('select2:close', handleDropdown)
})
$(document).ready(function() {
$('form:first *:input[type!=hidden]:first').focus();
});
} catch(err) {
console.log(err)
return { valid: false, error: err }
......
......@@ -53,7 +53,7 @@ function highlight(nameVal){
//uses coordinates given in coordinates text file
ctx.beginPath();
ctx.lineWidth = 3;
ctx.lineWidth = 2;
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.stroke();
......@@ -220,7 +220,7 @@ function initHighlight() {
};
fetch("./src/highlight/dbSchema_anno.xlsx")
fetch(HIGH_LIGHT_SCHEMA)
.then(res => {
return res.arrayBuffer();
}).then(res => {
......
......@@ -227,8 +227,11 @@ function TIFFViewer(xhr, TiffViewerImageName) {
if (setheight > 800 && setwidth > 1000) {
if (setheight > setwidth) {
img.style = "width: 870px; height: 1160px";
// img.style = "width: 870px; height: 1160px";
img.style = "width: 600; height: 800";
} else {
// img.style = "width: 800; height: 600";
//img.style = "width: 600; height: 800";
img.style = "width: 800; height: 600";
}
changed = true;
......@@ -337,7 +340,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const rotateR = document.getElementById("TiffViewer_RotateR");
rotateR.addEventListener("click", rotateClockwise);
document.addEventListener("keydown", (e) => {
if (e.shiftKey && e.key === "PageUp") {
if (e.ctrlKey && e.key === ".") {
e.preventDefault();
rotateClockwise();
}
......@@ -354,7 +357,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const rotateL = document.getElementById("TiffViewer_RotateL");
rotateL.addEventListener("click", rotateCounterClockwise);
document.addEventListener("keydown", (e) => {
if (e.shiftKey && e.key === "PageDown") {
if (e.ctrlKey && e.key === ",") {
e.preventDefault();
rotateCounterClockwise();
}
......@@ -375,7 +378,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const zoomP = document.getElementById("TiffViewer_ZoomP");
zoomP.addEventListener("click", zoomIn);
document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.key === "=") {
if (e.shiftKey && e.key === "+") {
e.preventDefault();
zoomIn();
}
......@@ -390,7 +393,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const zoomM = document.getElementById("TiffViewer_ZoomM");
zoomM.addEventListener("click", zoomOut);
document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.key === "-") {
if (e.shiftKey && e.key == "_") {
e.preventDefault();
zoomOut();
}
......@@ -410,7 +413,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const prevB = document.getElementById("TiffViewer_PrevButton");
prevB.addEventListener("click", previousPage);
document.addEventListener("keydown", (e) => {
if (e.key === "F11") {
if (e.shiftKey && e.keyCode == 37) {
e.preventDefault();
previousPage();
......@@ -432,7 +435,7 @@ function TIFFViewer(xhr, TiffViewerImageName) {
const nextB = document.getElementById("TiffViewer_NextButton");
nextB.addEventListener("click", nextPage);
document.addEventListener("keydown", (e) => {
if (e.key === "F12") {
if (e.shiftKey && e.keyCode == 39) {
e.preventDefault();
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