/
snap
/
lxd
/
current
/
share
/
lxd-ui
/
assets
/
File Upload :
llllll
Current File: //snap/lxd/current/share/lxd-ui/assets/useVolumes-BGHjBnNk.js
import{cx as h,ca as p,u as l,G as i,A as c,q as r}from"./index-B3cgCbnJ.js";import{e as d}from"./images-CA6qXE8n.js";import{f as g,b as S,e as q}from"./storage-volumes-BlpH9Ab1.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):A(s,o),A=async(s,e)=>{const o=[],a=await h(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},w=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&&!p(t)&&a.push(t)}),a},I=s=>{const{isFineGrained:e}=l(),{hasStorageVolumesAll:o}=i();return c({queryKey:[r.volumes,s],queryFn:async()=>y(s,o,e)})},b=s=>{const{isFineGrained:e}=l(),{hasStorageVolumesAll:o}=i();return c({queryKey:[r.isoVolumes,s],queryFn:async()=>F(s,o,e)})},G=(s,e)=>{const{isFineGrained:o}=l(),{hasStorageVolumesAll:a}=i();return c({queryKey:[r.customVolumes,s],queryFn:async()=>w(s,a,o),...e})},L=(s,e,o,a,n)=>{const{isFineGrained:t}=l();return c({queryKey:[r.storage,s,e,o,a,n],queryFn:async()=>q(s,e,o,a,n??null,t)})};export{G as a,I as b,L as c,b as u};
Copyright ©2k19 -
Hexid
|
Tex7ure