diff --git a/front-generator/template/common/monitoring-methods.js.j2 b/front-generator/template/common/monitoring-methods.js.j2 index b059c93..589cabf 100644 --- a/front-generator/template/common/monitoring-methods.js.j2 +++ b/front-generator/template/common/monitoring-methods.js.j2 @@ -29,8 +29,8 @@ this.statRx.freq_search_lock = vals["state"]["rx"]["freq_search_lock"] this.statRx.afc_lock = vals["state"]["rx"]["afc_lock"] this.statRx.pkt_sync = vals["state"]["rx"]["pkt_sync"] - this.statRx.snr = vals["state"]["rx"]["snr"] - this.statRx.rssi = vals["state"]["rx"]["rssi"] + this.statRx.snr = Math.round(vals["state"]["rx"]["snr"] * 10) / 10 + this.statRx.rssi = Math.round(vals["state"]["rx"]["rssi"] * 10) / 10 this.statRx.modcod = modcodToStr(vals["state"]["rx"]["modcod"]) this.statRx.frameSizeNormal = vals["state"]["rx"]["frameSizeNormal"] this.statRx.isPilots = vals["state"]["rx"]["isPilots"] @@ -39,8 +39,8 @@ this.statRx.freqErrAcc = vals["state"]["rx"]["freqErrAcc"] this.statRx.inputSignalLevel = vals["state"]["rx"]["inputSignalLevel"] this.statRx.pllError = vals["state"]["rx"]["pllError"] - this.statRx.speedOnRxKbit = vals["state"]["rx"]["speedOnRxKbit"] - this.statRx.speedOnIifKbit = vals["state"]["rx"]["speedOnIifKbit"] + this.statRx.speedOnRxKbit = Math.round(vals["state"]["rx"]["speedOnRxKbit"] * 100) / 100 + this.statRx.speedOnIifKbit = Math.round(vals["state"]["rx"]["speedOnIifKbit"] * 100) / 100 this.statRx.packetsOk = vals["state"]["rx"]["packetsOk"] this.statRx.packetsBad = vals["state"]["rx"]["packetsBad"] this.statRx.packetsDummy = vals["state"]["rx"]["packetsDummy"] @@ -63,8 +63,8 @@ {% else %} this.statTx.state = vals["state"]["tx"]["state"] this.statTx.modcod = modcodToStr(vals["state"]["tx"]["modcod"]) - this.statTx.speedOnTxKbit = vals["state"]["tx"]["speedOnTxKbit"] - this.statTx.speedOnIifKbit = vals["state"]["tx"]["speedOnIifKbit"] + this.statTx.speedOnTxKbit = Math.round(vals["state"]["tx"]["speedOnTxKbit"] * 100) / 100 + this.statTx.speedOnIifKbit = Math.round(vals["state"]["tx"]["speedOnIifKbit"] * 100) / 100 this.statTx.centerFreq = vals["state"]["tx"]["centerFreq"] this.statTx.symSpeed = vals["state"]["tx"]["symSpeed"] {% endif %} @@ -91,9 +91,9 @@ } else { this.statOs.uptime = '?' } - this.statOs.load1 = vals["state"]["device"]["load1min"] - this.statOs.load5 = vals["state"]["device"]["load5min"] - this.statOs.load15 = vals["state"]["device"]["load15min"] + this.statOs.load1 = Math.round(vals["state"]["device"]["load1min"] * 100) / 100 + this.statOs.load5 = Math.round(vals["state"]["device"]["load5min"] * 100) / 100 + this.statOs.load15 = Math.round(vals["state"]["device"]["load15min"] * 100) / 100 this.statOs.totalram = vals["state"]["device"]["totalram"] this.statOs.freeram = vals["state"]["device"]["freeram"] }, diff --git a/static/main-scpc.html b/static/main-scpc.html index d2d7e3a..54a1b2e 100644 --- a/static/main-scpc.html +++ b/static/main-scpc.html @@ -974,8 +974,8 @@ this.statRx.freq_search_lock = vals["state"]["rx"]["freq_search_lock"] this.statRx.afc_lock = vals["state"]["rx"]["afc_lock"] this.statRx.pkt_sync = vals["state"]["rx"]["pkt_sync"] - this.statRx.snr = vals["state"]["rx"]["snr"] - this.statRx.rssi = vals["state"]["rx"]["rssi"] + this.statRx.snr = Math.round(vals["state"]["rx"]["snr"] * 10) / 10 + this.statRx.rssi = Math.round(vals["state"]["rx"]["rssi"] * 10) / 10 this.statRx.modcod = modcodToStr(vals["state"]["rx"]["modcod"]) this.statRx.frameSizeNormal = vals["state"]["rx"]["frameSizeNormal"] this.statRx.isPilots = vals["state"]["rx"]["isPilots"] @@ -984,8 +984,8 @@ this.statRx.freqErrAcc = vals["state"]["rx"]["freqErrAcc"] this.statRx.inputSignalLevel = vals["state"]["rx"]["inputSignalLevel"] this.statRx.pllError = vals["state"]["rx"]["pllError"] - this.statRx.speedOnRxKbit = vals["state"]["rx"]["speedOnRxKbit"] - this.statRx.speedOnIifKbit = vals["state"]["rx"]["speedOnIifKbit"] + this.statRx.speedOnRxKbit = Math.round(vals["state"]["rx"]["speedOnRxKbit"] * 100) / 100 + this.statRx.speedOnIifKbit = Math.round(vals["state"]["rx"]["speedOnIifKbit"] * 100) / 100 this.statRx.packetsOk = vals["state"]["rx"]["packetsOk"] this.statRx.packetsBad = vals["state"]["rx"]["packetsBad"] this.statRx.packetsDummy = vals["state"]["rx"]["packetsDummy"] @@ -1022,9 +1022,9 @@ } else { this.statOs.uptime = '?' } - this.statOs.load1 = vals["state"]["device"]["load1min"] - this.statOs.load5 = vals["state"]["device"]["load5min"] - this.statOs.load15 = vals["state"]["device"]["load15min"] + this.statOs.load1 = Math.round(vals["state"]["device"]["load1min"] * 100) / 100 + this.statOs.load5 = Math.round(vals["state"]["device"]["load5min"] * 100) / 100 + this.statOs.load15 = Math.round(vals["state"]["device"]["load15min"] * 100) / 100 this.statOs.totalram = vals["state"]["device"]["totalram"] this.statOs.freeram = vals["state"]["device"]["freeram"] }, diff --git a/static/main-shps.html b/static/main-shps.html index 90bd164..13a1c82 100644 --- a/static/main-shps.html +++ b/static/main-shps.html @@ -633,8 +633,8 @@ this.statRx.freq_search_lock = vals["state"]["rx"]["freq_search_lock"] this.statRx.afc_lock = vals["state"]["rx"]["afc_lock"] this.statRx.pkt_sync = vals["state"]["rx"]["pkt_sync"] - this.statRx.snr = vals["state"]["rx"]["snr"] - this.statRx.rssi = vals["state"]["rx"]["rssi"] + this.statRx.snr = Math.round(vals["state"]["rx"]["snr"] * 10) / 10 + this.statRx.rssi = Math.round(vals["state"]["rx"]["rssi"] * 10) / 10 this.statRx.modcod = modcodToStr(vals["state"]["rx"]["modcod"]) this.statRx.frameSizeNormal = vals["state"]["rx"]["frameSizeNormal"] this.statRx.isPilots = vals["state"]["rx"]["isPilots"] @@ -643,16 +643,16 @@ this.statRx.freqErrAcc = vals["state"]["rx"]["freqErrAcc"] this.statRx.inputSignalLevel = vals["state"]["rx"]["inputSignalLevel"] this.statRx.pllError = vals["state"]["rx"]["pllError"] - this.statRx.speedOnRxKbit = vals["state"]["rx"]["speedOnRxKbit"] - this.statRx.speedOnIifKbit = vals["state"]["rx"]["speedOnIifKbit"] + this.statRx.speedOnRxKbit = Math.round(vals["state"]["rx"]["speedOnRxKbit"] * 100) / 100 + this.statRx.speedOnIifKbit = Math.round(vals["state"]["rx"]["speedOnIifKbit"] * 100) / 100 this.statRx.packetsOk = vals["state"]["rx"]["packetsOk"] this.statRx.packetsBad = vals["state"]["rx"]["packetsBad"] this.statRx.packetsDummy = vals["state"]["rx"]["packetsDummy"] this.statTx.state = vals["state"]["tx"]["state"] this.statTx.modcod = modcodToStr(vals["state"]["tx"]["modcod"]) - this.statTx.speedOnTxKbit = vals["state"]["tx"]["speedOnTxKbit"] - this.statTx.speedOnIifKbit = vals["state"]["tx"]["speedOnIifKbit"] + this.statTx.speedOnTxKbit = Math.round(vals["state"]["tx"]["speedOnTxKbit"] * 100) / 100 + this.statTx.speedOnIifKbit = Math.round(vals["state"]["tx"]["speedOnIifKbit"] * 100) / 100 this.statTx.centerFreq = vals["state"]["tx"]["centerFreq"] this.statTx.symSpeed = vals["state"]["tx"]["symSpeed"] @@ -673,9 +673,9 @@ } else { this.statOs.uptime = '?' } - this.statOs.load1 = vals["state"]["device"]["load1min"] - this.statOs.load5 = vals["state"]["device"]["load5min"] - this.statOs.load15 = vals["state"]["device"]["load15min"] + this.statOs.load1 = Math.round(vals["state"]["device"]["load1min"] * 100) / 100 + this.statOs.load5 = Math.round(vals["state"]["device"]["load5min"] * 100) / 100 + this.statOs.load15 = Math.round(vals["state"]["device"]["load15min"] * 100) / 100 this.statOs.totalram = vals["state"]["device"]["totalram"] this.statOs.freeram = vals["state"]["device"]["freeram"] }, diff --git a/static/main-tdma.html b/static/main-tdma.html index 9f24eab..2d4a300 100644 --- a/static/main-tdma.html +++ b/static/main-tdma.html @@ -616,8 +616,8 @@ this.statRx.freq_search_lock = vals["state"]["rx"]["freq_search_lock"] this.statRx.afc_lock = vals["state"]["rx"]["afc_lock"] this.statRx.pkt_sync = vals["state"]["rx"]["pkt_sync"] - this.statRx.snr = vals["state"]["rx"]["snr"] - this.statRx.rssi = vals["state"]["rx"]["rssi"] + this.statRx.snr = Math.round(vals["state"]["rx"]["snr"] * 10) / 10 + this.statRx.rssi = Math.round(vals["state"]["rx"]["rssi"] * 10) / 10 this.statRx.modcod = modcodToStr(vals["state"]["rx"]["modcod"]) this.statRx.frameSizeNormal = vals["state"]["rx"]["frameSizeNormal"] this.statRx.isPilots = vals["state"]["rx"]["isPilots"] @@ -626,16 +626,16 @@ this.statRx.freqErrAcc = vals["state"]["rx"]["freqErrAcc"] this.statRx.inputSignalLevel = vals["state"]["rx"]["inputSignalLevel"] this.statRx.pllError = vals["state"]["rx"]["pllError"] - this.statRx.speedOnRxKbit = vals["state"]["rx"]["speedOnRxKbit"] - this.statRx.speedOnIifKbit = vals["state"]["rx"]["speedOnIifKbit"] + this.statRx.speedOnRxKbit = Math.round(vals["state"]["rx"]["speedOnRxKbit"] * 100) / 100 + this.statRx.speedOnIifKbit = Math.round(vals["state"]["rx"]["speedOnIifKbit"] * 100) / 100 this.statRx.packetsOk = vals["state"]["rx"]["packetsOk"] this.statRx.packetsBad = vals["state"]["rx"]["packetsBad"] this.statRx.packetsDummy = vals["state"]["rx"]["packetsDummy"] this.statTx.state = vals["state"]["tx"]["state"] this.statTx.modcod = modcodToStr(vals["state"]["tx"]["modcod"]) - this.statTx.speedOnTxKbit = vals["state"]["tx"]["speedOnTxKbit"] - this.statTx.speedOnIifKbit = vals["state"]["tx"]["speedOnIifKbit"] + this.statTx.speedOnTxKbit = Math.round(vals["state"]["tx"]["speedOnTxKbit"] * 100) / 100 + this.statTx.speedOnIifKbit = Math.round(vals["state"]["tx"]["speedOnIifKbit"] * 100) / 100 this.statTx.centerFreq = vals["state"]["tx"]["centerFreq"] this.statTx.symSpeed = vals["state"]["tx"]["symSpeed"] @@ -659,9 +659,9 @@ } else { this.statOs.uptime = '?' } - this.statOs.load1 = vals["state"]["device"]["load1min"] - this.statOs.load5 = vals["state"]["device"]["load5min"] - this.statOs.load15 = vals["state"]["device"]["load15min"] + this.statOs.load1 = Math.round(vals["state"]["device"]["load1min"] * 100) / 100 + this.statOs.load5 = Math.round(vals["state"]["device"]["load5min"] * 100) / 100 + this.statOs.load15 = Math.round(vals["state"]["device"]["load15min"] * 100) / 100 this.statOs.totalram = vals["state"]["device"]["totalram"] this.statOs.freeram = vals["state"]["device"]["freeram"] },