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