pl063/weather-station

View on GitHub
web_interface/static/scripts/logsChart.js

Summary

Maintainability
A
0 mins
Test Coverage

Function main has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Invalid

     async function main() {
      //get entries for today
        await fetch("/logs/entries")
        .then(response=>response.json())
        .then( function drawData(data) {
Severity: Minor
Found in web_interface/static/scripts/logsChart.js - About 1 hr to fix

    Function drawData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Invalid

            .then( function drawData(data) {
              let entries = JSON.parse(data);
              console.log(entries)
              new Chart(
                document.getElementById("chart"), //context for the chart
    Severity: Minor
    Found in web_interface/static/scripts/logsChart.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status