aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-22 03:44:03 -0700
committerfriendica <info@friendica.com>2012-05-22 03:44:03 -0700
commitf29f861d25c443075c1bd310313aaf52596402a3 (patch)
tree51f59adc8a7035af69f4cad7dcbf72b109180ff1
parentbe64437b147259d6eac0d5455de7c435eee450e6 (diff)
downloadvolse-hubzilla-f29f861d25c443075c1bd310313aaf52596402a3.tar.gz
volse-hubzilla-f29f861d25c443075c1bd310313aaf52596402a3.tar.bz2
volse-hubzilla-f29f861d25c443075c1bd310313aaf52596402a3.zip
add queue totals to admin summary page
-rw-r--r--mod/admin.php15
-rw-r--r--view/admin_summary.tpl4
2 files changed, 18 insertions, 1 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 1f53f112d..d19118b78 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -115,7 +115,7 @@ function admin_content(&$a) {
$aside['logs'] = Array($a->get_baseurl(true)."/admin/logs/", t("Logs"), "logs");
$t = get_markup_template("admin_aside.tpl");
- $a->page['aside'] = replace_macros( $t, array(
+ $a->page['aside'] .= replace_macros( $t, array(
'$admin' => $aside,
'$h_pending' => t('User registrations waiting for confirmation'),
'$admurl'=> $a->get_baseurl(true)."/admin/"
@@ -182,6 +182,7 @@ function admin_page_summary(&$a) {
Array( t('Community/Celebrity Account'), 0),
Array( t('Automatic Friend Account'), 0)
);
+
$users=0;
foreach ($r as $u){ $accounts[$u['page-flags']][1] = $u['count']; $users+= $u['count']; }
@@ -190,10 +191,22 @@ function admin_page_summary(&$a) {
$r = q("SELECT COUNT(id) as `count` FROM `register`");
$pending = $r[0]['count'];
+ $r = q("select count(*) as total from deliverq where 1");
+ $deliverq = (($r) ? $r[0]['total'] : 0);
+
+ $r = q("select count(*) as total from queue where 1");
+ $queue = (($r) ? $r[0]['total'] : 0);
+
+ // We can do better, but this is a quick queue status
+
+ $queues = array( 'label' => t('Message queues'), 'deliverq' => $deliverq, 'queue' => $queue );
+
+
$t = get_markup_template("admin_summary.tpl");
return replace_macros($t, array(
'$title' => t('Administration'),
'$page' => t('Summary'),
+ '$queues' => $queues,
'$users' => Array( t('Registered users'), $users),
'$accounts' => $accounts,
'$pending' => Array( t('Pending registrations'), $pending),
diff --git a/view/admin_summary.tpl b/view/admin_summary.tpl
index eed71fbe0..4efe1960c 100644
--- a/view/admin_summary.tpl
+++ b/view/admin_summary.tpl
@@ -2,6 +2,10 @@
<h1>$title - $page</h1>
<dl>
+ <dt>$queues.label</dt>
+ <dd>$queues.deliverq - $queues.queue</dd>
+ </dl>
+ <dl>
<dt>$pending.0</dt>
<dd>$pending.1</dt>
</dl>