Your IP : 216.73.216.189


Current Path : /proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets/
Upload File :
Current File : //proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets/StoragePoolSize-ChYxPd_8.js

import{S,ae as v,w as y,j as n,a0 as u,c1 as x}from"./index-BFGypnt-.js";import{M as j}from"./Meter-VGEmUMfL.js";import{l as g,q as C,r as $}from"./useStoragePools-qBtKr1j9.js";const z=(e,r)=>{const t=S(),s=g(e?.driver??"")&&t,c=C(e?.name,r,s),i=v({queryKey:[y.storage,e?.name,y.resources,r?.server_name],queryFn:async()=>$(e?.name??""),enabled:!!e&&!s});return s?c:i},P=({pool:e,hasMeterBar:r,member:t,forceSingleLine:s})=>{const c=S(),i=g(e.driver)&&c,{data:h}=z(e,t),m=x(h);return i&&s&&!t&&m.length>1?"Cluster member dependent":n.jsx("div",{children:m.map((a,l)=>{if(!a)return n.jsx("div",{children:e.config?.size},`empty-${l}`);const o=a.space.total,d=a.space.used||0,f=a.memberName||`resource-${l}`;return r?n.jsx(j,{percentage:100/o*d||0,text:`${u(d)} of ${u(o)} used`},f):n.jsx("div",{children:`${u(d)} of ${u(o)} used`},f)})})};export{P as S,z as u};