mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 01:37:02 +02:00
Fixed #758: sphinx index watcher
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
@ -156,11 +156,10 @@ 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->data['sphinx_current_main_size'] = $this->model_health_health->get_current_sphinx_main_index_size();
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -255,7 +255,15 @@ class ModelHealthHealth extends Model {
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
public function get_current_sphinx_main_index_size() {
|
||||
$size = 0;
|
||||
|
||||
if(file_exists(SPHINX_MAIN_INDEX_SIZE)) {
|
||||
$size = (int) file_get_contents(SPHINX_MAIN_INDEX_SIZE);
|
||||
}
|
||||
|
||||
return $size;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
@ -115,8 +115,8 @@ cite{font-style:normal;}
|
||||
a.muted:hover{color:#808080;}
|
||||
.text-warning{color:#c09853;}
|
||||
a.text-warning:hover{color:#a47e3c;}
|
||||
.text-error{color:#b94a48;}
|
||||
a.text-error:hover{color:#953b39;}
|
||||
.text-error{color:#b94a48;font-weight:bold;}
|
||||
a.text-error:hover{color:#953b39;font-weight:bold;}
|
||||
.text-info{color:#3a87ad;}
|
||||
a.text-info:hover{color:#2d6987;}
|
||||
.text-success{color:#468847;}
|
||||
|
@ -61,6 +61,7 @@
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@ -154,6 +155,10 @@
|
||||
<td><?php print $text_usage_trend; ?></td>
|
||||
<td><?php if ( $usagetrend > 0 ) { print $text_usage_increasing; } elseif( $usagetrend < 0 ) { print $text_usage_decreasing; } else { print $text_usage_neutral; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sphinx main index</td>
|
||||
<td<?php if($sphinx_current_main_size > SPHINX_MAIN_INDEX_THRESHOLD) { ?> class="text-error"<?php } ?>><?php print nice_size($sphinx_current_main_size); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user