Skip to content

Commit

Permalink
Added --no-html-last-updated command line option.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Aug 31, 2016
1 parent 03cf277 commit 6b4e756
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ struct option long_opts[] = {
{"no-global-config" , no_argument , 0 , 0 } ,
{"no-progress" , no_argument , 0 , 0 } ,
{"no-tab-scroll" , no_argument , 0 , 0 } ,
{"no-html-last-updated" , no_argument , 0 , 0 } ,
{"origin" , required_argument , 0 , 0 } ,
{"output" , required_argument , 0 , 0 } ,
{"port" , required_argument , 0 , 0 } ,
Expand Down Expand Up @@ -169,6 +170,7 @@ cmd_help (void)
" --no-csv-summary - Disable summary metrics on the CSV output.\n"
" --no-progress - Disable progress metrics.\n"
" --no-tab-scroll - Disable scrolling through panels on TAB.\n"
" --no-html-last-updated - Hide HTML last updated field.\n"
"\n"

/* Server Options */
Expand Down Expand Up @@ -490,6 +492,10 @@ parse_long_opt (const char *name, const char *oarg)
if (!strcmp ("no-tab-scroll", name))
conf.no_tab_scroll = 1;

/* no html last updated field */
if (!strcmp ("no-html-last-updated", name))
conf.no_html_last_updated = 1;

/* specifies the path of the GeoIP City database file */
if (!strcmp ("geoip-city-data", name) || !strcmp ("geoip-database", name))
conf.geoip_database = oarg;
Expand Down
8 changes: 5 additions & 3 deletions src/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ print_html_body (FILE * fp, const char *now)
"<div class='page-header clearfix'>"
"<div class='pull-right'>"
"<h4>"
"<span class='label label-info'>"
"<span class='label label-info' style='display:%s'>"
"Last Updated: <span class='last-updated'>%s</span>"
"</span>"
"</h4>"
Expand All @@ -245,14 +245,16 @@ print_html_body (FILE * fp, const char *now)
"<i class='fa fa-bars nav-minibars'></i>"
"<i class='fa fa-circle nav-ws-status mini'></i>"
"</span>"
"</h1>"
"</h1>", conf.no_html_last_updated ? "none" : "block", now);

fprintf (fp,
"<div class='report-title'>%s</div>"
"</div>"
"<div class='wrap-general'></div>"
"<div class='wrap-panels'></div>"
"</div>"
"</div>"
"</div>", now, conf.html_report_title ? conf.html_report_title : "");
"</div>", conf.html_report_title ? conf.html_report_title : "");
fprintf (fp, "%s", tpls);
}

Expand Down
1 change: 1 addition & 0 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ typedef struct GConf_
int no_csv_summary; /* don't show overall metrics */
int no_progress; /* disable progress metrics */
int no_tab_scroll; /* don't scroll dashboard on tab */
int no_html_last_updated; /* don't show HTML last updated field */
int output_stdout; /* outputting to stdout */
int real_os; /* show real OSs */
int real_time_html; /* enable real-time HTML output */
Expand Down

0 comments on commit 6b4e756

Please sign in to comment.