mirror of https://github.com/apache/archiva.git
fix snippet url
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233900 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b722a82aec
commit
2d96427bd0
|
@ -216,6 +216,7 @@ public class DefaultManagedRepositoriesService
|
||||||
|
|
||||||
snippet.append( " <" ).append( distRepoName ).append( ">\n" );
|
snippet.append( " <" ).append( distRepoName ).append( ">\n" );
|
||||||
snippet.append( " <id>" ).append( repo.getId() ).append( "</id>\n" );
|
snippet.append( " <id>" ).append( repo.getId() ).append( "</id>\n" );
|
||||||
|
snippet.append( " <url>" );
|
||||||
snippet.append( getBaseUrl( httpServletRequest ) + "repository" );
|
snippet.append( getBaseUrl( httpServletRequest ) + "repository" );
|
||||||
snippet.append( "/" ).append( repo.getId() ).append( "/" ).append( "</url>\n" );
|
snippet.append( "/" ).append( repo.getId() ).append( "/" ).append( "</url>\n" );
|
||||||
|
|
||||||
|
|
|
@ -366,16 +366,14 @@ $(function() {
|
||||||
|
|
||||||
showPomSnippet=function(managedRepository){
|
showPomSnippet=function(managedRepository){
|
||||||
|
|
||||||
|
$("#managed-repositories-pom-snippet").html(mediumSpinnerImg());
|
||||||
|
$('#managed-repositories-pom-snippet').show();
|
||||||
var url = "restServices/archivaServices/managedRepositoriesService/getPomSnippet/"+managedRepository.id();
|
var url = "restServices/archivaServices/managedRepositoriesService/getPomSnippet/"+managedRepository.id();
|
||||||
$.ajax(url,
|
$.ajax(url,
|
||||||
{
|
{
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: 'text',
|
dataType: 'text',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
//var snippet='<div class="page-header">';
|
|
||||||
//snippet +="<h2>POM Snippet</h2></div>";
|
|
||||||
//$("#managed-repositories-pom-snippet").html(snippet+"<pre>"+data+"</pre>");
|
|
||||||
$("#managed-repositories-pom-snippet").html($("#pom-snippet-tmpl").tmpl(data));
|
$("#managed-repositories-pom-snippet").html($("#pom-snippet-tmpl").tmpl(data));
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
|
|
|
@ -268,5 +268,7 @@
|
||||||
<script id="pom-snippet-tmpl" type='text/x-jquery-tmpl'>
|
<script id="pom-snippet-tmpl" type='text/x-jquery-tmpl'>
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h2>POM Snippet</h2></div>
|
<h2>POM Snippet</h2></div>
|
||||||
|
</div>
|
||||||
|
<div><a href="#" onclick="$('#managed-repositories-pom-snippet').effect('blind')">${$.i18n.prop('hide')}</a></div>
|
||||||
<pre>${$data}</pre>
|
<pre>${$data}</pre>
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue