admin panel: inspect queue
This commit is contained in:
parent
6b93325f70
commit
f439ac47c4
|
@ -106,6 +106,7 @@ function admin_content(&$a) {
|
|||
'plugins'=> Array($a->get_baseurl(true)."/admin/plugins/", t("Plugins") , "plugins"),
|
||||
'themes' => Array($a->get_baseurl(true)."/admin/themes/", t("Themes") , "themes"),
|
||||
'dbsync' => Array($a->get_baseurl(true)."/admin/dbsync/", t('DB updates'), "dbsync"),
|
||||
'queue' => Array($a->get_baseurl(true)."/admin/queue/", t('Inspect Queue'), "queue"),
|
||||
//'update' => Array($a->get_baseurl(true)."/admin/update/", t("Software Update") , "update")
|
||||
);
|
||||
|
||||
|
@ -165,6 +166,9 @@ function admin_content(&$a) {
|
|||
case 'update':
|
||||
$o = admin_page_remoteupdate($a);
|
||||
break;
|
||||
case 'queue':
|
||||
$o = admin_page_queue($a);
|
||||
break;
|
||||
default:
|
||||
notice( t("Item not found.") );
|
||||
}
|
||||
|
@ -181,7 +185,30 @@ function admin_content(&$a) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin Inspect Queue Page
|
||||
* @param App $a
|
||||
* return string
|
||||
*/
|
||||
function admin_page_queue(&$a) {
|
||||
// get content from the queue table
|
||||
$r = q("SELECT c.name,c.nurl,q.id,q.network,q.created,q.last from queue as q, contact as c where c.id=q.cid order by q.cid, q.created;");
|
||||
|
||||
$t = get_markup_template("admin_queue.tpl");
|
||||
return replace_macros($t, array(
|
||||
'$title' => t('Administration'),
|
||||
'$page' => t('Inspect Queue'),
|
||||
'$count' => sizeof($r),
|
||||
'id_header' => t('ID'),
|
||||
'$to_header' => t('Recipient Name'),
|
||||
'$url_header' => t('Recipient Profile'),
|
||||
'$network_header' => t('Network'),
|
||||
'$created_header' => t('Created'),
|
||||
'$last_header' => t('Last Tried'),
|
||||
'$info' => t('This page lists the content of the queue for outgoing postings. These are postings the initial delivery failed for. They will be resend later and eventually deleted if the delivery fails permanently.'),
|
||||
'$entries' => $r,
|
||||
));
|
||||
}
|
||||
/**
|
||||
* Admin Summary Page
|
||||
* @param App $a
|
||||
|
|
25
view/templates/admin_queue.tpl
Normal file
25
view/templates/admin_queue.tpl
Normal file
|
@ -0,0 +1,25 @@
|
|||
<div id='adminpage'>
|
||||
<h1>{{$title}} - {{$page}} ({{$count}})</h1>
|
||||
|
||||
<p>{{$info}}</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>{{$id_header}}</th>
|
||||
<th>{{$to_header}}</th>
|
||||
<th>{{$url_header}}</th>
|
||||
<th>{{$network_header}}</th>
|
||||
<th>{{$created_header}}</th>
|
||||
<th>{{$last_header}}</th>
|
||||
</tr>
|
||||
{{foreach $entries as $e}}
|
||||
<tr>
|
||||
<td>{{$e.id}}</td>
|
||||
<td>{{$e.name}}</td>
|
||||
<td><a href="{{$e.nurl}}">{{$e.nurl}}</a></td>
|
||||
<td>{{$e.network}}</td>
|
||||
<td>{{$e.created}}</td>
|
||||
<td>{{$e.last}}</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</table>
|
||||
</div>
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<dl>
|
||||
<dt>{{$queues.label}}</dt>
|
||||
<dd>{{$queues.deliverq}} - {{$queues.queue}}</dd>
|
||||
<dd>{{$queues.deliverq}} - <a href="/admin/queue">{{$queues.queue}}</a></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>{{$pending.0}}</dt>
|
||||
|
|
Loading…
Reference in a new issue