| Current Path : /snap/lxd/38768/share/lxd-ui/assets/ |
| Current File : //snap/lxd/38768/share/lxd-ui/assets/network-acls-bpCzo6oH.js |
import{R as s,O as o,cG as p,cH as c,cI as m}from"./index-BsQN_SZU.js";const r=["can_edit","can_delete"],d=async(t,n)=>{const e=new URLSearchParams;return e.set("project",t),e.set("recursion","1"),c(e,n,r),fetch(`${s}/1.0/network-acls?${e.toString()}`).then(o).then(a=>a.metadata)},l=async(t,n,e)=>{const a=new URLSearchParams;return a.set("project",n),a.set("recursion","1"),c(a,e,r),fetch(`${s}/1.0/network-acls/${encodeURIComponent(t)}?${a.toString()}`).then(m).then(h=>h)},w=async(t,n)=>{const e=new URLSearchParams;return e.set("project",n),fetch(`${s}/1.0/network-acls/${encodeURIComponent(t)}/log?${e.toString()}`).then(p).then(a=>a)},S=async(t,n)=>{const e=new URLSearchParams;e.set("project",n),await fetch(`${s}/1.0/network-acls?${e.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(o)},$=async(t,n,e)=>{const a=new URLSearchParams;a.set("project",e),await fetch(`${s}/1.0/network-acls/${encodeURIComponent(t)}?${a.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n})}).then(o)},R=async(t,n)=>{const e=new URLSearchParams;e.set("project",n),await fetch(`${s}/1.0/network-acls/${encodeURIComponent(t.name)}?${e.toString()}`,{method:"PUT",body:JSON.stringify(t),headers:{"Content-Type":"application/json","If-Match":t.etag??""}}).then(o)},f=async(t,n)=>{const e=new URLSearchParams;e.set("project",n),await fetch(`${s}/1.0/network-acls/${encodeURIComponent(t)}?${e.toString()}`,{method:"DELETE"}).then(o)};export{d as a,l as b,S as c,f as d,w as f,$ as r,R as u};