diff options
author | friendica <info@friendica.com> | 2015-02-26 20:00:47 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-02-26 20:00:47 -0800 |
commit | a00c072f02efb741629b4b3e5b0eac1b3d6a95d4 (patch) | |
tree | 9685f27c7ea4a489c4853939118ca13be2836c8c /mod/admin.php | |
parent | 5d57df2694b6515b43c4a641bf47b8c5f112d4f7 (diff) | |
download | volse-hubzilla-a00c072f02efb741629b4b3e5b0eac1b3d6a95d4.tar.gz volse-hubzilla-a00c072f02efb741629b4b3e5b0eac1b3d6a95d4.tar.bz2 volse-hubzilla-a00c072f02efb741629b4b3e5b0eac1b3d6a95d4.zip |
high level queue inspector - needs a lot more, like the ability to dump certain destinations and indicating known dead sites, but this is a start
Diffstat (limited to 'mod/admin.php')
-rw-r--r-- | mod/admin.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/mod/admin.php b/mod/admin.php index ba52033ec..a54a4b0b8 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -99,7 +99,8 @@ function admin_content(&$a) { 'channels' => Array($a->get_baseurl(true)."/admin/channels/", t("Channels") , "channels"), 'plugins' => Array($a->get_baseurl(true)."/admin/plugins/", t("Plugins") , "plugins"), 'themes' => Array($a->get_baseurl(true)."/admin/themes/", t("Themes") , "themes"), - 'hubloc' => Array($a->get_baseurl(true)."/admin/hubloc/", t("Server") , "server"), + 'queue' => array(z_root() . '/admin/queue', t('Inspect queue'), 'queue'), +// 'hubloc' => Array($a->get_baseurl(true)."/admin/hubloc/", t("Server") , "server"), 'profs' => array(z_root() . '/admin/profs', t('Profile Config'), 'profs'), 'dbsync' => Array($a->get_baseurl(true)."/admin/dbsync/", t('DB updates'), "dbsync") ); @@ -164,6 +165,9 @@ function admin_content(&$a) { case 'profs': $o = admin_page_profs($a); break; + case 'queue': + $o = admin_page_queue($a); + break; default: notice( t("Item not found.") ); } @@ -583,6 +587,26 @@ function admin_page_dbsync(&$a) { } +function admin_page_queue($a) { + $o = ''; + + $r = q("select count(outq_posturl) as total, outq_posturl from outq + where outq_delivered = 0 group by outq_posturl order by total desc"); + + $o .= '<h3>' . t('Queue Statistics') . '</h3>'; + + if($r) { + $o .= '<table><tr><td>' . t('Total Entries') . ' </td><td>' . t('Destination URL') . '</td></tr>'; + foreach($r as $rr) { + $o .= '<tr><td>' . $rr['total'] . '</td><td>' . $rr['outq_posturl'] . '</td></tr>'; + } + $o .= '</table>'; + } + + return $o; + +} + /** * Users admin page * |