mirror of
https://github.com/goharbor/harbor.git
synced 2024-10-31 23:59:32 +01:00
commit
e7e23240f0
@ -62,7 +62,7 @@ jQuery(function(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.each(data, function(i, e){
|
$.each(data, function(i, e){
|
||||||
var targetId = e.replace(/\//g, "------");
|
var targetId = e.replace(/\//g, "------").replace(/\./g, "---");
|
||||||
var row = '<div class="panel panel-default" targetId="' + targetId + '">' +
|
var row = '<div class="panel panel-default" targetId="' + targetId + '">' +
|
||||||
'<div class="panel-heading" role="tab" id="heading' + i + '"+ >' +
|
'<div class="panel-heading" role="tab" id="heading' + i + '"+ >' +
|
||||||
'<h4 class="panel-title">' +
|
'<h4 class="panel-title">' +
|
||||||
@ -105,7 +105,7 @@ jQuery(function(){
|
|||||||
$('#accordionRepo').on('show.bs.collapse', function (e) {
|
$('#accordionRepo').on('show.bs.collapse', function (e) {
|
||||||
$('#accordionRepo .in').collapse('hide');
|
$('#accordionRepo .in').collapse('hide');
|
||||||
var targetId = $(e.target).attr("targetId");
|
var targetId = $(e.target).attr("targetId");
|
||||||
var repoName = targetId.replace(/------/g, "/");
|
var repoName = targetId.replace(/[-]{6}/g, "/").replace(/[-]{3}/g, '.');
|
||||||
new AjaxUtil({
|
new AjaxUtil({
|
||||||
url: "/api/repositories/tags?repo_name=" + repoName,
|
url: "/api/repositories/tags?repo_name=" + repoName,
|
||||||
type: "get",
|
type: "get",
|
||||||
@ -113,8 +113,8 @@ jQuery(function(){
|
|||||||
$('#' + targetId +' table tbody tr').remove();
|
$('#' + targetId +' table tbody tr').remove();
|
||||||
var row = [];
|
var row = [];
|
||||||
for(var i in data){
|
for(var i in data){
|
||||||
var tagName = data[i]
|
var tagName = data[i];
|
||||||
row.push('<tr><td><a href="#" imageId="' + tagName + '" repoName="' + repoName + '">' + tagName + '</a></td><td><input type="text" style="width:100%" readonly value=" docker pull '+ $("#harborRegUrl").val() +'/'+ repoName + ':' + tagName +'"></td></tr>');
|
row.push('<tr><td><a href="#" imageId="' + tagName + '" repoName="' + repoName + '">' + tagName + '</a></td><td><input type="text" style="width:100%" readonly value=" docker pull '+ $("#harborRegUrl").val() +'/'+ repoName + ':' + tagName +'"></td></tr>');
|
||||||
}
|
}
|
||||||
$('#' + targetId +' table tbody').append(row.join(""));
|
$('#' + targetId +' table tbody').append(row.join(""));
|
||||||
$('#' + targetId +' table tbody tr a').on("click", function(e){
|
$('#' + targetId +' table tbody tr a').on("click", function(e){
|
||||||
|
Loading…
Reference in New Issue
Block a user