From: Jan Hoffmann Date: Sat, 28 Jan 2023 18:13:55 +0000 (+0100) Subject: luci-mod-status: extend DSL metrics X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fpull%2F6224%2Fhead;p=project%2Fluci.git luci-mod-status: extend DSL metrics Add the following metrics: - Bitswap and rate adaptation status - Impulse noise protection (INP) - Retransmission status (G.INP) - Channel error counters (CV-C, FEC-C) - G.INP counters (MINEFTR, LEFTRS, rtx-tx, rtx-c, rtx-uc) - Modem chipset and firmware version Signed-off-by: Jan Hoffmann --- diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js index 7de3fa2515..785fb773ec 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js @@ -9,6 +9,10 @@ var callDSLMetrics = rpc.declare({ expect: { '': {} } }); +function format_on_off(val) { + return val ? _('on') : _('off'); +} + function format_latency(val) { return '%.2f ms'.format(val / 1000); } @@ -38,7 +42,16 @@ function renderbox(dsl) { L.itemlist(E('span'), [ _('Data Rate'), format_values('%1000.3mb/s', dsl.downstream.data_rate, dsl.upstream.data_rate), _('Max. Attainable Data Rate (ATTNDR)'), format_values('%1000.3mb/s', dsl.downstream.attndr, dsl.upstream.attndr), - _('Latency'), format_values_func(format_latency, dsl.downstream.interleave_delay, dsl.upstream.interleave_delay) + _('Min. Error-Free Throughput (MINEFTR)'), format_values('%1000.3mb/s', dsl.downstream.mineftr, dsl.upstream.mineftr) + ]), + L.itemlist(E('span'), [ + _('Bitswap'), format_values_func(format_on_off, dsl.downstream.bitswap, dsl.upstream.bitswap), + _('Rate Adaptation Mode'), format_values('%s', dsl.downstream.ra_mode, dsl.upstream.ra_mode) + ]), + L.itemlist(E('span'), [ + _('Latency'), format_values_func(format_latency, dsl.downstream.interleave_delay, dsl.upstream.interleave_delay), + _('Impulse Noise Protection (INP)'), format_values('%.1f symbols', dsl.downstream.inp, dsl.upstream.inp), + _('Retransmission (G.INP)'), format_values_func(format_on_off, dsl.downstream.retx, dsl.upstream.retx) ]), L.itemlist(E('span'), [ _('Line Attenuation (LATN)'), format_values('%.1f dB', dsl.downstream.latn, dsl.upstream.latn), @@ -51,7 +64,12 @@ function renderbox(dsl) { _('Errored Seconds (ES)'), format_values('%d', dsl.errors.near.es, dsl.errors.far.es), _('Severely Errored Seconds (SES)'), format_values('%d', dsl.errors.near.ses, dsl.errors.far.ses), _('Loss of Signal Seconds (LOSS)'), format_values('%d', dsl.errors.near.loss, dsl.errors.far.loss), - _('Unavailable Seconds (UAS)'), format_values('%d', dsl.errors.near.uas, dsl.errors.far.uas) + _('Unavailable Seconds (UAS)'), format_values('%d', dsl.errors.near.uas, dsl.errors.far.uas), + _('Seconds with Low Error-Free Throughput (LEFTRS)'), format_values('%d', dsl.errors.near.leftrs, dsl.errors.far.leftrs) + ]), + L.itemlist(E('span'), [ + _('Channel CRC Errors (CV-C)'), format_values('%d', dsl.errors.near.cv_c, dsl.errors.far.cv_c), + _('Channel Errors Corrected by FEC (FEC-C)'), format_values('%d', dsl.errors.near.fec_c, dsl.errors.far.fec_c) ]), L.itemlist(E('span'), [ _('ATM Header Error Code Errors (HEC)'), format_values('%d', dsl.errors.near.hec, dsl.errors.far.hec), @@ -59,6 +77,13 @@ function renderbox(dsl) { _('PTM Pre-emptive CRC Errors (CRCP-P)'), format_values('%d', dsl.errors.near.crcp_p, dsl.errors.far.crcp_p) ]), L.itemlist(E('span'), [ + _('Retransmitted DTUs (rtx-tx)'), format_values('%d', dsl.errors.far.tx_retransmitted, dsl.errors.near.tx_retransmitted), + _('Corrected DTUs (rtx-c)'), format_values('%d', dsl.errors.near.rx_corrected, dsl.errors.far.rx_corrected), + _('Uncorrected DTUs (rtx-uc)'), format_values('%d', dsl.errors.near.rx_uncorrected_protected, dsl.errors.far.rx_uncorrected_protected) + ]), + L.itemlist(E('span'), [ + _('Modem Chipset'), dsl.chipset || '-', + _('Modem Firmware'), dsl.firmware_version || '-', _('xTU-C Vendor ID'), dsl.atu_c.vendor || dsl.atu_c.vendor_id ]), L.itemlist(E('span'), [