5 var callLuciDSLStatus = rpc.declare({
7 method: 'getDSLStatus',
11 function renderbox(dsl) {
12 return E('div', { class: 'ifacebox' }, [
13 E('div', { class: 'ifacebox-head center ' + ((dsl.line_state === 'UP') ? 'active' : '') },
14 E('strong', _('DSL Status'))),
15 E('div', { class: 'ifacebox-body left' }, [
16 L.itemlist(E('span'), [
17 _('Line State'), '%s [0x%x]'.format(dsl.line_state, dsl.line_state_detail),
18 _('Line Mode'), dsl.line_mode_s || '-',
19 _('Line Uptime'), dsl.line_uptime_s || '-',
20 _('Annex'), dsl.annex_s || '-',
21 _('Profile'), dsl.profile_s || '-',
22 _('Data Rate'), '%s/s / %s/s'.format(dsl.data_rate_down_s, dsl.data_rate_up_s),
23 _('Max. Attainable Data Rate (ATTNDR)'), '%s/s / %s/s'.format(dsl.max_data_rate_down_s, dsl.max_data_rate_up_s),
24 _('Latency'), '%s / %s'.format(dsl.latency_num_down, dsl.latency_num_up),
25 _('Line Attenuation (LATN)'), '%.1f dB / %.1f dB'.format(dsl.line_attenuation_down, dsl.line_attenuation_up),
26 _('Signal Attenuation (SATN)'), '%.1f dB / %.1f dB'.format(dsl.signal_attenuation_down, dsl.signal_attenuation_up),
27 _('Noise Margin (SNR)'), '%.1f dB / %.1f dB'.format(dsl.noise_margin_down, dsl.noise_margin_up),
28 _('Aggregate Transmit Power (ACTATP)'), '%.1f dB / %.1f dB'.format(dsl.actatp_down, dsl.actatp_up),
29 _('Forward Error Correction Seconds (FECS)'), '%d / %d'.format(dsl.errors_fecs_near, dsl.errors_fecs_far),
30 _('Errored seconds (ES)'), '%d / %d'.format(dsl.errors_es_near, dsl.errors_es_far),
31 _('Severely Errored Seconds (SES)'), '%d / %d'.format(dsl.errors_ses_near, dsl.errors_ses_far),
32 _('Loss of Signal Seconds (LOSS)'), '%d / %d'.format(dsl.errors_loss_near, dsl.errors_loss_far),
33 _('Unavailable Seconds (UAS)'), '%d / %d'.format(dsl.errors_uas_near, dsl.errors_uas_far),
34 _('Header Error Code Errors (HEC)'), '%d / %d'.format(dsl.errors_hec_near, dsl.errors_hec_far),
35 _('Non Pre-emptive CRC errors (CRC_P)'), '%d / %d'.format(dsl.errors_crc_p_near, dsl.errors_crc_p_far),
36 _('Pre-emptive CRC errors (CRCP_P)'), '%d / %d'.format(dsl.errors_crcp_p_near, dsl.errors_crcp_p_far),
37 _('ATU-C System Vendor ID'), dsl.atuc_vendor_id,
38 _('Power Management Mode'), dsl.power_mode_s
44 return baseclass.extend({
48 return L.resolveDefault(callLuciDSLStatus(), {});
51 render: function(dsl) {
55 return E('div', { 'id': 'dsl_status_table', 'class': 'network-status-table' }, renderbox(dsl));