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/useVolumes-CXLHz-Wc.js

import{cT as h,u as l,K as i,ae as r,w as c}from"./index-BFGypnt-.js";import{o as p}from"./useStoragePools-qBtKr1j9.js";import{k as d}from"./images-C6WqBeZG.js";import{f as g,b as S,d as q}from"./storage-volumes-CNe_c3nC.js";const F=async(s,e,o)=>{const a=[];return(await y(s,e,o)).forEach(t=>{if(t.content_type==="iso"){const u=d(t);a.push(u)}}),a},y=async(s,e,o)=>e?g(s,o):w(s,o),w=async(s,e)=>{const o=[],a=await p(e);return(await Promise.allSettled(a.map(async t=>S(t.name,s,e)))).forEach((t,u)=>{if(t.status==="fulfilled"){const m=a[u],V=t.value.map(f=>({...f,pool:m.name}));o.push(...V)}else throw new Error("Failed to load iso images")}),o},A=async(s,e,o)=>{const a=[];return(await y(s,e,o)).forEach(t=>{const m=["filesystem","block"].includes(t.content_type);t.type==="custom"&&m&&!h(t)&&a.push(t)}),a},T=s=>{const{isFineGrained:e}=l(),{hasStorageVolumesAll:o}=i();return r({queryKey:[c.volumes,s],queryFn:async()=>y(s,o,e)})},b=s=>{const{isFineGrained:e}=l(),{hasStorageVolumesAll:o}=i();return r({queryKey:[c.isoVolumes,s],queryFn:async()=>F(s,o,e)})},k=(s,e)=>{const{isFineGrained:o}=l(),{hasStorageVolumesAll:a}=i();return r({queryKey:[c.customVolumes,s],queryFn:async()=>A(s,a,o),...e})},L=(s,e,o,a,n)=>{const{isFineGrained:t}=l();return r({queryKey:[c.storage,s,e,o,a,n],queryFn:async()=>q(s,e,o,a,n??null,t)})};export{k as a,T as b,L as c,b as u};