- new "clear cache" button for Redis added to /setup
This commit is contained in:
@@ -140,6 +140,15 @@ class Setup extends Controller {
|
||||
// js view (file)
|
||||
$f3->set('jsView', 'setup');
|
||||
|
||||
// set render functions (called within template)
|
||||
$f3->set('cacheType', function(){
|
||||
$cacheType = $this->getF3()->get('CACHE');
|
||||
if( strpos($cacheType, 'redis') !== false ){
|
||||
$cacheType = 'redis';
|
||||
}
|
||||
return $cacheType;
|
||||
});
|
||||
|
||||
// render view
|
||||
echo \Template::instance()->render( $f3->get('PATHFINDER.VIEW.INDEX') );
|
||||
}
|
||||
|
||||
@@ -938,22 +938,33 @@
|
||||
</div>
|
||||
|
||||
<div class="panel-body no-padding">
|
||||
<check if="{{ @cacheType() == 'redis' }}">
|
||||
<div class="btn-group btn-group-justified">
|
||||
<span class="btn btn-default disabled btn-fake">
|
||||
Redis cache
|
||||
</span>
|
||||
<a href="?clearCache=1#pf-setup-administration" class="btn btn-warning" role="button">
|
||||
<i class="fa fa-fw fa-times"></i> Clear all keys
|
||||
</a>
|
||||
</div>
|
||||
</check>
|
||||
|
||||
<div class="btn-group btn-group-justified">
|
||||
<span class="btn btn-default disabled btn-fake">
|
||||
Data
|
||||
<kbd class="pull-right">
|
||||
<check if="{{ @cacheSize.data }}">
|
||||
<true>
|
||||
{{ @cacheSize.data }}
|
||||
</true>
|
||||
<false>
|
||||
0 KB
|
||||
</false>
|
||||
</check>
|
||||
</kbd>
|
||||
</span>
|
||||
<span class="btn btn-default disabled btn-fake">
|
||||
Data
|
||||
<kbd class="pull-right">
|
||||
<check if="{{ @cacheSize.data }}">
|
||||
<true>
|
||||
{{ @cacheSize.data }}
|
||||
</true>
|
||||
<false>
|
||||
0 KB
|
||||
</false>
|
||||
</check>
|
||||
</kbd>
|
||||
</span>
|
||||
<a href="?clearCache=1#pf-setup-administration" class="btn btn-warning {{ (@cacheSize.data) ?'':'disabled' }}" role="button">
|
||||
<i class="fa fa-fw fa-times"></i> Clear
|
||||
<i class="fa fa-fw fa-times"></i> Delete
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user