← Back
Editing: container-mirror-legacy.js
!function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function l(r,o,a,u){var l=o&&o.prototype instanceof c?o:c,s=Object.create(l.prototype);return n(s,"_invoke",function(r,n,o){var a,u,l,c=0,s=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,u=0,l=e,p.n=r,i}};function d(r,n){for(u=r,l=n,t=0;!f&&c&&!o&&t<s.length;t++){var o,a=s[t],d=p.p,m=a[2];r>3?(o=m===n)&&(l=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=r<2&&d<a[1])?(u=0,p.v=n,p.n=a[1]):d<m&&(o=r<3||a[0]>n||n>m)&&(a[4]=r,a[5]=n,p.n=m,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&d(s,m),u=s,l=m;(t=u<2?e:l)||!f;){a||(u?u<3?(u>1&&(p.n=-1),d(u,l)):p.n=l:p.v=l);try{if(c=2,a){if(u||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=a.return)&&t.call(a),u<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=e}else if((t=(f=p.n<0)?l:r.call(n,p))!==i)break}catch(t){a=e,u=1,l=t}finally{c=1}}return{value:t,done:f}}}(r,a,u),!0),s}var i={};function c(){}function s(){}function f(){}t=Object.getPrototypeOf;var p=[][a]?t(t([][a]())):(n(t={},a,function(){return this}),t),d=f.prototype=c.prototype=Object.create(p);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,n(e,u,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=f,n(d,"constructor",f),n(f,"constructor",s),s.displayName="GeneratorFunction",n(f,u,"GeneratorFunction"),n(d),n(d,u,"Generator"),n(d,a,function(){return this}),n(d,"toString",function(){return"[object Generator]"}),(r=function(){return{w:l,m:m}})()}function n(e,t,r,o){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}n=function(e,t,r,o){function u(t,r){n(e,t,function(e){return this._invoke(t,r,e)})}t?a?a(e,t,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[t]=r:(u("next",0),u("throw",1),u("return",2))},n(e,t,r,o)}function o(e,t,r,n,o,a,u){try{var l=e[a](u),i=l.value}catch(e){return void r(e)}l.done?t(i):Promise.resolve(i).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var u=e.apply(t,r);function l(e){o(u,n,a,l,i,"next",e)}function i(e){o(u,n,a,l,i,"throw",e)}l(void 0)})}}System.register(["./base-lib-legacy.js?v=1765440387","./index-legacy91.js?v=1765440387","./utils-lib-legacy.js?v=1765440387","./validator-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387","./column-legacy.js?v=1765440387"],function(t,n){"use strict";var o,u,l,i,c,s,f,p,d,m,h,y,v,g,b,V,_,w,j,x,S,O,E,U,k,A,P,T,C,I,G;return{setters:[function(e){o=e.c,u=e.r,l=e.k,i=e.U,c=e.p,s=e.q,f=e.v,p=e.e,d=e.A,m=e.x,h=e.P,y=e.y,v=e.H,g=e.I,b=e.B,V=e.Q,_=e.aa,w=e.T,j=e.ad,x=e.D,S=e.a8},function(e){O=e._},function(e){E=e.ay,U=e.K,k=e.c6,A=e.iK,P=e.$,T=e.j,C=e.ag,I=e.e},function(e){G=e.f},null,null,null],execute:function(){var n={class:"container-dialog"},q={class:"flex items-center"},D={class:"mt-[2.4rem]"},F={class:"flex items-center"},H=o({__name:"container-mirror",props:{compData:{default:function(){return{}}}},setup:function(t){var o=E(),I=o.refs.currentConDetail,H=o.getCurrentCon,K=t,N=u("easy"),$=[{label:"简单模式",value:"easy"},{label:"高级模式",value:"more"}],z=l({repository:"",tag:"latest",stash:"official",message:"",author:"",isExport:[],path:"",name:""}),B=i([]),J=u(),M={repository:[{required:!0,trigger:["blur","change"],message:"请输入镜像名"}]},Q=function(){G({type:"dir",change:function(e){z.path=e}})},R=function(){var e=a(r().m(function e(){var t;return r().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,J.value.validate();case 1:t={id:K.compData.row.id,repository:z.repository,tag:z.tag},"more"==N.value&&(t.message=z.message,t.author=z.author,t.repository="".concat(""!=z.stash?z.stash+"/":"").concat(z.repository),z.isExport.length>0&&(t.path=z.path,t.name=z.name)),U({request:A({data:JSON.stringify(t)}),message:!0,success:function(){var e=a(r().m(function e(t){return r().w(function(e){for(;;)switch(e.n){case 0:if(!t.status){e.n=2;break}return e.n=1,H(I.value.Id);case 1:N.value="easy",L();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),L=function(){z.repository="",z.tag="latest",z.stash="official",z.message="",z.author="",z.isExport=[],z.path="",z.name="",J.value.clearValidate()};return c(a(r().m(function e(){return r().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,U({request:k(),data:Array,success:function(e){B.value=e.map(function(e){return{label:e.name,value:"docker.io"===e.url?"official":e.namespace}})}});case 1:return e.a(2)}},e)}))),function(t,r){var o=P,a=_,u=T,l=C,i=w,c=j,E=O,U=x,k=S;return s(),f("div",n,[p(k,{ref_key:"cmdFormRef",ref:J,model:m(z),rules:M,"label-position":"right",onSubmit:r[10]||(r[10]=V(function(){},["prevent"]))},{default:d(function(){return[p(a,{style:{"margin-bottom":"1.5rem"},label:"创建方式"},{default:d(function(){return[p(o,{type:"button",modelValue:m(N),"onUpdate:modelValue":r[0]||(r[0]=function(e){return h(N)?N.value=e:null}),options:$},null,8,["modelValue"])]}),_:1}),p(a,{prop:"repository",style:{"margin-bottom":"1.5rem"},label:"镜像名"},{default:d(function(){return[p(u,{modelValue:m(z).repository,"onUpdate:modelValue":r[1]||(r[1]=function(e){return m(z).repository=e}),width:"24rem",placeholder:"请输入镜像名"},null,8,["modelValue"])]}),_:1}),p(a,{prop:"path",label:"版本号",display:"flex"},{default:d(function(){return[y("div",q,[p(u,{modelValue:m(z).tag,"onUpdate:modelValue":r[2]||(r[2]=function(e){return m(z).tag=e}),width:"24rem",placeholder:"请输入版本号"},null,8,["modelValue"]),r[11]||(r[11]=y("span",{class:"ml-[1rem] text-[#666] text-[1.2rem] whitespace-nowrap"},"默认:latest",-1))])]}),_:1}),v(y("div",null,[p(a,{prop:"path",label:"仓库地址"},{default:d(function(){return[p(l,{modelValue:m(z).stash,"onUpdate:modelValue":r[3]||(r[3]=function(e){return m(z).stash=e}),options:m(B),class:"!w-[24rem]",placeholder:"请选择仓库地址"},null,8,["modelValue","options"])]}),_:1}),p(a,{prop:"path",label:"描述"},{default:d(function(){return[p(u,{modelValue:m(z).message,"onUpdate:modelValue":r[4]||(r[4]=function(e){return m(z).message=e}),width:"24rem",placeholder:"描述"},null,8,["modelValue"])]}),_:1}),p(a,{prop:"path",label:"作者"},{default:d(function(){return[p(u,{modelValue:m(z).author,"onUpdate:modelValue":r[5]||(r[5]=function(e){return m(z).author=e}),width:"24rem",placeholder:"作者"},null,8,["modelValue"])]}),_:1}),y("div",D,[p(c,{modelValue:m(z).isExport,"onUpdate:modelValue":r[6]||(r[6]=function(e){return m(z).isExport=e}),class:"mb-[2rem] ml-[10rem]"},{default:d(function(){return[p(i,{size:"default",label:"生成镜像并导出压缩包",value:"生成镜像并导出压缩包"})]}),_:1},8,["modelValue"]),v(p(a,{label:" "},{default:d(function(){return[p(E,{modelValue:m(z).path,"onUpdate:modelValue":r[7]||(r[7]=function(e){return m(z).path=e}),class:"!w-[24rem]",icon:"el-folder-opened",onIconClick:Q,onChangePassive:r[8]||(r[8]=function(e){z.path=z.path.replace(/\s+/g,"")}),placeholder:"请输入镜像路径"},null,8,["modelValue"])]}),_:1},512),[[g,m(z).isExport.length>0]]),v(p(a,{prop:"path",label:"文件名"},{default:d(function(){return[y("div",F,[p(u,{modelValue:m(z).name,"onUpdate:modelValue":r[9]||(r[9]=function(e){return m(z).name=e}),width:"24rem",placeholder:"文件名"},null,8,["modelValue"]),r[12]||(r[12]=y("span",{class:"ml-[1rem]"},".tar",-1))])]}),_:1},512),[[g,m(z).isExport.length>0]])])],512),[[g,"more"==m(N)]]),p(U,{type:"primary",class:"ml-[10rem]",onClick:R},{default:d(function(){return e(r[13]||(r[13]=[b("生成镜像",-1)]))}),_:1})]}),_:1},8,["model"])])}}});t("default",I(H,[["__scopeId","data-v-8a5dcb11"]]))}}})}();
Save File
Cancel