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