Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web-ui
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WEBGDE-Components
web-ui
Commits
338fdef5
Commit
338fdef5
authored
Sep 14, 2022
by
Jorem Magcawas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit last changes
parent
a4efcb98
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
9 deletions
+87
-9
config.js
Web-GDE/config.js
+7
-0
dir.php
Web-GDE/dir.php
+3
-4
index.html
Web-GDE/index.html
+2
-1
accessFile.js
Web-GDE/src/accessFile/accessFile.js
+62
-2
Felizardo, Theodure Brylle - Application Form.TIFF
...oadimg/Felizardo, Theodure Brylle - Application Form.TIFF
+0
-0
tiffViewer.js
Web-GDE/src/tiffViewer/tiffViewer.js
+13
-2
No files found.
Web-GDE/config.js
View file @
338fdef5
...
...
@@ -32,3 +32,10 @@ const INPUT_FOLDER = "./input/"
const
OUTPUT_FILES
=
"../../output/"
//this determines if the images will be retrieved from the gfs
const
DOMAIN
=
"http://35.169.23.0:8080"
const
CONTEXTROOT
=
"gfs-explorer-ws"
const
FOLDER_URL
=
DOMAIN
+
"/"
+
CONTEXTROOT
+
"/svc/gfs-rest/get-folder?parentPath="
const
DOWNLOAD_URL
=
DOMAIN
+
"/"
+
CONTEXTROOT
+
"/svc/gfs-rest/get-download-link"
const
IS_RETRIEVE_FROM_GFS
=
"Y"
Web-GDE/dir.php
View file @
338fdef5
var Dirfiles =
<?php
$arrFiles
=
array
();
$path
=
'./input'
;
$iterator
=
new
FilesystemIterator
(
$path
);
foreach
(
$iterator
as
$entry
)
{
$arrFiles
[]
=
'./input/'
.
$entry
->
getFilename
();
}
echo
json_encode
(
$arrFiles
);
?>
\ No newline at end of file
echo
json_encode
(
$arrFiles
);
?>
Web-GDE/index.html
View file @
338fdef5
...
...
@@ -120,5 +120,5 @@
<script
src=
"./src/endSession/endSession.js"
></script>
<script
src=
"./src/tiffViewer/tiffViewer.js"
></script>
<script
src=
"./src/highlight/highlight.js"
></script>
<script
src=
'config.php'
></script>
</html>
\ No newline at end of file
Web-GDE/src/accessFile/accessFile.js
View file @
338fdef5
...
...
@@ -237,4 +237,65 @@ function accessFile() {
body
:
formData
});
}
}
\ No newline at end of file
}
function
getFolder
(
url
){
const
promise
=
fetch
(
url
,
{
method
:
'GET'
,
headers
:
{
'Authorization'
:
kc
.
token
// 'Content-Type': 'application/x-www-form-urlencoded',
}
//body: JSON.stringify(myObject)
})
.
then
(
function
(
response
)
{
if
(
response
.
status
===
200
){
response
.
json
().
then
(
function
(
data
)
{
//var parseData = JSON.parse(data);
// func(data);
console
.
log
(
data
);
//displayData(parseData);
});
}
else
{
console
.
log
(
"Error"
);
}
})
.
catch
(
function
(
error
)
{
console
.
log
(
'Request failed'
,
error
);
});
return
promise
;
}
function
postServiceText
(
url
,
myObject
,
funcSuccess
,
funcFail
){
const
promise
=
fetch
(
url
,
{
method
:
'post'
,
body
:
JSON
.
stringify
(
myObject
),
headers
:
{
'Content-Type'
:
'application/json'
,
'Authorization'
:
kc
.
token
// 'Content-Type': 'application/x-www-form-urlencoded',
}
})
.
then
(
function
(
response
)
{
if
(
response
.
status
===
200
){
response
.
text
().
then
(
function
(
data
)
{
//var parseData = JSON.parse(data);
// funcSuccess(data);
console
.
log
(
data
);
//alert(data);
//displayData(parseData);
});
}
else
{
console
.
log
(
"Error"
);
funcFail
();
}
})
.
catch
(
function
(
error
)
{
console
.
log
(
'Request failed'
,
error
);
});
return
promise
;
}
Web-GDE/src/accessFile/uploadimg/Felizardo, Theodure Brylle - Application Form.TIFF
0 → 100644
View file @
338fdef5
122 KB
Web-GDE/src/tiffViewer/tiffViewer.js
View file @
338fdef5
...
...
@@ -211,9 +211,10 @@ function TIFFViewer(xhr, TiffViewerImageName) {
tiff.setDirectory(i);
var canvas = tiff.toCanvas().toDataURL();
document.getElementById(`IMG${i + 1}`).src = canvas;
}
//setting the style per page
for (var j = 1; j <= TiffViewer_pages; ++j) {
for (var j = 1; j <= TiffViewer_pages; ++j) {
var img = document.getElementById("IMG" + j);
getMeta(canvas, function (width, height) {
wzoom[TiffViewer_current - 1] = changedwidth; /*ADDED: to fit large TIFF files*/
...
...
@@ -222,6 +223,8 @@ function TIFFViewer(xhr, TiffViewerImageName) {
origwidth = width;
setwidth = width;
setheight = height;
//to only display single page
if (setheight > 800 && setwidth > 1000) {
if (setheight > setwidth) {
img.style = "width: 600; height: 800";
...
...
@@ -255,11 +258,13 @@ function TIFFViewer(xhr, TiffViewerImageName) {
flippedX.push(1);
flippedY.push(1);
rot.push(0);
if (j === 1) {
if (j === 1) {
img.style.display = "flex";
}
}
//getting the metadata of each TIFF page
function getMeta(url, callback) {
var img = new Image();
...
...
@@ -556,6 +561,11 @@ function TIFFViewer(xhr, TiffViewerImageName) {
}
editedwidth = image.clientWidth;
editedheight = image.clientHeight;
// document.getElementById(`IMG${TiffViewer_current + 1}`).style.display = '
none
';
// document.getElementById("IMG2").style.display = '
none
';
}
/* ADDED:
...
...
@@ -604,5 +614,6 @@ function TIFFViewer(xhr, TiffViewerImageName) {
div.scrollTop += 20;
}
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment