Buckets:
| ;exports.id=9675,exports.ids=[9675],exports.modules={17843:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(21124);c(38301);var e=c(47595),f=c(88886),g=c(6393),h=c(1279),i=c(81989),j=c(78088);function k({gpu:a}){let b,c=a=>a>=1024?`${(a/1024).toFixed(1)} GB`:`${a} MB`,k=a=>a<50?"text-emerald-500":a<80?"text-amber-500":"text-rose-500";return(0,d.jsxs)("div",{className:"bg-gray-900 rounded-xl shadow-lg overflow-hidden border border-gray-800",children:[(0,d.jsx)("div",{className:"bg-gray-800 px-4 py-3 flex items-center justify-between",children:(0,d.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,d.jsx)("h2",{className:"font-semibold text-gray-100",children:a.name}),(0,d.jsxs)("span",{className:"px-2 py-0.5 bg-gray-700 rounded-full text-xs text-gray-300",children:["# ",a.index]})]})}),(0,d.jsxs)("div",{className:"p-4 space-y-4",children:[(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,d.jsx)(e.A,{className:`w-4 h-4 ${k(a.temperature)}`}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-xs text-gray-400",children:"Temperature"}),(0,d.jsxs)("p",{className:`text-sm font-medium ${k(a.temperature)}`,children:[a.temperature,"\xb0C"]})]})]}),(0,d.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,d.jsx)(f.A,{className:"w-4 h-4 text-blue-600 dark:text-blue-400"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-xs text-gray-400",children:"Fan Speed"}),(0,d.jsxs)("p",{className:"text-sm font-medium text-blue-600 dark:text-blue-400",children:[a.fan.speed,"%"]})]})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,d.jsx)(g.A,{className:"w-4 h-4 text-gray-400"}),(0,d.jsx)("p",{className:"text-xs text-gray-400",children:"GPU Load"}),(0,d.jsxs)("span",{className:"text-xs text-gray-300 ml-auto",children:[a.utilization.gpu,"%"]})]}),(0,d.jsx)("div",{className:"w-full bg-gray-700 rounded-full h-1",children:(0,d.jsx)("div",{className:`h-1 rounded-full transition-all ${(b=a.utilization.gpu)<30?"bg-emerald-500":b<70?"bg-amber-500":"bg-rose-500"}`,style:{width:`${a.utilization.gpu}%`}})}),(0,d.jsxs)("div",{className:"flex items-center space-x-2 mb-1 mt-3",children:[(0,d.jsx)(h.A,{className:"w-4 h-4 text-blue-600 dark:text-blue-400"}),(0,d.jsx)("p",{className:"text-xs text-gray-400",children:"Memory"}),(0,d.jsxs)("span",{className:"text-xs text-gray-300 ml-auto",children:[(a.memory.used/a.memory.total*100).toFixed(1),"%"]})]}),(0,d.jsx)("div",{className:"w-full bg-gray-700 rounded-full h-1",children:(0,d.jsx)("div",{className:"h-1 rounded-full bg-blue-500 transition-all",style:{width:`${a.memory.used/a.memory.total*100}%`}})}),(0,d.jsxs)("p",{className:"text-xs text-gray-400 mt-0.5",children:[c(a.memory.used)," / ",c(a.memory.total)]})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4 pt-2 border-t border-gray-800",children:[(0,d.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,d.jsx)(i.A,{className:"w-4 h-4 text-purple-600 dark:text-purple-400"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-xs text-gray-400",children:"Clock Speed"}),(0,d.jsxs)("p",{className:"text-sm text-gray-200",children:[a.clocks.graphics," MHz"]})]})]}),(0,d.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,d.jsx)(j.A,{className:"w-4 h-4 text-amber-600 dark:text-amber-400"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-xs text-gray-400",children:"Power Draw"}),(0,d.jsxs)("p",{className:"text-sm text-gray-200",children:[a.power.draw?.toFixed(1),"W",(0,d.jsxs)("span",{className:"text-gray-400 text-xs",children:[" / ",a.power.limit?.toFixed(1)||" ? ","W"]})]})]})]})]})]})]})}},22235:(a,b,c)=>{c.d(b,{D:()=>m,V:()=>l});var d=c(21124),e=c(38301),f=c.n(e),g=c(68813),h=c.n(g),i=c(499),j=c(26531);let k=()=>{let[,a]=j._.use();return(0,d.jsx)("button",{onClick:()=>a(!0),className:"md:hidden flex items-center ml-2 mr-1 px-1 py-1 rounded-md hover:bg-gray-800","aria-label":"Open menu",children:(0,d.jsx)(i.A,{})})},l=({children:a,className:b})=>(0,d.jsxs)("div",{className:h()("absolute top-0 left-0 w-full h-12 bg-gray-900 shadow-sm z-10 flex items-center px-2 overflow-x-auto whitespace-nowrap",b),children:[(0,d.jsx)(k,{}),a||null]}),m=f().forwardRef(({children:a,className:b,style:c,belowTopBar:e},f)=>(0,d.jsx)("div",{ref:f,style:c,className:h()("px-2 sm:px-4 absolute left-0 w-full overflow-auto",e?"pt-2 top-12 bottom-0":"pt-14 top-0 h-full",b),children:a||null}));m.displayName="MainContent"},29308:(a,b,c)=>{c.d(b,{A:()=>z});var d=c(21124),e=c(3991),f=c.n(e),g=c(38301),h=c(62657),i=c(90447),j=c(21793),k=c(38438),l=c(56212),m=c(40822),n=c(42432),o=c(19518),p=c(49566),q=c(73550),r=c(11309),s=c(38232),t=c(32483),u=c(13802),v=c(50398),w=c(71471),x=c(99173),y=c(75241);function z({job:a,onRefresh:b,afterDelete:c,className:e,hideView:z,autoStartQueue:A=!1,menuAnchor:B="bottom"}){let{canStart:C,canStop:D,canDelete:E,canEdit:F,canRemoveFromQueue:G}=(0,v.O$)(a);c||(c=b);let[H,I]=(0,g.useState)(null),J=(0,g.useRef)(null),K=`${a.status}|${+!!a.stop}`,L=()=>{J.current=null,I(null)},M=async(a,b,c=!0)=>{if(!H){J.current=c?K:null,I(a);try{await b(),c||L()}catch(b){console.error(`Error running job action "${a}":`,b),L()}}},N=null!==H,O="w-5 h-5 sm:w-6 sm:h-6",P="ml-1 sm:ml-2 opacity-100 disabled:opacity-40 disabled:cursor-not-allowed",Q="px-4 py-1 rounded flex items-center gap-2",R=`${Q} cursor-pointer hover:bg-gray-800`,S=`${Q} opacity-40 cursor-not-allowed`,T=(0,d.jsx)(s.Boc,{className:`${O} animate-spin`}),U=(0,d.jsx)(s.Boc,{className:"w-4 h-4 animate-spin"});return(0,d.jsxs)("div",{className:`flex items-center flex-shrink-0 ${e??""}`,children:[C&&(0,d.jsx)(t.$,{disabled:N,onClick:()=>{C&&M("start",async()=>{await (0,v._1)(a.id),A&&await (0,w.U)(a.gpu_ids),b&&b()})},className:P,children:"start"===H?T:(0,d.jsx)(h.A,{className:O})}),G&&(0,d.jsx)(t.$,{disabled:N,onClick:()=>{G&&M("remove",async()=>{await (0,v.UH)(a.id),b&&b()})},className:P,children:"remove"===H?T:(0,d.jsx)(i.A,{className:O})}),D&&(0,d.jsx)(t.$,{disabled:N,onClick:()=>{D&&!N&&(0,u.X)({title:"Stop Job",message:`Are you sure you want to stop the job "${a.name}"? You CAN resume later.`,type:"info",confirmText:"Stop",onConfirm:()=>M("stop",async()=>{await (0,v.CC)(a.id),b&&b()})})},className:P,children:"stop"===H?T:(0,d.jsx)(j.A,{className:O})}),!z&&(0,d.jsx)(f(),{href:`/jobs/${a.id}`,className:"ml-1 sm:ml-2 text-gray-200 hover:text-gray-100 inline-block",children:(0,d.jsx)(k.A,{className:O})}),"caption"===a.job_type&&F&&(0,d.jsx)("div",{className:"ml-1 sm:ml-2 hover:text-gray-100 inline-block cursor-pointer",onClick:()=>(0,y.S)(a.job_ref||"",()=>{b&&b()},{jobId:a.id}),children:(0,d.jsx)(l.A,{className:O})}),"train"===a.job_type&&F&&(0,d.jsx)(f(),{href:`/jobs/new?id=${a.id}`,className:"ml-1 sm:ml-2 hover:text-gray-100 inline-block",children:(0,d.jsx)(l.A,{className:O})}),(0,d.jsx)(t.$,{disabled:N,onClick:()=>{if(N)return;let b=`Are you sure you want to delete the job "${a.name}"? This will also permanently remove it from your disk.`;"running"===a.status&&(b+=" WARNING: The job is currently running. You should stop it first if you can."),(0,u.X)({title:"Delete Job",message:b,type:"warning",confirmText:"Delete",onConfirm:()=>M("delete",async()=>{if("running"===a.status)try{await (0,v.CC)(a.id)}catch(a){console.error("Error stopping job before deleting:",a)}await (0,v.XX)(a.id),c&&c()})})},className:P,children:"delete"===H?T:(0,d.jsx)(m.A,{className:O})}),(0,d.jsx)("div",{className:"border-r border-1 border-gray-700 ml-1 sm:ml-2 inline"}),(0,d.jsxs)(x.W1,{children:[(0,d.jsx)(x.IU,{className:"ml-1 sm:ml-2",children:"save"===H||"sample"===H||"markStopped"===H?T:(0,d.jsx)(n.A,{className:O})}),(0,d.jsxs)(x.c,{anchor:{to:B,gap:16},className:"bg-gray-900 border border-gray-700 rounded shadow-lg w-60 px-2 py-2 z-50",children:["train"===a.job_type&&(0,d.jsx)(x.Dr,{children:(0,d.jsxs)(f(),{href:`/jobs/new?cloneId=${a.id}`,className:"cursor-pointer px-4 py-1 hover:bg-gray-800 rounded flex items-center gap-2",children:[(0,d.jsx)(o.A,{className:"w-4 h-4"}),"Clone Job"]})}),"train"===a.job_type&&D&&(0,d.jsx)(x.Dr,{disabled:N,children:(0,d.jsxs)("div",{className:N?S:R,onClick:()=>{N||M("save",async()=>{await (0,v.xK)(a.id),b&&b()},!1)},children:["save"===H?U:(0,d.jsx)(p.A,{className:"w-4 h-4"}),"Save Next Step"]})}),"train"===a.job_type&&D&&(0,d.jsx)(x.Dr,{disabled:N,children:(0,d.jsxs)("div",{className:N?S:R,onClick:()=>{N||M("sample",async()=>{await (0,v.OR)(a.id),b&&b()},!1)},children:["sample"===H?U:(0,d.jsx)(q.A,{className:"w-4 h-4"}),"Sample Next Step"]})}),(0,d.jsx)(x.Dr,{disabled:N,children:(0,d.jsxs)("div",{className:N?S:R,onClick:()=>{N||(0,u.X)({title:"Mark Job as Stopped",message:"Are you sure you want to mark this job as stopped? This will set the job status to 'stopped' if the status is hung. Only do this if you are 100% sure the job is stopped. This will NOT stop the job.",type:"warning",confirmText:"Mark as Stopped",onConfirm:()=>M("markStopped",async()=>{await (0,v.UH)(a.id),b&&b()})})},children:["markStopped"===H?U:(0,d.jsx)(r.A,{className:"w-4 h-4"}),"Mark as Stopped"]})})]})]})]})}}}; |
Xet Storage Details
- Size:
- 9.25 kB
- Xet hash:
- dc92c64fc545b588c875d20207b5c6e2882371ac9451bb414ea63cb54d0df7dd
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.