Sync changes with simpleadmintest

This commit is contained in:
Cameron Thompson
2024-03-21 23:29:16 -04:00
parent e19dc87405
commit a3b4e40027

View File

@@ -256,28 +256,28 @@
},
};
}
// function getSignalData() {
// return {
// csqData: {},
// lastUpdate: new Date().toLocaleString(),
// getcsq() {
// fetch("/cgi-bin/get_csq")
// .then((res) => res.json())
// .then((data) => {
// this.csqData = data;
// this.lastUpdate = new Date(
// data.LASTUPDATE * 1000
// ).toLocaleString();
// });
// },
// init() {
// this.getcsq();
// setInterval(() => {
// this.getcsq();
// }, 30000);
// },
// };
// }
function getSignalData() {
return {
csqData: {},
lastUpdate: new Date().toLocaleString(),
getcsq() {
fetch("/cgi-bin/get_csq")
.then((res) => res.json())
.then((data) => {
this.csqData = data;
this.lastUpdate = new Date(
data.LASTUPDATE * 1000
).toLocaleString();
});
},
init() {
this.getcsq();
setInterval(() => {
this.getcsq();
}, 30000);
},
};
}
</script>
</body>
</html>