summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/htdocs/luci-static
diff options
context:
space:
mode:
authorJan Hoffmann <jan@3e8.eu>2023-02-09 22:30:49 +0100
committerJan Hoffmann <jan@3e8.eu>2023-02-09 22:33:55 +0100
commite3950b5eeb7b600d28cb772afda865a6060c4ac4 (patch)
tree1ed94dc2c4a4060c6c6caeb715ae43c42684b7a6 /modules/luci-mod-status/htdocs/luci-static
parent3f9d47f97648974b5fd138a3996d7c8841015840 (diff)
luci-mod-status: reduce DSL information shown in overview.
As there is now a page in luci-mod-dsl that shows detailed DSl status, it is no longer necessary to have the entire information in the overview page. Only show the most important data on the overview instead. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Diffstat (limited to 'modules/luci-mod-status/htdocs/luci-static')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js62
1 files changed, 1 insertions, 61 deletions
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 785fb773ec..3482a9fd08 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,24 +9,11 @@ var callDSLMetrics = rpc.declare({
expect: { '': {} }
});
-function format_on_off(val) {
- return val ? _('on') : _('off');
-}
-
-function format_latency(val) {
- return '%.2f ms'.format(val / 1000);
-}
-
function format_values(format, val1, val2) {
var val1Str = (val1 != null) ? format.format(val1) : '-';
var val2Str = (val2 != null) ? format.format(val2) : '-';
return val1Str + ' / ' + val2Str;
}
-function format_values_func(func, val1, val2) {
- var val1Str = (val1 != null) ? func(val1) : '-';
- var val2Str = (val2 != null) ? func(val2) : '-';
- return val1Str + ' / ' + val2Str;
-}
function renderbox(dsl) {
return E('div', { class: 'ifacebox' }, [
@@ -37,57 +24,10 @@ function renderbox(dsl) {
_('Line State'), dsl.state || '-',
_('Line Mode'), dsl.mode || '-',
_('Line Uptime'), '%t'.format(dsl.uptime),
- _('Annex'), dsl.annex || '-'
]),
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),
- _('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),
- _('Signal Attenuation (SATN)'), format_values('%.1f dB', dsl.downstream.satn, dsl.upstream.satn),
- _('Noise Margin (SNRM)'), format_values('%.1f dB', dsl.downstream.snr, dsl.upstream.snr),
- _('Aggregate Transmit Power (ACTATP)'), format_values('%.1f dB', dsl.downstream.actatp, dsl.upstream.actatp)
- ]),
- L.itemlist(E('span'), [
- _('Forward Error Correction Seconds (FECS)'), format_values('%d', dsl.errors.near.fecs, dsl.errors.far.fecs),
- _('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),
- _('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),
- _('PTM Non Pre-emptive CRC Errors (CRC-P)'), format_values('%d', dsl.errors.near.crc_p, dsl.errors.far.crc_p),
- _('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'), [
- _('Power Management Mode'), dsl.power_state
+ _('Noise Margin'), format_values('%.1f dB', dsl.downstream.snr, dsl.upstream.snr),
])
])
]);