Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
ab965b7f
Commit
ab965b7f
authored
Dec 02, 2018
by
Lasse Karstensen
Committed by
Dridi Boukelmoune
Feb 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a notification field for temporary messages.
parent
b0a2afed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
varnishstat_curses.c
bin/varnishstat/varnishstat_curses.c
+14
-1
No files found.
bin/varnishstat/varnishstat_curses.c
View file @
ab965b7f
...
...
@@ -120,6 +120,10 @@ static double t_sample = 0.;
static
double
interval
=
1
.;
static
unsigned
vsm_status
=
0
;
#define NOTIF_MAXLEN 256
static
char
notification_message
[
NOTIF_MAXLEN
]
=
""
;
static
double
notification_eol
=
0
.
0
;
static
void
init_hitrate
(
void
)
{
...
...
@@ -435,7 +439,8 @@ draw_status(void)
mvwprintw
(
w_status
,
1
,
0
,
"Uptime child: "
);
running
(
w_status
,
up_chld
,
VSM_WRK_RUNNING
);
mvwprintw
(
w_status
,
0
,
55
,
"Refresh interval: %.3fs"
,
interval
);
if
(
VTIM_mono
()
<
notification_eol
)
mvwaddstr
(
w_status
,
2
,
0
,
notification_message
);
if
(
COLS
>
70
)
{
mvwprintw
(
w_status
,
0
,
getmaxx
(
w_status
)
-
37
,
...
...
@@ -903,11 +908,19 @@ handle_keypress(int ch)
break
;
case
'+'
:
interval
+=
0
.
1
;
(
void
)
snprintf
(
notification_message
,
NOTIF_MAXLEN
,
"Refresh interval set to %.1f seconds."
,
interval
);
notification_eol
=
VTIM_mono
()
+
1
.
25
;
break
;
case
'-'
:
interval
-=
0
.
1
;
if
(
interval
<
0
.
1
)
interval
=
0
.
1
;
(
void
)
snprintf
(
notification_message
,
NOTIF_MAXLEN
,
"Refresh interval set to %.1f seconds."
,
interval
);
notification_eol
=
VTIM_mono
()
+
1
.
25
;
break
;
case
'v'
:
verbosity
=
VSC_ChangeLevel
(
verbosity
,
1
);
...
...
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