Show More
@@ -1,55 +1,53 b'' | |||||
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 called periodically |
|
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 | 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 | </code> |
|
14 | </code> | |
15 | </p> |
|
15 | </p> | |
16 |
|
16 | |||
17 | ${h.secure_form(h.route_path('edit_repo_caches', repo_name=c.repo_name), method='POST')} |
|
17 | ${h.secure_form(h.route_path('edit_repo_caches', repo_name=c.repo_name), method='POST')} | |
18 | <div class="form"> |
|
18 | <div class="form"> | |
19 | <div class="fields"> |
|
19 | <div class="fields"> | |
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')+"');")} |
|
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 | </div> |
|
21 | </div> | |
22 | </div> |
|
22 | </div> | |
23 | ${h.end_form()} |
|
23 | ${h.end_form()} | |
24 |
|
24 | |||
25 | </div> |
|
25 | </div> | |
26 | </div> |
|
26 | </div> | |
27 |
|
27 | |||
28 |
|
28 | |||
29 | <div class="panel panel-default"> |
|
29 | <div class="panel panel-default"> | |
30 | <div class="panel-heading"> |
|
30 | <div class="panel-heading"> | |
31 | <h3 class="panel-title"> |
|
31 | <h3 class="panel-title"> | |
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)})} |
|
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 | </h3> |
|
33 | </h3> | |
34 | </div> |
|
34 | </div> | |
35 | <div class="panel-body"> |
|
35 | <div class="panel-body"> | |
36 | <div class="field" > |
|
36 | <div class="field" > | |
37 | <table class="rctable edit_cache"> |
|
37 | <table class="rctable edit_cache"> | |
38 | <tr> |
|
38 | <tr> | |
39 | <th>${_('Prefix')}</th> |
|
39 | <th>${_('Prefix')}</th> | |
40 | <th>${_('Key')}</th> |
|
40 | <th>${_('Key')}</th> | |
41 | <th>${_('Active')}</th> |
|
41 | <th>${_('Active')}</th> | |
42 | </tr> |
|
42 | </tr> | |
43 | %for cache in c.repo_info.cache_keys: |
|
43 | %for cache in c.repo_info.cache_keys: | |
44 | <tr> |
|
44 | <tr> | |
45 | <td class="td-prefix">${cache.get_prefix() or '-'}</td> |
|
45 | <td class="td-prefix">${cache.get_prefix() or '-'}</td> | |
46 | <td class="td-cachekey">${cache.cache_key}</td> |
|
46 | <td class="td-cachekey">${cache.cache_key}</td> | |
47 | <td class="td-active">${h.bool2icon(cache.cache_active)}</td> |
|
47 | <td class="td-active">${h.bool2icon(cache.cache_active)}</td> | |
48 | </tr> |
|
48 | </tr> | |
49 | %endfor |
|
49 | %endfor | |
50 | </table> |
|
50 | </table> | |
51 | </div> |
|
51 | </div> | |
52 | </div> |
|
52 | </div> | |
53 | </div> |
|
53 | </div> | |
54 |
|
||||
55 |
|
@@ -1,37 +1,40 b'' | |||||
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">${_('Remote url')}</h3> |
|
3 | <h3 class="panel-title">${_('Remote url')}</h3> | |
4 | </div> |
|
4 | </div> | |
5 | <div class="panel-body"> |
|
5 | <div class="panel-body"> | |
6 |
|
|
6 | ||
|
7 | <h4>${_('Manually pull changes from external repository.')}</h4> | |||
|
8 | ||||
7 | %if c.repo_info.clone_uri: |
|
9 | %if c.repo_info.clone_uri: | |
8 |
|
10 | |||
9 |
|
|
11 | ${_('Remote mirror url')}: | |
10 |
|
|
12 | <a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri_hidden}</a> | |
11 | <p> |
|
13 | ||
12 | ${_('Pull can be automated by such api call called periodically (in crontab etc)')} |
|
14 | <p> | |
13 | </p> |
|
15 | ${_('Pull can be automated by such api call. Can be called periodically in crontab etc.')} | |
|
16 | <br/> | |||
14 | <code> |
|
17 | <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}"}}' |
|
18 | ${h.api_call_example(method='pull', args={"repoid": c.repo_info.repo_name})} | |
16 | </code> |
|
19 | </code> | |
17 |
</ |
|
20 | </p> | |
18 |
|
21 | |||
19 | ${h.secure_form(url('edit_repo_remote', repo_name=c.repo_name), method='put')} |
|
22 | ${h.secure_form(url('edit_repo_remote', repo_name=c.repo_name), method='put')} | |
20 | <div class="form"> |
|
23 | <div class="form"> | |
21 | <div class="fields"> |
|
24 | <div class="fields"> | |
22 | ${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')+"');")} |
|
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 | </div> |
|
26 | </div> | |
24 | </div> |
|
27 | </div> | |
25 | ${h.end_form()} |
|
28 | ${h.end_form()} | |
26 | %else: |
|
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 | <button class="btn disabled" type="submit" disabled="disabled"> |
|
35 | <button class="btn disabled" type="submit" disabled="disabled"> | |
30 | ${_('Pull changes from remote location')} |
|
36 | ${_('Pull changes from remote location')} | |
31 | </button> |
|
37 | </button> | |
32 | %endif |
|
38 | %endif | |
33 | </div> |
|
39 | </div> | |
34 | </div> |
|
40 | </div> | |
35 |
|
||||
36 |
|
||||
37 |
|
General Comments 0
You need to be logged in to leave comments.
Login now