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
42ad8096
Commit
42ad8096
authored
Oct 10, 2023
by
Owen Ryan Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return bug fix
parent
054d7d00
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
69 deletions
+56
-69
returnElement.js
WebGde/WebContent/WebGde-Widgets/BPO/returnElement.js
+47
-65
ElementListWidget.js
...ent/WebGde-Widgets/ElementListWidget/ElementListWidget.js
+1
-1
config.js
WebGde/WebContent/WebGde-Widgets/config.js
+5
-1
script.js
WebGde/WebContent/script.js
+2
-1
style.css
WebGde/WebContent/style.css
+1
-1
No files found.
WebGde/WebContent/WebGde-Widgets/BPO/returnElement.js
View file @
42ad8096
import
{
createLoadingScreen
,
removeLoadingScreen
,
resetGDE
}
from
"../../script.js"
;
import
{
SCHEMA_FILE_PATH
}
from
"../DataInputWidget/config.js"
;
import
{
validateInput
}
from
"../DataInputWidget/validateInput.js"
;
import
{
removePrompt
,
showPrompt
}
from
"../LogInWidget/LogInPrompt.js"
;
import
{
PROJECT_CODE
}
from
"../Submit/config.js"
;
import
{
interval
}
from
"../captureMetrics/captureMetrics.js"
;
import
{
createInfoModal
,
createModal
}
from
"../genericPopup/genericPopup.js"
;
...
...
@@ -84,81 +85,61 @@ function returnSaveXML(){
}
export
function
createReturnWindow
()
{
let
overlay
=
document
.
createElement
(
"div"
);
overlay
.
classList
.
add
(
"genericPopup"
);
let
endWindow
=
document
.
createElement
(
'div'
);
endWindow
.
id
=
'end_window'
;
endWindow
.
classList
.
add
(
"parent_Window"
)
let
endBodyDiv
=
document
.
createElement
(
'div'
);
endBodyDiv
.
id
=
'endBodyDiv'
;
let
endLabel
=
document
.
createElement
(
'p'
);
endLabel
.
innerText
=
"Current Element will be Returned."
;
let
endContinue
=
document
.
createElement
(
'p'
);
endContinue
.
innerText
=
"Continue Y/N?"
;
let
endOkCnclDiv
=
document
.
createElement
(
'div'
);
endOkCnclDiv
.
id
=
'endOkCnclCont'
;
let
okEnd
=
document
.
createElement
(
'button'
);
okEnd
.
classList
.
add
(
"emphasizeButton"
);
okEnd
.
innerHTML
=
'ok'
;
okEnd
.
id
=
'okEndButtn'
;
okEnd
.
onclick
=
async
function
()
{
createLoadingScreen
();
let
popUpDisplay
=
document
.
createElement
(
"div"
);
popUpDisplay
.
id
=
"returnWindow"
;
popUpDisplay
.
classList
.
add
(
"modal-container"
)
let
screenMain
=
document
.
createElement
(
'div'
);
screenMain
.
id
=
'parent_Window'
;
screenMain
.
classList
.
add
(
'return-modal'
);
document
.
body
.
appendChild
(
screenMain
);
let
returnLabel
=
document
.
createElement
(
"div"
);
returnLabel
.
textContent
=
"Return Element?"
;
returnLabel
.
classList
.
add
(
"headerLabel"
);
screenMain
.
appendChild
(
returnLabel
);
let
buttonPanel
=
document
.
createElement
(
"div"
);
buttonPanel
.
classList
.
add
(
"floatingButtonPanel"
);
let
cancelButton
=
createButtonElem
(
"normalButton"
,
"Cancel"
);
let
okButton
=
createButtonElem
(
"emphasizeButton"
,
"Ok"
);
buttonPanel
.
append
(
cancelButton
);
buttonPanel
.
append
(
okButton
);
screenMain
.
appendChild
(
buttonPanel
);
okButton
.
onclick
=
async
function
()
{
showPrompt
(
"Returning Element"
,
"Please wait..."
,
null
,
null
,
null
);
let
response
=
await
returnElementBPO
(
sessionStorage
.
getItem
(
"element_id"
));
if
(
response
.
status
==
200
)
{
document
.
getElementById
(
"counter"
).
innerHTML
=
""
;
clearTimeout
(
interval
);
sessionStorage
.
removeItem
(
"section"
);
sessionStorage
.
removeItem
(
"doctype"
);
localStorage
.
clear
();
function
successfulReturn
()
{
document
.
getElementById
(
"backdropContainer"
).
remove
();
}
createInfoModal
(
successfulReturn
,
'OK'
,
"Element Returned"
);
if
(
await
BPO_OBJECT
.
getRandomWaitingElement
()){
resetGDE
();
};
removePrompt
();
document
.
getElementById
(
"returnWindow"
).
remove
();
}
else
{
//PROMPT.createInfoPrompt(`Error ${response.status}: Returning element`);
function
successfulReturn
()
{
logoutKeycloak
();
function
errorReturn
(){
removePrompt
();
}
removeLoadingScreen
();
createInfoModal
(
successfulReturn
,
'Log out'
,
"Error ${response.status}: Returning element"
);
createInfoModal
(
errorReturn
,
'Error'
,
"Error ${response.status}: Returning element"
);
}
overlay
.
remove
();
}
let
cancelEnd
=
document
.
createElement
(
'button'
);
cancelEnd
.
classList
.
add
(
"normalButton"
);
cancelEnd
.
innerHTML
=
'cancel'
;
cancelEnd
.
id
=
'cnclEndButton'
;
endOkCnclDiv
.
appendChild
(
okEnd
);
endOkCnclDiv
.
appendChild
(
cancelEnd
);
endBodyDiv
.
appendChild
(
endLabel
);
endBodyDiv
.
appendChild
(
endContinue
);
endBodyDiv
.
appendChild
(
endOkCnclDiv
);
endWindow
.
appendChild
(
endBodyDiv
);
cancelEnd
.
addEventListener
(
"click"
,
function
()
{
overlay
.
remove
();
cancelButton
.
addEventListener
(
"click"
,
function
()
{
document
.
getElementById
(
"returnWindow"
).
remove
();
});
popUpDisplay
.
append
(
screenMain
);
popUpDisplay
.
style
.
display
=
"block"
;
document
.
body
.
append
(
popUpDisplay
);
}
overlay
.
append
(
endWindow
);
document
.
body
.
append
(
overlay
);
function
createButtonElem
(
className
,
buttonName
,
icon
)
{
/* let buttonElem = document.createElement("button"); */
let
buttonElem
;
buttonElem
=
document
.
createElement
(
"button"
);
buttonElem
.
classList
.
add
(
className
);
buttonElem
.
textContent
=
buttonName
;
return
buttonElem
;
}
\ No newline at end of file
WebGde/WebContent/WebGde-Widgets/ElementListWidget/ElementListWidget.js
View file @
42ad8096
...
...
@@ -3,7 +3,7 @@ import { DocumentControlWidget } from "../documentControlWidget/documentControlW
import
{
INDEXED_DB_STORAGE
,
HIGHLIGHT_OBJECT
,
IMAGE_VIEWER_OBJECT
,
INDEXED_DB_NAME
,
INDEXED_DB_TBL_NAME
,
setIndexedDBStorage
,
setHighlightObject
,
setImageViewerObject
,
setBPOObject
,
BPO_OBJECT
,
DISPLAY_FIELD_OBJECT
,
setDisplayFieldObject
,
activateGDE
,
setDocumentControlObject
,
DOCUMENT_CONTROL_OBJECT
,
IS_GDE_ACTIVATED
}
from
"../globalVariable.js"
;
const
API_ROOT
=
"http://
52.207.220
.74:8080/bpo/req"
;
const
API_ROOT
=
"http://
3.83.246
.74:8080/bpo/req"
;
export
class
ElementListWidget
{
global
=
{
...
...
WebGde/WebContent/WebGde-Widgets/config.js
View file @
42ad8096
...
...
@@ -10,7 +10,7 @@ export const HIGH_LIGHT_SCHEMA = "./WebGde-Widgets/sample_schema/dbSchema_anno.x
export
const
ROOT_FOLDER
=
"/WebGde-Widgets"
;
//this determines if the images will be retrieved from the gfs
export
const
DOMAIN
=
"http://
52.207.220
.74:8080"
export
const
DOMAIN
=
"http://
3.83.246
.74:8080"
export
const
CONTEXTROOT
=
"gfs-explorer-ws"
export
const
GDE_URL
=
DOMAIN
+
"/MobileGdeDev/svc/gfs-rest"
export
const
FOLDER_URL
=
DOMAIN
+
"/"
+
CONTEXTROOT
+
"/svc/gfs-rest/get-folder?parentPath=/Users/"
...
...
@@ -38,3 +38,7 @@ export const REASON_LIST = "Reason1,Reason2,Reason3,Reason4"
//KEYCLOAK CONFIG
window
.
REDIRECT_URL
=
'http://auth-server/auth/realms/GFS/protocol/openid-connect/logout?redirect_uri=encodedRedirectUri'
;
export
function
initializeConfig
(){
}
WebGde/WebContent/script.js
View file @
42ad8096
...
...
@@ -6,6 +6,7 @@ import { DocumentControlWidget } from "./WebGde-Widgets/documentControlWidget/do
import
{
ElementListWidget
}
from
"./WebGde-Widgets/ElementListWidget/ElementListWidget.js"
;
// import { DocumentControlWidget } from "./WebGde-Widgets/documentControlWidget/documentControlWidget.js";
import
{
INDEXED_DB_STORAGE
,
HIGHLIGHT_OBJECT
,
IMAGE_VIEWER_OBJECT
,
INDEXED_DB_NAME
,
INDEXED_DB_TBL_NAME
,
setIndexedDBStorage
,
setHighlightObject
,
setImageViewerObject
,
setBPOObject
,
BPO_OBJECT
,
DISPLAY_FIELD_OBJECT
,
setDisplayFieldObject
,
activateGDE
,
setDocumentControlObject
,
DOCUMENT_CONTROL_OBJECT
,
IS_GDE_ACTIVATED
}
from
"./WebGde-Widgets/globalVariable.js"
;
import
{
SHOW_ELEMENT_LIST_VIEWER
,
CURRENT_NODE
}
from
"./WebGde-Widgets/config.js"
;
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
const
LOG_IN_COMPONENT
=
new
LogInClass
(
startApplication
);
...
...
@@ -52,7 +53,7 @@ async function initializeWebGDE() {
mainLogInScreenContainer
.
remove
();
removeLoadingScreen
();
new
ElementListWidget
(
'Web_GDE_DEV'
,
'containerId'
);
new
ElementListWidget
(
CURRENT_NODE
,
'containerId'
);
}
else
{
await
createWebGdeInterface
(
null
);
setDocumentControlObject
(
new
DocumentControlWidget
());
...
...
WebGde/WebContent/style.css
View file @
42ad8096
...
...
@@ -980,7 +980,7 @@ span#filename {
margin
:
2px
;
}
.reject-modal
{
.reject-modal
,
.return-modal
{
overflow
:
auto
;
background-color
:
#fff
;
position
:
absolute
;
...
...
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