Coder Social home page Coder Social logo

When an entry in the GMT dashboard has no data the API completely aborts and nothing is shown. We would at least like to see the data from the projects table about green-metrics-tool HOT 2 CLOSED

green-coding-solutions avatar green-coding-solutions commented on August 26, 2024
When an entry in the GMT dashboard has no data the API completely aborts and nothing is shown. We would at least like to see the data from the projects table

from green-metrics-tool.

Comments (2)

djesic avatar djesic commented on August 26, 2024

Project data lives in the projects table, but this data is obtained by the frontend by using the GET /v1/stats/single/{id} API call.
This API function calls an unexposed function get_project that gets this information and returns it as part of the stats response object.
The problem occurs when the stats table contains no measurements for this project, it returns a failure and doing so, it does not fetch any data about the project.

I am attempting to expose this get_project function on the API to make an independent call to it before getting notes and stats, and the API is returning 200 from the API docs and curl command, but failing when being called from the frontend.
Not finding the reason right now, could we please discuss this tomorrow?

I pushed my work here: https://github.com/green-coding-berlin/green-metrics-tool/tree/no_api_data_handling

from green-metrics-tool.

ArneTR avatar ArneTR commented on August 26, 2024

Pull request has been merged in #75

from green-metrics-tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.