Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
SFB 1288 - INF
nopaque
Commits
c30ab8f5
Commit
c30ab8f5
authored
4 years ago
by
Stephan Porada
Browse files
Options
Downloads
Patches
Plain Diff
Some cosmetic fixes
parent
66827bbd
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
web/app/admin/tables.py
+3
-2
3 additions, 2 deletions
web/app/admin/tables.py
web/app/admin/views.py
+2
-1
2 additions, 1 deletion
web/app/admin/views.py
web/app/jobs/tables.py
+3
-2
3 additions, 2 deletions
web/app/jobs/tables.py
web/app/jobs/views.py
+3
-2
3 additions, 2 deletions
web/app/jobs/views.py
with
11 additions
and
7 deletions
web/app/admin/tables.py
+
3
−
2
View file @
c30ab8f5
...
@@ -15,7 +15,7 @@ class AdminUserTable(Table):
...
@@ -15,7 +15,7 @@ class AdminUserTable(Table):
role_id
=
Col
(
'
Role
'
,
column_html_attrs
=
{
'
class
'
:
'
role
'
},
role_id
=
Col
(
'
Role
'
,
column_html_attrs
=
{
'
class
'
:
'
role
'
},
th_html_attrs
=
{
'
class
'
:
'
sort
'
,
th_html_attrs
=
{
'
class
'
:
'
sort
'
,
'
data-sort
'
:
'
role
'
})
'
data-sort
'
:
'
role
'
})
confirmed
=
Col
(
'
Confrimed Status
'
,
column_html_attrs
=
{
'
class
'
:
'
confirmed
'
},
confirmed
=
Col
(
'
Confrimed Status
'
,
column_html_attrs
=
{
'
class
'
:
'
confirmed
'
},
# noqa
th_html_attrs
=
{
'
class
'
:
'
sort
'
,
th_html_attrs
=
{
'
class
'
:
'
sort
'
,
'
data-sort
'
:
'
confirmed
'
})
'
data-sort
'
:
'
confirmed
'
})
id
=
Col
(
'
User Id
'
,
column_html_attrs
=
{
'
class
'
:
'
id
'
},
id
=
Col
(
'
User Id
'
,
column_html_attrs
=
{
'
class
'
:
'
id
'
},
...
@@ -23,7 +23,8 @@ class AdminUserTable(Table):
...
@@ -23,7 +23,8 @@ class AdminUserTable(Table):
'
data-sort
'
:
'
id
'
})
'
data-sort
'
:
'
id
'
})
url
=
LinkCol
(
'
Profile
'
,
'
admin.user
'
,
url
=
LinkCol
(
'
Profile
'
,
'
admin.user
'
,
url_kwargs
=
dict
(
user_id
=
'
id
'
),
url_kwargs
=
dict
(
user_id
=
'
id
'
),
anchor_attrs
=
{
'
class
'
:
'
waves-effect waves-light btn-small
'
})
anchor_attrs
=
{
'
class
'
:
'
waves-effect waves-light btn-floating
'
},
# noqa
text_fallback
=
'
<i class=
"
material-icons
"
>edit</i>
'
)
class
AdminUserItem
(
object
):
class
AdminUserItem
(
object
):
...
...
This diff is collapsed.
Click to expand it.
web/app/admin/views.py
+
2
−
1
View file @
c30ab8f5
...
@@ -7,6 +7,7 @@ from .. import db
...
@@ -7,6 +7,7 @@ from .. import db
from
..decorators
import
admin_required
from
..decorators
import
admin_required
from
..models
import
Role
,
User
from
..models
import
Role
,
User
from
..profile
import
tasks
as
profile_tasks
from
..profile
import
tasks
as
profile_tasks
import
html
@admin.route
(
'
/
'
)
@admin.route
(
'
/
'
)
...
@@ -17,7 +18,7 @@ def index():
...
@@ -17,7 +18,7 @@ def index():
items
=
[
AdminUserItem
(
u
.
username
,
u
.
email
,
u
.
role_id
,
u
.
confirmed
,
u
.
id
)
items
=
[
AdminUserItem
(
u
.
username
,
u
.
email
,
u
.
role_id
,
u
.
confirmed
,
u
.
id
)
for
u
in
users
]
for
u
in
users
]
# Convert table object to html string
# Convert table object to html string
table
=
AdminUserTable
(
items
).
__html__
()
table
=
html
.
unescape
(
AdminUserTable
(
items
).
__html__
()
)
# Add class "list" to tbody element. Needed for "List.js"
# Add class "list" to tbody element. Needed for "List.js"
table
=
table
.
replace
(
'
tbody
'
,
'
tbody class=
"
list
"'
,
1
)
table
=
table
.
replace
(
'
tbody
'
,
'
tbody class=
"
list
"'
,
1
)
return
render_template
(
'
admin/index.html.j2
'
,
table
=
table
,
return
render_template
(
'
admin/index.html.j2
'
,
table
=
table
,
...
...
This diff is collapsed.
Click to expand it.
web/app/jobs/tables.py
+
3
−
2
View file @
c30ab8f5
...
@@ -12,8 +12,9 @@ class JobInputTable(Table):
...
@@ -12,8 +12,9 @@ class JobInputTable(Table):
url
=
LinkCol
(
'
Download
'
,
'
jobs.download_job_input
'
,
url
=
LinkCol
(
'
Download
'
,
'
jobs.download_job_input
'
,
url_kwargs
=
dict
(
job_id
=
'
job.id
'
,
url_kwargs
=
dict
(
job_id
=
'
job.id
'
,
job_input_id
=
'
input_id
'
),
job_input_id
=
'
input_id
'
),
anchor_attrs
=
{
'
class
'
:
'
waves-effect waves-light btn-small
'
,
anchor_attrs
=
{
'
class
'
:
'
waves-effect waves-light btn-floating
'
,
'
download
'
:
''
})
'
download
'
:
''
},
text_fallback
=
'
<i class=
"
material-icons
"
>file_download</i>
'
)
class
JobInputItem
(
object
):
class
JobInputItem
(
object
):
...
...
This diff is collapsed.
Click to expand it.
web/app/jobs/views.py
+
3
−
2
View file @
c30ab8f5
...
@@ -6,6 +6,7 @@ from . import tasks
...
@@ -6,6 +6,7 @@ from . import tasks
from
.
tables
import
JobInputItem
,
JobInputTable
from
.
tables
import
JobInputItem
,
JobInputTable
from
..models
import
Job
,
JobInput
,
JobResult
from
..models
import
Job
,
JobInput
,
JobResult
import
os
import
os
import
html
@jobs.route
(
'
/<int:job_id>
'
)
@jobs.route
(
'
/<int:job_id>
'
)
...
@@ -16,8 +17,8 @@ def job(job_id):
...
@@ -16,8 +17,8 @@ def job(job_id):
abort
(
403
)
abort
(
403
)
items
=
[
JobInputItem
(
input
.
filename
,
job
,
input
.
id
)
items
=
[
JobInputItem
(
input
.
filename
,
job
,
input
.
id
)
for
input
in
job
.
inputs
]
for
input
in
job
.
inputs
]
# Convert table object to html string
# Convert table object to html string
and unescape <>& for al little hack to use icons in buttons
job_input_table
=
JobInputTable
(
items
).
__html__
()
job_input_table
=
html
.
unescape
(
JobInputTable
(
items
).
__html__
()
)
# Add class "list" to tbody element. Needed for "List.js"
# Add class "list" to tbody element. Needed for "List.js"
job_input_table
=
job_input_table
.
replace
(
'
tbody
'
,
'
tbody class=
"
list
"'
,
1
)
job_input_table
=
job_input_table
.
replace
(
'
tbody
'
,
'
tbody class=
"
list
"'
,
1
)
return
render_template
(
'
jobs/job.html.j2
'
,
return
render_template
(
'
jobs/job.html.j2
'
,
...
...
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