Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pony
rework_ui
Commits
b90d42fd1f42
Commit
bcb737f6
authored
Nov 29, 2018
by
Aurélien Campéas
Browse files
adapt to the tasks new fields
parent
12142c8ff8d6
Changes
5
Hide whitespace changes
Inline
Side-by-side
rework_ui/taskstable.py
View file @
b90d42fd
...
...
@@ -107,7 +107,8 @@ def generate_tasks_table(engine, taskstates):
r
.
th
(
'#'
)
r
.
th
(
'service'
)
r
.
th
(
'domain'
)
r
.
th
(
'created'
)
r
.
th
(
'queued'
)
r
.
th
(
'started'
)
r
.
th
(
'finished'
)
r
.
th
(
'user'
)
r
.
th
(
'worker'
)
...
...
@@ -133,7 +134,12 @@ def generate_tasks_table(engine, taskstates):
href
=
'taskerror/{}'
.
format
(
row
.
id
))
r
.
td
(
row
.
domain
)
r
.
td
(
job
.
_propvalue
(
'created'
).
strftime
(
'%Y-%m-%d %H:%M:%S'
))
r
.
td
(
job
.
_propvalue
(
'queued'
).
strftime
(
'%Y-%m-%d %H:%M:%S'
))
started
=
job
.
_propvalue
(
'started'
)
if
started
is
None
:
r
.
td
(
''
)
else
:
r
.
td
(
started
.
strftime
(
'%Y-%m-%d %H:%M:%S'
))
finished
=
job
.
_propvalue
(
'finished'
)
if
finished
is
None
:
r
.
td
(
''
)
...
...
tests/data/tasks-table-error.html
View file @
b90d42fd
...
...
@@ -6,7 +6,8 @@
<th>
#
</th>
<th>
service
</th>
<th>
domain
</th>
<th>
created
</th>
<th>
queued
</th>
<th>
started
</th>
<th>
finished
</th>
<th>
user
</th>
<th>
worker
</th>
...
...
@@ -21,6 +22,7 @@
<td>
default
</td>
<td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td>
<td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td>
<td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td>
<td>
Babar
</td>
<td>
#
<X></td>
<td
class=
"failed"
title=
"Traceback (most recent call last):
...
...
@@ -40,6 +42,7 @@ Exception: I am a little crasher.
<td>
default
</td>
<td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td>
<td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td>
<td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td>
<td>
Babar
</td>
<td>
#
<X></td>
<td
class=
"done"
>
done
</td>
...
...
tests/data/tasks-table-uranus.html
View file @
b90d42fd
<br>
<table
class=
"table table-sm table-bordered table-striped table-hover"
>
<thead
class=
"thead-inverse"
><tr><th>
#
</th><th>
service
</th><th>
domain
</th><th>
crea
ted
</th><th>
finished
</th><th>
user
</th><th>
worker
</th><th>
status
</th><th>
action
</th></tr></thead>
<tr><th
scope=
"row"
><X></th><td><span><a
title=
"show the tasks log (if any)"
target=
"_blank"
href=
"tasklogs/<X>"
>
justdoit
</a></span></td><td>
uranus
</td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td>
Celeste
</td><td>
#
<X></td><td
class=
"done"
>
done
</td><td><button
type=
"button"
class=
"btn btn-warning btn-sm"
onclick=
"delete_task(<X>)"
>
delete
</button><span>
</span><button
type=
"button"
class=
"btn btn-primary btn-sm"
onclick=
"relaunch_task(<X>)"
>
relaunch
</button><span>
</span><button
type=
"button"
class=
"btn btn-info btn-sm"
onclick=
"download_input(<X>, "xml")"
>
input
</button><span>
</span><button
type=
"button"
class=
"btn btn-success btn-sm"
onclick=
"download_results(<X>)"
>
results
</button></td></tr>
<thead
class=
"thead-inverse"
><tr><th>
#
</th><th>
service
</th><th>
domain
</th><th>
queued
</th><th>
star
ted
</th><th>
finished
</th><th>
user
</th><th>
worker
</th><th>
status
</th><th>
action
</th></tr></thead>
<tr><th
scope=
"row"
><X></th><td><span><a
title=
"show the tasks log (if any)"
target=
"_blank"
href=
"tasklogs/<X>"
>
justdoit
</a></span></td><td>
uranus
</td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td>
Celeste
</td><td>
#
<X></td><td
class=
"done"
>
done
</td><td><button
type=
"button"
class=
"btn btn-warning btn-sm"
onclick=
"delete_task(<X>)"
>
delete
</button><span>
</span><button
type=
"button"
class=
"btn btn-primary btn-sm"
onclick=
"relaunch_task(<X>)"
>
relaunch
</button><span>
</span><button
type=
"button"
class=
"btn btn-info btn-sm"
onclick=
"download_input(<X>, "xml")"
>
input
</button><span>
</span><button
type=
"button"
class=
"btn btn-success btn-sm"
onclick=
"download_results(<X>)"
>
results
</button></td></tr>
</table>
\ No newline at end of file
tests/data/tasks-table.html
View file @
b90d42fd
<br>
<table
class=
"table table-sm table-bordered table-striped table-hover"
>
<thead
class=
"thead-inverse"
><tr><th>
#
</th><th>
service
</th><th>
domain
</th><th>
crea
ted
</th><th>
finished
</th><th>
user
</th><th>
worker
</th><th>
status
</th><th>
action
</th></tr></thead>
<tr><th
scope=
"row"
><X></th><td><span><a
title=
"show the tasks log (if any)"
target=
"_blank"
href=
"tasklogs/<X>"
>
good_job
</a></span></td><td>
default
</td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td>
Babar
</td><td>
#
<X></td><td
class=
"done"
>
done
</td><td><button
type=
"button"
class=
"btn btn-warning btn-sm"
onclick=
"delete_task(<X>)"
>
delete
</button><span>
</span><button
type=
"button"
class=
"btn btn-primary btn-sm"
onclick=
"relaunch_task(<X>)"
>
relaunch
</button><span>
</span><button
type=
"button"
class=
"btn btn-info btn-sm"
onclick=
"download_input(<X>, "xml")"
>
input
</button><span>
</span><button
type=
"button"
class=
"btn btn-success btn-sm"
onclick=
"download_results(<X>)"
>
results
</button></td></tr>
<thead
class=
"thead-inverse"
><tr><th>
#
</th><th>
service
</th><th>
domain
</th><th>
queued
</th><th>
star
ted
</th><th>
finished
</th><th>
user
</th><th>
worker
</th><th>
status
</th><th>
action
</th></tr></thead>
<tr><th
scope=
"row"
><X></th><td><span><a
title=
"show the tasks log (if any)"
target=
"_blank"
href=
"tasklogs/<X>"
>
good_job
</a></span></td><td>
default
</td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td><X>
-
<X>
-
<X>
<X>
:
<X>
:
<X></td><td>
Babar
</td><td>
#
<X></td><td
class=
"done"
>
done
</td><td><button
type=
"button"
class=
"btn btn-warning btn-sm"
onclick=
"delete_task(<X>)"
>
delete
</button><span>
</span><button
type=
"button"
class=
"btn btn-primary btn-sm"
onclick=
"relaunch_task(<X>)"
>
relaunch
</button><span>
</span><button
type=
"button"
class=
"btn btn-info btn-sm"
onclick=
"download_input(<X>, "xml")"
>
input
</button><span>
</span><button
type=
"button"
class=
"btn btn-success btn-sm"
onclick=
"download_results(<X>)"
>
results
</button></td></tr>
</table>
\ No newline at end of file
tests/test_rui.py
View file @
b90d42fd
...
...
@@ -163,7 +163,7 @@ def test_tasks_table(engine, client, refresh):
'<br>
\n
'
'<table class="table table-sm table-bordered table-striped table-hover">
\n
'
'<thead class="thead-inverse"><tr><th>#</th><th>service</th><th>domain</th>'
'<th>
crea
ted</th><th>finished</th>'
'<th>
queued</th><th>star
ted</th><th>finished</th>'
'<th>user</th><th>worker</th><th>status</th><th>action</th></tr></thead>
\n
</table>'
)
...
...
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