Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CiS Projekt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ockenden, Samuel
CiS Projekt
Commits
24a3f6cf
Commit
24a3f6cf
authored
3 years ago
by
Suireen
Browse files
Options
Downloads
Patches
Plain Diff
Benutzeroberfleache angepasst
parent
00735b52
Branches
Branches containing commit
No related tags found
1 merge request
!19
Main
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.DS_Store
+0
-0
0 additions, 0 deletions
.DS_Store
citation_parser_ui.py
+32
-10
32 additions, 10 deletions
citation_parser_ui.py
with
32 additions
and
10 deletions
.DS_Store
0 → 100644
+
0
−
0
View file @
24a3f6cf
File added
This diff is collapsed.
Click to expand it.
citation_parser_ui.py
+
32
−
10
View file @
24a3f6cf
...
...
@@ -10,8 +10,13 @@ from dash.exceptions import PreventUpdate
from
input.interface
import
InputInterface
import
input.publication
from
verarbeitung.process_main
import
Processing
from
dash.dependencies
import
Input
,
Output
,
State
#Loading Bar
import
plotly.express
as
px
import
dash_bootstrap_components
as
dbc
# pip install dash-bootstrap-components for Loading Bar
app
=
dash
.
Dash
(
__name__
)
app
=
dash
.
Dash
(
__name__
,
external_stylesheets
=
[
dbc
.
themes
.
SPACELAB
])
#SPACELAB https://bootswatch.com/default/ for more themes)
# List of options when inputting data and generating the graph
additional_options
=
[
'
Update Automatically
'
,
'
Smart Input
'
]
...
...
@@ -25,7 +30,7 @@ f.close()
app
.
layout
=
html
.
Div
([
# Layer 0: For the Header and Help Function(s)
html
.
Div
([
html
.
Button
(
id
=
'
show-info
'
,
children
=
'
Show Info
'
,
n_clicks
=
0
),
dbc
.
Button
(
id
=
'
show-info
'
,
children
=
'
Show Info
'
,
n_clicks
=
0
,
color
=
"
primary
"
,
className
=
"
me-1
"
),
html
.
Div
(
id
=
'
info-box
'
)
]),
# Layer 1: For all mandatory Inputs
...
...
@@ -33,16 +38,29 @@ app.layout = html.Div([
"
Input:
"
,
# A simple box for inputting a string.
# Value is transmitted upon pressing return or clicking out of the box.
dcc
.
Input
(
id
=
'
input-string
'
,
value
=
''
,
type
=
'
text
'
,
debounce
=
True
),
dcc
.
Input
(
id
=
'
input-string
'
,
value
=
''
,
type
=
'
text
'
,
debounce
=
True
,
style
=
{
"
width
"
:
"
400px
"
},
),
]),
# Layer 1,5: For test
html
.
Div
([
"
Forward recursion:
"
,
# Forward recursion. Values between 1 and 10 can be entered.
dcc
.
Input
(
id
=
'
forward-depth
'
,
value
=
'
1
'
,
type
=
'
number
'
,
min
=
'
1
'
,
max
=
'
10
'
),
dcc
.
Input
(
id
=
'
forward-depth
'
,
value
=
'
1
'
,
type
=
'
number
'
,
min
=
'
1
'
,
max
=
'
10
'
,
style
=
{
"
width
"
:
"
50px
"
},
),
"
Backward recursion:
"
,
# Backward recursion. Values between 1 and 10 can be entered.
dcc
.
Input
(
id
=
'
backward-depth
'
,
value
=
'
1
'
,
type
=
'
number
'
,
min
=
'
1
'
,
max
=
'
10
'
),
dcc
.
Input
(
id
=
'
backward-depth
'
,
value
=
'
1
'
,
type
=
'
number
'
,
min
=
'
1
'
,
max
=
'
10
'
,
style
=
{
"
width
"
:
"
50px
"
},
),
# Upload box. Can be used via drag-and-drop or byclicking on it to open a file viewer.
dcc
.
Upload
(
id
=
"
upload-data
"
,
children
=
html
.
Div
(
[
"
Drag and drop or click to select a file to upload.
"
]),
#Drag and drop or click to select a file to upload
[
"
Drag and drop to upload
"
]),
style
=
{
"
width
"
:
"
30%
"
,
"
height
"
:
"
60px
"
,
...
...
@@ -54,6 +72,7 @@ app.layout = html.Div([
"
margin
"
:
"
10px
"
,
})
]),
# Layer 2: For the checklist, Remove-/Start-Buttons and input-error-message
html
.
Div
([
# All input DOIs are collected in this checklist.
...
...
@@ -63,11 +82,14 @@ app.layout = html.Div([
# Displays error message if 'Smart Input' is active.
html
.
Div
(
id
=
'
input-err
'
,
style
=
{
'
color
'
:
'
red
'
}),
# Clears the entire list.
html
.
Button
(
id
=
'
clear-all-button
'
,
children
=
'
Clear All
'
),
#html.Button(id='clear-all-button',children='Clear All'),
dbc
.
Button
(
id
=
'
clear-all-button
'
,
children
=
'
Clear All
'
,
color
=
"
primary
"
,
className
=
"
me-1
"
),
# Clear all selected elements.
html
.
Button
(
id
=
'
clear-selected-button
'
,
children
=
'
Clear Selected
'
),
#html.Button(id='clear-selected-button',children='Clear Selected'),
dbc
.
Button
(
id
=
'
clear-selected-button
'
,
children
=
'
Clear Selected
'
,
color
=
"
primary
"
,
className
=
"
me-1
"
),
# Starts the process that generates a graph.
html
.
Button
(
id
=
'
start-button
'
,
children
=
'
Generate Graph
'
)
#html.Button(id='start-button',children='Generate Graph')
dbc
.
Button
(
id
=
'
start-button
'
,
children
=
'
Generate Graph
'
,
color
=
"
primary
"
,
className
=
"
me-1
"
)
]),
# Layer 3: For additional Options (e.g. Topological Sort)
html
.
Div
([
...
...
@@ -76,7 +98,7 @@ app.layout = html.Div([
dcc
.
Checklist
(
id
=
'
additional-options
'
,
options
=
[{
'
label
'
:
k
,
'
value
'
:
k
}
for
k
in
additional_options
],
value
=
[])
]),
]),
# Layer 4: For the Graph
html
.
Div
(
[
html
.
Iframe
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment