PageSourceSearch

https://www.cubieserver.de/_next/static/chunks/3620.16d74fc23dec44fa.js

js cubieserver.de collected 2026-09-25 21:57:45 UTC 3,463 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3620],{13620:(e,l,a)=>{a.r(l),a.d(l,{default:()=>c});var r=a(23798),n=a(50797),t=a(45515),s=a(84802),i=a(46001),o=a.n(i);function d(e){let{name:l,free:a,allocated:n,healthy:t}=e,{t:i}=(0,s.Bd)(),d=Math.round(n/(a+n)*100);return(0,r.jsxs)("div",{className:"flex flex-row text-theme-700 dark:text-theme-200 items-center text-xs relative h-5 w-full rounded-md bg-theme-200/50 dark:bg-theme-900/20 mt-1",children:[(0,r.jsx)("div",{className:"absolute h-5 rounded-md bg-theme-200 dark:bg-theme-900/40 z-0",style:{width:"".concat(d,"%")}}),(0,r.jsx)("span",{className:"ml-2 h-2 w-2 z-10",children:(0,r.jsx)("span",{className:o()("block w-2 h-2 rounded-sm",t?"bg-green-500":"bg-yellow-500")})}),(0,r.jsx)("div",{className:"text-xs z-10 self-center ml-2 relative h-4 grow mr-2",children:(0,r.jsx)("div",{className:"absolute w-full whitespace-nowrap text-ellipsis overflow-hidden text-left",children:l})}),(0,r.jsxs)("div",{className:"self-center text-xs flex justify-end mr-1.5 pl-1 z-10 text-ellipsis overflow-hidden whitespace-nowrap",children:[(0,r.jsx)("span",{children:"".concat(i("common.bytes",{value:n,maximumFractionDigits:1,binary:!0})," / ").concat(i("common.bytes",{value:a+n,maximumFractionDigits:1,binary:!0}))}),(0,r.jsxs)("span",{className:"pl-2",children:["(",d,"%)"]})]})]})}var u=a(82413);function c(e){let{service:l}=e,{t:a}=(0,s.Bd)(),{widget:i}=l,{data:o,error:c}=(0,u.A)(i,"alerts"),{data:m,error:h}=(0,u.A)(i,"status"),{data:v,error:x}=(0,u.A)(i,(null==i?void 0:i.enablePools)?"pools":""),{data:p,error:f}=(0,u.A)(i,(null==i?void 0:i.enablePools)?"dataset":"");if(c||h||x){var b,j;let e=null!=(j=null!=(b=null!=c?c:h)?b:x)?j:f;return(0,r.jsx)(t.A,{service:l,error:e})}if(!o||!m||(null==i?void 0:i.enablePools)&&(!v||!p))return(0,r.jsxs)(t.A,{service:l,children:[(0,r.jsx)(n.A,{label:"truenas.load"}),(0,r.jsx)(n.A,{label:"truenas.uptime"}),(0,r.jsx)(n.A,{label:"truenas.alerts"})]});let g=[],y=Array.isArray(v)&&v.length>0&&Array.isArray(p)&&p.length>0;return y&&(g=v.map(e=>{var l,a;let r=p.find(l=>l.pool===e.name&&l.name===e.name);return{id:e.id,name:e.name,healthy:e.healthy,allocated:null!=(l=null==r?void 0:r.used.parsed)?l:0,free:null!=(a=null==r?void 0:r.available.parsed)?a:0}})),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.A,{service:l,children:[(0,r.jsx)(n.A,{label:"truenas.load",value:a("common.number",{value:m.loadavg[0]})}),(0,r.jsx)(n.A,{label:"truenas.uptime",value:a("common.duration",{value:m.uptime_seconds})}),(0,r.jsx)(n.A,{label:"truenas.alerts",value:a("common.number",{value:o.pending})})]}),y&&g.sort((e,l)=>e.name.localeCompare(l.name)).map(e=>(0,r.jsx)(d,{name:e.name,healthy:e.healthy,allocated:e.allocated,free:e.free},e.id))]})}},82413:(e,l,a)=>{a.d(l,{A:()=>t});var r=a(59650),n=a(84826);function t(e){for(var l,a,t=arguments.length,s=Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];let o={};s&&(null==(l=s[1])?void 0:l.refreshInterval)&&(o.refreshInterval=s[1].refreshInterval);let d=(0,n.$C)(e,...s);""===s[0]&&(d=null);let{data:u,error:c,mutate:m}=(0,r.Ay)(d,o);return{data:u,error:null!=(a=null==u?void 0:u.error)?a:c,mutate:m}}},84826:(e,l,a)=>{function r(e,l){let a=new URLSearchParams({group:e.service_group,service:e.service_name,index:e.index});return l&&a.append("endpoint",l),a}function n(e,l,a){let n=r(e,l);return a&&n.append("query",JSON.stringify(a)),"/api/services/proxy?".concat(n.toString())}a.d(l,{$C:()=>n,_V:()=>r})}}]);

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.