luci-mod-admin-full: Fix DSL Stats display of dB statistics 2026/head
authorAlan Swanson <reiver@improbability.net>
Tue, 31 Jul 2018 21:37:47 +0000 (22:37 +0100)
committerAlan Swanson <reiver@improbability.net>
Sat, 4 Aug 2018 11:36:49 +0000 (12:36 +0100)
Line attenuation, signal attenuation, noise margin and aggregate transmit power really need to show
decimal digits. Fixes commit 88713f6 from issue #2003 due to excess changes from %s to %d.

modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm

index a56d904d9f11b980a2bca2e97b3ea283ce9bed92..29a03f2554527aa408a63d10f989a493e5d01185 100644 (file)
                                        '<%:Data Rate%>', '%s/s / %s/s'.format(info.dsl.data_rate_down_s, info.dsl.data_rate_up_s),
                                        '<%:Max. Attainable Data Rate (ATTNDR)%>', '%s/s / %s/s'.format(info.dsl.max_data_rate_down_s, info.dsl.max_data_rate_up_s),
                                        '<%:Latency%>', '%s / %s'.format(info.dsl.latency_num_down, info.dsl.latency_num_up),
-                                       '<%:Line Attenuation (LATN)%>', '%d dB / %d dB'.format(info.dsl.line_attenuation_down, info.dsl.line_attenuation_up),
-                                       '<%:Signal Attenuation (SATN)%>', '%d dB / %d dB'.format(info.dsl.signal_attenuation_down, info.dsl.signal_attenuation_up),
-                                       '<%:Noise Margin (SNR)%>', '%d dB / %d dB'.format(info.dsl.noise_margin_down, info.dsl.noise_margin_up),
-                                       '<%:Aggregate Transmit Power(ACTATP)%>', '%d dB / %d dB'.format(info.dsl.actatp_down, info.dsl.actatp_up),
+                                       '<%:Line Attenuation (LATN)%>', '%.1f dB / %.1f dB'.format(info.dsl.line_attenuation_down, info.dsl.line_attenuation_up),
+                                       '<%:Signal Attenuation (SATN)%>', '%.1f dB / %.1f dB'.format(info.dsl.signal_attenuation_down, info.dsl.signal_attenuation_up),
+                                       '<%:Noise Margin (SNR)%>', '%.1f dB / %.1f dB'.format(info.dsl.noise_margin_down, info.dsl.noise_margin_up),
+                                       '<%:Aggregate Transmit Power(ACTATP)%>', '%.1f dB / %.1f dB'.format(info.dsl.actatp_down, info.dsl.actatp_up),
                                        '<%:Forward Error Correction Seconds (FECS)%>', '%d / %d'.format(info.dsl.errors_fec_near, info.dsl.errors_fec_far),
                                        '<%:Errored seconds (ES)%>', '%d / %d'.format(info.dsl.errors_es_near, info.dsl.errors_es_far),
                                        '<%:Severely Errored Seconds (SES)%>', '%d / %d'.format(info.dsl.errors_ses_near, info.dsl.errors_ses_far),