mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 22:51:59 +01:00
webui fixes
This commit is contained in:
parent
90a69f9287
commit
b68602b5f0
@ -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)
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user