Show More
@@ -1,133 +1,140 b'' | |||
|
1 | 1 | <div class="panel panel-default"> |
|
2 | 2 | <div class="panel-heading"> |
|
3 | 3 | <h3 class="panel-title">${_('Invalidate Cache for Repository')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 | 6 | |
|
7 | 7 | <h4>${_('Manually invalidate the repository cache. On the next access a repository cache will be recreated.')}</h4> |
|
8 | 8 | |
|
9 | 9 | <p> |
|
10 | 10 | ${_('Cache purge can be automated by such api call. Can be called periodically in crontab etc.')} |
|
11 | 11 | <br/> |
|
12 | 12 | <code> |
|
13 | 13 | ${h.api_call_example(method='invalidate_cache', args={"repoid": c.rhodecode_db_repo.repo_name})} |
|
14 | 14 | </code> |
|
15 | 15 | </p> |
|
16 | 16 | |
|
17 | 17 | ${h.secure_form(h.route_path('edit_repo_caches', repo_name=c.repo_name), request=request)} |
|
18 | 18 | <div class="form"> |
|
19 | 19 | <div class="fields"> |
|
20 | 20 | ${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')+"');")} |
|
21 | 21 | </div> |
|
22 | 22 | </div> |
|
23 | 23 | ${h.end_form()} |
|
24 | 24 | |
|
25 | 25 | </div> |
|
26 | 26 | </div> |
|
27 | 27 | |
|
28 | 28 | |
|
29 | 29 | <div class="panel panel-default"> |
|
30 | 30 | <div class="panel-heading"> |
|
31 | 31 | <h3 class="panel-title"> |
|
32 | 32 | ${(_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)})} |
|
33 | 33 | </h3> |
|
34 | 34 | </div> |
|
35 | 35 | <div class="panel-body"> |
|
36 | 36 | <div class="field" > |
|
37 | 37 | <table class="rctable edit_cache"> |
|
38 | 38 | <tr> |
|
39 | 39 | <th>${_('Key')}</th> |
|
40 | 40 | <th>${_('Namespace')}</th> |
|
41 | 41 | <th>${_('Active')}</th> |
|
42 | 42 | </tr> |
|
43 | 43 | %for cache in c.rhodecode_db_repo.cache_keys: |
|
44 | 44 | <tr> |
|
45 | 45 | <td class="td-prefix"><code>${cache.cache_key}</code></td> |
|
46 | 46 | <td class="td-cachekey"><code>${cache.cache_args}</code></td> |
|
47 | 47 | <td class="td-active">${h.bool2icon(cache.cache_active)}</td> |
|
48 | 48 | </tr> |
|
49 | 49 | %endfor |
|
50 | 50 | </table> |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | </div> |
|
54 | 54 | |
|
55 | 55 | <div class="panel panel-default"> |
|
56 | 56 | <div class="panel-heading"> |
|
57 | 57 | <h3 class="panel-title"> |
|
58 | 58 | ${_('Cache keys')} |
|
59 | 59 | </h3> |
|
60 | 60 | </div> |
|
61 | 61 | <div class="panel-body"> |
|
62 | 62 | <p> |
|
63 | 63 | Cache keys used for storing cached values of repository stats, |
|
64 | 64 | file tree history and file tree search. |
|
65 | 65 | Invalidating the cache will remove those entries. |
|
66 | 66 | </p> |
|
67 | 67 | <pre> |
|
68 | 68 | region: ${c.region.name} |
|
69 | 69 | backend: ${c.region.actual_backend.__class__} |
|
70 | % if c.rhodecode_user.is_admin: | |
|
70 | 71 | store: ${c.region.actual_backend.get_store()} |
|
71 | ||
|
72 | % else: | |
|
73 | store: ${c.region.actual_backend.get_store().__class__} | |
|
74 | % endif | |
|
72 | 75 | |
|
73 | 76 | % if c.repo_keys: |
|
74 | 77 | ${len(c.repo_keys)} <a href="#showKeys" onclick="$('#show-keys').toggle()">${_('Show all')}</a> |
|
75 | 78 | <span id="show-keys" style="display: none"> |
|
76 | 79 | % for k in c.repo_keys: |
|
77 | 80 | - ${k} |
|
78 | 81 | % endfor |
|
79 | 82 | </span> |
|
80 | 83 | % else: |
|
81 | 84 | NO KEYS FOUND |
|
82 | 85 | % endif |
|
83 | 86 | |
|
84 | 87 | </pre> |
|
85 | 88 | |
|
86 | 89 | </div> |
|
87 | 90 | </div> |
|
88 | 91 | |
|
89 | 92 | |
|
90 | 93 | <div class="panel panel-default"> |
|
91 | 94 | <div class="panel-heading"> |
|
92 | 95 | <h3 class="panel-title">${_('Shadow Repositories')}</h3> |
|
93 | 96 | </div> |
|
94 | 97 | <div class="panel-body"> |
|
95 | 98 | <table class="rctable edit_cache"> |
|
96 | 99 | % if c.shadow_repos: |
|
97 | 100 | % for shadow_repo in c.shadow_repos: |
|
98 | 101 | <tr> |
|
99 | 102 | <td>${shadow_repo}</td> |
|
100 | 103 | </tr> |
|
101 | 104 | % endfor |
|
102 | 105 | % else: |
|
103 | 106 | <tr> |
|
104 | 107 | <td>${_('No Shadow repositories exist for this repository.')}</td> |
|
105 | 108 | </tr> |
|
106 | 109 | % endif |
|
107 | 110 | |
|
108 | 111 | </table> |
|
109 | 112 | </div> |
|
110 | 113 | </div> |
|
111 | 114 | |
|
112 | 115 | |
|
113 | 116 | <div class="panel panel-default"> |
|
114 | 117 | <div class="panel-heading"> |
|
115 | 118 | <h3 class="panel-title">${_('Diff Caches')}</h3> |
|
116 | 119 | </div> |
|
117 | 120 | <div class="panel-body"> |
|
118 | 121 | <table class="rctable edit_cache"> |
|
119 | 122 | <tr> |
|
120 | 123 | <td>${_('Cached diff name')}:</td> |
|
121 | <td>${c.rhodecode_db_repo.cached_diffs_relative_dir}</td> | |
|
124 | % if c.rhodecode_user.is_admin: | |
|
125 | <td>${c.rhodecode_db_repo.cached_diffs_dir}</td> | |
|
126 | % else: | |
|
127 | <td>${c.rhodecode_db_repo.cached_diffs_relative_dir}</td> | |
|
128 | % endif | |
|
122 | 129 | </tr> |
|
123 | 130 | <tr> |
|
124 | 131 | <td>${_('Cached diff files')}:</td> |
|
125 | 132 | <td>${c.cached_diff_count}</td> |
|
126 | 133 | </tr> |
|
127 | 134 | <tr> |
|
128 | 135 | <td>${_('Cached diff size')}:</td> |
|
129 | 136 | <td>${h.format_byte_size(c.cached_diff_size)}</td> |
|
130 | 137 | </tr> |
|
131 | 138 | </table> |
|
132 | 139 | </div> |
|
133 | 140 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now