Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CPUnetLOG
CPUnetLOG
Commits
e2233a01
Commit
e2233a01
authored
Jul 31, 2014
by
Mario Hock
Browse files
small fix: off by one (in ui)
parent
f96d1614
Changes
1
Hide whitespace changes
Inline
Side-by-side
curses_display.py
View file @
e2233a01
...
...
@@ -24,9 +24,9 @@ rounding_digits = 2
unit
=
"MBits"
## GUI, positions of fields
LABEL_CPU_UTIL
=
1
7
LABEL_CPU_USER
=
4
7
LABEL_CPU_SYSTEM
=
6
3
LABEL_CPU_UTIL
=
1
8
LABEL_CPU_USER
=
4
8
LABEL_CPU_SYSTEM
=
6
4
LABEL_Sent
=
LABEL_CPU_UTIL
LABEL_Received
=
LABEL_CPU_USER
...
...
@@ -125,7 +125,7 @@ def display(measurement):
# static labels
stdscr
.
addstr
(
y
,
1
,
'CPU{0}'
.
format
(
num
),
curses
.
color_pair
(
1
))
stdscr
.
addstr
(
y
,
LABEL_CPU_UTIL
,
'util: '
,
curses
.
color_pair
(
2
))
stdscr
.
addstr
(
y
,
LABEL_CPU_UTIL
+
2
7
,
'|'
,
curses
.
color_pair
(
2
))
stdscr
.
addstr
(
y
,
LABEL_CPU_UTIL
+
2
6
,
'|'
,
curses
.
color_pair
(
2
))
stdscr
.
addstr
(
y
,
LABEL_CPU_USER
,
'user: '
,
curses
.
color_pair
(
2
))
stdscr
.
addstr
(
y
,
LABEL_CPU_SYSTEM
,
'system: '
,
curses
.
color_pair
(
2
))
...
...
@@ -173,9 +173,9 @@ def display(measurement):
stdscr
.
addstr
(
y
,
1
,
'{0}'
.
format
(
nic
),
curses
.
color_pair
(
1
))
stdscr
.
addstr
(
y
,
LABEL_Sent
,
'Sent: '
,
curses
.
color_pair
(
2
))
stdscr
.
addstr
(
y
,
LABEL_Sent
+
2
7
,
"|"
,
curses
.
color_pair
(
2
))
stdscr
.
addstr
(
y
,
LABEL_Sent
+
2
6
,
"|"
,
curses
.
color_pair
(
2
))
stdscr
.
addstr
(
y
,
LABEL_Received
,
'Received: '
,
curses
.
color_pair
(
2
))
stdscr
.
addstr
(
y
,
LABEL_Received
+
3
1
,
"|"
,
curses
.
color_pair
(
2
))
stdscr
.
addstr
(
y
,
LABEL_Received
+
3
0
,
"|"
,
curses
.
color_pair
(
2
))
## TODO rewrite in nice ^^
## XXX prototypical "inline"-coloring
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment