]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: add the HTML conversion for float types
authorWilly Tarreau <w@1wt.eu>
Sat, 8 May 2021 05:37:38 +0000 (07:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 8 May 2021 08:48:17 +0000 (10:48 +0200)
For the prometheus exporter, a new float type was added for the fields
and its conversion was added everywhere except for the HTML output.
Now that we have F2H() we can implement it for consistency.

src/stats.c

index df1e9be699d0f004c8cac319ac79210d8769cd65..b2bf8b2ab6ac88333d488836577648f90534aa10 100644 (file)
@@ -391,6 +391,7 @@ const char *field_to_html_str(const struct field *f)
        case FF_S64: return U2H(f->u.s64);
        case FF_U64: return U2H(f->u.u64);
        case FF_U32: return U2H(f->u.u32);
+       case FF_FLT: return F2H(f->u.flt);
        case FF_STR: return field_str(f, 0);
        case FF_EMPTY:
        default: