mirror of https://github.com/apache/archiva.git
[MRM-1574] action to scan repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233134 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8233740cf9
commit
bf40346375
|
@ -32,4 +32,7 @@ managedrepository.delete.warning.message=Are you sure you want to delete the fol
|
|||
managedrepository.deleted=Managed Repository " {0} " deleted.
|
||||
managedrepository.location.already.exists=WARNING: Repository location already exists.
|
||||
managedrepository.location.already.exists.warning.message=Are you sure you want to use this directory
|
||||
managedrepository.add.title=Add Managed Repository
|
||||
managedrepository.add.title=Add Managed Repository
|
||||
managedrepository.scan.now=Scan Repository Now
|
||||
managedrepository.scan.all=Process All Artifacts
|
||||
managedrepository.scanned=Managed Repository " {0} " scanned.
|
|
@ -224,6 +224,41 @@ $(function() {
|
|||
activateManagedRepositoryFormValidation();
|
||||
}
|
||||
|
||||
scanNow=function(managedRepository){
|
||||
clearUserMessages();
|
||||
openDialogConfirm(
|
||||
function(){
|
||||
$("#dialog-confirm-modal #modal-login-footer").append(smallSpinnerImg());
|
||||
var checked = $("#managed-repository-scan-now-all").get(0).checked;
|
||||
var url = "restServices/archivaServices/repositoriesService/scanRepositoryNow?";
|
||||
url += "repositoryId="+encodeURIComponent(managedRepository.id());
|
||||
url += "&fullScan="+(checked==true?"true":"false");
|
||||
$.ajax(url,
|
||||
{
|
||||
type: "GET",
|
||||
success: function(data) {
|
||||
self.managedRepositories.remove(managedRepository);
|
||||
displaySuccessMessage($.i18n.prop("managedrepository.scanned",managedRepository.name()));
|
||||
|
||||
},
|
||||
error: function(data) {
|
||||
var res = $.parseJSON(data.responseText);
|
||||
displayRestError(res);
|
||||
},
|
||||
complete: function(){
|
||||
removeSmallSpinnerImg();
|
||||
closeDialogConfirm();
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
$.i18n.prop("ok"),
|
||||
$.i18n.prop("cancel"),
|
||||
$.i18n.prop("managedrepository.scan.now"),
|
||||
$("#managed-repository-scan-now-modal-tmpl").tmpl(managedRepository));
|
||||
|
||||
}
|
||||
|
||||
removeManagedRepository=function(managedRepository){
|
||||
clearUserMessages();
|
||||
openDialogConfirm(
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
{{/each}}
|
||||
<th>${$.i18n.prop('release.included')}</th>
|
||||
<th>${$.i18n.prop('snapshots.included')}</th>
|
||||
<th>${$.i18n.prop('managedrepository.scan.now')}</th>
|
||||
<th>${$.i18n.prop('edit')}</th>
|
||||
<th>${$.i18n.prop('delete')}</th>
|
||||
</tr>
|
||||
|
@ -91,6 +92,7 @@
|
|||
<img src="images/dialog-error.png"/>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td><a href="#" data-bind="click: function(){ scanNow(row) }">${$.i18n.prop('managedrepository.scan.now')}</a></td>
|
||||
<td><a href="#" data-bind="click: function(){ editManagedRepository(row) }">${$.i18n.prop('edit')}</a></td>
|
||||
<td>
|
||||
<a href="#" data-bind="click: function(){ removeManagedRepository(row) }">
|
||||
|
@ -236,4 +238,10 @@
|
|||
<div>${$.i18n.prop('name')}: ${name()}</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script id="managed-repository-scan-now-modal-tmpl" type='text/x-jquery-tmpl'>
|
||||
<div>
|
||||
${$.i18n.prop('managedrepository.scan.all')}: <input type="checkbox" id="managed-repository-scan-now-all">
|
||||
</div>
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue