=r)return t[2*a];if(n[a+1]>r)return Math.floor(r/n[a])+" "+t[2*a+1]}}(e.creationDate),getLocalDate:e=>e.creationDate&&e.creationDate.toLocaleString()||"unknown"},template:function(e,t,n,r){return e('
',[{redundantAttribute:"expr549",selector:"[expr549]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return[e.getDate(e.props.image)," ago"].join("")}},{type:t.ATTRIBUTE,name:"title",evaluate:function(e){return["Creation date ",e.getLocalDate(e.props.image)].join("")}}]}])},name:"image-date"},ImageSize:{css:null,exports:{onMounted(e,t){this.load(e,t)},onUpdated(e,t){this.load(e,t)},load(e,t){"number"!=typeof e.image.size&&(e.image.on("size",(e=>{this.update({size:e})})),e.image.trigger("get-size"))},getImageSize:e=>Fn(e.size)},template:function(e,t,n,r){return e('
',[{redundantAttribute:"expr548",selector:"[expr548]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.getImageSize(e.props.image)}}]}])},name:"image-size"},ImageTag:{css:null,exports:{onMounted(e){e.image.on("sha256",(e=>{this.update({sha256:e.substring(0,19)})})),e.image.trigger("get-sha256")}},template:function(e,t,n,r){return e('
',[{redundantAttribute:"expr550",selector:"[expr550]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.props.image.tag}},{type:t.ATTRIBUTE,name:"title",evaluate:function(e){return e.state.sha256}}]}])},name:"image-tag"},ImageContentDigest:{css:null,exports:{onMounted(e,t){this.load(e,t)},onUpdated(e,t){this.load(e,t)},load(e,t){e.image.digest||(t.chars=-1,e.image.one("content-digest",(t=>{this.digest=t,e.image.on("content-digest-chars",this.onResize),e.image.trigger("get-content-digest-chars")})),e.image.trigger("get-content-digest"))},onResize(e){e!==this.state.chars&&this.update({chars:e})},getTitle:(e,t)=>t>=70?"":e.digest||"",getDigest:(e,t)=>t>=70?e.digest||"":t<=0?"":e.digest&&e.digest.slice(0,t)+"..."},template:function(e,t,n,r){return e('
',[{redundantAttribute:"expr551",selector:"[expr551]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.getDigest(e.props.image,e.state.chars)}},{type:t.ATTRIBUTE,name:"title",evaluate:function(e){return e.getTitle(e.props.image,e.state.chars)}}]}])},name:"image-content-digest"},CopyToClipboard:{css:null,exports:{onMounted(e,t){this.load(e,t)},onUpdated(e,t){this.load(e,t)},getDockerCmd:e=>"tag"===e.target?`docker pull ${e.pullUrl}/${e.image.name}:${e.image.tag}`:`docker pull ${e.pullUrl}/${e.image.name}@${e.image.digest}`,load(e,t){"tag"===e.target||e.image.digest||(e.image.one("content-digest",(e=>{this.update()})),e.image.trigger("get-content-digest"))},copy(){const e=this.$("input");e.value?(e.style.display="block",e.select(),document.execCommand("copy"),e.style.display="none",this.props.onNotify("`"+e.value+"` has been copied to clipboard.")):this.props.onNotify(Yn)}},template:function(e,t,n,r){return e('
',[{redundantAttribute:"expr552",selector:"[expr552]",expressions:[{type:t.VALUE,evaluate:function(e){return e.getDockerCmd(e.props)}}]},{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:'content_copy ',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.copy}}],redundantAttribute:"expr553",selector:"[expr553]"}])},name:"copy-to-clipboard"},RemoveImage:vr,TagHistoryButton:{css:null,exports:{routeToHistory(){rr.history(this.props.image.name,this.props.image.tag)}},template:function(e,t,n,r){return e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:'history ',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.routeToHistory}}],redundantAttribute:"expr554",selector:"[expr554]"}])},name:"tag-history-button"},ConfirmDeleteImage:{css:'confirm-delete-image,[is="confirm-delete-image"]{ color: #000; list-style-type: disc; margin-block-start: 0.7em; } confirm-delete-image material-popup .content .material-popup-content,[is="confirm-delete-image"] material-popup .content .material-popup-content{ overflow-y: auto; max-height: 250px; }',exports:{displayImagesToDelete(e,t){const n=new Set;return e.forEach((e=>{e.digest&&n.add(e.digest)})),t.filter((e=>n.has(e.digest)))},deleteImages(){this.props.toDelete.forEach((e=>this.deleteImage(e,this.props)))},deleteImage(e,t){const{registryUrl:n,ignoreError:r,onNotify:a,onAuthentication:i,onClick:o}=t;if(!e.digest)return void a(`Information for ${s}:${u} are not yet loaded.`);const s=e.name,u=e.tag,l=new sr({onAuthentication:i});l.addEventListener("loadend",(function(){200==this.status||202==this.status?(rr.taglist(s),a(`Deleting ${s}:${u} image. Run \`registry garbage-collect config.yml\` on your registry`)):404==this.status?r||a({message:"Digest not found for this image in your registry.",isError:!0}):a(this.responseText),o()})),l.open("DELETE",`${n}/v2/${s}/manifests/${e.digest}`),l.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json"),l.addEventListener("error",(function(){a({message:"An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE'].",isError:!0})})),l.send()}},template:function(e,t,n,r){return e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-popup"},slots:[{id:"title",html:'These images will be deleted
',bindings:[]},{id:"content",html:'',bindings:[{type:n.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return[e.image.name,":",e.image.tag].join("")}}]}]),redundantAttribute:"expr558",selector:"[expr558]",itemName:"image",indexName:null,evaluate:function(e){return e.displayImagesToDelete(e.props.toDelete,e.props.tags)}}]},{id:"action",html:'
',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:"\n Delete\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.deleteImages}}],redundantAttribute:"expr559",selector:"[expr559]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:"\n Cancel\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.props.onClick}}],redundantAttribute:"expr560",selector:"[expr560]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.props.opened}},{type:t.EVENT,name:"onClick",evaluate:function(e){return e.props.onClick}}],redundantAttribute:"expr557",selector:"[expr557]"}])},name:"confirm-delete-image"}},onBeforeMount(e){this.state={toDelete:new Set,multiDelete:!1,page:e.page}},onBeforeUpdate(e,t){t.page!==e.page&&t.toDelete.clear(),t.page=e.page},deleteImages(){this.update({confirmDeleteImage:!0})},onConfirmDeleteImageClick(){this.state.singleDeleteAction&&this.state.toDelete.clear(),this.update({singleDeleteAction:!1,confirmDeleteImage:!1})},onRemoveImageHeaderChange(e,t){if(!0===t.altKey){qn(this.props.tags,this.props.page).filter((e=>ar(this.props.filterResults,e.tag))).forEach((e=>this.state.toDelete.add(e))),this.update({multiDelete:!0,toDelete:this.state.toDelete})}else this.update({multiDelete:e})},onRemoveImageChange(e,t){let n=!1,r=!1;switch(e){case yr:this.state.toDelete.add(t);break;case xr:this.state.toDelete.delete(t);break;case br:this.state.toDelete.clear(),this.state.toDelete.add(t),n=!0,r=!0}this.update({toDelete:this.state.toDelete,confirmDeleteImage:n,singleDeleteAction:r})},onReverseOrder(){this.state.orderType=null,this.state.desc=!1,this.props.onReverseOrder()},onPageReorder(e){this.update({orderType:e,desc:this.state.orderType&&this.state.orderType!==e||!this.state.desc})},getPage(e,t){const n=qn(e,t);return"date"===this.state.orderType?n.sort(((e,t)=>this.state.desc?e.creationDate.getTime()-t.creationDate.getTime():t.creationDate.getTime()-e.creationDate.getTime())):"size"===this.state.orderType&&n.sort(((e,t)=>this.state.desc?e.size-t.size:t.size-e.size)),n},matchSearch:ar},template:function(e,t,n,r){return e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"confirm-delete-image"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.state.confirmDeleteImage}},{type:t.EVENT,name:"on-click",evaluate:function(e){return e.onConfirmDeleteImageClick}},{type:t.ATTRIBUTE,name:"registry-url",evaluate:function(e){return e.props.registryUrl}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.props.onNotify}},{type:t.EVENT,name:"on-authentication",evaluate:function(e){return e.props.onAuthentication}},{type:t.ATTRIBUTE,name:"tags",evaluate:function(e){return e.props.tags}},{type:t.ATTRIBUTE,name:"to-delete",evaluate:function(e){return e.state.toDelete}}],redundantAttribute:"expr465",selector:"[expr465]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"material-card"},slots:[{id:"default",html:'\n Creation date\n \n Size\n History
',bindings:[{redundantAttribute:"expr467",selector:"[expr467]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return["creation-date ",e.state.desc&&"date"===e.state.orderType?"material-card-th-sorted-descending":"material-card-th-sorted-ascending"].join("")}},{type:t.EVENT,name:"onclick",evaluate:function(e){return()=>e.onPageReorder("date")}}]},{redundantAttribute:"expr468",selector:"[expr468]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return["image-size ",e.state.desc&&"size"===e.state.orderType?"material-card-th-sorted-descending":"material-card-th-sorted-ascending"].join("")}},{type:t.EVENT,name:"onclick",evaluate:function(e){return()=>e.onPageReorder("size")}}]},{type:n.IF,evaluate:function(e){return e.props.showContentDigest},redundantAttribute:"expr469",selector:"[expr469]",template:e("Content Digest",[])},{redundantAttribute:"expr470",selector:"[expr470]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return e.props.asc?"material-card-th-sorted-ascending":"material-card-th-sorted-descending"}},{type:t.EVENT,name:"onclick",evaluate:function(e){return e.onReverseOrder}}]},{type:n.IF,evaluate:function(e){return e.props.isImageRemoveActivated},redundantAttribute:"expr471",selector:"[expr471]",template:e(' ',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return["remove-tag ",e.state.toDelete.size>0&&!e.state.singleDeleteAction?"delete":""].join("")}}]},{type:n.IF,evaluate:function(e){return 0===e.state.toDelete.size||e.state.singleDeleteAction},redundantAttribute:"expr472",selector:"[expr472]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-checkbox"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"checked",evaluate:function(e){return e.state.multiDelete}},{type:t.EVENT,name:"onChange",evaluate:function(e){return e.onRemoveImageHeaderChange}}]}])},{type:n.IF,evaluate:function(e){return e.state.toDelete.size>0&&!e.state.singleDeleteAction},redundantAttribute:"expr473",selector:"[expr473]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:'delete ',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.deleteImages}}]}])}])},{type:n.EACH,getKey:null,condition:function(e){return e.matchSearch(e.props.filterResults,e.image.tag)},template:e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"image-date"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.image}}],redundantAttribute:"expr475",selector:"[expr475]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"image-size"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.image}}],redundantAttribute:"expr476",selector:"[expr476]"},{type:n.IF,evaluate:function(e){return e.props.showContentDigest},redundantAttribute:"expr477",selector:"[expr477]",template:e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"image-content-digest"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.image}}],redundantAttribute:"expr478",selector:"[expr478]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"copy-to-clipboard"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.image}},{type:t.ATTRIBUTE,name:"pull-url",evaluate:function(e){return e.props.pullUrl}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.props.onNotify}}],redundantAttribute:"expr479",selector:"[expr479]"}])},{type:n.TAG,getComponent:r,evaluate:function(e){return"image-tag"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.image}}],redundantAttribute:"expr480",selector:"[expr480]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"copy-to-clipboard"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.image}},{type:t.ATTRIBUTE,name:"pull-url",evaluate:function(e){return e.props.pullUrl}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.props.onNotify}}],redundantAttribute:"expr481",selector:"[expr481]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"tag-history-button"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.image}}],redundantAttribute:"expr482",selector:"[expr482]"},{type:n.IF,evaluate:function(e){return e.props.isImageRemoveActivated},redundantAttribute:"expr483",selector:"[expr483]",template:e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"remove-image"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"multi-delete",evaluate:function(e){return e.state.multiDelete}},{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.image}},{type:t.ATTRIBUTE,name:"registry-url",evaluate:function(e){return e.props.registryUrl}},{type:t.ATTRIBUTE,name:"handleCheckboxChange",evaluate:function(e){return e.onRemoveImageChange}},{type:t.ATTRIBUTE,name:"checked",evaluate:function(e){return e.state.toDelete.has(e.image)}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.props.onNotify}},{type:t.EVENT,name:"on-authentication",evaluate:function(e){return e.props.onAuthentication}}],redundantAttribute:"expr484",selector:"[expr484]"}])}]),redundantAttribute:"expr474",selector:"[expr474]",itemName:"image",indexName:null,evaluate:function(e){return e.getPage(e.props.tags,e.props.page)}}]}],attributes:[],redundantAttribute:"expr466",selector:"[expr466]"}])},name:"tag-table"}},onBeforeMount(e){this.state={registryName:e.registryName,tags:[],loadend:!1,asc:!0,page:rr.getPageQueryParam()||1}},onMounted(e,t){this.display(e,t),window.addEventListener("resize",this.onResize),window.requestAnimationFrame(this.onResize)},display(e,t){t.tags=[];const n=this,r=new sr({onAuthentication:e.onAuthentication});r.addEventListener("load",(function(){if(200==this.status){const r=(JSON.parse(this.responseText).tags||[]).map((t=>new gr(e.image,t,{registryUrl:e.registryUrl,onNotify:e.onNotify,onAuthentication:e.onAuthentication}))).sort(hr);window.requestAnimationFrame(n.onResize),n.update({page:Math.min(t.page,Kn(r)),tags:r})}else 404==this.status?n.props.onNotify("Server not found",!0):n.props.onNotify(this.responseText,!0)})),r.addEventListener("error",(function(){n.props.onNotify(this.getErrorMessage(),!0),t.tags=[]})),r.addEventListener("loadend",(function(){n.update({loadend:!0})})),r.open("GET",e.registryUrl+"/v2/"+e.image+"/tags/list"),r.send(),t.asc=!0},onPageUpdate(e){this.update({page:e}),rr.updatePageQueryParam(e)},onResize(){const e=window.innerWidth;let t=0;const n=this.state.tags.reduce((function(e,t){return t.tag.length>e?t.tag.length:e}),0);t=e>=1440?71:e<1024?0:15+(e-1024)/416*56,n>20&&(t-=n-20),t=Math.floor(t),this.state.tags.map((function(e){e.trigger("content-digest-chars",t)}))},onReverseOrder(){this.state.asc?(this.state.tags.reverse(),this.state.asc=!1):(this.state.tags.sort(hr),this.state.asc=!0),this.update()},getPageLabels:function(e,t){var n=[],r=10;if(1===t)return n;1!==e&&t>=r&&(n.push({icon:"first_page",page:1}),n.push({icon:"chevron_left",page:e-1}));for(var a=Math.round(Math.max(1,Math.min(e-5,t-r+1))),i=a;ir,"space-right":e===t&&t>r});return e!==t&&t>=r&&(n.push({icon:"chevron_right",page:e+1}),n.push({icon:"last_page",page:t})),n},getNumPages:Kn,router:rr},template:function(e,t,n,r){return e('
',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-card"},slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:'arrow_back ',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.router.home}}],redundantAttribute:"expr432",selector:"[expr432]"},{redundantAttribute:"expr433",selector:"[expr433]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return["Tags of ",e.props.image].join("")}}]},{redundantAttribute:"expr434",selector:"[expr434]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return["Sourced from ",e.state.registryName+"/"+e.props.image].join("")}}]},{redundantAttribute:"expr435",selector:"[expr435]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return[e.state.tags.length," tags"].join("")}}]}]}],attributes:[],redundantAttribute:"expr431",selector:"[expr431]"},{type:n.IF,evaluate:function(e){return!e.state.loadend},redundantAttribute:"expr436",selector:"[expr436]",template:e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-spinner"},slots:[],attributes:[],redundantAttribute:"expr437",selector:"[expr437]"}])},{type:n.TAG,getComponent:r,evaluate:function(e){return"pagination"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"pages",evaluate:function(e){return e.getPageLabels(e.state.page,e.getNumPages(e.state.tags))}},{type:t.EVENT,name:"onPageUpdate",evaluate:function(e){return e.onPageUpdate}}],redundantAttribute:"expr438",selector:"[expr438]"},{type:n.IF,evaluate:function(e){return e.state.loadend},redundantAttribute:"expr439",selector:"[expr439]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:function(e){return"tag-table"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"tags",evaluate:function(e){return e.state.tags}},{type:t.ATTRIBUTE,name:"asc",evaluate:function(e){return e.state.asc}},{type:t.ATTRIBUTE,name:"page",evaluate:function(e){return e.state.page}},{type:t.ATTRIBUTE,name:"show-content-digest",evaluate:function(e){return e.props.showContentDigest}},{type:t.ATTRIBUTE,name:"is-image-remove-activated",evaluate:function(e){return e.props.isImageRemoveActivated}},{type:t.EVENT,name:"onReverseOrder",evaluate:function(e){return e.onReverseOrder}},{type:t.ATTRIBUTE,name:"registry-url",evaluate:function(e){return e.props.registryUrl}},{type:t.ATTRIBUTE,name:"pull-url",evaluate:function(e){return e.props.pullUrl}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.props.onNotify}},{type:t.ATTRIBUTE,name:"filter-results",evaluate:function(e){return e.props.filterResults}},{type:t.EVENT,name:"on-authentication",evaluate:function(e){return e.props.onAuthentication}}]}])},{type:n.TAG,getComponent:r,evaluate:function(e){return"pagination"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"pages",evaluate:function(e){return e.getPageLabels(e.state.page,e.getNumPages(e.state.tags))}},{type:t.EVENT,name:"onPageUpdate",evaluate:function(e){return e.onPageUpdate}}],redundantAttribute:"expr440",selector:"[expr440]"}])},name:"tag-list"},TagHistory:{css:null,exports:{components:{TagHistoryElement:{css:'tag-history-element.Labels .value,[is="tag-history-element"].Labels .value,tag-history-element.Env .value,[is="tag-history-element"].Env .value{ margin-bottom: 0.5em; } tag-history-element i,[is="tag-history-element"] i{ font-size: 20px; padding: 0px; } tag-history-element.docker_version .headline .material-icons,[is="tag-history-element"].docker_version .headline .material-icons{ background-size: 24px auto; background-image: url("images/docker-logo.svg"); background-repeat: no-repeat; } tag-history-element,[is="tag-history-element"]{ display: block; padding: 20px; min-width: 100px; min-height: 3em; width: 420px; float: left; } tag-history-element .content,[is="tag-history-element"] .content{ overflow-x: auto; } tag-history-element.id .content,[is="tag-history-element"].id .content{ overflow-x: initial; } tag-history-element .headline p,[is="tag-history-element"] .headline p{ font-weight: bold; line-height: 20px; position: relative; display: inline; top: -4px; } tag-history-element.id div.value,[is="tag-history-element"].id div.value{ font-size: 12px; }',exports:{onBeforeStart(e,t){t.key=e.entry.key,t.icon=function(e){switch(e){case"architecture":return"memory";case"created":return"event";case"docker_version":return"";case"os":return"developer_board";case"Cmd":return"launch";case"Entrypoint":return"input";case"Env":return"notes";case"Labels":return"label";case"User":return"face";case"Volumes":return"storage";case"WorkingDir":return"home";case"author":return"account_circle";case"id":case"digest":return"settings_ethernet";case"created_by":return"build";case"size":return"get_app";case"ExposedPorts":return"router"}}(e.entry.key),t.name=this.cleanName(e.entry.key),e.entry.value instanceof Array?t.values=e.entry.value:t.value=e.entry.value},onBeforeMount(e,t){this.onBeforeStart(e,t)},onBeforeUpdate(e,t){this.onBeforeStart(e,t)},cleanName:e=>"id"===e?e:"os"===e?"OS":e.replace(/([a-z])([A-Z])/g,"$1 $2").replace("_"," ").split(" ").map((e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`)).join(" ")},template:function(e,t,n,r){return e('',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return e.state.key}}]},{redundantAttribute:"expr485",selector:"[expr485]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.state.icon}}]},{redundantAttribute:"expr486",selector:"[expr486]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.state.name}}]},{type:n.IF,evaluate:function(e){return e.state.value},redundantAttribute:"expr487",selector:"[expr487]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return[e.state.value].join("")}}]}])},{type:n.EACH,getKey:null,condition:function(e){return e.state.values},template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return[e.value].join("")}}]}]),redundantAttribute:"expr488",selector:"[expr488]",itemName:"value",indexName:null,evaluate:function(e){return e.state.values}}])},name:"tag-history-element"}},onBeforeMount(e,t){t.elements=[],t.image=new gr(e.image,e.tag,{list:!0,registryUrl:e.registryUrl,onNotify:e.onNotify,onAuthentication:e.onAuthentication}),t.image.fillInfo()},onMounted(e,t){t.image.on("blobs",this.processBlobs),t.image.on("list",this.multiArchList)},onTabChanged(e,t){const n=this.state,{registryUrl:r,onNotify:a}=this.props;if(n.elements=[],n.image.variants[t]=n.image.variants[t]||new gr(this.props.image,e.digest,{list:!1,registryUrl:r,onNotify:a}),n.image.variants[t].blobs)return this.processBlobs(n.image.variants[t].blobs);n.image.variants[t].fillInfo(),n.image.variants[t].on("blobs",this.processBlobs)},processBlobs(e){function t(e){const t=[];for(var n in e)if(e.hasOwnProperty(n)&&"empty_layer"!=n){const r=e[n],a={key:n,value:Ar(n,r)};t.push(a)}return t.sort(Er)}this.state;const n=new Array(e.history.length+1);n[0]=t(function(e){const t=["architecture","User","created","docker_version","os","Cmd","Entrypoint","Env","Labels","User","Volumes","WorkingDir","author","id","ExposedPorts"].reduce((function(t,n){const r=e[n]||e.config[n];return r&&"architecture"===n&&e.variant?t[n]=r+e.variant:r&&(t[n]=r),t}),{});return!t.author&&t.Labels&&t.Labels.maintainer&&(t.author=e.config.Labels.maintainer,delete t.Labels.maintainer),t}(e)),e.history.forEach((function(r,a){n[e.history.length-a]=t(r)})),this.update({elements:n,loadend:!0})},multiArchList(e){const t=(e=e.manifests||e).map((function(e){return{title:e.platform.os+"/"+e.platform.architecture+(e.platform.variant?e.platform.variant:""),digest:e.digest}}));this.update({archs:t})},toTaglist(){rr.taglist(this.props.image)}},template:function(e,t,n,r){return e('
',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-card"},slots:[{id:"default",html:'
history ',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:'arrow_back ',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.toTaglist}}],redundantAttribute:"expr442",selector:"[expr442]"},{redundantAttribute:"expr443",selector:"[expr443]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return["History of ",e.props.image,":",e.props.tag].join("")}}]}]}],attributes:[],redundantAttribute:"expr441",selector:"[expr441]"},{type:n.IF,evaluate:function(e){return!e.state.loadend},redundantAttribute:"expr444",selector:"[expr444]",template:e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-spinner"},slots:[],attributes:[],redundantAttribute:"expr445",selector:"[expr445]"}])},{type:n.IF,evaluate:function(e){return e.state.archs&&e.state.loadend},redundantAttribute:"expr446",selector:"[expr446]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-tabs"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"useLine",evaluate:function(e){return!0}},{type:t.ATTRIBUTE,name:"tabs",evaluate:function(e){return e.state.archs}},{type:t.EVENT,name:"onTabChanged",evaluate:function(e){return e.onTabChanged}}]}])},{type:n.EACH,getKey:null,condition:null,template:e(null,[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-card"},slots:[{id:"default",html:' ',bindings:[{type:n.EACH,getKey:null,condition:function(e){return e.entry.value&&e.entry.value.length>0},template:e(null,[{type:n.TAG,getComponent:r,evaluate:function(e){return"tag-history-element"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"entry",evaluate:function(e){return e.entry}}]}]),redundantAttribute:"expr448",selector:"[expr448]",itemName:"entry",indexName:null,evaluate:function(e){return e.element}}]}],attributes:[]}]),redundantAttribute:"expr447",selector:"[expr447]",itemName:"element",indexName:null,evaluate:function(e){return e.state.elements}}])},name:"tag-history"},DialogsMenu:{css:'dialogs-menu > .container,[is="dialogs-menu"] > .container{ position: absolute; top: 0px; right: 16px; color: #000; list-style-type: disc; margin-block-start: 0.7em; } dialogs-menu .overlay,[is="dialogs-menu"] .overlay{ position: fixed; height: 100%; width: 100%; top: 0; right: 0; z-index: 10; } dialogs-menu material-button,[is="dialogs-menu"] material-button{ background: rgba(255, 255, 255, 0); float: right; z-index: 2; } dialogs-menu material-button .content i.material-icons,[is="dialogs-menu"] material-button .content i.material-icons{ color: #fff; font-size: 24px; } dialogs-menu material-dropdown-list,[is="dialogs-menu"] material-dropdown-list{ display: inline-block; position: relative; } dialogs-menu material-dropdown-list ul.dropdown-content,[is="dialogs-menu"] material-dropdown-list ul.dropdown-content{ min-width: 156px; padding: 8px 0; margin: 0; } dialogs-menu material-dropdown-list ul.dropdown-content li span,[is="dialogs-menu"] material-dropdown-list ul.dropdown-content li span{ font-size: 1rem; line-height: 1.2em; } dialogs-menu material-popup *,[is="dialogs-menu"] material-popup *{ line-height: 1em; } dialogs-menu material-popup material-button .content,[is="dialogs-menu"] material-popup material-button .content{ line-height: 36px; }',exports:{components:{AddRegistryUrl:{css:null,exports:{onKeyUp(e){13===e.keyCode&&this.add()},add(){const e=this.$("input");if(!e||!e.value||0===e.value.length)return this.props.onNotify("The input field is empty. Please enter an url.",!0);if(!e.value.startsWith("http"))return this.props.onNotify("The input field should start with http:// or https://.",!0);const t=e.value.trim().replace(/\/*$/,""),n=Qn().filter((e=>e!==t));localStorage.setItem("registryServer",JSON.stringify([t].concat(n))),rr.home(),this.props.onServerChange(t),this.props.onClose(),setTimeout((()=>rr.updateUrlQueryParam(t)),100)}},template:function(e,t,n,r){return e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-popup"},slots:[{id:"title",html:'Add your Server ?
',bindings:[]},{id:"content",html:'Write your URL without /v2
',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-input"},slots:[],attributes:[{type:t.EVENT,name:"onkeyup",evaluate:function(e){return e.onKeyUp}}],redundantAttribute:"expr490",selector:"[expr490]"}]},{id:"action",html:'
',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:"\n Add\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.add}}],redundantAttribute:"expr491",selector:"[expr491]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:"\n Cancel\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.props.onClose}}],redundantAttribute:"expr492",selector:"[expr492]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.props.opened}},{type:t.EVENT,name:"onClick",evaluate:function(e){return e.props.onClose}}],redundantAttribute:"expr489",selector:"[expr489]"}])},name:"add-registry-url"},ChangeRegistryUrl:{css:'change-registry-url select,[is="change-registry-url"] select{ position: relative; outline: 0; box-shadow: none; padding: 0; width: 100%; background: 0 0; border: none; font-weight: 400; line-height: 24px; height: 24px; border-bottom: 1px solid #2f6975; appearance: none; -moz-appearance: none; -webkit-appearance: none; margin: 1.5em 0; }',exports:{change(e){const t=this.$("select");if(!t||!t.value||0===t.value.length)return this.props.onNotify("The select field is empty. Please add an url.",!0);if(!t.value.startsWith("http"))return this.props.onNotify("The select field should start with http:// or https://.",!0);const n=t.value.trim().replace(/\/*$/,""),r=Qn().filter((e=>e!==n));localStorage.setItem("registryServer",JSON.stringify([n].concat(r))),rr.home(),this.props.onServerChange(n),this.props.onClose(),setTimeout((()=>rr.updateUrlQueryParam(n)),100)},getRegistryServers:Qn},template:function(e,t,n,r){return e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-popup"},slots:[{id:"title",html:'Change your Server ?
',bindings:[]},{id:"content",html:'
',bindings:[{type:n.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.url}},{type:t.ATTRIBUTE,name:"value",evaluate:function(e){return e.url}}]}]),redundantAttribute:"expr499",selector:"[expr499]",itemName:"url",indexName:null,evaluate:function(e){return e.getRegistryServers()}}]},{id:"action",html:'
',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:"\n Change\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.change}}],redundantAttribute:"expr500",selector:"[expr500]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:"\n Cancel\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.props.onClose}}],redundantAttribute:"expr501",selector:"[expr501]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.props.opened}},{type:t.EVENT,name:"onClick",evaluate:function(e){return e.props.onClick}}],redundantAttribute:"expr498",selector:"[expr498]"}])},name:"change-registry-url"},RemoveRegistryUrl:{css:'remove-registry-url material-popup .popup material-button,[is="remove-registry-url"] material-popup .popup material-button{ margin-right: 1em; } remove-registry-url material-popup .popup material-button .content i.material-icons,[is="remove-registry-url"] material-popup .popup material-button .content i.material-icons{ color: #777; }',exports:{remove(e){const t=e.currentTarget.attributes.url&&e.currentTarget.attributes.url.value,n=Qn().filter((e=>e!==t));localStorage.setItem("registryServer",JSON.stringify(n)),setTimeout((()=>this.update()),100)},getRegistryServers:Qn},template:function(e,t,n,r){return e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-popup"},slots:[{id:"title",html:'Remove your Registry Server ?
',bindings:[]},{id:"content",html:'',bindings:[{type:n.EACH,getKey:null,condition:null,template:e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:'delete ',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.remove}},{type:t.ATTRIBUTE,name:"url",evaluate:function(e){return e.url}}],redundantAttribute:"expr495",selector:"[expr495]"},{redundantAttribute:"expr496",selector:"[expr496]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.url}}]}]),redundantAttribute:"expr494",selector:"[expr494]",itemName:"url",indexName:null,evaluate:function(e){return e.getRegistryServers()}}]},{id:"action",html:'
',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:"\n Close\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.props.onClose}}],redundantAttribute:"expr497",selector:"[expr497]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.props.opened}},{type:t.EVENT,name:"onClick",evaluate:function(e){return e.props.onClose}}],redundantAttribute:"expr493",selector:"[expr493]"}])},name:"remove-registry-url"}},dropdownItems:[{title:"Add URL",name:"add-registry-url"},{title:"Change URL",name:"change-registry-url"},{title:"Remove URL",name:"remove-registry-url"}],onDropdownSelect(e,t){this.update({[t.name]:!0,isDropdownOpened:!1})},onClose(e){return()=>{this.update({[e]:!1,isDropdownOpened:!1})}},onClick(){this.update({isDropdownOpened:!this.state.isDropdownOpened})}},template:function(e,t,n,r){return e('
',[{type:n.TAG,getComponent:r,evaluate:function(e){return"add-registry-url"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.state["add-registry-url"]}},{type:t.EVENT,name:"on-close",evaluate:function(e){return e.onClose("add-registry-url")}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.props.onNotify}},{type:t.EVENT,name:"on-server-change",evaluate:function(e){return e.props.onServerChange}}],redundantAttribute:"expr449",selector:"[expr449]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"change-registry-url"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.state["change-registry-url"]}},{type:t.EVENT,name:"on-close",evaluate:function(e){return e.onClose("change-registry-url")}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.props.onNotify}},{type:t.EVENT,name:"on-server-change",evaluate:function(e){return e.props.onServerChange}}],redundantAttribute:"expr450",selector:"[expr450]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"remove-registry-url"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.state["remove-registry-url"]}},{type:t.EVENT,name:"on-close",evaluate:function(e){return e.onClose("remove-registry-url")}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.props.onNotify}},{type:t.EVENT,name:"on-server-change",evaluate:function(e){return e.props.onServerChange}}],redundantAttribute:"expr451",selector:"[expr451]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"material-button"},slots:[{id:"default",html:'more_vert ',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return e.onClick}}],redundantAttribute:"expr452",selector:"[expr452]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"material-dropdown-list"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"items",evaluate:function(e){return e.dropdownItems}},{type:t.EVENT,name:"onSelect",evaluate:function(e){return e.onDropdownSelect}},{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.state.isDropdownOpened}}],redundantAttribute:"expr453",selector:"[expr453]"},{type:n.IF,evaluate:function(e){return e.state.isDropdownOpened},redundantAttribute:"expr454",selector:"[expr454]",template:e(null,[{expressions:[{type:t.EVENT,name:"onclick",evaluate:function(e){return e.onClick}}]}])}])},name:"dialogs-menu"},SearchBar:ir,Router:Hn,Route:mn},onUpdated(e,t){t.snackbarIsError=!1,t.snackbarMessage=void 0},onBeforeMount(e){const t=e.registryUrl||("true"===e.singleRegistry?void 0:rr.getUrlQueryParam()||Qn(0))||window.location.origin+window.location.pathname.replace(/\/+$/,"");this.state.registryUrl=t.replace(/\/$/,""),this.state.name=e.name||Wn(e.registryUrl),this.state.catalogElementsLimit=e.catalogElementsLimit||1e5,this.state.pullUrl=this.pullUrl(this.state.registryUrl,e.pullUrl)},onServerChange(e){this.update({registryUrl:e,name:Wn(e),pullUrl:this.pullUrl(e),snackbarMessage:"Registry server changed to `"+e+"`."})},onAuthentication(e,t){if(e&&e.realm&&e.service&&e.scope){const{realm:n,service:r,scope:a}=e,i=new XMLHttpRequest;i.addEventListener("loadend",(()=>{try{const e=JSON.parse(i.responseText);t(e)}catch(e){this.notifySnackbar(`Failed to log in: ${e.message}`,!0)}})),i.open("GET",`${n}?service=${r}&scope=${a}`),i.send()}else t()},onAuthenticationClose(){this.update({authenticationDialogOpened:!1})},pullUrl:(e,t)=>Wn(t||e&&e.length>0&&e||window.location.host),notifySnackbar(e,t){"string"==typeof e?this.update({snackbarMessage:e,snackbarIsError:t||!1}):e&&e.message&&this.update({snackbarMessage:e.message,snackbarIsError:e.isError})},onSearch(e){this.update({filter:e})},baseRoute:"([^#]*?)/(\\?[^#]*?)?(#!)?(/?)",router:rr,version:"2.0.6",truthy:function(e){return!0===e||"true"===e}},template:function(e,t,n,r){return e(' ',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-navbar"},slots:[{id:"default",html:'Docker Registry UI
',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"search-bar"},slots:[],attributes:[{type:t.EVENT,name:"on-search",evaluate:function(e){return e.onSearch}}],redundantAttribute:"expr411",selector:"[expr411]"},{type:n.IF,evaluate:function(e){return"true"!==e.props.singleRegistry},redundantAttribute:"expr412",selector:"[expr412]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:function(e){return"dialogs-menu"},slots:[],attributes:[{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.notifySnackbar}},{type:t.EVENT,name:"on-server-change",evaluate:function(e){return e.onServerChange}}]}])}]}],attributes:[],redundantAttribute:"expr410",selector:"[expr410]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"router"},slots:[{id:"default",html:' ',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"route"},slots:[{id:"default",html:' ',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"catalog"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"registry-url",evaluate:function(e){return e.state.registryUrl}},{type:t.ATTRIBUTE,name:"registry-name",evaluate:function(e){return e.state.name}},{type:t.ATTRIBUTE,name:"catalog-elements-limit",evaluate:function(e){return e.state.catalogElementsLimit}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.notifySnackbar}},{type:t.ATTRIBUTE,name:"filter-results",evaluate:function(e){return e.state.filter}},{type:t.EVENT,name:"on-authentication",evaluate:function(e){return e.onAuthentication}}],redundantAttribute:"expr415",selector:"[expr415]"}]}],attributes:[{type:t.ATTRIBUTE,name:"path",evaluate:function(e){return e.baseRoute}}],redundantAttribute:"expr414",selector:"[expr414]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"route"},slots:[{id:"default",html:' ',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"tag-list"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"registry-url",evaluate:function(e){return e.state.registryUrl}},{type:t.ATTRIBUTE,name:"registry-name",evaluate:function(e){return e.state.name}},{type:t.ATTRIBUTE,name:"pull-url",evaluate:function(e){return e.state.pullUrl}},{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.router.getTagListImage()}},{type:t.ATTRIBUTE,name:"show-content-digest",evaluate:function(e){return e.truthy(e.props.showContentDigest)}},{type:t.ATTRIBUTE,name:"is-image-remove-activated",evaluate:function(e){return e.truthy(e.props.isImageRemoveActivated)}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.notifySnackbar}},{type:t.ATTRIBUTE,name:"filter-results",evaluate:function(e){return e.state.filter}},{type:t.EVENT,name:"on-authentication",evaluate:function(e){return e.onAuthentication}}],redundantAttribute:"expr417",selector:"[expr417]"}]}],attributes:[{type:t.ATTRIBUTE,name:"path",evaluate:function(e){return[e.baseRoute,"taglist/(.*)"].join("")}}],redundantAttribute:"expr416",selector:"[expr416]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"route"},slots:[{id:"default",html:' ',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"tag-history"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"registry-url",evaluate:function(e){return e.state.registryUrl}},{type:t.ATTRIBUTE,name:"registry-name",evaluate:function(e){return e.state.name}},{type:t.ATTRIBUTE,name:"pull-url",evaluate:function(e){return e.state.pullUrl}},{type:t.ATTRIBUTE,name:"image",evaluate:function(e){return e.router.getTagHistoryImage()}},{type:t.ATTRIBUTE,name:"tag",evaluate:function(e){return e.router.getTagHistoryTag()}},{type:t.ATTRIBUTE,name:"is-image-remove-activated",evaluate:function(e){return e.truthy(e.props.isImageRemoveActivated)}},{type:t.EVENT,name:"on-notify",evaluate:function(e){return e.notifySnackbar}},{type:t.EVENT,name:"on-authentication",evaluate:function(e){return e.onAuthentication}}],redundantAttribute:"expr419",selector:"[expr419]"}]}],attributes:[{type:t.ATTRIBUTE,name:"path",evaluate:function(e){return[e.baseRoute,"taghistory/(.*)"].join("")}}],redundantAttribute:"expr418",selector:"[expr418]"}]}],attributes:[],redundantAttribute:"expr413",selector:"[expr413]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"registry-authentication"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"realm",evaluate:function(e){return e.state.realm}},{type:t.ATTRIBUTE,name:"scope",evaluate:function(e){return e.state.scope}},{type:t.ATTRIBUTE,name:"service",evaluate:function(e){return e.state.service}},{type:t.EVENT,name:"on-close",evaluate:function(e){return e.onAuthenticationClose}},{type:t.EVENT,name:"on-authenticated",evaluate:function(e){return e.state.onAuthenticated}},{type:t.ATTRIBUTE,name:"opened",evaluate:function(e){return e.state.authenticationDialogOpened}}],redundantAttribute:"expr420",selector:"[expr420]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"material-snackbar"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"message",evaluate:function(e){return e.state.snackbarMessage}},{type:t.ATTRIBUTE,name:"is-error",evaluate:function(e){return e.state.snackbarIsError}}],redundantAttribute:"expr421",selector:"[expr421]"},{type:n.TAG,getComponent:r,evaluate:function(e){return"material-footer"},slots:[{id:"logo",html:' ',bindings:[{redundantAttribute:"expr423",selector:"[expr423]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return["Docker Registry UI ",e.version].join("")}}]}]},{id:"link-list",html:'',bindings:[]}],attributes:[],redundantAttribute:"expr422",selector:"[expr422]"}])},name:"docker-registry-ui"};At("material-card",Nt),At("material-footer",kt),At("material-navbar",{css:null,exports:null,template:function(e,t,n,r){return e('
',[{expressions:[{type:t.ATTRIBUTE,name:"role",evaluate:function(e){return"toolbar"}}]},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr521",selector:"[expr521]"}])},name:"material-navbar"}),At("material-spinner",{css:null,exports:null,template:function(e,t,n,r){return e(' ',[{redundantAttribute:"expr541",selector:"[expr541]",expressions:[{type:t.ATTRIBUTE,name:"stroke-width",evaluate:function(e){return e.props.strokewidth||3}}]}])},name:"material-spinner"}),At("material-button",Ct),At("material-waves",jt),At("material-checkbox",It),At("material-snackbar",Bt),At("material-tabs",Lt),At("material-dropdown-list",Rt),At("material-popup",St),At("material-input",Ot);for(var Cr,Nr=(Cr=wr,function(e,t,n){var r=void 0===n?{}:n,a=r.slots,i=r.attributes,o=r.parentScope;return function(){for(var e=arguments.length,t=new Array(e),n=0;n .
},
onBeforeMount(props) {
// props.singleRegistry === 'true' means old static version
- this.state.registryUrl = props.registryUrl ||
+ const registryUrl = props.registryUrl ||
(props.singleRegistry === 'true' ? undefined : (router.getUrlQueryParam() || getRegistryServers(0))) ||
(window.location.origin + window.location.pathname.replace(/\/+$/, ''));
+ this.state.registryUrl = registryUrl.replace(/\/$/, '');
this.state.name = props.name || stripHttps(props.registryUrl);
this.state.catalogElementsLimit = props.catalogElementsLimit || 100000;
this.state.pullUrl = this.pullUrl(this.state.registryUrl, props.pullUrl);
diff --git a/src/scripts/docker-image.js b/src/scripts/docker-image.js
index 9b7e5070..1875b95c 100644
--- a/src/scripts/docker-image.js
+++ b/src/scripts/docker-image.js
@@ -98,7 +98,7 @@ export class DockerImage {
oReq.addEventListener('loadend', function () {
if (this.status == 200 || this.status == 202) {
const response = JSON.parse(this.responseText);
- if (response.mediaType === 'application/vnd.docker.distribution.manifest.list.v2+json') {
+ if (response.mediaType === 'application/vnd.docker.distribution.manifest.list.v2+json' && !response.layers) {
self.trigger('list', response);
const manifest = response.manifests[0];
const image = new DockerImage(self.name, manifest.digest, { ...self.opts, list: false });