Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Add titles
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Apr 8, 2014
1 parent 3089052 commit cfa6784
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion core/src/plugins/editor.ajxp_graphs/class.GraphsViewer.js
Expand Up @@ -59,7 +59,13 @@ Class.create("GraphsViewer", AbstractEditor, {
$('graph_viewer_box').update('');
this.queriesData = $A(queriesData);
this.queriesData.each(function(qData){
var div = new Element('div', {id:qData['NAME']+'_container'});
var div;
if(qData['SEPARATOR']){
div = new Element('div', {class:'tabrow'}).update('<li class="selected">' + qData['LABEL'] + '</li>');
this.element.insert(div);
return;
}
div = new Element('div', {id:qData['NAME']+'_container'});
this.element.insert(div);
div.insert({top:('<div class="innerTitle">'+qData['LABEL']+'</div>')});
div.insert(('<div style="text-align: center; padding:100px;">Loading...</div>'));
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/log.sql/class.sqlLogDriver.php
Expand Up @@ -131,7 +131,7 @@ public function exposeQueries($actionName, &$httpVars, &$fileVars){

private function getQuery($queryName){
foreach($this->queries as $q){
if($q["NAME"] == $queryName) return $q;
if(isset($q["NAME"]) && $q["NAME"] == $queryName) return $q;
}
return false;
}
Expand Down
8 changes: 8 additions & 0 deletions core/src/plugins/log.sql/queries.json
Expand Up @@ -5,6 +5,10 @@
"FIGURE":"total_number_of_logins",
"SQL":"SELECT COUNT( DISTINCT id ) AS total_number_of_logins FROM ajxp_log2 WHERE user IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE severity = \"INFO\" AND login NOT IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE repo_uuid = \"ajxp.parent_user\" ) ) AND params LIKE \"Log In%\""
},
{
"SEPARATOR":true,
"LABEL":"Users activity"
},
{
"NAME":"unique_users_per_day",
"LABEL":"Unique users per day",
Expand All @@ -23,6 +27,10 @@
},
"SQL":"SELECT SQL_CALC_FOUND_ROWS DATE( logdate )AS Date, COUNT( DISTINCT id ) AS \"Users Connections\" FROM ajxp_log2 WHERE user IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE severity = \"INFO\" AND login NOT IN (SELECT DISTINCT login FROM ajxp_user_rights WHERE repo_uuid = \"ajxp.parent_user\" ) ) AND params LIKE \"Log In%\" GROUP BY DATE( logdate ) ORDER BY logdate DESC"
},
{
"SEPARATOR":true,
"LABEL":"Documents Activity"
},
{
"NAME":"downloads_per_day",
"LABEL":"Downloads per day",
Expand Down

0 comments on commit cfa6784

Please sign in to comment.