qhoxie: added user activity graph

(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42128 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-16 16:27:36 +00:00
parent b3da227764
commit 3090ae956d
4 changed files with 36 additions and 6 deletions

View File

@ -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();

View File

@ -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);
}

View File

@ -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);
}

View File

@ -8,6 +8,7 @@
<li id="stusers"><a href="$baseURL/admin/statistics/users">Users</a></li>
<li id="stviews"><a href="$baseURL/admin/statistics/views">Views</a></li>
<li id="sttrends"><a href="$baseURL/admin/statistics/trends">Trends</a></li>
<li id="stos"><a href="$baseURL/admin/statistics/os">Operating Systems</a></li>
<li id="stbrowsers"><a href="$baseURL/admin/statistics/browsers">Browsers</a></li>
</li>
</ul>