@allurereport/web-awesome
Version:
The static files for Allure Awesome Report
1 lines • 1.85 kB
JavaScript
;(self.webpackChunk_allurereport_web_awesome=self.webpackChunk_allurereport_web_awesome||[]).push([[121],{5121:function(e,a,t){t.d(a,{Timeline:function(){return w}});var n=t(2636),r=t(3175),i=t(4501),s=t(9254),l=t(4080),o=t(1848);const d=(0,r.vP)({loading:!0,error:void 0,data:void 0});var c="AZZDr1a8",h="YjGJbbhT",m="Aop2iD35",u="ngWCd_e9",v=t(1968);const p=e=>[...new Set(e.map((e=>e.host)))],g=(e,a)=>e.filter((e=>e.host===a)),Y=(0,r.EW)((()=>{const e=d.value.data??[];if(!e.length)return[];if(l.hf.value){const a=e.filter((e=>((e,a)=>void 0!==e.environmentName?e.environment===a:e.environment===(0,l.J_)(a))(e,l.hf.value)));return p(a).map((e=>({data:g(a,e),host:e})))}return p(e).map((a=>({data:g(e,a),host:a})))})),w=()=>{const{t:e}=(0,s.s9)("timeline");(0,i.vJ)((()=>{(async()=>{d.value={...d.value,loading:!0,error:void 0};try{const e=await(0,o.tj)("widgets/timeline.json",{bustCache:!0});d.value={data:e,error:void 0,loading:!1}}catch(e){d.value={data:void 0,error:e.message,loading:!1}}})()}),[]);const a=(0,i.Kr)((()=>({empty:e("empty"),selected:a=>e("selected",{count:a.count,percentage:a.percentage,minDuration:a.minDuration,maxDuration:a.maxDuration})})),[e]);return(0,v.Y)(n.x_,{source:d,renderLoader:()=>(0,v.Y)(n.DP,{}),renderData:()=>0===Y.value.length?(0,v.Y)("div",{className:h,children:(0,v.Y)(n.xA,{kind:"swap",className:m,children:(0,v.Y)(n.Ei,{className:u,children:(0,v.Y)(n.x0,{children:(0,v.Y)("div",{className:c,children:e("empty")})})})})}):(0,v.Y)("div",{className:h,children:(0,v.Y)(n.xA,{kind:"swap",className:m,children:Y.value.map((({data:t,host:r})=>(0,v.Y)(n.Ei,{className:u,children:(0,v.FD)(n.x0,{title:e("host",{host:r}),children:[t.length>0&&(0,v.Y)(n.Kf,{data:t,dataId:r,width:100,translations:a}),0===t.length&&(0,v.Y)("div",{className:c,children:e("empty_host",{host:r})})]})},r)))})})})}}}]);