← Back
Editing: index-legacy30.js
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(e,n,r){return(n=function(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return n};var e,n={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new T(r||[]);return a(i,"_invoke",{value:C(t,n,u)}),i}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var v="suspendedStart",m="suspendedYield",y="executing",d="completed",g={};function b(){}function w(){}function x(){}var j={};f(j,c,(function(){return this}));var k=Object.getPrototypeOf,O=k&&k(k(D([])));O&&O!==r&&i.call(O,c)&&(j=O);var L=x.prototype=b.prototype=Object.create(j);function _(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(e,n){function r(o,a,u,c){var l=h(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):n.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var o=v;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=P(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===v)throw o=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=y;var l=h(t,n,r);if("normal"===l.type){if(o=r.done?d:m,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=d,r.method="throw",r.arg=l.arg)}}}function P(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function D(n){if(n||""===n){var r=n[c];if(r)return r.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var o=-1,a=function t(){for(;++o<n.length;)if(i.call(n,o))return t.value=n[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(n)+" is not iterable")}return w.prototype=x,a(L,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},n.awrap=function(t){return{__await:t}},_(E.prototype),f(E.prototype,l,(function(){return this})),n.AsyncIterator=E,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new E(p(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),f(L,s,"Generator"),f(L,c,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=D,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},n}function i(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function u(t){i(a,r,o,u,c,"next",t)}function c(t){i(a,r,o,u,c,"throw",t)}u(void 0)}))}}System.register(["./index-legacy103.js?v=VERSION_NUMBER","./index-legacy101.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./utils-lib-legacy.js?v=VERSION_NUMBER","./useMethods-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER"],(function(t,e){"use strict";var r,i,u,c,l,s,f,p,h,v,m,y,d,g,b,w,x,j,k,O,L,_,E,C,P,S,N,T,D,G,I,R,B,A,F,q,z,V,H,J;return{setters:[function(t){r=t._},function(t){i=t._},function(t){u=t.k,c=t.r,l=t.c,s=t.e,f=t.aQ,p=t.ba,h=t.w,v=t.p,m=t.a4,y=t.q,d=t.v,g=t.A,b=t.y,w=t.x,x=t.O},function(t){j=t.ay,k=t.a8,O=t.K,L=t.b_,_=t.p,E=t.bZ,C=t.n,P=t.L,S=t.u,N=t.aM,T=t.a6,D=t.A,G=t.w,I=t.R,R=t.N,B=t.e},function(t){A=t.o,F=t.b,q=t.a,z=t.N},function(t){V=t.c,H=t.a,J=t.u},null,null],execute:function(){var K,M=j(),Y=M.refs,Q=Y.customLimit,U=Y.isRefreshTableList,W=M.getCurrentCon,Z=u({search:"",isRefresh:!0}),X=c([]),$=function(){var t=a(o().mark((function t(e,n,r,i,u){var c,l,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=i.label,l=i.value,s=function(){var t=a(o().mark((function t(e,n){var r,i,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.id,i=e.name,t.t0=l,t.next="delete"===t.t0?4:8;break;case 4:return a={id:r,name:i,force:"0"},t.next=7,E({data:JSON.stringify(a)});case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),t.next=4,e({title:"批量".concat(c,"镜像"),content:"批量".concat(c,"已选的镜像,是否继续操作!"),column:[{label:"镜像名",prop:"name"},V()],onConfirm:function(){var t=a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n(s);case 2:return U.value=!0,t.abrupt("return",!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 4:case"end":return t.stop()}}),t)})));return function(e,n,r,o,i){return t.apply(this,arguments)}}(),tt=[{active:!0,label:"从仓库中拉取",type:"button",onClick:function(){C({component:function(){return P((function(){return e.import("./index-legacy218.js?v=VERSION_NUMBER")}),void 0,e.meta.url)},title:"拉取镜像",area:64})}},{active:!1,label:"导入镜像",type:"button",onClick:function(){C({component:function(){return P((function(){return e.import("./index-legacy219.js?v=VERSION_NUMBER")}),void 0,e.meta.url)},title:"导入镜像",area:43,btn:"导入"})}},{active:!1,label:"构建镜像",type:"button",onClick:function(){C({component:function(){return P((function(){return e.import("./index-legacy220.js?v=VERSION_NUMBER")}),void 0,e.meta.url)},title:"构建镜像",area:54,btn:"提交"})}},{active:!1,label:"线上镜像",type:"button",onClick:function(){C({component:function(){return P((function(){return e.import("./index-legacy29.js?v=VERSION_NUMBER").then((function(t){return t.a}))}),void 0,e.meta.url)},title:"Docker线上镜像搜索",area:80})}},{active:!1,label:"清理镜像",type:"button",onClick:(K=a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:C({component:function(){return P((function(){return e.import("./clear-confirm-legacy.js?v=VERSION_NUMBER")}),void 0,e.meta.url)},title:"清理镜像",area:35,btn:!0});case 1:case"end":return t.stop()}}),t)}))),function(){return K.apply(this,arguments)})}],et=function(){var t=a(o().mark((function t(e,n){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={id:e.id,name:e.name,force:"0"},t.prev=1,t.next=4,_({type:"calc",title:"删除镜像【".concat(e.name,"】"),width:"35rem",content:"您真的要删除镜像【".concat(e.name,"】吗?")});case 4:O({request:E({data:JSON.stringify(r)}),message:!0,success:function(){n()}}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1);case 10:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e,n){return t.apply(this,arguments)}}(),nt=function(t){C({component:function(){return P((function(){return e.import("./index-legacy221.js?v=VERSION_NUMBER")}),void 0,e.meta.url)},title:"推送【".concat(t.name,"】到仓库"),area:43,btn:!0,compData:{row:t}})},rt=function(t){C({component:function(){return P((function(){return e.import("./index-legacy222.js?v=VERSION_NUMBER")}),void 0,e.meta.url)},title:"导出【".concat(t.name,"】镜像"),area:43,btn:"导出",compData:{row:t}})},ot=function(){var t=a(o().mark((function t(e){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:q({image:e.name});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),it=function(){var t=a(o().mark((function t(e){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={id:e.container_id,name:e.container_name},t.next=3,W(n.id);case 3:A(n);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),at=function(){var t=a(o().mark((function t(e,r){var i,a,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i=e.toLowerCase(),a=["name","id","container"],u=X.value.filter((function(t){var e=n(n({},t),{},{container:t.containers.map((function(t){return t.container_name})).join("")||""});return a.some((function(t){var n;return null===(n=e[t])||void 0===n?void 0:n.toLowerCase().includes(i)}))})),t.abrupt("return",{data:F({limit:r.limit,list:u,p:r.p})||[],total:u.length});case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",{data:[],total:0});case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}(),ut=k([{label:"删除项目",value:"delete",event:$}]),ct=function(){var t=a(o().mark((function t(e,n){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(U.value=!1,!n){t.next=3;break}return t.abrupt("return",at(e.search,e));case 3:if(Z.isRefresh){t.next=5;break}return t.abrupt("return",{data:F({limit:e.limit,list:X.value,p:e.p})||[],total:X.value.length});case 5:return Z.isRefresh=!1,t.next=8,O({request:L(),data:Array});case 8:return r=t.sent,X.value=r,t.abrupt("return",{data:F({limit:e.limit,list:X.value,p:e.p})||[],total:X.value.length});case 11:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),lt=function(t,e){setTimeout((function(){Q.value.images||function(t,e){setTimeout((function(){t.value>900?e.value.limit=20:e.value.limit=10}),0)}(t,e)}),0)},st={class:"relative"},ft={class:"flex items-center"},pt=l({__name:"index",setup:function(t){var e=j().refs.isRefreshTableList,n=S().mainHeight,u=N({options:tt}).BtOperation,c=!1,l=function(t,e){Z.isRefresh=!0,t&&!isNaN(t)&&(P.value.p=t),e?(P.value.search=e,c=!0):c=!1,C()},k=T({request:function(t){return ct(t,c)},columns:[H(),{label:"ID",prop:"id",width:110,render:function(t){var e=t.id.slice(7);return s(f,{placement:"top"},{default:function(){return s("div",{onClick:function(){return D({value:t.id})}},[e.slice(0,12)])},content:function(){return s("div",null,[t.id])}})}},{label:"镜像名",prop:"name",isCustom:!0},{label:"大小",prop:"size",width:100,isCustom:!0,render:function(t){return G(t.size)}},{label:"创建时间",prop:"time",width:160,isCustom:!0,render:function(t){return I(t.time)}},{label:"使用镜像的容器",prop:"used",minWidth:180,isCustom:!0,render:function(t){return 1!==t.used?"--":R(t.containers)&&t.containers.length>0?s("span",{class:"flex items-center whitespace-pre-wrap gap-4 min-h-[3rem]"},[t.containers.map((function(t){return s(p,{class:"mr-1 cursor-pointer",type:"success",size:"small",onClick:function(){return it(t)}},{default:function(){return[t.container_name]}})}))]):"--"}},J([{onClick:ot,width:80,title:"创建容器"},{onClick:nt,title:"推送"},{onClick:rt,title:"导出"},{onClick:function(t){return et(t,l)},title:"删除"}])],extension:[ut]}),O=k.BtTable,L=k.BtPage,_=k.BtBatch,E=k.BtColumn,C=k.refresh,P=k.param;return h((function(){return e.value}),(function(t){t&&(l(),e.value=!1)})),v(a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:lt(n,P);case 1:case"end":return t.stop()}}),t)})))),m((function(){Z.search="",Z.isRefresh=!0,X.value=[]})),function(t,e){var o=i,a=r;return y(),d("div",st,[s(a,null,{"header-left":g((function(){return[b("div",ft,[s(w(u)),b("a",{class:"ml-[1rem] bt-link",onClick:e[0]||(e[0]=function(){return w(z)&&w(z).apply(void 0,arguments)})},"需求反馈")])]})),"header-right":g((function(){return[s(o,{icon:"el-search",class:"!mr-[1rem] !w-[26rem]",modelValue:w(Z).search,"onUpdate:modelValue":e[1]||(e[1]=function(t){return w(Z).search=t}),clearable:"",placeholder:"镜像名、ID、使用的容器",onIconClick:e[2]||(e[2]=function(t){return l(1,w(Z).search)}),onClear:e[3]||(e[3]=function(t){return l(1)}),onKeyup:e[4]||(e[4]=x((function(t){return l(1,w(Z).search)}),["enter"]))},null,8,["modelValue"]),s(w(E))]})),content:g((function(){return[s(w(O),{key:"ImageTable","max-height":w(n)-220},null,8,["max-height"])]})),"footer-left":g((function(){return[s(w(_))]})),"footer-right":g((function(){return[s(w(L))]})),popup:g((function(){return e[5]||(e[5]=[])})),_:1})])}}});t("default",B(pt,[["__scopeId","data-v-71d635d4"]]))}}}))}();
Save File
Cancel