[CodeFactor] Apply fixes

This commit is contained in:
codefactor-io 2024-04-13 15:27:53 +00:00
parent 27bf6177ea
commit 956fbf9fa9
No known key found for this signature in database
GPG key ID: B66B2D63282C190F
3 changed files with 37 additions and 24 deletions

View file

@ -34,9 +34,10 @@ function getMaidenheadDistance(dxGrid) {
//
}
}
function pushToPing(origin)
{
window.dispatchEvent(new CustomEvent("stationSelected", {bubbles:true, detail: origin }));
function pushToPing(origin) {
window.dispatchEvent(
new CustomEvent("stationSelected", { bubbles: true, detail: origin }),
);
}
</script>
<template>
@ -62,12 +63,15 @@ function pushToPing(origin)
<th scope="col" id="thSnr">SNR</th>
<!--<th scope="col">Off</th>-->
<th scope="col" id="thSnr">AFK?</th>
</tr>
</thead>
<tbody id="gridHeardStations">
<!--https://vuejs.org/guide/essentials/list.html-->
<tr v-for="item in state.heard_stations" :key="item.origin" @click="pushToPing(item.origin)">
<tr
v-for="item in state.heard_stations"
:key="item.origin"
@click="pushToPing(item.origin)"
>
<td>
{{ getDateTime(item.timestamp) }}
</td>

View file

@ -93,7 +93,10 @@ export async function getSerialDevices() {
}
export async function setModemBeacon(enabled = false, away_from_key = false) {
return await apiPost("/modem/beacon", { enabled: enabled, away_from_key: away_from_key});
return await apiPost("/modem/beacon", {
enabled: enabled,
away_from_key: away_from_key,
});
}
export async function sendModemCQ() {

View file

@ -33,7 +33,7 @@ import {
export async function loadAllData() {
// TODO: Make this working
let stateData = await getModemState();
console.log(stateData)
console.log(stateData);
getRemote();
getOverallHealth();
@ -185,13 +185,16 @@ export function eventDispatcher(data) {
100;
stateStore.arq_total_bytes =
data["arq-transfer-outbound"].received_bytes;
stateStore.arq_speed_list_timestamp.value =
toRaw(data["arq-transfer-outbound"].statistics.time_histogram);
stateStore.arq_speed_list_bpm.value =
toRaw(data["arq-transfer-outbound"].statistics.bpm_histogram);
stateStore.arq_speed_list_snr.value =
toRaw(data["arq-transfer-outbound"].statistics.snr_histogram);
//console.log(toRaw(stateStore.arq_speed_list_timestamp.value));
stateStore.arq_speed_list_timestamp.value = toRaw(
data["arq-transfer-outbound"].statistics.time_histogram,
);
stateStore.arq_speed_list_bpm.value = toRaw(
data["arq-transfer-outbound"].statistics.bpm_histogram,
);
stateStore.arq_speed_list_snr.value = toRaw(
data["arq-transfer-outbound"].statistics.snr_histogram,
);
//console.log(toRaw(stateStore.arq_speed_list_timestamp.value));
return;
case "ABORTING":
@ -273,16 +276,19 @@ export function eventDispatcher(data) {
100;
stateStore.arq_total_bytes =
data["arq-transfer-inbound"].received_bytes;
//console.log(data["arq-transfer-inbound"].statistics.time_histogram);
stateStore.arq_speed_list_timestamp.value =
toRaw(data["arq-transfer-inbound"].statistics.time_histogram);
stateStore.arq_speed_list_bpm.value =
toRaw(data["arq-transfer-inbound"].statistics.bpm_histogram);
stateStore.arq_speed_list_snr.value =
toRaw(data["arq-transfer-inbound"].statistics.snr_histogram);
console.log((stateStore.arq_speed_list_timestamp.value));
console.log((stateStore.arq_speed_list_bpm.value));
console.log((stateStore.arq_speed_list_snr.value));
//console.log(data["arq-transfer-inbound"].statistics.time_histogram);
stateStore.arq_speed_list_timestamp.value = toRaw(
data["arq-transfer-inbound"].statistics.time_histogram,
);
stateStore.arq_speed_list_bpm.value = toRaw(
data["arq-transfer-inbound"].statistics.bpm_histogram,
);
stateStore.arq_speed_list_snr.value = toRaw(
data["arq-transfer-inbound"].statistics.snr_histogram,
);
console.log(stateStore.arq_speed_list_timestamp.value);
console.log(stateStore.arq_speed_list_bpm.value);
console.log(stateStore.arq_speed_list_snr.value);
return;
case "ENDED":