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
7160709a51ae
Commit
0c0e583a
authored
Jun 12, 2019
by
Aurélien Campéas
Browse files
show the cpu usage
parent
c641c86f7387
Changes
3
Show whitespace changes
Inline
Side-by-side
rework_ui/blueprint.py
View file @
7160709a
...
...
@@ -223,8 +223,8 @@ def reworkui(engine,
def
list_workers
():
# workers
q
=
select
(
'id'
,
'host'
,
'domain'
,
'pid'
,
'mem'
,
'
shutdown
'
,
'kill'
,
'debugport'
,
'started'
'id'
,
'host'
,
'domain'
,
'pid'
,
'mem'
,
'
cpu
'
,
'shutdown'
,
'kill'
,
'debugport'
,
'started'
).
table
(
'rework.worker'
).
where
(
'running = true'
).
order
(
'id'
)
...
...
@@ -280,15 +280,17 @@ def reworkui(engine,
r
.
th
(
'pid@host'
)
r
.
th
(
'domain'
)
r
.
th
(
'memory (Mb)'
)
r
.
th
(
'cpu'
)
r
.
th
(
'debug port'
)
r
.
th
(
'started'
)
r
.
th
(
'action'
)
for
wid
,
host
,
domain
,
pid
,
mem
,
shutdown
,
kill
,
debugport
,
started
in
workers
:
for
wid
,
host
,
domain
,
pid
,
mem
,
cpu
,
shutdown
,
kill
,
debugport
,
started
in
workers
:
with
t
.
tr
()
as
r
:
r
.
th
(
str
(
wid
),
scope
=
'row'
)
r
.
td
(
'{}@{}'
.
format
(
pid
,
host
))
r
.
td
(
domain
)
r
.
td
(
str
(
mem
))
r
.
td
(
str
(
cpu
))
r
.
td
(
debugport
and
str
(
debugport
)
or
''
)
if
started
:
started
=
started
.
astimezone
(
TZ
).
strftime
(
'%Y-%m-%d %H:%M:%S%z'
)
...
...
tests/data/monitors-table-1-task.html
View file @
7160709a
...
...
@@ -22,6 +22,7 @@
<th>
pid@host
</th>
<th>
domain
</th>
<th>
memory (Mb)
</th>
<th>
cpu
</th>
<th>
debug port
</th>
<th>
started
</th>
<th>
action
</th>
...
...
@@ -31,6 +32,7 @@
<td><x>
@
<x>
.
<x>
.
<x>
.
<x></x></x></x></x></x></td>
<td>
default
</td>
<td><x></x></td>
<td><x></x></td>
<td></td>
<td><x>
-
<x>
-
<x>
<x>
:
<x>
:
<x>
+
<x></x></x></x></x></x></x></x></td>
<td>
...
...
tests/data/monitors-table.html
View file @
7160709a
...
...
@@ -22,6 +22,7 @@
<th>
pid@host
</th>
<th>
domain
</th>
<th>
memory (Mb)
</th>
<th>
cpu
</th>
<th>
debug port
</th>
<th>
started
</th>
<th>
action
</th>
...
...
@@ -31,6 +32,7 @@
<td><x>
@
<x>
.
<x>
.
<x>
.
<x></x></x></x></x></x></td>
<td>
default
</td>
<td><x></x></td>
<td><x></x></td>
<td></td>
<td><x>
-
<x>
-
<x>
<x>
:
<x>
:
<x>
+
<x></x></x></x></x></x></x></x></td>
<td>
...
...
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