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
|
@ -33,3 +33,6 @@ managedrepository.deleted=Managed Repository " {0} " deleted.
|
||||||
managedrepository.location.already.exists=WARNING: Repository location already exists.
|
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.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();
|
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){
|
removeManagedRepository=function(managedRepository){
|
||||||
clearUserMessages();
|
clearUserMessages();
|
||||||
openDialogConfirm(
|
openDialogConfirm(
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<th>${$.i18n.prop('release.included')}</th>
|
<th>${$.i18n.prop('release.included')}</th>
|
||||||
<th>${$.i18n.prop('snapshots.included')}</th>
|
<th>${$.i18n.prop('snapshots.included')}</th>
|
||||||
|
<th>${$.i18n.prop('managedrepository.scan.now')}</th>
|
||||||
<th>${$.i18n.prop('edit')}</th>
|
<th>${$.i18n.prop('edit')}</th>
|
||||||
<th>${$.i18n.prop('delete')}</th>
|
<th>${$.i18n.prop('delete')}</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -91,6 +92,7 @@
|
||||||
<img src="images/dialog-error.png"/>
|
<img src="images/dialog-error.png"/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</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(){ editManagedRepository(row) }">${$.i18n.prop('edit')}</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" data-bind="click: function(){ removeManagedRepository(row) }">
|
<a href="#" data-bind="click: function(){ removeManagedRepository(row) }">
|
||||||
|
@ -237,3 +239,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</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