##// END OF EJS Templates
file-browser: refactor how we load metadata for file trees....
file-browser: refactor how we load metadata for file trees. Before we used to use JSON data to map the nodes to json and fill in metadata. Now we use rendered parts of html. This is nicer for caching as it would allow us to replace the view with cached tree and then after ajax load replace it again with cached with metadata. On the next request we'll get the cached with metadata and thus we can skip entirely second ajax call for metadata. This is part of #4083

File last commit:

r418:97d24f73 default
r423:9930e2c8 default
Show More
repo_creating.html
73 lines | 2.1 KiB | text/html | HtmlLexer
project: added all source files and assets
r1 ## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
## don't trigger flash messages on this page
<%def name="flash_msg()">
</%def>
<%def name="title()">
${_('%s Creating repository') % c.repo_name}
%if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
</%def>
<%def name="breadcrumbs_links()">
${_('Creating repository')} ${c.repo}
</%def>
<%def name="menu_bar_nav()">
${self.menu_items(active='repositories')}
</%def>
<%def name="main()">
<div class="box">
<!-- box / title -->
<div class="title">
${self.breadcrumbs()}
</div>
<div id="progress-message">
${_('Repository "%(repo_name)s" is being created, you will be redirected when this process is finished.' % {'repo_name':c.repo_name})}
</div>
<div id="progress">
<div class="progress progress-striped active">
<div class="progress-bar progress-bar" role="progressbar"
aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
</div>
</div>
</div>
</div>
<script>
(function worker() {
var skipCheck = false;
var url = "${h.url('repo_check_home', repo_name=c.repo_name, repo=c.repo, task_id=c.task_id)}";
$.ajax({
url: url,
complete: function(resp) {
if (resp.status == 200) {
var jsonResponse = resp.responseJSON;
repo: when creating repos if we don't get JSON results, stop execution at refresh.
r75 if (jsonResponse === undefined) {
setTimeout(function () {
project: added all source files and assets
r1 // we might have a backend problem, try dashboard again
window.location = "${h.url('summary_home', repo_name = c.repo)}";
repo: when creating repos if we don't get JSON results, stop execution at refresh.
r75 }, 3000);
project: added all source files and assets
r1 } else {
repo: when creating repos if we don't get JSON results, stop execution at refresh.
r75 if (skipCheck || jsonResponse.result === true) {
// success, means go to dashboard
window.location = "${h.url('summary_home', repo_name = c.repo)}";
} else {
// Schedule the next request when the current one's complete
setTimeout(worker, 1000);
}
project: added all source files and assets
r1 }
}
else {
window.location = "${h.url('home')}";
}
}
});
})();
</script>
repositories: fixed missing javascript on repository creating page
r418 </%def>