gree / Orion

126 stars 22 forks source link

Can´t create a new dashboard #9

Closed biancalana closed 11 years ago

biancalana commented 11 years ago

Hi !

I´ve just installed Orion following the readme file, I can do the discovery but when I access the system a click in "Create Dashboard" nothing is displayed... I´ve also tried to raise log_threshold to 4 in application/config/config.php but nothing is logged... Orion

Can you help me to debug ?

karankurani commented 11 years ago

Hi biancalana,

Can you paste the last 50 - 100 lines in the file /tmp/orion-[date].log?

biancalana commented 11 years ago

DEBUG 2013-03-01 19:10:54 - - cache.php - in repopulate DEBUG 2013-03-01 19:10:54 - - graphitemodel.php - Skipping carbon.agents.sid-a.avgUpdateTime because it contains carbon DEBUG 2013-03-01 19:11:48 - - graphitemodel.php - Skipping carbon.agents.sid-a.cache. because it contains carbon DEBUG 2013-03-01 19:11:48 - - graphitemodel.php - Skipping carbon.agents.sid-a.committedPoints because it contains carbon DEBUG 2013-03-01 19:11:49 - - graphitemodel.php - Skipping carbon.agents.sid-a.cpuUsage because it contains carbon DEBUG 2013-03-01 19:11:49 - - graphitemodel.php - Skipping carbon.agents.sid-a.creates because it contains carbon DEBUG 2013-03-01 19:11:52 - - graphitemodel.php - Skipping carbon.agents.sid-a.errors because it contains carbon DEBUG 2013-03-01 19:11:56 - - graphitemodel.php - Skipping carbon.agents.sid-a.metricsReceived because it contains carbon DEBUG 2013-03-01 19:11:58 - - graphitemodel.php - Skipping carbon.agents.sid-a.pointsPerUpdate because it contains carbon DEBUG 2013-03-01 19:12:03 - - graphitemodel.php - Skipping carbon.agents.sid-a.updateOperations because it contains carbon DEBUG 2013-03-01 19:12:03 - - metricscachemodel.php - get_metrics() is called for MetricsCacheModel DEBUG 2013-03-01 19:12:41 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:12:43 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:12:45 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:16:14 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:16:16 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:18:41 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:18:44 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:20:10 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:20:15 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:20:17 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:20:20 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:23:54 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:23:56 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:23:58 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:24:00 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:24:01 - - categorymodel.php - get_all_categories() is called for CategoryModel DEBUG 2013-03-01 19:27:27 - - categorymodel.php - get_all_categories() is called for CategoryModel

pcockwell commented 11 years ago

I'm also going to ask that you create a gist of your config file with any security credentials removed. I'd like to take a look and see some of the settings.

biancalana commented 11 years ago

I'm using the default orion.php basically changing DB config

https://gist.github.com/biancalana/0569bc53cb9bc40e2532

pcockwell commented 11 years ago

I'm going to assume in index.php (in the root folder) the ENVIRONMENT variable is set to 'development' and that you have populated the metrics (you can do so by visiting http://localhost/orion/index.php/cache/repopulate)? I don't think either of those are causing the issue but I want to make sure of a few things.

biancalana commented 11 years ago

Yes, you´re right. The ENVIRONMENT is set to development and I already populated metrics.

pcockwell commented 11 years ago

Hey - sorry about the bug. Right now we aren't quite sure what's causing the issue, so I'm going to ask you to help debug it with us if that's okay. What I'd like you to do is open the page in Google Chrome with Chrome Developer Tools open. You can open them by right clicking on the page, and clicking "Inspect Element". Once you have the inspector open, go to the "Console" tab, and reload the page. Please paste any error messages here. Then navigate to the "Network" tab and take note of any error responses listed there. If you could get us that information, it would be really helpful.

Thanks.

luup2k commented 11 years ago

Hi, i'm having the same issue, no errors found into Network & Console TAB(Chrome Devloper Tool) but in the main HTML i found the next "error"...


   <div class="span7">
        <div class="page-header">
            <h2 id="graph_title">Select a category and dashboard above</h2>
            <div id="server-error" class="alert alert-error"></div>
        </div>
    </div>

dbow commented 11 years ago

The presence of that "server-error" div in the HTML is expected: https://github.com/gree/Orion/blob/master/application/views/home.php#L79

It is only revealed if the server responds with an error code: https://github.com/gree/Orion/blob/master/css/style.css#L233 https://github.com/gree/Orion/blob/master/js/index.js#L530

You're not seeing it in the UI right?

dbow commented 11 years ago

I can repro this and it seems it's the create_dashboard controller in application/controllers/orion.php:

function create_dashboard($dashboard_id = null) {

    //Access with index.php/orion/create_dashboard/dashboard_id
    //Optional: dashboard_id via URL if you want to edit a specific dashboard

    if ( !$this->UserModel->has_permission($this->user->email, 'create') ){
        redirect('orion/index');
    }

That redirect keeps getting triggered for me (making it look like nothing is happening). I didn't set up any custom auth stuff - does the default user get created with full permissions? Any reason the user wouldn't have 'create' permission? (I also don't have other permissions to see, for example, the 'users' page).

luup2k commented 11 years ago

Yep, looks like nothing happens. and I don't use auth ( $config['AUTHENTICATION_METHOD'] ='NOAUTH' )

when you talk about user creation... i don't see that on the readme.md ¿?

pcockwell commented 11 years ago

User creation is done automatically on sign-in. Because we rely on outside forms of authentication (Google OAuth2 and the NOAuth helper) we don't actually store any user info beyond an email, if one is used by the authentication system - NOAuth doesn't user one, so the user table remains empty and 'Signing In' should create a user with full permissions for the sessions and simply not save it to the database.

karankurani commented 11 years ago

This is fixed now. Thank you Pat!