Show More
@@ -1,142 +1,154 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 | ${(_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)})} | |
|
32 | ${_('Invalidation keys')} | |
|
33 | 33 | </h3> |
|
34 | 34 | </div> |
|
35 | 35 | <div class="panel-body"> |
|
36 | <div class="field" > | |
|
37 | <table class="rctable edit_cache"> | |
|
36 | <p> | |
|
37 | Cache keys used to signal repository state changes after operations such as push, strip etc. | |
|
38 | </p> | |
|
39 | <div class="field"> | |
|
40 | <a href="#showKeys" onclick="$('#signal-keys').toggle()">${_('Show all')} ${len(c.rhodecode_db_repo.cache_keys)}</a> | |
|
41 | ||
|
42 | <table class="rctable edit_cache" id="signal-keys" style="display: none"> | |
|
38 | 43 | <tr> |
|
39 | 44 | <th>${_('Key')}</th> |
|
40 | 45 | <th>${_('State UID')}</th> |
|
41 | 46 | <th>${_('Namespace')}</th> |
|
42 | 47 | <th>${_('Active')}</th> |
|
43 | 48 | </tr> |
|
44 | 49 | %for cache in c.rhodecode_db_repo.cache_keys: |
|
45 | 50 | <tr> |
|
46 | 51 | <td class="td-prefix"><code>${cache.cache_key}</code></td> |
|
47 | 52 | <td class="td-cachekey"><code>${cache.cache_state_uid}</code></td> |
|
48 | 53 | <td class="td-cachekey"><code>${cache.cache_args}</code></td> |
|
49 | 54 | <td class="td-active">${h.bool2icon(cache.cache_active)}</td> |
|
50 | 55 | </tr> |
|
51 | 56 | %endfor |
|
52 | 57 | </table> |
|
53 | 58 | </div> |
|
54 | 59 | </div> |
|
55 | 60 | </div> |
|
56 | 61 | |
|
57 | 62 | <div class="panel panel-default"> |
|
58 | 63 | <div class="panel-heading"> |
|
59 | 64 | <h3 class="panel-title"> |
|
60 | 65 | ${_('Cache keys')} |
|
61 | 66 | </h3> |
|
62 | 67 | </div> |
|
63 | 68 | <div class="panel-body"> |
|
64 | <p> | |
|
65 | Cache keys used for storing cached values of repository stats, | |
|
66 | file tree history and file tree search. | |
|
67 | Invalidating the cache will remove those entries. | |
|
68 | </p> | |
|
69 | <p> | |
|
70 | Cache keys used for storing cached values of repository stats, | |
|
71 | file tree history and file tree search. | |
|
72 | Invalidating the cache will remove those entries. | |
|
73 | </p> | |
|
69 | 74 | <pre> |
|
70 | region: ${c.region.name} | |
|
71 | 75 | backend: ${c.region.actual_backend.__class__} |
|
72 | 76 | % if c.rhodecode_user.is_admin: |
|
73 | 77 | store: ${c.region.actual_backend.get_store()} |
|
74 | 78 | % else: |
|
75 | 79 | store: ${c.region.actual_backend.get_store().__class__} |
|
76 | 80 | % endif |
|
81 | </pre> | |
|
77 | 82 |
|
|
78 | % if c.repo_keys: | |
|
79 |
|
|
|
80 | <span id="show-keys" style="display: none"> | |
|
81 | % for k in c.repo_keys: | |
|
82 | - ${k} | |
|
83 | % endfor | |
|
84 | </span> | |
|
85 | % else: | |
|
86 | NO KEYS FOUND | |
|
87 | % endif | |
|
83 | <div class="field"> | |
|
84 | <a href="#showKeys" onclick="$('#cache-keys').toggle()">${_('Show all')} ${len(c.repo_keys)}</a> | |
|
88 | 85 | |
|
89 | </pre> | |
|
86 | <table class="rctable edit_cache" id="cache-keys" style="display: none"> | |
|
87 | <tr> | |
|
88 | <th>${_('Key')}</th> | |
|
89 | <th>${_('Region')}</th> | |
|
90 | </tr> | |
|
91 | %for cache_key in c.repo_keys: | |
|
92 | <tr> | |
|
93 | <td class="td-prefix"><code>${cache_key}</code></td> | |
|
94 | <td class="td-cachekey">${c.region.name}</td> | |
|
95 | </tr> | |
|
96 | %endfor | |
|
97 | </table> | |
|
98 | </div> | |
|
90 | 99 | |
|
91 | 100 | </div> |
|
92 | 101 | </div> |
|
93 | 102 | |
|
94 | 103 | |
|
95 | 104 | <div class="panel panel-default"> |
|
96 | 105 | <div class="panel-heading"> |
|
97 | 106 | <h3 class="panel-title">${_('Shadow Repositories')}</h3> |
|
98 | 107 | </div> |
|
99 | 108 | <div class="panel-body"> |
|
100 | 109 | <table class="rctable edit_cache"> |
|
101 | 110 | % if c.shadow_repos: |
|
102 | 111 | % for shadow_repo in c.shadow_repos: |
|
103 | 112 | <tr> |
|
104 | 113 | <td>${shadow_repo}</td> |
|
105 | 114 | </tr> |
|
106 | 115 | % endfor |
|
107 | 116 | % else: |
|
108 | 117 | <tr> |
|
109 | 118 | <td>${_('No Shadow repositories exist for this repository.')}</td> |
|
110 | 119 | </tr> |
|
111 | 120 | % endif |
|
112 | 121 | |
|
113 | 122 | </table> |
|
114 | 123 | </div> |
|
115 | 124 | </div> |
|
116 | 125 | |
|
117 | 126 | |
|
118 | 127 | <div class="panel panel-default"> |
|
119 | 128 | <div class="panel-heading"> |
|
120 | 129 | <h3 class="panel-title">${_('Diff Caches')}</h3> |
|
121 | 130 | </div> |
|
122 | 131 | <div class="panel-body"> |
|
132 | <p> | |
|
133 | Number and size of stored cached diff for commits and pull requests. | |
|
134 | </p> | |
|
123 | 135 | <table class="rctable edit_cache"> |
|
124 | 136 | <tr> |
|
125 | 137 | <td>${_('Cached diff name')}:</td> |
|
126 | 138 | % if c.rhodecode_user.is_admin: |
|
127 | 139 | <td>${c.rhodecode_db_repo.cached_diffs_dir}</td> |
|
128 | 140 | % else: |
|
129 | 141 | <td>${c.rhodecode_db_repo.cached_diffs_relative_dir}</td> |
|
130 | 142 | % endif |
|
131 | 143 | </tr> |
|
132 | 144 | <tr> |
|
133 | 145 | <td>${_('Cached diff files')}:</td> |
|
134 | 146 | <td>${c.cached_diff_count}</td> |
|
135 | 147 | </tr> |
|
136 | 148 | <tr> |
|
137 | 149 | <td>${_('Cached diff size')}:</td> |
|
138 | 150 | <td>${h.format_byte_size(c.cached_diff_size)}</td> |
|
139 | 151 | </tr> |
|
140 | 152 | </table> |
|
141 | 153 | </div> |
|
142 | 154 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now