##// END OF EJS Templates
settings-pages: replaced hardcoded api calls examples with introduced...
marcink -
r1741:97b4b51b default
parent child Browse files
Show More
@@ -7,10 +7,10 b''
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 (in crontab etc)')}
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
@@ -51,5 +51,3 b''
51 51 </div>
52 52 </div>
53 53 </div>
54
55
@@ -4,17 +4,20 b''
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 <div class="panel-body-title-text">${_('Remote mirror url')}:
10 <a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri_hidden}</a>
11 <p>
12 ${_('Pull can be automated by such api call called periodically (in crontab etc)')}
13 </p>
11 ${_('Remote mirror url')}:
12 <a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri_hidden}</a>
13
14 <p>
15 ${_('Pull can be automated by such api call. Can be called periodically in crontab etc.')}
16 <br/>
14 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 19 </code>
17 </div>
20 </p>
18 21
19 22 ${h.secure_form(url('edit_repo_remote', repo_name=c.repo_name), method='put')}
20 23 <div class="form">
@@ -24,14 +27,14 b''
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