PageSourceSearch

https://ossprey.netlify.app/assets/repos-B_93dfBW.js

js ossprey.netlify.app collected 2026-10-03 11:14:18 UTC 4,201 bytes, 1 lines download raw bytes

1import{_ as $,d as _,b as T,U as E,o as r,c as u,y as n,O as i,Q as y,a1 as R,a as b,q as I,l as V,e as S,f as x,a0 as M,i as A,w as F,h as L}from"./index-mFYfEsYG.js";import{V as C}from"./VPagination-DyEZ9W-_.js";import{V as P}from"./VContainer-CUmrlzm1.js";/* empty css              */const D={class:"repos-section"},B={class:"text-h5 font-weight-medium mb-4"},w=["aria-label"],U={class:"repos-table"},q={scope:"col"},G={key:0},Y=["href"],H={key:1},O={key:0,class:"table-pagination"},Q={class:"table-pagination__summary"},N=10,Z={__name:"ReposTable",props:{title:{type:String,required:!0},rows:{type:Array,default:()=>[]},timeColumnLabel:{type:String,default:"Completion Time"},timeField:{type:String,default:"completionTime"}},setup(p){const h=p,g=e=>{if(!e)return Number.NEGATIVE_INFINITY;const t=e.replace(" ","T"),o=Date.parse(t);return Number.isNaN(o)?Number.NEGATIVE_INFINITY:o},c=_(()=>[...h.rows].sort((e,t)=>g(t.startTime)-g(e.startTime))),l=T(1),m=_(()=>Math.max(1,Math.ceil(c.value.length/N)));E(m,e=>{l.value>e&&(l.value=e)});const d=_(()=>(l.value-1)*N),f=_(()=>Math.min(d.value+N,c.value.length)),v=_(()=>c.value.slice(d.value,f.value)),s=e=>e!=null&&e.gitLink?`/dashboard?repo=${encodeURIComponent(e.gitLink)}`:null,a=e=>{const t=e==null?void 0:e[h.timeField];return t==null||t===""?"—":t};return(e,t)=>(r(),u("section",D,[n("h2",B,i(p.title),1),n("div",{class:"table-wrapper",role:"region","aria-label":`${p.title} table`},[n("table",U,[n("thead",null,[n("tr",null,[t[1]||(t[1]=n("th",{scope:"col"},"Repo Name",-1)),t[2]||(t[2]=n("th",{scope:"col"},"Task Initiation Time",-1)),n("th",q,i(p.timeColumnLabel),1)])]),c.value.length?(r(),u("tbody",G,[(r(!0),u(y,null,R(v.value,o=>(r(),u("tr",{key:`${o.repoName}-${o.startTime}`},[n("td",null,[s(o)?(r(),u("a",{key:0,href:s(o),target:"_blank",rel:"noopener",class:"repo-link"},i(o.repoName),9,Y)):(r(),u(y,{key:1},[V(i(o.repoName),1)],64))]),n("td",null,i(o.startTime),1),n("td",null,i(a(o)),1)]))),128))])):(r(),u("tbody",H,t[3]||(t[3]=[n("tr",null,[n("td",{colspan:"3",class:"empty-state"},"No items to show.")],-1)])))])],8,w),m.value>1?(r(),u("div",O,[n("span",Q," Showing "+i(d.value+1)+"-"+i(f.value)+" of "+i(c.value.length),1),b(C,{modelValue:l.value,"onUpdate:modelValue":t[0]||(t[0]=o=>l.value=o),length:m.value,"total-visible":5,density:"comfortable",rounded:"circle","aria-label":`${p.title} pagination`},null,8,["modelValue","length","aria-label"])])):I("",!0)]))}},k=$(Z,[["__scopeId","data-v-9d686af5"]]),z={class:"repos-heading mt-8"},J={key:0,class:"repos-heading__note"},K=15e3,W={__name:"repos",setup(p){const h=S(),g=T([]),c=T([]),l=T("");let m=null;const d=s=>{if(!s)return"—";const a=new Date(s);if(Number.isNaN(a.getTime()))return"—";const e=t=>String(t).padStart(2,"0");return`${a.getFullYear()}-${e(a.getMonth()+1)}-${e(a.getDate())} ${e(a.getHours())}:${e(a.getMinutes())}`},f=s=>{if(s==null)return"—";const a=Math.max(0,Math.round(s)),e=Math.floor(a/60),t=a%60;return e===0?`${t} seconds`:`${e} minutes ${t} seconds`},v=async()=>{try{const s=await L(`${h}/api/repo_jobs`);if(!s.ok)throw new Error(`Status request failed (${s.status})`);const a=await s.json();g.value=(a.pending||[]).map(e=>({repoName:e.repo_name,gitLink:e.git_link,startTime:d(e.created_at),completionTime:null,estimatedProcessingTime:f(e.estimated_seconds),status:e.status})),c.value=(a.processed||[]).map(e=>({repoName:e.repo_name,gitLink:e.git_link,startTime:d(e.created_at),completionTime:e.status==="completed"?d(e.finished_at):`${d(e.finished_at)} (${e.status})`,status:e.status})),l.value=""}catch(s){l.value=s.message||"Failed to load repositories."}};return x(()=>{v(),m=setInterval(v,K)}),M(()=>{m&&clearInterval(m)}),(s,a)=>(r(),A(P,{fluid:"",class:"py-6 repos-page"},{default:F(()=>[n("div",z,[a[0]||(a[0]=n("h1",{class:"text-h4 font-weight-bold mb-0"},"All Repos",-1)),l.value?(r(),u("p",J,i(l.value),1)):I("",!0)]),b(k,{title:"Pending Repos",rows:g.value,"time-column-label":"Estimated Processing Time","time-field":"estimatedProcessingTime",class:"mt-8"},null,8,["rows"]),b(k,{title:"Processed Repos",rows:c.value,class:"mt-8"},null,8,["rows"])]),_:1}))}},ae=$(W,[["__scopeId","data-v-b414bbc5"]]);export{ae as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.