MEDIUM: stats: make stats_dump_fe_stats() use stats fields for HTML dump
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Jan 2016 14:26:40 +0000 (15:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Mar 2016 16:08:04 +0000 (17:08 +0100)
commitd72c917683c6b7cb5cab239a39a23460ca1756ee
treec0521914f207294865edc5a2423ea4e89036cdd1
parent9e561077e6fc9bc7ad0e8c3e5ded01e96c6cbf5a
MEDIUM: stats: make stats_dump_fe_stats() use stats fields for HTML dump

Now we avoid directly accessing the proxy and instead we pick the values
from the stats fields. This unveils that only a few fields are missing to
complete the job :
  - know whether or not the checkbox column needs to be displayed. This
    is not directly relevant to the stats but rather to the fact that the
    HTML dump is also a control interface. This doesn't need a field, just
    a function argument.
  - px->mode == HTTP (or px->mode as a string)
  - px->fe_counters.intercepted_req (stats and redirects ?)
  - px->fe_counters.cum_conn
  - px->fe_counters.cps_max
  - px->fe_conn_per_sec

All the last ones make sense in the CSV, so they'll have to be added as well.
src/dumpstats.c