diff --git a/code/StatisticsAdmin.php b/code/StatisticsAdmin.php index 59a875fa..8539778c 100644 --- a/code/StatisticsAdmin.php +++ b/code/StatisticsAdmin.php @@ -78,15 +78,22 @@ class StatisticsAdmin extends LeftAndMain { function Trend() { - return Statistics::TrendChart(array('Member', 'SiteTree', 'Group'), 'day', 'mchart', 'Line', 'red'); + return Statistics::TrendChart(array('PageView', 'Member', 'SiteTree'), 'day', 'mchart', 'Line', 'red'); } function BrowserPie() { return Statistics::BrowserChart(); } + function OSPie() { + return Statistics::OSChart(); + } + + function UACPie() { + return Statistics::ActivityChart(); + } + function UserTable() { - //Statistics::getBrowserChart(); return Statistics::UserRecordTable(); } @@ -94,12 +101,12 @@ class StatisticsAdmin extends LeftAndMain { return Statistics::getViews('all'); } - public function users($params) { - return Statistics::UserRecordTable(); - } + function showAll() { return $this->BrowserPie() . + $this->OSPie() . + $this->UACPie() . $this->Trend() . $this->UserTable() . $this->ViewTable(); diff --git a/css/StatisticsAdmin.css b/css/StatisticsAdmin.css index 9b3b63ce..3288a30e 100644 --- a/css/StatisticsAdmin.css +++ b/css/StatisticsAdmin.css @@ -143,6 +143,6 @@ ul.tree li#sttrends a { background-image: url(../images/treeicons/element-file.gif); } -ul.tree li#stbrowsers a { +ul.tree li#stbrowsers a, ul.tree li#stos a { background-image: url(../images/treeicons/reports-file.png); } diff --git a/javascript/StatisticsAdmin.js b/javascript/StatisticsAdmin.js index 66c66126..6e1f55d0 100644 --- a/javascript/StatisticsAdmin.js +++ b/javascript/StatisticsAdmin.js @@ -43,6 +43,8 @@ overview = function() { $('trendchart') ? $('trendchart').show() : null; $('usertable') ? $('usertable').show() : null; $('viewtable') ? $('viewtable').show() : null; + $('oschart') ? $('oschart').hide() : null; + $('uacchart') ? $('uacchart').hide() : null; } users = function() { @@ -50,6 +52,8 @@ users = function() { $('trendchart') ? $('trendchart').hide() : null; $('usertable') ? $('usertable').show() : null; $('viewtable') ? $('viewtable').hide() : null; + $('oschart') ? $('oschart').hide() : null; + $('uacchart') ? $('uacchart').show() : null; } views = function() { @@ -57,6 +61,8 @@ views = function() { $('trendchart') ? $('trendchart').hide() : null; $('usertable') ? $('usertable').hide() : null; $('viewtable') ? $('viewtable').show() : null; + $('oschart') ? $('oschart').hide() : null; + $('uacchart') ? $('uacchart').hide() : null; } trends = function() { @@ -64,6 +70,8 @@ trends = function() { $('trendchart') ? $('trendchart').show() : null; $('usertable') ? $('usertable').hide() : null; $('viewtable') ? $('viewtable').hide() : null; + $('oschart') ? $('oschart').hide() : null; + $('uacchart') ? $('uacchart').hide() : null; } browsers = function() { @@ -71,6 +79,17 @@ browsers = function() { $('trendchart') ? $('trendchart').hide() : null; $('usertable') ? $('usertable').hide() : null; $('viewtable') ? $('viewtable').hide() : null; + $('oschart') ? $('oschart').hide() : null; + $('uacchart') ? $('uacchart').hide() : null; +} + +os = function() { + $('browserchart') ? $('browserchart').hide() : null; + $('trendchart') ? $('trendchart').hide() : null; + $('usertable') ? $('usertable').hide() : null; + $('viewtable') ? $('viewtable').hide() : null; + $('oschart') ? $('oschart').show() : null; + $('uacchart') ? $('uacchart').hide() : null; } @@ -93,6 +112,9 @@ SiteTreeNode.prototype.onselect = function() { case 'stbrowsers' : browsers(); break; + case 'stos' : + os(); + break; default : console.log('Unrecognized option ' + this.id); } diff --git a/templates/Includes/StatisticsAdmin_left.ss b/templates/Includes/StatisticsAdmin_left.ss index e8873891..978b1f85 100644 --- a/templates/Includes/StatisticsAdmin_left.ss +++ b/templates/Includes/StatisticsAdmin_left.ss @@ -8,6 +8,7 @@
  • Users
  • Views
  • Trends
  • +
  • Operating Systems
  • Browsers