What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

[RESOLVED] Skynet UI not Displaying Statistics

copperhead

Occasional Visitor
Was having issues with Skynet v7.6.3 not displaying any stats. The instructions elsewhere didn't help.

The problem began after tapping the Skynet > Update Stats button. Behind the scenes, this action creates / updates the file: /tmp/mnt/<USB>/skynet/webui/stats.js. The file is loaded within the Skynet tab from web location: /ext/skynet/stats.js.

stats.js contained the following line:
LabelTCConnHits.unshift('192.168.20.30', '192.168.20.101 (Roe's PC)');

The above is a Javascript method, unshift(''), using single quotes. Notice my device name has the label Roe's PC, also containing a single quote. This, obviously, is a JavaScript error. FTR, the browser console log also showed this line to be an error stopping JS execution. Within the Asus Web UI, I hopped over to Network Map > View List to modify the device name from Roe's PC to Roe PC. Next, I went back to Skynet to "Update Stats".

stats.js now shows:
LabelTCConnHits.unshift('192.168.20.30', '192.168.20.101 (Roe PC)');

The offending single quote is now removed. After this change, the Skynet stats page is working perfectly (see attached). Feel free to recreate the effect by modifying your Device Name to contain a single quote then head back to Skynet > "Update Stats". No consequences, afaik.


SUMMARY
  • Avoid using Single Quotes or Double Quotes within your Device Names.

  • To @Adamm : Skynet code needs to escape User Data before inserting it into JS or HTML to avoid browser syntax errors.
 

Attachments

  • 1.jpg
    1.jpg
    32.5 KB · Views: 42
  • 2.jpg
    2.jpg
    50.5 KB · Views: 41
Last edited:
If you use valid hostnames, you would not have an issue. A valid hostname can contain lowercase and uppercase letters (a-z, A-Z), numbers (0-9), and the hyphen (-) character; essentially, only ASCII letters, digits, and the hyphen are allowed, with no spaces permitted.
 
While these aren't valid hostnames, the webui allows you to set them (most clients don't). I've added additional filtering to data grabbed from nvram but this should probably be filtered when trying to assign the custom name by Asus/@RMerlin
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top