diff --git a/asset/static/7297.3c8c32bb.async.js b/asset/static/7297.3c8c32bb.async.js new file mode 100644 index 00000000..89c17396 --- /dev/null +++ b/asset/static/7297.3c8c32bb.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7297],{7297:function(H,B,t){t.d(B,{Z:function(){return Ie}});var W=t(64599),s=t.n(W),M=t(15009),l=t.n(M),m=t(99289),D=t.n(m),I=t(5574),T=t.n(I),y=t(10641),h=t(31418),x=t(60922),d=t(42075),j=t(96074),c=t(83062),g=t(50136),A=t(54006),w=t(43425),E=t(95591),C=t(45742),L=t(89035),o=t(74842),f=t(87784),R=t(33160),N=t(30159),i=t(94359),fe=t(78498),V=t(60335),G=t(80821),$=t(67294),ne=t(62597),me=t(87662),ve=t(84410),ie=t(16165),n=t(85893),_e=function(){return(0,n.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"18403",children:(0,n.jsx)("path",{d:"M224 192v64H96v576h128v64h64v-64h64v64h64v-64h64v64h64v-64h64v64h64v-64h64v64h64v-64h128V256h-128V192h-64v64h-64V192h-64v64h-64V192h-64v64h-64V192h-64v64H288V192z m-64 128h704v448H160z m96 64c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32zM256 512c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m512 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32zM256 640c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z","p-id":"18404"})})},pe=function(){return(0,n.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"18546",children:(0,n.jsx)("path",{d:"M64 224v576h416v-32c0-17.76 14.24-32 32-32 17.76 0 32 14.24 32 32v32h416V224z m64 64h768v288H128z m64 64v160h192v-160z m224 0v160h192v-160z m224 0v160h192v-160zM256 416h64v32H256z m224 0h64v32h-64z m224 0h64v32h-64zM128 640h768v96h-300.992c-14.144-35.52-42.752-64-83.008-64-40.256 0-68.864 28.48-83.008 64H128z","p-id":"18547"})})};function ge(p){var b=(0,$.useState)(),_=T()(b,2),F=_[0],ee=_[1];(0,$.useEffect)(function(){(0,ve.i)({id:p.md5}).then(function(Q){ee(Q)})},[p.md5,p.shouldUpdate]);var re=function(Z){if(!Z.data||!Z.data.cpu_stats||!Z.data.cpu_stats.system_cpu_usage||!Z.data.precpu_stats.system_cpu_usage)return"";var z=Z.data.cpu_stats.cpu_usage.total_usage-Z.data.precpu_stats.cpu_usage.total_usage,se=Z.data.cpu_stats.system_cpu_usage-Z.data.precpu_stats.system_cpu_usage;return(0,n.jsxs)(c.Z,{title:"CPU\u5360\u7528\u7387",children:[(0,n.jsx)(ie.Z,{component:_e,style:{width:15,lineHeight:20}})," ","".concat((z/se*Z.data.cpu_stats.online_cpus*100).toFixed(2),"%")]})},ue=function(Z){return!Z.data||!Z.data.memory_stats||!Z.data.memory_stats.usage?"":(0,n.jsxs)(c.Z,{title:"\u5185\u5B58\u5360\u7528\u7387",children:[(0,n.jsx)(ie.Z,{component:pe,style:{width:15,lineHeight:20}})," ","".concat((Z.data.memory_stats.usage/Z.data.memory_stats.limit*100).toFixed(2),"%")]})};return(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(re,{data:F},"cpu"),(0,n.jsx)(ue,{data:F},"memory")]})}var le=t(67255),Ee=t(19632),ce=t.n(Ee),oe=t(27496),je=t(35995),Pe=t(99611),Oe=t(29158),ae=t(38345),De=t(55241),Y=t(66309);function ye(p){return(0,n.jsx)(De.Z,{placement:"right",content:(0,n.jsxs)(ae.Z,{direction:"column",style:{width:500},ghost:!0,children:[(0,n.jsx)(ae.Z,{title:"\u7AEF\u53E3",children:[].concat(ce()(p.publicPort),ce()(p.privatePort)).map(function(b,_){var F=p.serverIp;return F!=""&&F.indexOf(":")>-1&&(F="[".concat(F,"]")),F==""&&b.IP=="::"&&(F="[::1]"),F==""&&b.IP=="0.0.0.0"&&(F="127.0.0.1"),F==""&&(F=b.IP),(0,n.jsx)(d.Z,{size:"large",wrap:!0,children:(0,n.jsx)(Y.Z,{color:b.PublicPort?"#2db7f5":"warning",icon:b.PublicPort?(0,n.jsx)(oe.Z,{}):"",style:{marginBottom:5,width:210},children:b.PublicPort?(0,n.jsx)("a",{href:"http://".concat(F,":").concat(b.PublicPort),target:"_blank",children:"".concat(b.PublicPort?b.IP+":"+b.PublicPort+" -> ":"").concat(b.PrivatePort,"/").concat(b.Type)},"link".concat(_)):"".concat(b.PrivatePort,"/").concat(b.Type)})},"space".concat(_))})}),p.domain.length>0&&(0,n.jsx)(ae.Z,{title:"\u57DF\u540D",children:(0,n.jsx)(d.Z,{direction:"vertical",style:{textAlign:"left"},children:p.domain.map(function(b,_){return(0,n.jsx)(Y.Z,{color:"blue",icon:(0,n.jsx)(oe.Z,{}),children:(0,n.jsx)("a",{href:b,target:"_blank",children:b})},"domain".concat(_))})})})]}),children:(0,n.jsxs)(d.Z,{direction:"vertical",children:[p.privatePort.length>0&&(0,n.jsxs)(Y.Z,{color:"warning",icon:(0,n.jsx)(je.Z,{}),children:["\u5185\u90E8\u7AEF\u53E3: ",p.privatePort.length]}),p.publicPort.length>0&&(0,n.jsxs)(Y.Z,{color:"#2db7f5",icon:(0,n.jsx)(Pe.Z,{}),children:["\u5BF9\u5916\u7AEF\u53E3: ",p.publicPort.length]}),p.domain.length>0&&(0,n.jsxs)(Y.Z,{color:"blue",icon:(0,n.jsx)(Oe.Z,{}),children:["\u7ED1\u5B9A\u57DF\u540D: ",p.domain.length]})]})})}var Ce=t(24963),Re=(0,$.forwardRef)(function(p,b){var _=(0,$.useRef)(),F=(0,$.useState)(""),ee=T()(F,2),re=ee[0],ue=ee[1],Q=(0,$.useState)(),Z=T()(Q,2),z=Z[0],se=Z[1],Se=(0,$.useState)(1),de=T()(Se,2),he=de[0],be=de[1],Te=h.Z.useApp(),Me=(0,$.useContext)(Ce.Z),Ae=Me.notice;return(0,$.useImperativeHandle)(b,function(){return{reload:function(){var S,r;!((S=_.current)===null||S===void 0)&&S.reloadAndRest&&((r=_.current)===null||r===void 0||r.reloadAndRest())}}}),(0,$.useEffect)(function(){(0,me.pe)({groupName:"setting",name:"server"}).then(function(K){K.data.setting.value.serverIp&&ue(K.data.setting.value.serverIp)})},[]),(0,n.jsx)(y.Z,{actionRef:_,scroll:{x:"max-content"},columns:[{key:"title",title:"\u540D\u79F0",dataIndex:"siteTitle",width:200,render:function(S,r,P,a,u){var v="";return z!=null&&z.siteList&&z.siteList.map(function(O){O.containerInfo.ID==r.Id&&(v=O.siteTitle)}),(0,n.jsx)(x.Z.Text,{editable:{tooltip:"\u4FEE\u6539\u955C\u50CF\u5907\u6CE8\u540D\u79F0",onChange:function(){var O=D()(l()().mark(function e(k){var J,q;return l()().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:if(k!=""){X.next=2;break}return X.abrupt("return");case 2:return X.next=4,(0,ne.lK)({md5:r.Id,title:k});case 4:q=X.sent,v=k,Ae.success("\u4FEE\u6539\u5BB9\u5668\u540D\u79F0\u6210\u529F"),!((J=_.current)===null||J===void 0)&&J.reload&&_.current.reload();case 8:case"end":return X.stop()}},e)}));function U(e){return O.apply(this,arguments)}return U}()},children:v==""?(0,n.jsx)(A.Link,{to:r.Id?"/app/detail/edit/".concat(r.Id):"#",children:r.Labels&&r.Labels["com.dpanel.container.title"]?r.Labels["com.dpanel.container.title"]:r.Names[0]}):(0,n.jsx)(A.Link,{to:r.Id?"/app/detail/edit/".concat(r.Id):"#",children:v})})}},{key:"ports",title:(0,n.jsx)(fe.Z,{title:"\u5BF9\u5916\u8BBF\u95EE",help:"\u5BF9\u5916\u66B4\u9732\u7AEF\u53E3\u65F6\u53EF\u4EE5\u76F4\u63A5\u901A\u8FC7\u670D\u52A1\u5668ip(\u516C\u7F51,\u5185\u7F51,127.0.0.1)\u52A0\u7AEF\u53E3\u7684\u5F62\u5F0F\u8FDB\u884C\u8BBF\u95EE\u3002\u5982\u679C\u9700\u8981\u7ED1\u5B9A\u57DF\u540D,\u8BF7\u6DFB\u52A0\u7AD9\u70B9\u7ED1\u5B9A\u57DF\u540D\u8F6C\u53D1."}),dataIndex:"ports",width:200,search:!1,render:function(S,r,P,a){var u=[],v=[],O=[];return r!=null&&r.Ports&&r.Ports.map(function(U,e){U.PublicPort?u.push(U):v.push(U)}),z!=null&&z.domainList&&z.domainList.map(function(U,e){r.Names.indexOf(U.containerId)>-1&&O.push(U.setting.enableSSL?"https://"+U.serverName:"http://"+U.serverName)}),(0,n.jsx)(ye,{publicPort:u,privatePort:v,domain:O,serverIp:re})}},{title:"\u5360\u7528\u7387",width:170,search:!1,key:"usage",render:function(S,r,P,a,u){return(0,n.jsx)(ge,{md5:r.Id,shouldUpdate:he})}},{title:"\u8FD0\u884C\u72B6\u6001",key:"status",dataIndex:["container","status"],search:!1,width:120,render:function(S,r,P,a){return[(0,n.jsx)("div",{children:(0,n.jsx)(i.Z,{status:r.State,message:{content:r.Status,placement:"top"}})},"status")]}},{title:"\u6240\u5C5E\u955C\u50CF",key:"image",search:!1,width:150,render:function(S,r,P,a){return(0,n.jsx)("span",{style:{wordBreak:"break-word"},children:(0,n.jsx)(A.Link,{to:"/image/detail/".concat(r.ImageID),children:r.Image})})}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",width:200,render:function(S,r,P,a){return(0,n.jsxs)(d.Z,{split:(0,n.jsx)(j.Z,{type:"vertical"}),children:[(0,n.jsx)(A.Link,{to:"/app/detail/edit/"+r.Id,children:(0,n.jsx)(c.Z,{title:"\u7BA1\u7406\u955C\u50CF",children:(0,n.jsx)(w.Z,{})})},"edit"),r.State=="running"&&(0,n.jsx)(A.Link,{to:"/app/detail/file/"+r.Id+"?tab=file",children:(0,n.jsx)(c.Z,{title:"\u6587\u4EF6\u7BA1\u7406",children:(0,n.jsx)(E.Z,{})})},"file"),r.State=="running"&&(0,n.jsx)(A.Link,{to:"/app/detail/log/"+r.Id+"?tab=log",children:(0,n.jsx)(c.Z,{title:"\u8FD0\u884C\u65E5\u5FD7",children:(0,n.jsx)(C.Z,{})})},"log"),r.State=="running"&&(0,n.jsx)(A.Link,{target:"_blank",to:"/console/"+r.Id,children:(0,n.jsx)(c.Z,{title:"\u7EC8\u7AEF",children:(0,n.jsx)(L.Z,{})})},"console")]})}}],rowKey:"Id",request:function(){var K=D()(l()().mark(function S(r,P,a){var u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.IE)({tag:r.title,siteTitle:r.title,md5:r.Id});case 2:return v=e.sent,O=[],p.searchPrefix&&p.searchPrefix!=""?v.data.list.map(function(k){k.Names.map(function(J){J.startsWith("/"+p.searchPrefix)&&O.push(k)})}):p.searchNameList?v.data.list.map(function(k){k.Names.map(function(J){var q,te;p.searchNameList&&((q=p.searchNameList)===null||q===void 0?void 0:q.length)>0&&((te=p.searchNameList)===null||te===void 0?void 0:te.indexOf(J))>-1&&O.push(k)})}):O=v.data.list,se(v.data),be(he+1),e.abrupt("return",{data:(u=O)!==null&&u!==void 0?u:[],success:!0,total:v.data.list.length});case 8:case"end":return e.stop()}},S)}));return function(S,r,P){return K.apply(this,arguments)}}(),rowSelection:{defaultSelectedRowKeys:[],alwaysShowAlert:!0},tableAlertOptionRender:function(S){var r=S.selectedRowKeys;return(0,n.jsxs)(d.Z,{size:16,children:[(0,n.jsx)(G.Z,{icon:(0,n.jsx)(o.Z,{}),action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"start"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u542F\u52A8\u6210\u529F",onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},children:"\u542F\u52A8"}),(0,n.jsx)(G.Z,{action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"stop"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u505C\u6B62\u6210\u529F",icon:(0,n.jsx)(f.Z,{}),onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},children:"\u505C\u6B62"}),(0,n.jsx)(G.Z,{action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"restart"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u91CD\u542F\u6210\u529F",onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},icon:(0,n.jsx)(R.Z,{}),children:"\u91CD\u542F"}),(0,n.jsx)(G.Z,{action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"pause"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u6682\u505C\u6210\u529F",onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},icon:(0,n.jsx)(N.Z,{}),children:"\u6682\u505C"}),(0,n.jsx)(G.Z,{action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"unpause"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u542F\u52A8\u6210\u529F",onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},icon:(0,n.jsx)(o.Z,{}),children:"\u6062\u590D"}),(0,n.jsx)(j.Z,{}),(0,n.jsx)(G.Z,{danger:!0,type:"primary",action:function(){if(r.length==0)return(0,ne.Ct)({md5:"",deleteImage:!1,deleteVolume:!1});var a=r.map(function(){var u=D()(l()().mark(function v(O){return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ne.Ct)({md5:O,deleteImage:!1,deleteVolume:!1});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},v)}));return function(v){return u.apply(this,arguments)}}());return a[0]},onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},onError:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reset&&((u=_.current)===null||u===void 0||u.reset()),!0},messageSuccess:"\u5220\u9664\u6210\u529F",children:"\u6279\u91CF\u5220\u9664"})]})},pagination:p.showLite?!1:(0,le.O)(),search:p.showLite?!1:{collapsed:!1},tableExtraRender:function(){return!p.showLite&&(0,n.jsx)(g.Z,{mode:"horizontal",selectedKeys:["list"],items:[{label:(0,n.jsx)(A.Link,{to:"/app/list",replace:!0,children:"\u5BB9\u5668\u5217\u8868"}),key:"list"},{label:(0,n.jsx)(A.Link,{to:"/app/list/recycle",replace:!0,children:"\u56DE\u6536\u7AD9"}),key:"recycle"}]})},toolBarRender:p.showLite?!1:function(){return[(0,n.jsx)(G.Z,{action:function(){return(0,V.KK)()},onSuccess:function(){var S,r;return!((S=_.current)===null||S===void 0)&&S.reloadAndRest&&((r=_.current)===null||r===void 0||r.reloadAndRest()),!0},onError:function(){var S,r;return!((S=_.current)===null||S===void 0)&&S.reset&&((r=_.current)===null||r===void 0||r.reset()),!0},messageSuccess:"\u6E05\u9664\u6210\u529F",confirm:"\u662F\u5426\u6E05\u7406\u5DF2\u505C\u6B62\u7684\u5BB9\u5668",children:"\u6E05\u7406\u5DF2\u505C\u6B62\u5BB9\u5668"})]},columnsState:(0,le.j)("app-list")})}),Ie=Re},80821:function(H,B,t){t.d(B,{Z:function(){return y}});var W=t(5574),s=t.n(W),M=t(24963),l=t(86738),m=t(14726),D=t(83062),I=t(67294),T=t(85893);function y(h){var x=(0,I.useState)(!1),d=s()(x,2),j=d[0],c=d[1],g=(0,I.useContext)(M.Z),A=g.lang,w=g.notice,E=g.message,C=function(){c(!0),h.action().then(function(o){if(c(!1),typeof h.onSuccess=="function"&&h.onSuccess(o),h.messageSuccess){var f="";typeof h.messageSuccess=="function"?f=h.messageSuccess(o):f=h.messageSuccess,f.indexOf(".")>-1&&(f=A(f)),h.asynced?E.info(f):E.success(f)}}).catch(function(o){c(!1),typeof h.onError=="function"&&h.onError(o)})};return h.confirm?(0,T.jsx)(l.Z,{style:{width:500},title:A("notification.title.tip"),description:h.confirm,onConfirm:C,okText:"Yes",cancelText:"No",children:(0,T.jsx)(m.ZP,{disabled:h.disabled,icon:h.icon,loading:j,danger:h.danger,type:h.type,children:h.children})}):(0,T.jsx)(D.Z,{title:h.tips,children:(0,T.jsx)(m.ZP,{disabled:h.disabled,icon:h.icon,loading:j,onClick:C,danger:h.danger,type:h.type,children:h.children})})}},94359:function(H,B,t){t.d(B,{Z:function(){return j}});var W=t(67294),s=t(3089),M=t(98165),l=t(18429),m=t(8751),D=t(14313),I=t(30159),T=t(87740),y=t(66309),h=t(83062),x=t(54006),d=t(85893);function j(c){var g=(0,d.jsx)(d.Fragment,{});if(c.status=="0"&&(g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(s.Z,{}),color:"default",children:"waiting"})),c.status=="10"&&(g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(M.Z,{spin:!0}),color:"processing",children:"processing"})),c.status=="20"&&(g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(l.Z,{}),color:"error",children:"error"})),c.status=="30"&&(g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(m.Z,{}),color:"success",children:"success"})),c.status=="running"){var A,w;g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(D.Z,{}),color:"success",children:(A=c.message)!==null&&A!==void 0&&A.showInTag?(w=c.message)===null||w===void 0?void 0:w.content:c.status})}if(c.status=="paused"){var E,C;g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(I.Z,{}),children:(E=c.message)!==null&&E!==void 0&&E.showInTag?(C=c.message)===null||C===void 0?void 0:C.content:c.status})}if(c.status=="waiting"){var L,o;g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(T.Z,{}),children:(L=c.message)!==null&&L!==void 0&&L.showInTag?(o=c.message)===null||o===void 0?void 0:o.content:c.status})}if(c.status=="exited"||c.status=="dead"||c.status=="removing"||c.status=="restarting"||c.status=="created"){var f,R;g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(l.Z,{}),color:"warning",children:(f=c.message)!==null&&f!==void 0&&f.showInTag?(R=c.message)===null||R===void 0?void 0:R.content:c.status})}return c.link&&(g=(0,d.jsx)(x.Link,{to:c.link,children:g})),c.message&&(g=(0,d.jsx)(h.Z,{placement:c.message.placement,title:c.message.content,children:g})),(0,d.jsx)(d.Fragment,{children:g})}},78498:function(H,B,t){t.d(B,{Z:function(){return D}});var W=t(25035),s=t(42075),M=t(83062),l=t(67294),m=t(85893);function D(I){return(0,m.jsxs)(s.Z,{children:[I.title,(0,m.jsx)(M.Z,{title:I.help,children:(0,m.jsx)(W.Z,{})})]})}},24963:function(H,B,t){var W=t(67294),s=(0,W.createContext)({});B.Z=s},62597:function(H,B,t){t.d(B,{$G:function(){return D},Ct:function(){return A},Tb:function(){return h},XH:function(){return d},cl:function(){return T},iE:function(){return c},lK:function(){return L},xb:function(){return E}});var W=t(15009),s=t.n(W),M=t(99289),l=t.n(M),m=t(54006);function D(f){return I.apply(this,arguments)}function I(){return I=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,m.request)("/api/app/site/create-by-image",{method:"POST",data:R}));case 1:case"end":return i.stop()}},f)})),I.apply(this,arguments)}function T(f){return y.apply(this,arguments)}function y(){return y=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,m.request)("/api/app/site/get-list",{method:"POST",data:R}));case 1:case"end":return i.stop()}},f)})),y.apply(this,arguments)}function h(f){return x.apply(this,arguments)}function x(){return x=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return R.download=!1,i.next=3,(0,m.request)("/api/app/log/run",{method:"POST",data:R});case 3:return i.abrupt("return",i.sent);case 4:case"end":return i.stop()}},f)})),x.apply(this,arguments)}function d(f){return j.apply(this,arguments)}function j(){return j=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return R.download=!0,i.next=3,(0,m.request)("/api/app/log/run",{method:"POST",data:R,responseType:"blob"});case 3:return i.abrupt("return",i.sent);case 4:case"end":return i.stop()}},f)})),j.apply(this,arguments)}function c(f){return g.apply(this,arguments)}function g(){return g=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,m.request)("/api/app/site/get-detail",{data:R,method:"POST"});case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}},f)})),g.apply(this,arguments)}function A(f){return w.apply(this,arguments)}function w(){return w=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,m.request)("/api/app/container/delete",{method:"POST",data:R}));case 1:case"end":return i.stop()}},f)})),w.apply(this,arguments)}function E(f){return C.apply(this,arguments)}function C(){return C=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,m.request)("/api/app/site/delete",{method:"POST",data:R}));case 1:case"end":return i.stop()}},f)})),C.apply(this,arguments)}function L(f){return o.apply(this,arguments)}function o(){return o=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,m.request)("/api/app/site/update-title",{method:"POST",data:R});case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}},f)})),o.apply(this,arguments)}},84410:function(H,B,t){t.d(B,{a:function(){return T},i:function(){return D}});var W=t(15009),s=t.n(W),M=t(99289),l=t.n(M),m=t(54006);function D(h){return I.apply(this,arguments)}function I(){return I=l()(s()().mark(function h(x){return s()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.abrupt("return",(0,m.request)("/api/app/container/get-stat-info",{method:"POST",data:x}));case 1:case"end":return j.stop()}},h)})),I.apply(this,arguments)}function T(h){return y.apply(this,arguments)}function y(){return y=l()(s()().mark(function h(x){return s()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.abrupt("return",(0,m.request)("/api/app/container/get-process-info",{method:"POST",data:x}));case 1:case"end":return j.stop()}},h)})),y.apply(this,arguments)}},60335:function(H,B,t){t.d(B,{IE:function(){return T},IW:function(){return D},KK:function(){return c},LJ:function(){return A},eE:function(){return d},jV:function(){return h}});var W=t(15009),s=t.n(W),M=t(99289),l=t.n(M),m=t(54006);function D(E){return I.apply(this,arguments)}function I(){return I=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/status",{method:"POST",data:C}));case 1:case"end":return o.stop()}},E)})),I.apply(this,arguments)}function T(E){return y.apply(this,arguments)}function y(){return y=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/get-list",{data:C,method:"POST"}));case 1:case"end":return o.stop()}},E)})),y.apply(this,arguments)}function h(E){return x.apply(this,arguments)}function x(){return x=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/get-detail",{data:C,method:"POST"}));case 1:case"end":return o.stop()}},E)})),x.apply(this,arguments)}function d(E){return j.apply(this,arguments)}function j(){return j=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/update",{data:C,method:"POST"}));case 1:case"end":return o.stop()}},E)})),j.apply(this,arguments)}function c(){return g.apply(this,arguments)}function g(){return g=l()(s()().mark(function E(){return s()().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.abrupt("return",(0,m.request)("/api/app/container/prune",{method:"POST"}));case 1:case"end":return L.stop()}},E)})),g.apply(this,arguments)}function A(E){return w.apply(this,arguments)}function w(){return w=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/export",{method:"POST",data:C,responseType:"blob"}));case 1:case"end":return o.stop()}},E)})),w.apply(this,arguments)}},67255:function(H,B,t){t.d(B,{O:function(){return W},j:function(){return s}});function W(){var M,l=parseInt((M=localStorage.getItem("dpanel-pagesize"))!==null&&M!==void 0?M:"0");return{showSizeChanger:!0,defaultPageSize:l!=null?l:20}}function s(M){var l="dpanel-table-column-".concat(M),m={};if(localStorage.getItem(l)){var D;m=JSON.parse((D=localStorage.getItem(l))!==null&&D!==void 0?D:"{}")}return{defaultValue:m,onChange:function(T){localStorage.setItem("dpanel-table-column-".concat(M),JSON.stringify(T))}}}}}]); diff --git a/asset/static/7297.d8dd71aa.async.js b/asset/static/7297.d8dd71aa.async.js deleted file mode 100644 index e704aef5..00000000 --- a/asset/static/7297.d8dd71aa.async.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7297],{7297:function(H,B,t){t.d(B,{Z:function(){return Ie}});var W=t(64599),s=t.n(W),M=t(15009),l=t.n(M),m=t(99289),D=t.n(m),I=t(5574),T=t.n(I),y=t(10641),h=t(31418),x=t(60922),d=t(42075),j=t(96074),c=t(83062),g=t(50136),A=t(54006),w=t(43425),E=t(95591),C=t(45742),Z=t(89035),o=t(74842),f=t(87784),R=t(33160),N=t(30159),i=t(94359),fe=t(78498),V=t(60335),G=t(80821),$=t(67294),ne=t(62597),me=t(87662),ve=t(84410),ie=t(16165),n=t(85893),_e=function(){return(0,n.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"18403",children:(0,n.jsx)("path",{d:"M224 192v64H96v576h128v64h64v-64h64v64h64v-64h64v64h64v-64h64v64h64v-64h64v64h64v-64h128V256h-128V192h-64v64h-64V192h-64v64h-64V192h-64v64h-64V192h-64v64H288V192z m-64 128h704v448H160z m96 64c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32zM256 512c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m512 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32zM256 640c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z m128 0c-17.6 0-32 14.4-32 32s14.4 32 32 32 32-14.4 32-32-14.4-32-32-32z","p-id":"18404"})})},pe=function(){return(0,n.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"18546",children:(0,n.jsx)("path",{d:"M64 224v576h416v-32c0-17.76 14.24-32 32-32 17.76 0 32 14.24 32 32v32h416V224z m64 64h768v288H128z m64 64v160h192v-160z m224 0v160h192v-160z m224 0v160h192v-160zM256 416h64v32H256z m224 0h64v32h-64z m224 0h64v32h-64zM128 640h768v96h-300.992c-14.144-35.52-42.752-64-83.008-64-40.256 0-68.864 28.48-83.008 64H128z","p-id":"18547"})})};function ge(p){var b=(0,$.useState)(),_=T()(b,2),F=_[0],ee=_[1];(0,$.useEffect)(function(){(0,ve.i)({id:p.md5}).then(function(Q){ee(Q)})},[p.md5,p.shouldUpdate]);var re=function(L){if(!L.data||!L.data.cpu_stats||!L.data.cpu_stats.system_cpu_usage||!L.data.precpu_stats.system_cpu_usage)return"";var z=L.data.cpu_stats.cpu_usage.total_usage-L.data.precpu_stats.cpu_usage.total_usage,se=L.data.cpu_stats.system_cpu_usage-L.data.precpu_stats.system_cpu_usage;return(0,n.jsxs)(c.Z,{title:"CPU\u5360\u7528\u7387",children:[(0,n.jsx)(ie.Z,{component:_e,style:{width:15,lineHeight:20}})," ","".concat((z/se*L.data.cpu_stats.online_cpus*100).toFixed(2),"%")]})},ue=function(L){return!L.data||!L.data.memory_stats||!L.data.memory_stats.usage?"":(0,n.jsxs)(c.Z,{title:"\u5185\u5B58\u5360\u7528\u7387",children:[(0,n.jsx)(ie.Z,{component:pe,style:{width:15,lineHeight:20}})," ","".concat((L.data.memory_stats.usage/L.data.memory_stats.limit*100).toFixed(2),"%")]})};return(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(re,{data:F},"cpu"),(0,n.jsx)(ue,{data:F},"memory")]})}var le=t(67255),Ee=t(19632),ce=t.n(Ee),oe=t(27496),je=t(35995),Pe=t(99611),Oe=t(29158),ae=t(38345),De=t(55241),Y=t(66309);function ye(p){return(0,n.jsx)(De.Z,{placement:"right",content:(0,n.jsxs)(ae.Z,{direction:"column",style:{width:500},ghost:!0,children:[(0,n.jsx)(ae.Z,{title:"\u7AEF\u53E3",children:[].concat(ce()(p.publicPort),ce()(p.privatePort)).map(function(b,_){var F=p.serverIp;return F!=""&&F.indexOf(":")>-1&&(F="[".concat(F,"]")),F==""&&b.IP=="::"&&(F="[::1]"),F==""&&b.IP=="0.0.0.0"&&(F="127.0.0.1"),F==""&&(F=b.IP),(0,n.jsx)(d.Z,{size:"large",wrap:!0,children:(0,n.jsx)(Y.Z,{color:b.PublicPort?"#2db7f5":"warning",icon:b.PublicPort?(0,n.jsx)(oe.Z,{}):"",style:{marginBottom:5,width:210},children:b.PublicPort?(0,n.jsx)("a",{href:"http://".concat(F,":").concat(b.PublicPort),target:"_blank",children:"".concat(b.PublicPort?b.IP+":"+b.PublicPort+" -> ":"").concat(b.PrivatePort,"/").concat(b.Type)},"link".concat(_)):"".concat(b.PrivatePort,"/").concat(b.Type)})},"space".concat(_))})}),p.domain.length>0&&(0,n.jsx)(ae.Z,{title:"\u57DF\u540D",children:(0,n.jsx)(d.Z,{direction:"vertical",style:{textAlign:"left"},children:p.domain.map(function(b,_){return(0,n.jsx)(Y.Z,{color:"blue",icon:(0,n.jsx)(oe.Z,{}),children:(0,n.jsx)("a",{href:b,target:"_blank",children:b})},"domain".concat(_))})})})]}),children:(0,n.jsxs)(d.Z,{direction:"vertical",children:[p.privatePort.length>0&&(0,n.jsxs)(Y.Z,{color:"warning",icon:(0,n.jsx)(je.Z,{}),children:["\u5185\u90E8\u7AEF\u53E3: ",p.privatePort.length]}),p.publicPort.length>0&&(0,n.jsxs)(Y.Z,{color:"#2db7f5",icon:(0,n.jsx)(Pe.Z,{}),children:["\u5BF9\u5916\u7AEF\u53E3: ",p.publicPort.length]}),p.domain.length>0&&(0,n.jsxs)(Y.Z,{color:"blue",icon:(0,n.jsx)(Oe.Z,{}),children:["\u7ED1\u5B9A\u57DF\u540D: ",p.domain.length]})]})})}var Ce=t(24963),Re=(0,$.forwardRef)(function(p,b){var _=(0,$.useRef)(),F=(0,$.useState)(""),ee=T()(F,2),re=ee[0],ue=ee[1],Q=(0,$.useState)(),L=T()(Q,2),z=L[0],se=L[1],Se=(0,$.useState)(1),de=T()(Se,2),he=de[0],be=de[1],Te=h.Z.useApp(),Me=(0,$.useContext)(Ce.Z),Ae=Me.notice;return(0,$.useImperativeHandle)(b,function(){return{reload:function(){var S,r;!((S=_.current)===null||S===void 0)&&S.reloadAndRest&&((r=_.current)===null||r===void 0||r.reloadAndRest())}}}),(0,$.useEffect)(function(){(0,me.pe)({groupName:"setting",name:"server"}).then(function(K){K.data.setting.value.serverIp&&ue(K.data.setting.value.serverIp)})},[]),(0,n.jsx)(y.Z,{actionRef:_,scroll:{x:"max-content"},columns:[{key:"title",title:"\u540D\u79F0",dataIndex:"siteTitle",width:200,render:function(S,r,P,a,u){var v="";return z!=null&&z.siteList&&z.siteList.map(function(O){O.containerInfo.ID==r.Id&&(v=O.siteTitle)}),(0,n.jsx)(x.Z.Text,{editable:{tooltip:"\u4FEE\u6539\u955C\u50CF\u5907\u6CE8\u540D\u79F0",onChange:function(){var O=D()(l()().mark(function e(k){var J,q;return l()().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:if(k!=""){X.next=2;break}return X.abrupt("return");case 2:return X.next=4,(0,ne.lK)({md5:r.Id,title:k});case 4:q=X.sent,v=k,Ae.success("\u4FEE\u6539\u5BB9\u5668\u540D\u79F0\u6210\u529F"),!((J=_.current)===null||J===void 0)&&J.reload&&_.current.reload();case 8:case"end":return X.stop()}},e)}));function U(e){return O.apply(this,arguments)}return U}()},children:v==""?(0,n.jsx)(A.Link,{to:r.Id?"/app/detail/edit/".concat(r.Id):"#",children:r.Names[0]}):(0,n.jsx)(A.Link,{to:r.Id?"/app/detail/edit/".concat(r.Id):"#",children:v})})}},{key:"ports",title:(0,n.jsx)(fe.Z,{title:"\u5BF9\u5916\u8BBF\u95EE",help:"\u5BF9\u5916\u66B4\u9732\u7AEF\u53E3\u65F6\u53EF\u4EE5\u76F4\u63A5\u901A\u8FC7\u670D\u52A1\u5668ip(\u516C\u7F51,\u5185\u7F51,127.0.0.1)\u52A0\u7AEF\u53E3\u7684\u5F62\u5F0F\u8FDB\u884C\u8BBF\u95EE\u3002\u5982\u679C\u9700\u8981\u7ED1\u5B9A\u57DF\u540D,\u8BF7\u6DFB\u52A0\u7AD9\u70B9\u7ED1\u5B9A\u57DF\u540D\u8F6C\u53D1."}),dataIndex:"ports",width:200,search:!1,render:function(S,r,P,a){var u=[],v=[],O=[];return r!=null&&r.Ports&&r.Ports.map(function(U,e){U.PublicPort?u.push(U):v.push(U)}),z!=null&&z.domainList&&z.domainList.map(function(U,e){r.Names.indexOf(U.containerId)>-1&&O.push(U.setting.enableSSL?"https://"+U.serverName:"http://"+U.serverName)}),(0,n.jsx)(ye,{publicPort:u,privatePort:v,domain:O,serverIp:re})}},{title:"\u5360\u7528\u7387",width:170,search:!1,key:"usage",render:function(S,r,P,a,u){return(0,n.jsx)(ge,{md5:r.Id,shouldUpdate:he})}},{title:"\u8FD0\u884C\u72B6\u6001",key:"status",dataIndex:["container","status"],search:!1,width:120,render:function(S,r,P,a){return[(0,n.jsx)("div",{children:(0,n.jsx)(i.Z,{status:r.State,message:{content:r.Status,placement:"top"}})},"status")]}},{title:"\u6240\u5C5E\u955C\u50CF",key:"image",search:!1,width:150,render:function(S,r,P,a){return(0,n.jsx)("span",{style:{wordBreak:"break-word"},children:(0,n.jsx)(A.Link,{to:"/image/detail/".concat(r.ImageID),children:r.Image})})}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",width:200,render:function(S,r,P,a){return(0,n.jsxs)(d.Z,{split:(0,n.jsx)(j.Z,{type:"vertical"}),children:[(0,n.jsx)(A.Link,{to:"/app/detail/edit/"+r.Id,children:(0,n.jsx)(c.Z,{title:"\u7BA1\u7406\u955C\u50CF",children:(0,n.jsx)(w.Z,{})})},"edit"),r.State=="running"&&(0,n.jsx)(A.Link,{to:"/app/detail/file/"+r.Id+"?tab=file",children:(0,n.jsx)(c.Z,{title:"\u6587\u4EF6\u7BA1\u7406",children:(0,n.jsx)(E.Z,{})})},"file"),r.State=="running"&&(0,n.jsx)(A.Link,{to:"/app/detail/log/"+r.Id+"?tab=log",children:(0,n.jsx)(c.Z,{title:"\u8FD0\u884C\u65E5\u5FD7",children:(0,n.jsx)(C.Z,{})})},"log"),r.State=="running"&&(0,n.jsx)(A.Link,{target:"_blank",to:"/console/"+r.Id,children:(0,n.jsx)(c.Z,{title:"\u7EC8\u7AEF",children:(0,n.jsx)(Z.Z,{})})},"console")]})}}],rowKey:"Id",request:function(){var K=D()(l()().mark(function S(r,P,a){var u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.IE)({tag:r.title,siteTitle:r.title,md5:r.Id});case 2:return v=e.sent,O=[],p.searchPrefix&&p.searchPrefix!=""?v.data.list.map(function(k){k.Names.map(function(J){J.startsWith("/"+p.searchPrefix)&&O.push(k)})}):p.searchNameList?v.data.list.map(function(k){k.Names.map(function(J){var q,te;p.searchNameList&&((q=p.searchNameList)===null||q===void 0?void 0:q.length)>0&&((te=p.searchNameList)===null||te===void 0?void 0:te.indexOf(J))>-1&&O.push(k)})}):O=v.data.list,se(v.data),be(he+1),e.abrupt("return",{data:(u=O)!==null&&u!==void 0?u:[],success:!0,total:v.data.list.length});case 8:case"end":return e.stop()}},S)}));return function(S,r,P){return K.apply(this,arguments)}}(),rowSelection:{defaultSelectedRowKeys:[],alwaysShowAlert:!0},tableAlertOptionRender:function(S){var r=S.selectedRowKeys;return(0,n.jsxs)(d.Z,{size:16,children:[(0,n.jsx)(G.Z,{icon:(0,n.jsx)(o.Z,{}),action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"start"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u542F\u52A8\u6210\u529F",onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},children:"\u542F\u52A8"}),(0,n.jsx)(G.Z,{action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"stop"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u505C\u6B62\u6210\u529F",icon:(0,n.jsx)(f.Z,{}),onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},children:"\u505C\u6B62"}),(0,n.jsx)(G.Z,{action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"restart"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u91CD\u542F\u6210\u529F",onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},icon:(0,n.jsx)(R.Z,{}),children:"\u91CD\u542F"}),(0,n.jsx)(G.Z,{action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"pause"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u6682\u505C\u6210\u529F",onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},icon:(0,n.jsx)(N.Z,{}),children:"\u6682\u505C"}),(0,n.jsx)(G.Z,{action:D()(l()().mark(function P(){var a,u,v,O;return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=s()(r),e.prev=1,a.s();case 3:if((u=a.n()).done){e.next=10;break}return v=u.value,e.next=7,(0,V.IW)({md5:v,operate:"unpause"});case 7:O=e.sent;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),a.e(e.t0);case 15:return e.prev=15,a.f(),e.finish(15);case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}},P,null,[[1,12,15,18]])})),messageSuccess:"\u542F\u52A8\u6210\u529F",onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},icon:(0,n.jsx)(o.Z,{}),children:"\u6062\u590D"}),(0,n.jsx)(j.Z,{}),(0,n.jsx)(G.Z,{danger:!0,type:"primary",action:function(){if(r.length==0)return(0,ne.Ct)({md5:"",deleteImage:!1,deleteVolume:!1});var a=r.map(function(){var u=D()(l()().mark(function v(O){return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ne.Ct)({md5:O,deleteImage:!1,deleteVolume:!1});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},v)}));return function(v){return u.apply(this,arguments)}}());return a[0]},onSuccess:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reloadAndRest&&((u=_.current)===null||u===void 0||u.reloadAndRest()),!0},onError:function(){var a,u;return!((a=_.current)===null||a===void 0)&&a.reset&&((u=_.current)===null||u===void 0||u.reset()),!0},messageSuccess:"\u5220\u9664\u6210\u529F",children:"\u6279\u91CF\u5220\u9664"})]})},pagination:p.showLite?!1:(0,le.O)(),search:p.showLite?!1:{collapsed:!1},tableExtraRender:function(){return!p.showLite&&(0,n.jsx)(g.Z,{mode:"horizontal",selectedKeys:["list"],items:[{label:(0,n.jsx)(A.Link,{to:"/app/list",replace:!0,children:"\u5BB9\u5668\u5217\u8868"}),key:"list"},{label:(0,n.jsx)(A.Link,{to:"/app/list/recycle",replace:!0,children:"\u56DE\u6536\u7AD9"}),key:"recycle"}]})},toolBarRender:p.showLite?!1:function(){return[(0,n.jsx)(G.Z,{action:function(){return(0,V.KK)()},onSuccess:function(){var S,r;return!((S=_.current)===null||S===void 0)&&S.reloadAndRest&&((r=_.current)===null||r===void 0||r.reloadAndRest()),!0},onError:function(){var S,r;return!((S=_.current)===null||S===void 0)&&S.reset&&((r=_.current)===null||r===void 0||r.reset()),!0},messageSuccess:"\u6E05\u9664\u6210\u529F",confirm:"\u662F\u5426\u6E05\u7406\u5DF2\u505C\u6B62\u7684\u5BB9\u5668",children:"\u6E05\u7406\u5DF2\u505C\u6B62\u5BB9\u5668"})]},columnsState:(0,le.j)("app-list")})}),Ie=Re},80821:function(H,B,t){t.d(B,{Z:function(){return y}});var W=t(5574),s=t.n(W),M=t(24963),l=t(86738),m=t(14726),D=t(83062),I=t(67294),T=t(85893);function y(h){var x=(0,I.useState)(!1),d=s()(x,2),j=d[0],c=d[1],g=(0,I.useContext)(M.Z),A=g.lang,w=g.notice,E=g.message,C=function(){c(!0),h.action().then(function(o){if(c(!1),typeof h.onSuccess=="function"&&h.onSuccess(o),h.messageSuccess){var f="";typeof h.messageSuccess=="function"?f=h.messageSuccess(o):f=h.messageSuccess,f.indexOf(".")>-1&&(f=A(f)),h.asynced?E.info(f):E.success(f)}}).catch(function(o){c(!1),typeof h.onError=="function"&&h.onError(o)})};return h.confirm?(0,T.jsx)(l.Z,{style:{width:500},title:A("notification.title.tip"),description:h.confirm,onConfirm:C,okText:"Yes",cancelText:"No",children:(0,T.jsx)(m.ZP,{disabled:h.disabled,icon:h.icon,loading:j,danger:h.danger,type:h.type,children:h.children})}):(0,T.jsx)(D.Z,{title:h.tips,children:(0,T.jsx)(m.ZP,{disabled:h.disabled,icon:h.icon,loading:j,onClick:C,danger:h.danger,type:h.type,children:h.children})})}},94359:function(H,B,t){t.d(B,{Z:function(){return j}});var W=t(67294),s=t(3089),M=t(98165),l=t(18429),m=t(8751),D=t(14313),I=t(30159),T=t(87740),y=t(66309),h=t(83062),x=t(54006),d=t(85893);function j(c){var g=(0,d.jsx)(d.Fragment,{});if(c.status=="0"&&(g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(s.Z,{}),color:"default",children:"waiting"})),c.status=="10"&&(g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(M.Z,{spin:!0}),color:"processing",children:"processing"})),c.status=="20"&&(g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(l.Z,{}),color:"error",children:"error"})),c.status=="30"&&(g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(m.Z,{}),color:"success",children:"success"})),c.status=="running"){var A,w;g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(D.Z,{}),color:"success",children:(A=c.message)!==null&&A!==void 0&&A.showInTag?(w=c.message)===null||w===void 0?void 0:w.content:c.status})}if(c.status=="paused"){var E,C;g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(I.Z,{}),children:(E=c.message)!==null&&E!==void 0&&E.showInTag?(C=c.message)===null||C===void 0?void 0:C.content:c.status})}if(c.status=="waiting"){var Z,o;g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(T.Z,{}),children:(Z=c.message)!==null&&Z!==void 0&&Z.showInTag?(o=c.message)===null||o===void 0?void 0:o.content:c.status})}if(c.status=="exited"||c.status=="dead"||c.status=="removing"||c.status=="restarting"||c.status=="created"){var f,R;g=(0,d.jsx)(y.Z,{icon:(0,d.jsx)(l.Z,{}),color:"warning",children:(f=c.message)!==null&&f!==void 0&&f.showInTag?(R=c.message)===null||R===void 0?void 0:R.content:c.status})}return c.link&&(g=(0,d.jsx)(x.Link,{to:c.link,children:g})),c.message&&(g=(0,d.jsx)(h.Z,{placement:c.message.placement,title:c.message.content,children:g})),(0,d.jsx)(d.Fragment,{children:g})}},78498:function(H,B,t){t.d(B,{Z:function(){return D}});var W=t(25035),s=t(42075),M=t(83062),l=t(67294),m=t(85893);function D(I){return(0,m.jsxs)(s.Z,{children:[I.title,(0,m.jsx)(M.Z,{title:I.help,children:(0,m.jsx)(W.Z,{})})]})}},24963:function(H,B,t){var W=t(67294),s=(0,W.createContext)({});B.Z=s},62597:function(H,B,t){t.d(B,{$G:function(){return D},Ct:function(){return A},Tb:function(){return h},XH:function(){return d},cl:function(){return T},iE:function(){return c},lK:function(){return Z},xb:function(){return E}});var W=t(15009),s=t.n(W),M=t(99289),l=t.n(M),m=t(54006);function D(f){return I.apply(this,arguments)}function I(){return I=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,m.request)("/api/app/site/create-by-image",{method:"POST",data:R}));case 1:case"end":return i.stop()}},f)})),I.apply(this,arguments)}function T(f){return y.apply(this,arguments)}function y(){return y=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,m.request)("/api/app/site/get-list",{method:"POST",data:R}));case 1:case"end":return i.stop()}},f)})),y.apply(this,arguments)}function h(f){return x.apply(this,arguments)}function x(){return x=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return R.download=!1,i.next=3,(0,m.request)("/api/app/log/run",{method:"POST",data:R});case 3:return i.abrupt("return",i.sent);case 4:case"end":return i.stop()}},f)})),x.apply(this,arguments)}function d(f){return j.apply(this,arguments)}function j(){return j=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return R.download=!0,i.next=3,(0,m.request)("/api/app/log/run",{method:"POST",data:R,responseType:"blob"});case 3:return i.abrupt("return",i.sent);case 4:case"end":return i.stop()}},f)})),j.apply(this,arguments)}function c(f){return g.apply(this,arguments)}function g(){return g=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,m.request)("/api/app/site/get-detail",{data:R,method:"POST"});case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}},f)})),g.apply(this,arguments)}function A(f){return w.apply(this,arguments)}function w(){return w=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,m.request)("/api/app/container/delete",{method:"POST",data:R}));case 1:case"end":return i.stop()}},f)})),w.apply(this,arguments)}function E(f){return C.apply(this,arguments)}function C(){return C=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,m.request)("/api/app/site/delete",{method:"POST",data:R}));case 1:case"end":return i.stop()}},f)})),C.apply(this,arguments)}function Z(f){return o.apply(this,arguments)}function o(){return o=l()(s()().mark(function f(R){return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,m.request)("/api/app/site/update-title",{method:"POST",data:R});case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}},f)})),o.apply(this,arguments)}},84410:function(H,B,t){t.d(B,{a:function(){return T},i:function(){return D}});var W=t(15009),s=t.n(W),M=t(99289),l=t.n(M),m=t(54006);function D(h){return I.apply(this,arguments)}function I(){return I=l()(s()().mark(function h(x){return s()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.abrupt("return",(0,m.request)("/api/app/container/get-stat-info",{method:"POST",data:x}));case 1:case"end":return j.stop()}},h)})),I.apply(this,arguments)}function T(h){return y.apply(this,arguments)}function y(){return y=l()(s()().mark(function h(x){return s()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.abrupt("return",(0,m.request)("/api/app/container/get-process-info",{method:"POST",data:x}));case 1:case"end":return j.stop()}},h)})),y.apply(this,arguments)}},60335:function(H,B,t){t.d(B,{IE:function(){return T},IW:function(){return D},KK:function(){return c},LJ:function(){return A},eE:function(){return d},jV:function(){return h}});var W=t(15009),s=t.n(W),M=t(99289),l=t.n(M),m=t(54006);function D(E){return I.apply(this,arguments)}function I(){return I=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/status",{method:"POST",data:C}));case 1:case"end":return o.stop()}},E)})),I.apply(this,arguments)}function T(E){return y.apply(this,arguments)}function y(){return y=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/get-list",{data:C,method:"POST"}));case 1:case"end":return o.stop()}},E)})),y.apply(this,arguments)}function h(E){return x.apply(this,arguments)}function x(){return x=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/get-detail",{data:C,method:"POST"}));case 1:case"end":return o.stop()}},E)})),x.apply(this,arguments)}function d(E){return j.apply(this,arguments)}function j(){return j=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/update",{data:C,method:"POST"}));case 1:case"end":return o.stop()}},E)})),j.apply(this,arguments)}function c(){return g.apply(this,arguments)}function g(){return g=l()(s()().mark(function E(){return s()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.abrupt("return",(0,m.request)("/api/app/container/prune",{method:"POST"}));case 1:case"end":return Z.stop()}},E)})),g.apply(this,arguments)}function A(E){return w.apply(this,arguments)}function w(){return w=l()(s()().mark(function E(C){return s()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,m.request)("/api/app/container/export",{method:"POST",data:C,responseType:"blob"}));case 1:case"end":return o.stop()}},E)})),w.apply(this,arguments)}},67255:function(H,B,t){t.d(B,{O:function(){return W},j:function(){return s}});function W(){var M,l=parseInt((M=localStorage.getItem("dpanel-pagesize"))!==null&&M!==void 0?M:"0");return{showSizeChanger:!0,defaultPageSize:l!=null?l:20}}function s(M){var l="dpanel-table-column-".concat(M),m={};if(localStorage.getItem(l)){var D;m=JSON.parse((D=localStorage.getItem(l))!==null&&D!==void 0?D:"{}")}return{defaultValue:m,onChange:function(T){localStorage.setItem("dpanel-table-column-".concat(M),JSON.stringify(T))}}}}}]); diff --git a/asset/static/index.html b/asset/static/index.html index e91f6b81..169330aa 100644 --- a/asset/static/index.html +++ b/asset/static/index.html @@ -18,6 +18,6 @@
- +