mirror of https://github.com/apache/archiva.git
[MRM-1620] add a tab to browse artifact content in artifact detail view
being able to see file content of each artifact (pom, sources etc..) git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1341043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ba65bc6ad7
commit
e9d4231e1b
|
@ -270,9 +270,15 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($(e.target).attr("href")=="#artifact-details-file-content") {
|
if ($(e.target).attr("href")=="#artifact-details-files-content") {
|
||||||
$.log("file content:"+self.groupId+":"+self.artifactId+":"+self.version);
|
$.log("file content:"+self.groupId+":"+self.artifactId+":"+self.version);
|
||||||
|
|
||||||
|
var artifactDownloadInfosUrl = "restServices/archivaServices/browseService/artifactDownloadInfos/"+encodeURIComponent(self.groupId);
|
||||||
|
artifactDownloadInfosUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version);
|
||||||
|
artifactDownloadInfosUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository());
|
||||||
|
|
||||||
|
$.get(artifactDownloadInfosUrl,function(data){
|
||||||
|
$("#artifact-details-files-content" ).html($("#artifact-details-files-content_tmpl").tmpl({artifactDownloadInfos:data}));
|
||||||
var entriesUrl = "restServices/archivaServices/browseService/artifactContentEntries/"+encodeURIComponent(self.groupId);
|
var entriesUrl = "restServices/archivaServices/browseService/artifactContentEntries/"+encodeURIComponent(self.groupId);
|
||||||
entriesUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version);
|
entriesUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version);
|
||||||
entriesUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository());
|
entriesUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository());
|
||||||
|
@ -282,8 +288,10 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock
|
||||||
script: entriesUrl,
|
script: entriesUrl,
|
||||||
root: ""
|
root: ""
|
||||||
},function(file) {
|
},function(file) {
|
||||||
//alert(file);
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,7 +433,7 @@
|
||||||
<a data-toggle="tab" href="#artifact-details-dependency-tree-content">${$.i18n.prop('artifact.detail.tab.header.dependency.tree')}</a>
|
<a data-toggle="tab" href="#artifact-details-dependency-tree-content">${$.i18n.prop('artifact.detail.tab.header.dependency.tree')}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a data-toggle="tab" href="#artifact-details-file-content">${$.i18n.prop('artifact.detail.tab.header.file.content')}</a>
|
<a data-toggle="tab" href="#artifact-details-files-content">${$.i18n.prop('artifact.detail.tab.header.file.content')}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a data-toggle="tab" href="#artifact-details-used-by-content">${$.i18n.prop('artifact.detail.tab.header.used.by')}</a>
|
<a data-toggle="tab" href="#artifact-details-used-by-content">${$.i18n.prop('artifact.detail.tab.header.used.by')}</a>
|
||||||
|
@ -628,9 +628,8 @@
|
||||||
<div id="artifact-details-dependency-tree-content" class="tab-pane">
|
<div id="artifact-details-dependency-tree-content" class="tab-pane">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="artifact-details-file-content" class="tab-pane">
|
<div id="artifact-details-files-content" class="tab-pane">
|
||||||
<div id="artifact_content_tree">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="artifact-details-used-by-content" class="tab-pane"></div>
|
<div id="artifact-details-used-by-content" class="tab-pane"></div>
|
||||||
|
@ -807,3 +806,19 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script id="artifact-details-files-content_tmpl" type="text/html">
|
||||||
|
<div class="row">
|
||||||
|
<div class="span4">
|
||||||
|
<ul>
|
||||||
|
{{each artifactDownloadInfos}}
|
||||||
|
<li>${$value.type}:${$value.classifier}</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="span8">
|
||||||
|
<div id="artifact_content_tree">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</script>
|
Loading…
Reference in New Issue