webui fixes

This commit is contained in:
SJ 2013-08-11 09:22:03 +02:00
parent 90a69f9287
commit b68602b5f0
5 changed files with 31 additions and 0 deletions

View File

@ -41,6 +41,7 @@ $config['SITE_KEYWORDS'] = 'piler email archiver';
$config['SITE_DESCRIPTION'] = 'piler email archiver';
$config['INDEXER_BEACON'] = '/var/piler/stat/indexer';
$config['PURGE_BEACON'] = '/var/piler/stat/purge';
// authentication against an ldap directory (disabled by default)

View File

@ -148,6 +148,7 @@ class ControllerHealthWorker extends Controller {
$this->data['indexer_stat'] = $this->model_health_health->indexer_stat();
$this->data['purge_stat'] = $this->model_health_health->purge_stat();
$this->render();

View File

@ -215,6 +215,21 @@ class ModelHealthHealth extends Model {
}
public function purge_stat() {
$data = array('', '');
if(file_exists(PURGE_BEACON)) {
$st = stat(PURGE_BEACON);
$t1 = date(DATE_TEMPLATE . " H:i", $st['mtime']);
$t2 = date(DATE_TEMPLATE . " H:i", $st['mtime']+86400);
$data = array($t1, $t2);
}
return $data;
}
}

View File

@ -76,6 +76,13 @@
</tr>
<?php } ?>
<?php if($purge_stat[0]) { ?>
<tr>
<th><?php print $text_periodic_purge; ?></th>
<td><?php print $text_last; ?>: <?php print $purge_stat[0]; ?>, <?php print $text_next; ?>: <?php print $purge_stat[1]; ?></td>
</tr>
<?php } ?>
</table>
</div>

View File

@ -133,6 +133,13 @@
</div>
<?php } ?>
<?php if($purge_stat[0]) { ?>
<div class="row">
<div class="cellhealthleft"><?php print $text_periodic_purge; ?></div>
<div class="cellhealthright"><?php print $text_last; ?>: <?php print $purge_stat[0]; ?>, <?php print $text_next; ?>: <?php print $purge_stat[1]; ?></div>
</div>
<?php } ?>
</div>