Skip to content

Commit

Permalink
Added metric labels for easier substitution.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Jul 17, 2015
1 parent 02a503f commit 3d64b4c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,19 +1482,19 @@ print_html_common (FILE * fp, GHolder * h, int processed, const GOutput * panel)
if (h->module == HOSTS)
fprintf (fp, "<th>-</th>");

fprintf (fp, "<th>Visitors</th>");
fprintf (fp, "<th>Hits</th>");
fprintf (fp, "<th>%s</th>", MTRC_VISITORS_LBL);
fprintf (fp, "<th>%s</th>", MTRC_HITS_LBL);
fprintf (fp, "<th>%%</th>");
fprintf (fp, "<th>Bandwidth</th>");
fprintf (fp, "<th>%s</th>", MTRC_BW_LBL);

if (conf.serve_usecs) {
fprintf (fp, "<th>Avg. T.S.</th>");
fprintf (fp, "<th>Max. T.S.</th>");
fprintf (fp, "<th>%s</th>", MTRC_AVGTS_LBL);
fprintf (fp, "<th>%s</th>", MTRC_MAXTS_LBL);
}
if (conf.append_protocol && panel->protocol)
fprintf (fp, "<th>Protocol</th>");
fprintf (fp, "<th>%s</th>", MTRC_PROTOCOLS_LBL);
if (conf.append_method && panel->method)
fprintf (fp, "<th>Method</th>");
fprintf (fp, "<th>%s</th>", MTRC_METHODS_LBL);

if (max_hit)
fprintf (fp, "<th>%s</th>", lbl);
Expand Down
13 changes: 13 additions & 0 deletions src/ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,19 @@
#define OVERALL_BANDWIDTH "bandwidth"
#define OVERALL_LOG "log_path"

/* Metric Labels */
#define MTRC_HITS_LBL "Hits"
#define MTRC_VISITORS_LBL "Visitors"
#define MTRC_VISITORS_SHORT_LBL "Vis."
#define MTRC_BW_LBL "Bandwidth"
#define MTRC_AVGTS_LBL "Avg. T.S."
#define MTRC_MAXTS_LBL "Max. T.S."
#define MTRC_METHODS_LBL "Method"
#define MTRC_METHODS_SHORT_LBL "Mtd"
#define MTRC_PROTOCOLS_LBL "Protocol"
#define MTRC_PROTOCOLS_SHORT_LBL "Proto"
#define MTRC_DATA_LBL "Data"

/* Find Labels */
#define FIND_HEAD "Find pattern in all views"
#define FIND_DESC "Regex allowed - ^g to cancel - TAB switch case"
Expand Down

0 comments on commit 3d64b4c

Please sign in to comment.