mirror of https://github.com/apache/archiva.git
implements schedule of remote index download
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1235353 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
54fa39f727
commit
87101453e3
|
@ -609,7 +609,40 @@ $(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduleDownloadRemoteIndex=function(remoteRepository){
|
scheduleDownloadRemoteIndex=function(remoteRepository){
|
||||||
$.log("scheduleDownloadRemoteIndex");
|
openDialogConfirm(
|
||||||
|
function(){
|
||||||
|
|
||||||
|
var url = "restServices/archivaServices/repositoriesService/scheduleDownloadRemoteIndex?";
|
||||||
|
url += "repositoryId="+encodeURIComponent(remoteRepository.id());
|
||||||
|
|
||||||
|
var now = $("#remoterepository-scan-now").get(0).checked;
|
||||||
|
|
||||||
|
var full = $("#remoterepository-scan-full").get(0).checked;
|
||||||
|
|
||||||
|
url += "&now="+(now==true?"true":"false");
|
||||||
|
url += "&fullDownload="+(full==true?"true":"false");
|
||||||
|
$.ajax(url,
|
||||||
|
{
|
||||||
|
type: "GET",
|
||||||
|
success: function(data) {
|
||||||
|
displaySuccessMessage($.i18n.prop("remoterepository.scanned.scheduled",remoteRepository.name()));
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(data) {
|
||||||
|
var res = $.parseJSON(data.responseText);
|
||||||
|
displayRestError(res);
|
||||||
|
},
|
||||||
|
complete: function(){
|
||||||
|
closeDialogConfirm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
},
|
||||||
|
$.i18n.prop("ok"),
|
||||||
|
$.i18n.prop("cancel"),
|
||||||
|
$.i18n.prop("remoterepository.scan.confirm",remoteRepository.name()),
|
||||||
|
$("#remote-repository-scan-modal-tmpl").tmpl(remoteRepository));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,6 +254,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script id="managed-repository-location-warning-tmpl" type='text/x-jquery-tmpl'>
|
<script id="managed-repository-location-warning-tmpl" type='text/x-jquery-tmpl'>
|
||||||
<div>
|
<div>
|
||||||
<a class="close" href="#">×</a>
|
<a class="close" href="#">×</a>
|
||||||
|
@ -428,4 +429,13 @@
|
||||||
<button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
|
<button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
|
||||||
<button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
|
<button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
|
||||||
</form>
|
</form>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script id="remote-repository-scan-modal-tmpl" type='text/x-jquery-tmpl'>
|
||||||
|
<div>
|
||||||
|
${$.i18n.prop('remoterepository.scan.now')}: <input type="checkbox" id="remoterepository-scan-now">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
${$.i18n.prop('remoterepository.scan.full')}: <input type="checkbox" id="remoterepository-scan-full">
|
||||||
|
</div>
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue