]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stats: make stats_dump_sv_stats() use the stats field for HTML
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Jan 2016 18:48:21 +0000 (19:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Mar 2016 16:08:04 +0000 (17:08 +0100)
commit164d4a9e73042cad5928532cf5ca877a247ecf71
tree383ac05985f35f40eef9d227908404ef9b746cf5
parent2b96cf1292a4f4dc559a8b2ecbc64a8621f4c700
MEDIUM: stats: make stats_dump_sv_stats() use the stats field for HTML

Here we still have a huge amount of stuff to extract from the HTML code
and even from the caller. Indeed, the calling function computes the
server state and prepares a color code that will be used to determine
what style to use. The operations needed to decide what field to present
or not depend a lot on the server's state, admin state, health value,
rise and fall etc... all of which are not easily present in the table.

We also have to check the reference's values for all of the above.

There are also a number of differences between the CSV and HTML outputs :
  - CSV always reports check duration, HTML only if not zero
  - regarding last_change, CSV always report the server's while the HTML
    considers either the server's or the reference based on the admin state.
  - agent and health are separate in the CSV but mixed in the HTML.
  - too few info on agent anyway.

After careful code inspection it happens that both sv->last_change and
ref->last_change are identical and can both derive from [LASTCHG].

Also, the following info are missing from the array to complete the HTML
code :
  - cookie, address, status description, check-in-progress, srv->admin

At least for now it still works but a lot of info now need to be added.
src/dumpstats.c