tariqbuilds / linux-dash

A beautiful web dashboard for Linux
https://afaqurk.github.io/linux-dash/
MIT License
10.4k stars 1.2k forks source link

Data loading for even in first starting server in node, but in the second starting server,Data display ( Delay display data in dash board) #499

Closed APIPLM closed 3 years ago

APIPLM commented 3 years ago

In my side, what I find is that as run node index.js --port 8080 --host 192.168.0.44, then seem like that data is loading for ever in each dash board in UI. But the interesting is that as stopping service CRTL + c, then start the service again node index.js --port 8080 --host 192.168.0.44, refresh the previous session in the browse, the data come out. If I start a new session of browse, then it is still always loading the data without actually data in UI. Did any one see this kind of the issue before?

APIPLM commented 3 years ago

As I tried again. Seem like it not about the first time or second time to start server. it is about time. Like it need time to refresh data dash board. Until the respond of server method respondWithData, Seeing the below, I added the output data to the console after the server respond. But there is no output in the console and in dash board it is always loading. If there is the output in the console, then dash broad of the data will show up. Seem like that the server do not respond.

    var respondWithData = function(code, output) {
        if (code === 0) 
        {
            res.send(output.toString())
            console.log('Linux Dash Server Started on--->2' + output.toString())

        }
        else 
        {
        res.sendStatus(500)
        }
    }

Not Sure what it is something block the data to send out in my side Someone can help a little bit. Thanks in advance.

APIPLM commented 3 years ago

One more thing, as running go version of the service sudo go run index.go it works without delay