Giter VIP home page Giter VIP logo

Comments (5)

commonquail avatar commonquail commented on May 1, 2024

The data type should be JSON.

from linux-dash.

vernes avatar vernes commented on May 1, 2024

Does it work for you?
In my case OS and Hostname remain empty, because data couldn't be inserted.

function generate_os_data(url, element){
        $.get( url, function( data ) {
          $(element).text(data);
        } );
    }

$.get is automatically converting data to Object and $(element).text(data); doesn't work.

Tested in latest Firefox and Chromium

from linux-dash.

commonquail avatar commonquail commented on May 1, 2024

No, I mean it should be JSON, not HTML. JSON is natively supported by jQuery; it will be automatically sanitized. I'm guessing jQuery is able to infer the content type (I don't remember and can't test right now) and transforms the data automatically, which is what's causing your problem. The solution isn't to change the data type but to treat the incoming data as a JSON object.

Edit: It looks like data isn't being encoded as JSON. I suppose that's the real culprit. Is this a problem elsewhere?

from linux-dash.

vernes avatar vernes commented on May 1, 2024

Yes, that's probably it. I could try to fix it when I get home. I didn't see the problem anywhere else...

from linux-dash.

tariqbuilds avatar tariqbuilds commented on May 1, 2024

Good catch guys. I believe with PR #50 by @vernes , this is now addressed.

from linux-dash.

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.