import{o as i,c as f,w as a,u as s,b as n,d as m,e as _,a as t,f as d,g as l,h as c,t as r,F as h,D as p}from"./app-DA7OTM4Q.js";import{i as g,c as y}from"./app-BT68AfZ-.js";import{_ as b}from"./app-B1Hy7xcE.js";import{_ as k}from"./app-DokSVapq.js";import{_ as v}from"./app-BMjG4tWp.js";import{_ as w}from"./app-CKSEN_Rg.js";import{D as x}from"./app-DNL2FXPk.js";import{_ as R}from"./app-BWsCS5pa.js";import{_ as C}from"./app-CKBPOVnC.js";import"./app-scFtFqL8.js";import"./app-DREBJ-ou.js";import"./app-CWBL8eTX.js";import"./app-CnGe5nlE.js";import"./app-OC5wWJiS.js";import"./app-BX4pd6U-.js";import"./app-Bhreb6Cm.js";import"./app-Zes_jb7S.js";import"./app-up4gT9D9.js";import"./app-D29bbm9n.js";import"./app-Dxa5h-uG.js";import"./app-B_5dka6q.js";import"./app-BqY8p2gl.js";import"./app-CQwVTjAx.js";import"./app-P70ZK_FT.js";import"./app-D5twQdhO.js";import"./app-BotiHebp.js";function $(){g(this),this.isRequesting=!1,this.isOk=!1,this.message="",this.failKeys=[],this.before=function(){this.isRequesting=!0,this.isOk=!1,this.message="",this.failKeys=[]},this.success=function(o){this.isOk=!0,this.$NotifyReloadSuccess("任务提交成功")()},this.fail=function(o){this.message=o.message,o.data.failKeys!=null&&(this.failKeys=o.data.failKeys)},this.done=function(){this.isRequesting=!1}}const q=t("p",{class:"!mb-4"},"可以在这里批量预热一组URL。",-1),D=["value"],O=["value"],B=t("td",null,"URL列表",-1),K=t("p",{class:"comment"},"每行一个URL。",-1),N=t("td",{class:"title"},"操作结果",-1),S={key:0},F={key:1,class:"red"},I={key:2,class:"fail-keys-box"},L={class:"red"},fe={__name:"fetch",setup(o){const e=y(new $);return(V,U)=>(i(),f(C,{ctx:s(e)},{default:a(()=>[n(b,{ctx:s(e),"active-tab":"fetch"},null,8,["ctx"]),m(t("div",null,[n(R,{"disable-spacing":""},{default:a(()=>[d("没有开启缓存，暂时无法预热缓存。")]),_:1})],512),[[_,s(e).webConfig.cache==null||!s(e).webConfig.cache.isOn]]),m(t("div",null,[q,n(k,{action:"$",onBefore:s(e).before,onSuccess:s(e).success,onFail:s(e).fail,onDone:s(e).done,timeout:"3600"},{default:a(()=>[t("input",{type:"hidden",name:"serverId",value:s(e).serverId},null,8,D),t("input",{type:"hidden",name:"webId",value:s(e).webId},null,8,O),n(x,null,{default:a(()=>[t("tbody",null,[t("tr",null,[B,t("td",null,[n(v,{name:"keys",rows:"10",class:"w-full",autofocus:""}),K])]),t("tr",null,[N,t("td",null,[s(e).isRequesting?(i(),l("div",S,"数据发送中...")):c("",!0),!s(e).isRequesting&&!s(e).isOk&&s(e).message.length>0?(i(),l("span",F,"失败："+r(s(e).message),1)):c("",!0),!s(e).isRequesting&&!s(e).isOk&&s(e).failKeys.length>0?(i(),l("div",I,[(i(!0),l(h,null,p(s(e).failKeys,u=>(i(),l("div",null,[t("span",L,r(u.key)+": "+r(u.reason),1)]))),256))])):c("",!0)])])])]),_:1}),s(e).isRequesting?c("",!0):(i(),f(w,{key:0},{default:a(()=>[d("提交")]),_:1}))]),_:1},8,["onBefore","onSuccess","onFail","onDone"])],512),[[_,s(e).webConfig.cache!=null&&s(e).webConfig.cache.isOn]])]),_:1},8,["ctx"]))}};export{fe as default};
