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

Commit

Permalink
Browse files Browse the repository at this point in the history
Add some figures
  • Loading branch information
cdujeu committed Apr 10, 2014
1 parent f598d90 commit fb4d276
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions core/src/plugins/log.sql/queries.json
Expand Up @@ -3,12 +3,30 @@
"SEPARATOR":true,
"LABEL":"Main Figures"
},
{
"NAME":"cumulated_logins",
"LABEL":"Cumulated Logins",
{
"NAME":"cumulated_uploads",
"LABEL":"# Files Uploaded",
"FIGURE":"total",
"SQL":"SELECT COUNT(distinct id) AS total FROM ajxp_log WHERE severity = \"INFO\" AND (message like \"Upload%\" OR message like \"Upload%\")"
},
{
"NAME":"cumulated_shares",
"LABEL":"# Files Shared",
"FIGURE":"total",
"SQL":"SELECT COUNT( DISTINCT id ) AS total FROM ajxp_log 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%\" OR message LIKE \"Log In%\") AND AJXP_CURSOR_DATE"
"SQL":"SELECT COUNT( DISTINCT id ) AS total FROM ajxp_log WHERE severity = \"INFO\" AND user IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE login NOT IN ( SELECT DISTINCT login FROM ajxp_user_rights WHERE repo_uuid = \"ajxp.parent_user\" ) ) AND (params LIKE \"New Share%\" OR message LIKE \"New Share%\" )"
},
{
"NAME":"cumulated_users",
"LABEL":"Total # Users",
"FIGURE":"total",
"SQL":"SELECT COUNT(distinct login) AS total FROM ajxp_users"
},
{
"NAME":"cumulated_logins",
"LABEL":"Cumulated Logins",
"FIGURE":"total",
"SQL":"SELECT COUNT( DISTINCT id ) AS total FROM ajxp_log 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%\" OR message LIKE \"Log In%\") AND AJXP_CURSOR_DATE"
},
{
"SEPARATOR":true,
"LABEL":"Users activity"
Expand Down

0 comments on commit fb4d276

Please sign in to comment.