/
snap
/
lxd
/
current
/
share
/
lxd-ui
/
assets
/
File Upload :
llllll
Current File: //snap/lxd/current/share/lxd-ui/assets/StorageUsedBy-DczqZZyc.js
import{aX as a,j as s,bT as h}from"./index-dL2n30-Z.js";import{E as r}from"./ExpandableList-Cjp4v1_P.js";import{U as c}from"./UsedByItem-Ber64JUd.js";import{g as m}from"./storageBucket-Bz2jIa5m.js";const j="Instances",p="Profiles",l="Images",d="Snapshots",x="Custom volumes",u="Buckets",S=({storage:n,project:o})=>{const t={[j]:a("instance",n.used_by),[p]:a("profile",n.used_by),[l]:a("image",n.used_by),[d]:a("snapshot",n.used_by),[x]:a("volume",n.used_by),[u]:a("bucket",n.used_by)};return s.jsx("table",{children:s.jsxs("tbody",{children:[s.jsxs("tr",{children:[s.jsxs("th",{className:"u-text--muted",children:["Instances (",t[j].length,")"]}),s.jsx("td",{children:s.jsx(r,{items:t[j].map(e=>s.jsx(c,{item:e,activeProject:o,type:"instance",to:`/ui/project/${encodeURIComponent(e.project)}/instance/${encodeURIComponent(e.name)}`},`${e.name}-${e.project}`))})})]}),s.jsxs("tr",{children:[s.jsxs("th",{className:"u-text--muted",children:["Profiles (",t[p].length,")"]}),s.jsx("td",{children:s.jsx(r,{items:t[p].map(e=>s.jsx(c,{item:e,activeProject:o,type:"profile",to:`/ui/project/${encodeURIComponent(e.project)}/profile/${encodeURIComponent(e.name)}`},`${e.name}-${e.project}`))})})]}),s.jsxs("tr",{children:[s.jsxs("th",{className:"u-text--muted",children:["Images (",t[l].length,")"]}),s.jsx("td",{children:s.jsx(r,{items:t[l].map(e=>s.jsx(c,{item:e,activeProject:o,type:"image",to:`/ui/project/${encodeURIComponent(e.project)}/images`},`${e.name}-${e.project}`))})})]}),s.jsxs("tr",{children:[s.jsxs("th",{className:"u-text--muted",children:["Snapshots (",t[d].length,")"]}),s.jsx("td",{children:s.jsx(r,{items:t[d].map(e=>s.jsxs(s.Fragment,{children:[e.instance&&s.jsx(c,{item:e,activeProject:o,type:"snapshot",to:`/ui/project/${encodeURIComponent(e.project)}/instance/${encodeURIComponent(e.instance)}/snapshots`},`${e.instance}-${e.name}-${e.project}`),e.volume&&s.jsx(c,{item:e,activeProject:o,type:"snapshot",to:`${h({name:e.volume,project:e.project,pool:n.name,type:"custom",location:e.target??""})}/snapshots`},`${e.volume}-${e.name}-${e.project}-${e.target}`)]}))})})]}),s.jsxs("tr",{children:[s.jsxs("th",{className:"u-text--muted",children:["Custom volumes (",t[x].length,")"]}),s.jsx("td",{children:s.jsx(r,{items:t[x].map(e=>s.jsx(c,{item:e,activeProject:o,type:"volume",to:h({name:e.name,project:e.project,pool:n.name,type:"custom",location:e.target??""})},`${e.name}-${e.project}-${e.target}`))})})]}),s.jsxs("tr",{children:[s.jsxs("th",{className:"u-text--muted",children:["Buckets (",t[u].length,")"]}),s.jsx("td",{children:s.jsx(r,{items:t[u].map(e=>s.jsx(c,{item:e,activeProject:o,type:"bucket",to:m(e.name,n.name,e.project)},`${e.name}-${e.project}`))})})]})]})})};export{S};
Copyright ©2k19 -
Hexid
|
Tex7ure