Commit 9f04dd40 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

varnishstat: New 'r'aw key binding

parent 0f5f457c
......@@ -72,6 +72,14 @@ BINDING(UNSEEN,
"\tof varnishstat. Defaults to hide unseen counters."
)
BINDING_KEY('r', "r",)
BINDING(RAW,
"\tToggle between showing raw and adjusted gauges. When a gauge\n"
"\tis decremented faster than it is incremented, it may appear as\n"
"\ta large integer with its most significant bit set. By default\n"
"\tsuch values are adjusted to zero."
)
BINDING_KEY('e', "e",)
BINDING(SCALE, "\tToggle scaling of values.")
......
......@@ -935,7 +935,7 @@ handle_common_keypress(enum kb_e kb)
}
static void
handle_points_keypress(enum kb_e kb)
handle_points_keypress(struct vsc *vsc, enum kb_e kb)
{
switch (kb) {
......@@ -973,6 +973,10 @@ handle_points_keypress(enum kb_e kb)
hide_unseen = 1 - hide_unseen;
rebuild = REBUILD_NEXT;
break;
case KB_RAW:
VSC_Arg(vsc, 'r', NULL);
rebuild = REBUILD_NEXT;
break;
case KB_SCALE:
scale = 1 - scale;
rebuild = REBUILD_NEXT;
......@@ -1046,6 +1050,7 @@ handle_help_keypress(enum kb_e kb)
help_line = bindings_help_len;
break;
case KB_UNSEEN:
case KB_RAW:
case KB_SCALE:
case KB_ACCEL:
case KB_DECEL:
......@@ -1072,7 +1077,7 @@ handle_help_keypress(enum kb_e kb)
}
static void
handle_keypress(int ch)
handle_keypress(struct vsc *vsc, int ch)
{
enum kb_e kb;
......@@ -1091,7 +1096,7 @@ handle_keypress(int ch)
if (show_help)
handle_help_keypress(kb);
else
handle_points_keypress(kb);
handle_points_keypress(vsc, kb);
}
static void * v_matchproto_(VSC_new_f)
......@@ -1201,7 +1206,7 @@ do_curses(struct vsm *vsm, struct vsc *vsc)
break;
#endif
default:
handle_keypress(ch);
handle_keypress(vsc, ch);
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment