remove one option
This commit is contained in:
@@ -100,27 +100,7 @@ class GPONDashboard {
|
|||||||
this.setElementText('pon-mode', data.pon_mode);
|
this.setElementText('pon-mode', data.pon_mode);
|
||||||
this.setElementText('lan-mode', data.lan_mode);
|
this.setElementText('lan-mode', data.lan_mode);
|
||||||
this.setElementText('olt-vendor-info', data.olt_vendor_info);
|
this.setElementText('olt-vendor-info', data.olt_vendor_info);
|
||||||
this.setElementText('olt-version-info', data.olt_version_info);
|
this.setElementText('olt-version-info', data.olt_version_info);
|
||||||
|
|
||||||
const connTimeElem = document.getElementById('connection-time');
|
|
||||||
if (connTimeElem) {
|
|
||||||
if (data.connection_time) {
|
|
||||||
connTimeElem.textContent = data.connection_time;
|
|
||||||
} else if (data.uptime && data.uptime > 0) {
|
|
||||||
const seconds = parseInt(data.uptime);
|
|
||||||
const days = Math.floor(seconds / 86400);
|
|
||||||
const hours = Math.floor((seconds % 86400) / 3600);
|
|
||||||
const minutes = Math.floor((seconds % 3600) / 60);
|
|
||||||
let connTime = '';
|
|
||||||
if (days > 0) connTime += days + 'd ';
|
|
||||||
if (hours > 0 || days > 0) connTime += hours + 'h ';
|
|
||||||
connTime += minutes + 'm';
|
|
||||||
connTimeElem.textContent = connTime.trim();
|
|
||||||
} else {
|
|
||||||
connTimeElem.textContent = '--';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setElementText('rx-packets', (data.rx_packets || 0).toLocaleString('en-US'));
|
this.setElementText('rx-packets', (data.rx_packets || 0).toLocaleString('en-US'));
|
||||||
this.setElementText('tx-packets', (data.tx_packets || 0).toLocaleString('en-US'));
|
this.setElementText('tx-packets', (data.tx_packets || 0).toLocaleString('en-US'));
|
||||||
this.setElementText('fec-corrected', (data.fec_corrected || 0).toLocaleString('en-US'));
|
this.setElementText('fec-corrected', (data.fec_corrected || 0).toLocaleString('en-US'));
|
||||||
|
|||||||
@@ -158,7 +158,6 @@
|
|||||||
<tr><td class="text-muted border-0">OLT Version:</td><td class="border-0 fw-semibold" id="olt-version-info">--</td></tr>
|
<tr><td class="text-muted border-0">OLT Version:</td><td class="border-0 fw-semibold" id="olt-version-info">--</td></tr>
|
||||||
<tr><td class="text-muted border-0">OLT Mode:</td><td class="border-0 fw-semibold" id="olt-mode">--</td></tr>
|
<tr><td class="text-muted border-0">OLT Mode:</td><td class="border-0 fw-semibold" id="olt-mode">--</td></tr>
|
||||||
<tr><td class="text-muted border-0">OMCC Version:</td><td class="border-0 fw-semibold font-monospace" id="omcc-version">--</td></tr>
|
<tr><td class="text-muted border-0">OMCC Version:</td><td class="border-0 fw-semibold font-monospace" id="omcc-version">--</td></tr>
|
||||||
<tr><td class="text-muted border-0">Connection Time:</td><td class="border-0 fw-semibold" id="connection-time">--</td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user