Show More
@@ -1,55 +1,53 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 |
${_('Cache purge can be automated by such api call called periodically |
|
|
10 | ${_('Cache purge can be automated by such api call. Can be called periodically in crontab etc.')} | |
|
11 | 11 | <br/> |
|
12 | 12 | <code> |
|
13 | curl ${h.route_url('apiv2')} -X POST -H 'content-type:text/plain' --data-binary '{"id":1, "auth_token":"SECRET", "method":"invalidate_cache", "args":{"repoid":"${c.repo_info.repo_name}"}}' | |
|
13 | ${h.api_call_example(method='invalidate_cache', args={"repoid": c.repo_info.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), method='POST')} |
|
18 | 18 | <div class="form"> |
|
19 | 19 | <div class="fields"> |
|
20 | 20 | ${h.submit('reset_cache_%s' % c.repo_info.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.repo_info.cache_keys)) % {'count': len(c.repo_info.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>${_('Prefix')}</th> |
|
40 | 40 | <th>${_('Key')}</th> |
|
41 | 41 | <th>${_('Active')}</th> |
|
42 | 42 | </tr> |
|
43 | 43 | %for cache in c.repo_info.cache_keys: |
|
44 | 44 | <tr> |
|
45 | 45 | <td class="td-prefix">${cache.get_prefix() or '-'}</td> |
|
46 | 46 | <td class="td-cachekey">${cache.cache_key}</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 | ||
|
55 |
@@ -1,37 +1,40 b'' | |||
|
1 | 1 | <div class="panel panel-default"> |
|
2 | 2 | <div class="panel-heading"> |
|
3 | 3 | <h3 class="panel-title">${_('Remote url')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 | 6 |
|
|
7 | <h4>${_('Manually pull changes from external repository.')}</h4> | |
|
8 | ||
|
7 | 9 | %if c.repo_info.clone_uri: |
|
8 | 10 | |
|
9 |
|
|
|
11 | ${_('Remote mirror url')}: | |
|
10 | 12 |
|
|
13 | ||
|
11 | 14 |
|
|
12 |
${_('Pull can be automated by such api call called periodically |
|
|
15 | ${_('Pull can be automated by such api call. Can be called periodically in crontab etc.')} | |
|
16 | <br/> | |
|
17 | <code> | |
|
18 | ${h.api_call_example(method='pull', args={"repoid": c.repo_info.repo_name})} | |
|
19 | </code> | |
|
13 | 20 |
|
|
14 | <code> | |
|
15 | curl ${h.route_url('apiv2')} -X POST -H 'content-type:text/plain' --data-binary '{"id":1, "auth_token":"SECRET","method":"pull", "args":{"repoid":"${c.repo_info.repo_name}"}}' | |
|
16 | </code> | |
|
17 | </div> | |
|
18 | 21 | |
|
19 | 22 | ${h.secure_form(url('edit_repo_remote', repo_name=c.repo_name), method='put')} |
|
20 | 23 | <div class="form"> |
|
21 | 24 | <div class="fields"> |
|
22 | 25 | ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")} |
|
23 | 26 | </div> |
|
24 | 27 | </div> |
|
25 | 28 | ${h.end_form()} |
|
26 | 29 | %else: |
|
27 | <div class="panel-body-title-text">${_('This repository does not have any remote mirror url set.')}</div> | |
|
28 | 30 | |
|
31 | ${_('This repository does not have any remote mirror url set.')} | |
|
32 | <a href="${h.route_path('edit_repo', repo_name=c.repo_info.repo_name)}">${_('Set remote url.')}</a> | |
|
33 | <br/> | |
|
34 | <br/> | |
|
29 | 35 | <button class="btn disabled" type="submit" disabled="disabled"> |
|
30 | 36 | ${_('Pull changes from remote location')} |
|
31 | 37 | </button> |
|
32 | 38 | %endif |
|
33 | 39 | </div> |
|
34 | 40 | </div> |
|
35 | ||
|
36 | ||
|
37 |
General Comments 0
You need to be logged in to leave comments.
Login now