0

I've just installed StatusWolf 0.8.8 on Ubuntu 12.04, running Apache 2.2.22 with PHP 5.4.23.

I had retrieved the latest Git source using:

git clone https://github.com/box/StatusWolf.git

and followed the installation instructions here:

https://github.com/box/StatusWolf/wiki/Installation

I can login, however am unable to create any graphs. While investigating, I found entries in the Apache log that have "/undefined/" in the URL path. For example, when I login, choose Dashboard, then select the menu item Dashboard / Add Widget / Graphing Widget, the following Apache access log entries are generated:

192.168.100.110:9653 192.168.100.102 - - [08/Jan/2014:13:27:09 -0800] "POST /undefined/api/get_saved_searches HTTP/1.1" 200 1755 "http://192.168.100.110:9653/dashboard" "Mozilla/5.0 (Windows NT 5.2; rv:14.0) Gecko/20100101 Firefox/14.0.1"
192.168.100.110:9653 192.168.100.102 - - [08/Jan/2014:13:27:09 -0800] "GET /undefined/app/js/lib/bootstrap-datetimepicker.js HTTP/1.1" 200 1755 "http://192.168.100.110:9653/dashboard" "Mozilla/5.0 (Windows NT 5.2; rv:14.0) Gecko/20100101 Firefox/14.0.1"

Notice the "/undefined/" prefix in both URL paths. This leads me to believe that the request is possibly being constructed by the GUI using an uninitialized variable. However, the return code in the log entry is 200, indicating that Apache did serve something.

My virtual host is defined as follows (using the sample from the installation instructions):

Listen 9653
<VirtualHost *:9653>
    DocumentRoot /var/www/StatusWolf/
    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>
</VirtualHost>

Is this a problem with the .htaccess rewrite rules?

Where else should I look for configuration issues?

Thanks for any assistance!

EDIT

I modified index.php to log the URI just before the SWRouter object is instantiated:

error_log("Instantiating SWRouter with URI " . $_SERVER['REQUEST_URI'] . "\n", 3,
          "/var/log/statuswolf/log_2014-01-08.txt");
$router = new SWRouter($_SERVER['REQUEST_URI']);

This showed that the URI does indeed contain the "/undefined/" prefix, presumably as generated by the rewrite rules:

Instantiating SWRouter with URI /undefined/api/get_saved_searches
Instantiating SWRouter with URI /undefined/app/js/lib/bootstrap-datetimepicker.js

So there must be something going on with the web server configuration and the rewrite rules. I'll continue to investigate.

1 Answer 1

2

I also posted this question to StatusWolf's GitHub site, and the developer just got back to me. The cause of the problem is that I'm using a very old browser:

StatusWolf is using 'window.location.origin' in the widget javascript to build the URL for loading files and making API calls. You're using an older version of Firefox (14.0.1, current is 26), I've just confirmed that the version you're using doesn't support window.location.origin, hence the variable storing the URL internally in StatusWolf has that as "undefined". Anyway you could try with Chrome, or update to a newer Firefox?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .