tariqbuilds / linux-dash

A beautiful web dashboard for Linux

Home Page:https://afaqurk.github.io/linux-dash/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debian/Apache/PHP: Cannot leave Demo Mode

jaromic opened this issue · comments

Summary:

This issue is similar to #428 and #434, but reading those issues has not helped me.

My goal is to run linux-dash in Apache/PHP configuration. I tried pointing apache to both

  • the root of the work tree
  • the app directory (as suggested in the document linked in README.md)
  • the app/server directory (because the js for running the app in node configuration is there)

Either way, the result is the same - demo data is displayed instead of real data.

Steps to reproduce:

  • configure apache with document root /app (relative to the worktree root)
  • request / URL in the browser
  • look at gauges and boxes

Expected behavior:

  • gauges/boxes show data from my system

Actual behavior:

  • "Demo mode" is displayed in the headline
  • gauges/boxes show demo data (users and processes that do not exist on my machine)

Environment:

  • Debian 8.10
  • PHP 5.6.36 (run with mod_fcgid)
  • Apache 2.4.10
  • npm 3.10.10 (local installation in user home)
  • node v6.9.5 (local installation in user home)

Notes:

I also tried running the gulpfile as suggested in the other issues. It seems to block after this output (probably listening):

[13:02:31] Using gulpfile /home/php/environments/monitor.foxcraft.at/data/gulpfile.js
[13:02:31] Starting 'template-cache'...
[13:02:31] Starting 'generate-css-dist'...
[13:02:31] Starting 'watch'...
[13:02:31] Finished 'watch' after 41 ms
[13:02:31] Finished 'template-cache' after 186 ms
[13:02:31] Starting 'generate-js-dist'...
[13:02:31] Finished 'generate-css-dist' after 218 ms
[13:02:31] Finished 'generate-js-dist' after 607 ms
[13:02:31] Starting 'build'...
[13:02:31] Finished 'build' after 6.44 μs
[13:02:31] Starting 'default'...
[13:02:31] Finished 'default' after 2.29 μs

The shell API seems to return the correct JSON data (e.g. users). So the problem must be something rather straightforward somewhere in the JS.

commented

Same Problem.
i guess this project is little bit death ?

commented

Found the solution by carefully reading the docs (https://github.com/afaqurk/linux-dash#if-using-php) again:

...
2. Point your web server to app/ directory under linux-dash
...

So in my case, demo.js was picked up by accessing http://HOSTNAME/linux-dash/. Real data was shown by accessing http://HOSTNAME/linux-dash/app/

commented

I know but it doesn't work with PHP 7.2 or 7.3. No data is read.
the Dash version 1 runs ...

commented

i found the problem
The app/server/linux_json_api.sh need 744 chmod rights

@r0max solved the issue. I've pointed my webserver to / by accident and it loaded the demo data. changing to /app solved the issue.