Changeset 489

Show
Ignore:
Timestamp:
03/13/08 00:07:58 (10 months ago)
Author:
padams
Message:

adding specific dashcountsby month metric
fixing last_thirty days period constraints
fixing dashboard trend graph

Location:
trunk
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/base/graphDashboardTrend.php

    r342 r489  
    5656                                                'is_browser' => 1, 
    5757                                                'is_robot'      => 0), 
    58                                         'groupby'                       => array('day'), 
     58                                         
    5959                                        'order'                         => 'ASC' 
    6060                                        )); 
    6161                 
     62         
    6263                //Graph params 
    6364 
  • trunk/modules/base/metrics/dashCoreByDay.php

    r241 r489  
    5252                $this->params['use_summary'] = true; 
    5353                 
     54                $this->params['groupby'] = array('day', 'month'); 
     55 
    5456                $this->params['orderby'] = array('year', 'month', 'day'); 
    5557                 
  • trunk/modules/base/reportDashboard.php

    r482 r489  
    6161 
    6262                        case "this_year": 
    63                                 $data['core_metrics_data'] = $api->getMetric('base.dashCoreByDay', array( 
     63                                $data['core_metrics_data'] = $api->getMetric('base.dashCoreByMonth', array( 
    6464                                 
    65                                         'constraints'           => array('site_id'      => $this->params['site_id']), 
    66                                         'groupby'                       => array('month') 
     65                                        'constraints'           => array('site_id'      => $this->params['site_id']) 
    6766                                 
    6867                                )); 
     
    7473                         
    7574                                        'constraints'           => array('site_id'      => $this->params['site_id']), 
    76                                         'groupby'                       => array('day') 
     75                                        'order'                         => ASC 
    7776                                 
    7877                                )); 
     
    8685                 
    8786                )); 
    88                  
    89                 //print_r($data['summary_stats_data'] ); 
    9087 
    9188                $data['latest_visits'] = $api->getMetric('base.latestVisits', array( 
  • trunk/owa_metric.php

    r396 r489  
    220220                        case "last_thirty_days": 
    221221                                 
    222                                 $bound = mktime(23, 59, 59, $this->time_now['month'], $this->time_now['day'], $this->time_now['year']) - 3600*24*30; 
    223  
    224                                 $this->params['constraints']['timestamp'] = array('operator' => '>=', 'value' => $bound); 
     222                                $end = mktime(0, 0, 0, $this->time_now['month'], $this->time_now['day']+1, $this->time_now['year']); 
     223                                 
     224                                $start = mktime(0, 0, 0, $this->time_now['month'], $this->time_now['day']-29, $this->time_now['year']); 
     225                                //$start = $end - 3600*24*29; 
     226                                //$this->params['constraints']['timestamp'] = array('operator' => '>=', 'value' => $bound); 
     227                                 
     228                                $this->params['constraints']['timestamp'] = array('operator' => 'BETWEEN', 'start' => $start, 'end' => $end); 
     229 
    225230                                 
    226231                                break;