repo_edit_caches.mako
140 lines
| 4.3 KiB
| application/x-mako
|
MakoHtmlLexer
r1282 | <div class="panel panel-default"> | |||
<div class="panel-heading"> | ||||
<h3 class="panel-title">${_('Invalidate Cache for Repository')}</h3> | ||||
</div> | ||||
<div class="panel-body"> | ||||
r1722 | ||||
<h4>${_('Manually invalidate the repository cache. On the next access a repository cache will be recreated.')}</h4> | ||||
<p> | ||||
r1741 | ${_('Cache purge can be automated by such api call. Can be called periodically in crontab etc.')} | |||
r1722 | <br/> | |||
<code> | ||||
r2081 | ${h.api_call_example(method='invalidate_cache', args={"repoid": c.rhodecode_db_repo.repo_name})} | |||
r1722 | </code> | |||
</p> | ||||
r2105 | ${h.secure_form(h.route_path('edit_repo_caches', repo_name=c.repo_name), request=request)} | |||
r1722 | <div class="form"> | |||
r1282 | <div class="fields"> | |||
r2081 | ${h.submit('reset_cache_%s' % c.rhodecode_db_repo.repo_name,_('Invalidate repository cache'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")} | |||
r1282 | </div> | |||
</div> | ||||
${h.end_form()} | ||||
r1722 | ||||
r1282 | </div> | |||
</div> | ||||
<div class="panel panel-default"> | ||||
<div class="panel-heading"> | ||||
<h3 class="panel-title"> | ||||
r2081 | ${(_ungettext('List of repository caches (%(count)s entry)', 'List of repository caches (%(count)s entries)' ,len(c.rhodecode_db_repo.cache_keys)) % {'count': len(c.rhodecode_db_repo.cache_keys)})} | |||
r1282 | </h3> | |||
</div> | ||||
<div class="panel-body"> | ||||
<div class="field" > | ||||
<table class="rctable edit_cache"> | ||||
<tr> | ||||
<th>${_('Key')}</th> | ||||
r2932 | <th>${_('Namespace')}</th> | |||
r1282 | <th>${_('Active')}</th> | |||
</tr> | ||||
r2081 | %for cache in c.rhodecode_db_repo.cache_keys: | |||
r1282 | <tr> | |||
r2932 | <td class="td-prefix"><code>${cache.cache_key}</code></td> | |||
<td class="td-cachekey"><code>${cache.cache_args}</code></td> | ||||
r1282 | <td class="td-active">${h.bool2icon(cache.cache_active)}</td> | |||
</tr> | ||||
%endfor | ||||
</table> | ||||
</div> | ||||
</div> | ||||
</div> | ||||
r2687 | ||||
r2811 | <div class="panel panel-default"> | |||
<div class="panel-heading"> | ||||
r2846 | <h3 class="panel-title"> | |||
${_('Cache keys')} | ||||
</h3> | ||||
</div> | ||||
<div class="panel-body"> | ||||
<p> | ||||
Cache keys used for storing cached values of repository stats, | ||||
file tree history and file tree search. | ||||
Invalidating the cache will remove those entries. | ||||
</p> | ||||
<pre> | ||||
region: ${c.region.name} | ||||
backend: ${c.region.actual_backend.__class__} | ||||
r3084 | % if c.rhodecode_user.is_admin: | |||
r2846 | store: ${c.region.actual_backend.get_store()} | |||
r3084 | % else: | |||
store: ${c.region.actual_backend.get_store().__class__} | ||||
% endif | ||||
r2846 | ||||
% if c.repo_keys: | ||||
${len(c.repo_keys)} <a href="#showKeys" onclick="$('#show-keys').toggle()">${_('Show all')}</a> | ||||
<span id="show-keys" style="display: none"> | ||||
% for k in c.repo_keys: | ||||
- ${k} | ||||
% endfor | ||||
</span> | ||||
% else: | ||||
NO KEYS FOUND | ||||
% endif | ||||
</pre> | ||||
</div> | ||||
</div> | ||||
<div class="panel panel-default"> | ||||
<div class="panel-heading"> | ||||
r2811 | <h3 class="panel-title">${_('Shadow Repositories')}</h3> | |||
</div> | ||||
<div class="panel-body"> | ||||
<table class="rctable edit_cache"> | ||||
% if c.shadow_repos: | ||||
% for shadow_repo in c.shadow_repos: | ||||
<tr> | ||||
<td>${shadow_repo}</td> | ||||
</tr> | ||||
% endfor | ||||
% else: | ||||
<tr> | ||||
<td>${_('No Shadow repositories exist for this repository.')}</td> | ||||
</tr> | ||||
% endif | ||||
</table> | ||||
</div> | ||||
</div> | ||||
r2687 | ||||
<div class="panel panel-default"> | ||||
<div class="panel-heading"> | ||||
<h3 class="panel-title">${_('Diff Caches')}</h3> | ||||
</div> | ||||
<div class="panel-body"> | ||||
<table class="rctable edit_cache"> | ||||
<tr> | ||||
r2688 | <td>${_('Cached diff name')}:</td> | |||
r3084 | % if c.rhodecode_user.is_admin: | |||
<td>${c.rhodecode_db_repo.cached_diffs_dir}</td> | ||||
% else: | ||||
<td>${c.rhodecode_db_repo.cached_diffs_relative_dir}</td> | ||||
% endif | ||||
r2688 | </tr> | |||
<tr> | ||||
r2687 | <td>${_('Cached diff files')}:</td> | |||
<td>${c.cached_diff_count}</td> | ||||
</tr> | ||||
<tr> | ||||
<td>${_('Cached diff size')}:</td> | ||||
<td>${h.format_byte_size(c.cached_diff_size)}</td> | ||||
</tr> | ||||
</table> | ||||
</div> | ||||
</div> | ||||