Changeset 508
- Timestamp:
- 10/22/08 02:12:03 (3 months ago)
- Location:
- trunk
- Files:
-
- 121 added
- 20 modified
-
modules/base/classes/pagination.php (added)
-
modules/base/classes/widget.php (modified) (5 diffs)
-
modules/base/dashboardTrendWidget.php (modified) (4 diffs)
-
modules/base/metrics/dashCoreByDay.php (modified) (3 diffs)
-
modules/base/metrics/dashCountsTraffic.php (modified) (2 diffs)
-
modules/base/processEvent.php (modified) (3 diffs)
-
modules/base/processRequest.php (modified) (2 diffs)
-
modules/base/report.php (modified) (2 diffs)
-
modules/base/reportDashboard.php (modified) (2 diffs)
-
modules/base/templates/generic_table.tpl (modified) (1 diff)
-
modules/base/templates/ofc.tpl (modified) (1 diff)
-
modules/base/templates/report_dashboard.tpl (modified) (1 diff)
-
modules/base/templates/sites.tpl (modified) (1 diff)
-
modules/base/templates/sparkline.tpl (added)
-
modules/base/templates/widget.tpl (modified) (2 diffs)
-
owa_controller.php (modified) (2 diffs)
-
owa_env.php (modified) (1 diff)
-
owa_metric.php (modified) (6 diffs)
-
owa_template.php (modified) (2 diffs)
-
owa_view.php (modified) (10 diffs)
-
public/css/owa.widgets.css (modified) (1 diff)
-
public/js/includes/jquery/tablesorter (added)
-
public/js/includes/jquery/tablesorter/addons (added)
-
public/js/includes/jquery/tablesorter/addons/pager (added)
-
public/js/includes/jquery/tablesorter/addons/pager/icons (added)
-
public/js/includes/jquery/tablesorter/addons/pager/icons/first.png (added)
-
public/js/includes/jquery/tablesorter/addons/pager/icons/last.png (added)
-
public/js/includes/jquery/tablesorter/addons/pager/icons/next.png (added)
-
public/js/includes/jquery/tablesorter/addons/pager/icons/prev.png (added)
-
public/js/includes/jquery/tablesorter/addons/pager/jquery.tablesorter.pager.css (added)
-
public/js/includes/jquery/tablesorter/addons/pager/jquery.tablesorter.pager.js (added)
-
public/js/includes/jquery/tablesorter/build (added)
-
public/js/includes/jquery/tablesorter/build.xml (added)
-
public/js/includes/jquery/tablesorter/build/js.jar (added)
-
public/js/includes/jquery/tablesorter/build/jsmin.js (added)
-
public/js/includes/jquery/tablesorter/build/min.js (added)
-
public/js/includes/jquery/tablesorter/build/pack.js (added)
-
public/js/includes/jquery/tablesorter/build/packer.js (added)
-
public/js/includes/jquery/tablesorter/build/ParseMaster.js (added)
-
public/js/includes/jquery/tablesorter/build/writeFile.js (added)
-
public/js/includes/jquery/tablesorter/changelog (added)
-
public/js/includes/jquery/tablesorter/docs (added)
-
public/js/includes/jquery/tablesorter/docs/assets (added)
-
public/js/includes/jquery/tablesorter/docs/assets/ajax-content.html (added)
-
public/js/includes/jquery/tablesorter/docs/css (added)
-
public/js/includes/jquery/tablesorter/docs/css/jq.css (added)
-
public/js/includes/jquery/tablesorter/docs/example-ajax.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-empty-table.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-extending-defaults.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-meta-headers.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-meta-parsers.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-meta-sort-list.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-option-debug.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-option-digits.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-option-sort-force.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-option-sort-key.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-option-sort-list.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-option-sort-order.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-option-text-extraction.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-options-headers.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-pager.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-parsers.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-trigger-sort.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-triggers.html (added)
-
public/js/includes/jquery/tablesorter/docs/example-widgets.html (added)
-
public/js/includes/jquery/tablesorter/docs/img (added)
-
public/js/includes/jquery/tablesorter/docs/img/external.png (added)
-
public/js/includes/jquery/tablesorter/docs/index.html (added)
-
public/js/includes/jquery/tablesorter/docs/js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/chili-1.8b.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/chili-1.8b.pack.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/cplusplus.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/cplusplus.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/csharp.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/csharp.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/css.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/css.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/delphi.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/delphi.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/html.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/html.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/java.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/java.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/javascript.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/javascript.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/jquery-1.1.2.pack.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/js-jquery (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/js-jquery/javascript.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/js-jquery/javascript.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/lotusscript.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/lotusscript.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/mysql.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/mysql.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/php.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/php.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/recipes.css (added)
-
public/js/includes/jquery/tablesorter/docs/js/chili/recipes.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/docs.js (added)
-
public/js/includes/jquery/tablesorter/docs/js/examples.js (added)
-
public/js/includes/jquery/tablesorter/jquery-latest.js (added)
-
public/js/includes/jquery/tablesorter/jquery.metadata.js (added)
-
public/js/includes/jquery/tablesorter/jquery.tablesorter.js (added)
-
public/js/includes/jquery/tablesorter/jquery.tablesorter.min.js (added)
-
public/js/includes/jquery/tablesorter/tests (added)
-
public/js/includes/jquery/tablesorter/tests/assets (added)
-
public/js/includes/jquery/tablesorter/tests/assets/ajax-content.html (added)
-
public/js/includes/jquery/tablesorter/tests/assets/css (added)
-
public/js/includes/jquery/tablesorter/tests/assets/css/default.css (added)
-
public/js/includes/jquery/tablesorter/tests/assets/css/jquery.tabs-ie.css (added)
-
public/js/includes/jquery/tablesorter/tests/assets/css/jquery.tabs.css (added)
-
public/js/includes/jquery/tablesorter/tests/assets/img (added)
-
public/js/includes/jquery/tablesorter/tests/assets/img/header-asc.png (added)
-
public/js/includes/jquery/tablesorter/tests/assets/img/header-bg.png (added)
-
public/js/includes/jquery/tablesorter/tests/assets/img/header-desc.png (added)
-
public/js/includes/jquery/tablesorter/tests/assets/img/small.gif (added)
-
public/js/includes/jquery/tablesorter/tests/assets/img/small_asc.gif (added)
-
public/js/includes/jquery/tablesorter/tests/assets/img/small_desc.gif (added)
-
public/js/includes/jquery/tablesorter/tests/assets/img/tab.png (added)
-
public/js/includes/jquery/tablesorter/tests/cell.metadata.html (added)
-
public/js/includes/jquery/tablesorter/tests/checkbox.html (added)
-
public/js/includes/jquery/tablesorter/tests/colspan.html (added)
-
public/js/includes/jquery/tablesorter/tests/demo.html (added)
-
public/js/includes/jquery/tablesorter/tests/index.html (added)
-
public/js/includes/jquery/tablesorter/tests/large.html (added)
-
public/js/includes/jquery/tablesorter/tests/metadata.html (added)
-
public/js/includes/jquery/tablesorter/tests/pager.html (added)
-
public/js/includes/jquery/tablesorter/themes (added)
-
public/js/includes/jquery/tablesorter/themes/blue (added)
-
public/js/includes/jquery/tablesorter/themes/blue/asc.gif (added)
-
public/js/includes/jquery/tablesorter/themes/blue/bg.gif (added)
-
public/js/includes/jquery/tablesorter/themes/blue/blue.zip (added)
-
public/js/includes/jquery/tablesorter/themes/blue/desc.gif (added)
-
public/js/includes/jquery/tablesorter/themes/blue/style.css (added)
-
public/js/includes/jquery/tablesorter/themes/green (added)
-
public/js/includes/jquery/tablesorter/themes/green/asc.png (added)
-
public/js/includes/jquery/tablesorter/themes/green/bg.png (added)
-
public/js/includes/jquery/tablesorter/themes/green/desc.png (added)
-
public/js/includes/jquery/tablesorter/themes/green/green.zip (added)
-
public/js/includes/jquery/tablesorter/themes/green/style.css (added)
-
public/js/owa.widgets.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/base/classes/widget.php
r504 r508 51 51 52 52 if (!array_key_exists('format', $this->params)): 53 $this->params['format'] = $this->default_format; 53 54 $this->params['format'] = $this->default_format; 55 56 else: 57 if (empty($this->params['format'])): 58 $this->params['format'] = $this->default_format; 59 endif; 54 60 endif; 55 61 … … 66 72 unset($this->data['params']['initial_view']); 67 73 endif; 68 74 $this->data['wrapper'] = $this->params['wrapper']; 69 75 $this->data['widget'] = $this->params['do']; 70 76 $this->data['do'] = $this->params['do']; 77 71 78 } 72 79 … … 76 83 return; 77 84 85 } 86 87 function setHeight($height) { 88 89 if (!array_key_exists('height', $this->params)): 90 $this->data['height'] = $height; 91 else: 92 $this->data['height'] = $this->params['height']; 93 endif; 94 95 if ($this->params['wrapper'] === true): 96 $this->data['outer_height'] = $this->data['height']; 97 $this->data['height'] = $this->data['height'] - 130; 98 endif; 99 100 return; 101 } 102 103 function setWidth($width) { 104 105 if (!array_key_exists('width', $this->params)): 106 $this->data['width'] = $width; 107 else: 108 $this->data['width'] = $this->params['width']; 109 endif; 110 111 if ($this->params['wrapper'] == true): 112 $this->data['outer_width'] = $this->data['width']; 113 $this->data['width'] = $this->data['width'] - 50; 114 115 endif; 116 117 return; 78 118 } 79 119 … … 113 153 if (!array_key_exists('width', $data)): 114 154 $data['params']['width'] = 300; 155 else: 156 $data['params']['width'] = $data['outer_width']; 115 157 endif; 116 158 117 if (!array_key_exists(' width', $data)):159 if (!array_key_exists('height', $data)): 118 160 $data['params']['height'] = 250; 161 else: 162 $data['params']['height'] = $data['outer_height']; 119 163 endif; 164 165 $this->_setLinkState(); 120 166 121 167 $this->body->set_template('widget.tpl'); … … 125 171 $this->body->set('title', $data['title']); 126 172 $this->body->set('widget_views', $data['widget_views']); 127 $this->body->set('do', $data['widget']); 173 $this->body->set('do', $data['widget']); 174 175 128 176 129 177 return; -
trunk/modules/base/dashboardTrendWidget.php
r504 r508 20 20 require_once(OWA_BASE_CLASSES_DIR.'owa_lib.php'); 21 21 require_once(OWA_BASE_CLASS_DIR.'widget.php'); 22 require_once(OWA_BASE_CLASSES_DIR.'owa_view.php');23 22 23 /** 24 * DashBoard Trend Widget Controller 25 * 26 * 27 */ 24 28 class owa_dashboardTrendWidgetController extends owa_widgetController { 25 29 26 30 function __construct($params) { 31 32 $this->default_format = 'graph'; 27 33 28 34 return parent::__construct($params); … … 38 44 // Set Title of the Widget 39 45 $this->data['title'] = 'Dashboard Trend'; 46 47 // set default dimensions 48 $this->setHeight(300); 49 $this->setWidth(800); 40 50 41 51 // enable formats … … 56 66 57 67 $this->data['view'] = 'base.openFlashChart'; 58 $this->data['height'] = $this->params['height'];59 $this->data['width'] = $this->params['width'];60 68 break; 61 69 … … 75 83 case 'table': 76 84 77 $m->setLimit(5); 85 // apply limit override 86 if (array_key_exists('limit', $this->params)): 87 $m->setLimit($this->params['limit']); 88 else: 89 $m->setLimit(5); 90 endif; 91 92 // set page number of results 93 if (array_key_exists('page', $this->params)): 94 $m->setPage($this->params['page']); 95 endif; 96 78 97 $results = $m->generate(); 98 79 99 $this->data['labels'] = $m->getLabels(); 80 100 $this->data['rows'] = $results; 81 101 $this->data['view'] = 'base.genericTable'; 102 103 // generate pagination array 104 $this->data['pagination'] = $m->getPagination(); 105 106 //print_r($this->data['pagination']); 82 107 break; 83 108 109 case 'sparkline': 110 111 $this->data['type'] = 'line'; 112 $this->data['view'] = 'base.sparkline'; 113 break; 114 case 'sparkline-image': 115 116 $this->data['view'] = 'base.sparklineLineGraph'; 117 break; 84 118 } 85 119 -
trunk/modules/base/metrics/dashCoreByDay.php
r502 r508 30 30 31 31 class owa_dashCoreByDay extends owa_metric { 32 33 var $limit = 10; 32 34 33 35 function owa_dashCoreByDay($params = null) { … … 42 44 43 45 $this->setLabels(array('Month', 'Day', 'Year', 'Unique Visitors', 'Sessions', 'Page Views')); 46 $this->page_results = true; 44 47 45 48 return; … … 49 52 function calculate() { 50 53 51 $ db = owa_coreAPI::dbSingleton();54 $this->db->selectFrom('owa_session', 'session'); 52 55 53 $db->selectFrom('owa_session', 'session'); 56 $this->db->selectColumn("session.month, 57 session.day, 58 session.year, 59 count(distinct session.visitor_id) as unique_visitors, 60 count(session.id) as sessions, 61 sum(session.num_pageviews) as page_views"); 62 63 $this->db->groupBy('day'); 64 $this->db->groupBy('month'); 65 $this->db->orderBy('year'); 66 $this->db->orderBy('month'); 67 $this->db->orderBy('day'); 54 68 55 $db->selectColumn("session.month, 56 session.day, 57 session.year, 58 count(distinct session.visitor_id) as unique_visitors, 59 count(session.id) as sessions, 60 sum(session.num_pageviews) as page_views"); 61 62 // pass constraints set by caller into where clause 63 $db->multiWhere($this->getConstraints()); 64 $db->groupBy('day'); 65 $db->groupBy('month'); 66 $db->orderBy('year'); 67 $db->orderBy('month'); 68 $db->orderBy('day'); 69 70 if (array_key_exists('limit', $this->params)): 71 $db->limit($this->params['limit']); 72 endif; 73 74 $ret = $db->getAllRows(); 69 $ret = $this->db->getAllRows(); 75 70 76 71 return $ret; -
trunk/modules/base/metrics/dashCountsTraffic.php
r501 r508 44 44 45 45 $db = owa_coreAPI::dbSingleton(); 46 46 47 $db->selectColumn("count(distinct session.visitor_id) as unique_visitors, 47 48 sum(session.is_new_visitor) as new_visitor, sum(session.is_repeat_visitor) as repeat_visitor, … … 59 60 60 61 return $ret; 61 62 63 /*64 65 $this->params['select'] = "count(distinct session.visitor_id) as unique_visitors,66 sum(session.is_new_visitor) as new_visitor, sum(session.is_repeat_visitor) as repeat_visitor,67 count(session.id) as sessions,68 sum(session.num_pageviews) as page_views ";69 70 $this->params['use_summary'] = true;71 72 $this->setTimePeriod($this->params['period']);73 74 $s = owa_coreAPI::entityFactory('base.session');75 76 $ref = owa_coreAPI::entityFactory('base.referer');77 78 $this->params['related_objs'] = array('referer_id' => $ref);79 80 return $s->query($this->params);81 */82 62 83 63 } -
trunk/modules/base/processEvent.php
r424 r508 58 58 59 59 // Pre process - default and standard properties 60 $this->pre ();60 $this->preProcess(); 61 61 62 62 $this->event->state = $this->params['caller']['event']; … … 76 76 * Must be called before all other event property setting functions 77 77 */ 78 function pre () {78 function preProcess() { 79 79 80 80 // set site id if not already set . Needed for GUID generation of event … … 141 141 } 142 142 143 function post () {143 function postProcess() { 144 144 145 145 //Clean Query Strings -
trunk/modules/base/processRequest.php
r463 r508 59 59 60 60 // Pre process - set default and standard event property names 61 $this->pre ();61 $this->preProcess(); 62 62 63 63 // Set event properties … … 110 110 111 111 // Post Process - cleanup after all properties are set 112 $this->post ();112 $this->postProcess(); 113 113 114 114 return $this->event->log(); -
trunk/modules/base/report.php
r503 r508 93 93 $this->body->set('params', $this->report_params); 94 94 95 // create state params for all links 95 /* 96 // create state params for all links 96 97 $link_params = array( 97 98 'period' => $this->data['params']['period'], // could be set by setPeriod … … 107 108 $this->body->caller_params['link_state'] = $link_params; 108 109 $this->subview->body->caller_params['link_state'] = $link_params; 110 */ 111 $this->_setLinkState(); 109 112 110 113 // set site filter list -
trunk/modules/base/reportDashboard.php
r504 r508 1 1 <?php 2
